summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359.tar.gz
tdenetwork-47c8a359.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--dcoprss/article.cpp6
-rw-r--r--dcoprss/cache.cpp46
-rw-r--r--dcoprss/cache.h30
-rw-r--r--dcoprss/client.cpp34
-rw-r--r--dcoprss/document.cpp66
-rw-r--r--dcoprss/feedbrowser.cpp62
-rw-r--r--dcoprss/feedbrowser.h28
-rw-r--r--dcoprss/query.cpp90
-rw-r--r--dcoprss/query.h38
-rw-r--r--dcoprss/rssnewsfeed.h94
-rw-r--r--dcoprss/service.cpp22
-rw-r--r--dcoprss/service.h82
-rw-r--r--dcoprss/xmlrpciface.cpp202
-rw-r--r--dcoprss/xmlrpciface.h132
-rw-r--r--filesharing/advanced/kcm_sambaconf/common.cpp14
-rw-r--r--filesharing/advanced/kcm_sambaconf/common.h6
-rw-r--r--filesharing/advanced/kcm_sambaconf/dictmanager.cpp66
-rw-r--r--filesharing/advanced/kcm_sambaconf/dictmanager.h24
-rw-r--r--filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp18
-rw-r--r--filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h16
-rw-r--r--filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp146
-rw-r--r--filesharing/advanced/kcm_sambaconf/hiddenfileview.h38
-rw-r--r--filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h2
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h4
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp234
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmsambaconf.h32
-rw-r--r--filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp36
-rw-r--r--filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h14
-rw-r--r--filesharing/advanced/kcm_sambaconf/passwd.cpp24
-rw-r--r--filesharing/advanced/kcm_sambaconf/passwd.h22
-rw-r--r--filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp42
-rw-r--r--filesharing/advanced/kcm_sambaconf/printerdlgimpl.h2
-rw-r--r--filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp36
-rw-r--r--filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h16
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambafile.cpp154
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambafile.h60
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambashare.cpp82
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambashare.h64
-rw-r--r--filesharing/advanced/kcm_sambaconf/share.ui.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp84
-rw-r--r--filesharing/advanced/kcm_sambaconf/sharedlgimpl.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp26
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp52
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbpasswdfile.h22
-rw-r--r--filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h14
-rw-r--r--filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h10
-rw-r--r--filesharing/advanced/kcm_sambaconf/usertabimpl.cpp154
-rw-r--r--filesharing/advanced/kcm_sambaconf/usertabimpl.h48
-rw-r--r--filesharing/advanced/nfs/nfsdialog.cpp50
-rw-r--r--filesharing/advanced/nfs/nfsdialog.h6
-rw-r--r--filesharing/advanced/nfs/nfsentry.cpp46
-rw-r--r--filesharing/advanced/nfs/nfsentry.h46
-rw-r--r--filesharing/advanced/nfs/nfsfile.cpp46
-rw-r--r--filesharing/advanced/nfs/nfsfile.h12
-rw-r--r--filesharing/advanced/nfs/nfshostdlg.cpp38
-rw-r--r--filesharing/advanced/nfs/nfshostdlg.h10
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.cpp70
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.h14
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp28
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h2
-rw-r--r--filesharing/simple/fileshare.cpp116
-rw-r--r--filesharing/simple/fileshare.h14
-rw-r--r--filesharing/simple/groupconfigdlg.cpp132
-rw-r--r--filesharing/simple/groupconfigdlg.h16
-rw-r--r--filesharing/simple/groupconfiggui.ui.h2
-rw-r--r--filesharing/simple/krichtextlabel.cpp42
-rw-r--r--filesharing/simple/krichtextlabel.h18
-rw-r--r--kdict/actions.cpp56
-rw-r--r--kdict/actions.h44
-rw-r--r--kdict/applet/kdictapplet.cpp120
-rw-r--r--kdict/applet/kdictapplet.h26
-rw-r--r--kdict/application.cpp4
-rw-r--r--kdict/application.h4
-rw-r--r--kdict/dcopinterface.h18
-rw-r--r--kdict/dict.cpp100
-rw-r--r--kdict/dict.h56
-rw-r--r--kdict/matchview.cpp144
-rw-r--r--kdict/matchview.h48
-rw-r--r--kdict/options.cpp254
-rw-r--r--kdict/options.h124
-rw-r--r--kdict/queryview.cpp142
-rw-r--r--kdict/queryview.h46
-rw-r--r--kdict/sets.cpp78
-rw-r--r--kdict/sets.h10
-rw-r--r--kdict/toplevel.cpp174
-rw-r--r--kdict/toplevel.h36
-rw-r--r--kdnssd/ioslave/dnssd.cpp62
-rw-r--r--kdnssd/ioslave/dnssd.h30
-rw-r--r--kdnssd/kdedmodule/dnssdwatcher.cpp14
-rw-r--r--kdnssd/kdedmodule/dnssdwatcher.h14
-rw-r--r--kdnssd/kdedmodule/watcher.cpp16
-rw-r--r--kdnssd/kdedmodule/watcher.h10
-rw-r--r--kfile-plugins/torrent/bbase.h6
-rw-r--r--kfile-plugins/torrent/bdict.cpp22
-rw-r--r--kfile-plugins/torrent/bdict.h22
-rw-r--r--kfile-plugins/torrent/bint.cpp18
-rw-r--r--kfile-plugins/torrent/bint.h10
-rw-r--r--kfile-plugins/torrent/blist.cpp6
-rw-r--r--kfile-plugins/torrent/blist.h16
-rw-r--r--kfile-plugins/torrent/bstring.cpp22
-rw-r--r--kfile-plugins/torrent/bstring.h28
-rw-r--r--kfile-plugins/torrent/bytetape.cpp2
-rw-r--r--kfile-plugins/torrent/bytetape.h14
-rw-r--r--kfile-plugins/torrent/kfile_torrent.cpp72
-rw-r--r--kfile-plugins/torrent/kfile_torrent.h2
-rw-r--r--kget/dlgAdvanced.cpp8
-rw-r--r--kget/dlgAdvanced.h2
-rw-r--r--kget/dlgAutomation.cpp10
-rw-r--r--kget/dlgAutomation.h8
-rw-r--r--kget/dlgConnection.cpp10
-rw-r--r--kget/dlgConnection.h4
-rw-r--r--kget/dlgDirectories.cpp52
-rw-r--r--kget/dlgDirectories.h4
-rw-r--r--kget/dlgIndividual.cpp70
-rw-r--r--kget/dlgIndividual.h26
-rw-r--r--kget/dlgLimits.cpp6
-rw-r--r--kget/dlgLimits.h2
-rw-r--r--kget/dlgPreferences.cpp34
-rw-r--r--kget/dlgPreferences.h6
-rw-r--r--kget/dlgSystem.cpp10
-rw-r--r--kget/dlgSystem.h2
-rw-r--r--kget/dockindividual.cpp12
-rw-r--r--kget/dockindividual.h4
-rw-r--r--kget/docking.cpp28
-rw-r--r--kget/docking.h20
-rw-r--r--kget/droptarget.cpp44
-rw-r--r--kget/droptarget.h22
-rw-r--r--kget/kfileio.cpp52
-rw-r--r--kget/kfileio.h6
-rw-r--r--kget/kget_iface.h6
-rw-r--r--kget/kget_plug_in/kget_linkview.cpp38
-rw-r--r--kget/kget_plug_in/kget_linkview.h14
-rw-r--r--kget/kget_plug_in/kget_plug_in.cpp22
-rw-r--r--kget/kget_plug_in/kget_plug_in.h10
-rw-r--r--kget/kget_plug_in/links.cpp4
-rw-r--r--kget/kget_plug_in/links.h6
-rw-r--r--kget/kmainwidget.cpp246
-rw-r--r--kget/kmainwidget.h28
-rw-r--r--kget/logwindow.cpp72
-rw-r--r--kget/logwindow.h24
-rw-r--r--kget/main.cpp6
-rw-r--r--kget/safedelete.cpp4
-rw-r--r--kget/settings.cpp22
-rw-r--r--kget/settings.h28
-rw-r--r--kget/slave.cpp32
-rw-r--r--kget/slave.h24
-rw-r--r--kget/slaveevent.cpp10
-rw-r--r--kget/slaveevent.h8
-rw-r--r--kget/transfer.cpp66
-rw-r--r--kget/transfer.h26
-rw-r--r--kget/transferlist.cpp34
-rw-r--r--kget/transferlist.h30
-rw-r--r--knewsticker/common/configaccess.cpp482
-rw-r--r--knewsticker/common/configaccess.h60
-rw-r--r--knewsticker/common/configiface.h16
-rw-r--r--knewsticker/common/newsengine.cpp42
-rw-r--r--knewsticker/common/newsengine.h46
-rw-r--r--knewsticker/common/newsiconmgr.cpp74
-rw-r--r--knewsticker/common/newsiconmgr.h22
-rw-r--r--knewsticker/common/xmlnewsaccess.cpp52
-rw-r--r--knewsticker/common/xmlnewsaccess.h32
-rw-r--r--knewsticker/knewsticker.cpp122
-rw-r--r--knewsticker/knewsticker.h28
-rw-r--r--knewsticker/knewstickerconfig.cpp188
-rw-r--r--knewsticker/knewstickerconfig.h44
-rw-r--r--knewsticker/knewstickerstub/knewstickerstub.cpp10
-rw-r--r--knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp42
-rw-r--r--knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h10
-rw-r--r--knewsticker/newsscroller.cpp126
-rw-r--r--knewsticker/newsscroller.h44
-rw-r--r--knewsticker/newssourcedlgimpl.cpp72
-rw-r--r--knewsticker/newssourcedlgimpl.h18
-rw-r--r--kopete/kopete/addaccountwizard/addaccountwizard.cpp44
-rw-r--r--kopete/kopete/addaccountwizard/addaccountwizard.h10
-rw-r--r--kopete/kopete/addcontactwizard/addcontactwizard.cpp76
-rw-r--r--kopete/kopete/addcontactwizard/addcontactwizard.h20
-rw-r--r--kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp32
-rw-r--r--kopete/kopete/addcontactwizard/fastaddcontactwizard.h14
-rw-r--r--kopete/kopete/chatwindow/chatmemberslistwidget.cpp74
-rw-r--r--kopete/kopete/chatwindow/chatmemberslistwidget.h20
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.cpp366
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.h36
-rw-r--r--kopete/kopete/chatwindow/chattexteditpart.cpp114
-rw-r--r--kopete/kopete/chatwindow/chattexteditpart.h16
-rw-r--r--kopete/kopete/chatwindow/chatview.cpp252
-rw-r--r--kopete/kopete/chatwindow/chatview.h54
-rw-r--r--kopete/kopete/chatwindow/emoticonselector.cpp50
-rw-r--r--kopete/kopete/chatwindow/emoticonselector.h28
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.cpp294
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.h36
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstyle.cpp148
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstyle.h36
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp68
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstylemanager.h16
-rw-r--r--kopete/kopete/chatwindow/kopeteemailwindow.cpp156
-rw-r--r--kopete/kopete/chatwindow/kopeteemailwindow.h8
-rw-r--r--kopete/kopete/chatwindow/kopeteemoticonaction.cpp46
-rw-r--r--kopete/kopete/chatwindow/kopeteemoticonaction.h8
-rw-r--r--kopete/kopete/chatwindow/krichtexteditpart.cpp128
-rw-r--r--kopete/kopete/chatwindow/krichtexteditpart.h32
-rw-r--r--kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp34
-rw-r--r--kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp98
-rw-r--r--kopete/kopete/config/accounts/kopeteaccountconfig.cpp48
-rw-r--r--kopete/kopete/config/accounts/kopeteaccountconfig.h8
-rw-r--r--kopete/kopete/config/appearance/appearanceconfig.cpp290
-rw-r--r--kopete/kopete/config/appearance/appearanceconfig.h8
-rw-r--r--kopete/kopete/config/appearance/emoticonseditdialog.cpp102
-rw-r--r--kopete/kopete/config/appearance/emoticonseditdialog.h28
-rw-r--r--kopete/kopete/config/appearance/tooltipeditdialog.cpp72
-rw-r--r--kopete/kopete/config/appearance/tooltipeditdialog.h8
-rw-r--r--kopete/kopete/config/avdevice/avdeviceconfig.cpp52
-rw-r--r--kopete/kopete/config/avdevice/avdeviceconfig.h20
-rw-r--r--kopete/kopete/config/behavior/behaviorconfig.cpp166
-rw-r--r--kopete/kopete/config/behavior/behaviorconfig.h8
-rw-r--r--kopete/kopete/config/identity/globalidentitiesmanager.cpp72
-rw-r--r--kopete/kopete/config/identity/globalidentitiesmanager.h26
-rw-r--r--kopete/kopete/config/identity/kopeteidentityconfig.cpp130
-rw-r--r--kopete/kopete/config/identity/kopeteidentityconfig.h6
-rw-r--r--kopete/kopete/config/plugins/kopetepluginconfig.cpp16
-rw-r--r--kopete/kopete/config/plugins/kopetepluginconfig.h2
-rw-r--r--kopete/kopete/contactlist/customnotificationprops.cpp28
-rw-r--r--kopete/kopete/contactlist/customnotificationprops.h6
-rw-r--r--kopete/kopete/contactlist/kabcexport.cpp60
-rw-r--r--kopete/kopete/contactlist/kabcexport.h8
-rw-r--r--kopete/kopete/contactlist/kopeteaddrbookexport.cpp46
-rw-r--r--kopete/kopete/contactlist/kopeteaddrbookexport.h18
-rw-r--r--kopete/kopete/contactlist/kopetecontactlistview.cpp352
-rw-r--r--kopete/kopete/contactlist/kopetecontactlistview.h62
-rw-r--r--kopete/kopete/contactlist/kopetegrouplistaction.cpp18
-rw-r--r--kopete/kopete/contactlist/kopetegrouplistaction.h6
-rw-r--r--kopete/kopete/contactlist/kopetegroupviewitem.cpp36
-rw-r--r--kopete/kopete/contactlist/kopetegroupviewitem.h16
-rw-r--r--kopete/kopete/contactlist/kopetelviprops.cpp148
-rw-r--r--kopete/kopete/contactlist/kopetelviprops.h10
-rw-r--r--kopete/kopete/contactlist/kopetemetacontactlvi.cpp226
-rw-r--r--kopete/kopete/contactlist/kopetemetacontactlvi.h40
-rw-r--r--kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp6
-rw-r--r--kopete/kopete/contactlist/kopetestatusgroupviewitem.h4
-rw-r--r--kopete/kopete/kconf_update/kopete-account-kconf_update.cpp64
-rw-r--r--kopete/kopete/kconf_update/kopete-nameTracking.cpp74
-rw-r--r--kopete/kopete/kconf_update/kopete-pluginloader2.cpp30
-rw-r--r--kopete/kopete/kimiface.h48
-rw-r--r--kopete/kopete/kimifaceimpl.cpp120
-rw-r--r--kopete/kopete/kimifaceimpl.h50
-rw-r--r--kopete/kopete/kopeteaccountstatusbaricon.cpp20
-rw-r--r--kopete/kopete/kopeteaccountstatusbaricon.h14
-rw-r--r--kopete/kopete/kopeteapplication.cpp44
-rw-r--r--kopete/kopete/kopeteapplication.h6
-rw-r--r--kopete/kopete/kopeteballoon.cpp104
-rw-r--r--kopete/kopete/kopeteballoon.h14
-rw-r--r--kopete/kopete/kopeteeditglobalidentitywidget.cpp74
-rw-r--r--kopete/kopete/kopeteeditglobalidentitywidget.h14
-rw-r--r--kopete/kopete/kopeteiface.cpp78
-rw-r--r--kopete/kopete/kopeteiface.h50
-rw-r--r--kopete/kopete/kopetewindow.cpp304
-rw-r--r--kopete/kopete/kopetewindow.h54
-rw-r--r--kopete/kopete/systemtray.cpp92
-rw-r--r--kopete/kopete/systemtray.h32
-rw-r--r--kopete/libkopete/avdevice/kxv.cpp32
-rw-r--r--kopete/libkopete/avdevice/kxv.h40
-rw-r--r--kopete/libkopete/avdevice/qvideo.cpp4
-rw-r--r--kopete/libkopete/avdevice/qvideostream.cpp82
-rw-r--r--kopete/libkopete/avdevice/qvideostream.h24
-rw-r--r--kopete/libkopete/avdevice/videocontrol.h6
-rw-r--r--kopete/libkopete/avdevice/videodevice.cpp44
-rw-r--r--kopete/libkopete/avdevice/videodevice.h36
-rw-r--r--kopete/libkopete/avdevice/videodevicemodelpool.cpp2
-rw-r--r--kopete/libkopete/avdevice/videodevicemodelpool.h10
-rw-r--r--kopete/libkopete/avdevice/videodevicepool.cpp78
-rw-r--r--kopete/libkopete/avdevice/videodevicepool.h16
-rw-r--r--kopete/libkopete/avdevice/videoinput.h8
-rw-r--r--kopete/libkopete/clientiface.h14
-rw-r--r--kopete/libkopete/compat/kpixmapregionselectordialog.cpp50
-rw-r--r--kopete/libkopete/compat/kpixmapregionselectordialog.h12
-rw-r--r--kopete/libkopete/compat/kpixmapregionselectorwidget.cpp104
-rw-r--r--kopete/libkopete/compat/kpixmapregionselectorwidget.h40
-rw-r--r--kopete/libkopete/connectionmanager.cpp18
-rw-r--r--kopete/libkopete/connectionmanager.h16
-rw-r--r--kopete/libkopete/kabcpersistence.cpp96
-rw-r--r--kopete/libkopete/kabcpersistence.h6
-rw-r--r--kopete/libkopete/kautoconfig.cpp224
-rw-r--r--kopete/libkopete/kautoconfig.h44
-rw-r--r--kopete/libkopete/kcautoconfigmodule.cpp30
-rw-r--r--kopete/libkopete/kcautoconfigmodule.h14
-rw-r--r--kopete/libkopete/knotification.cpp150
-rw-r--r--kopete/libkopete/knotification.h40
-rw-r--r--kopete/libkopete/kopeteaccount.cpp116
-rw-r--r--kopete/libkopete/kopeteaccount.h64
-rw-r--r--kopete/libkopete/kopeteaccountmanager.cpp84
-rw-r--r--kopete/libkopete/kopeteaccountmanager.h22
-rw-r--r--kopete/libkopete/kopeteaway.cpp52
-rw-r--r--kopete/libkopete/kopeteaway.h24
-rw-r--r--kopete/libkopete/kopeteawayaction.cpp42
-rw-r--r--kopete/libkopete/kopeteawayaction.h18
-rw-r--r--kopete/libkopete/kopeteawaydialog.cpp10
-rw-r--r--kopete/libkopete/kopeteawaydialog.h8
-rw-r--r--kopete/libkopete/kopeteblacklister.cpp26
-rw-r--r--kopete/libkopete/kopeteblacklister.h18
-rw-r--r--kopete/libkopete/kopetechatsession.cpp92
-rw-r--r--kopete/libkopete/kopetechatsession.h32
-rw-r--r--kopete/libkopete/kopetechatsessionmanager.cpp44
-rw-r--r--kopete/libkopete/kopetechatsessionmanager.h18
-rw-r--r--kopete/libkopete/kopetecommandhandler.cpp152
-rw-r--r--kopete/libkopete/kopetecommandhandler.h60
-rw-r--r--kopete/libkopete/kopetecontact.cpp220
-rw-r--r--kopete/libkopete/kopetecontact.h76
-rw-r--r--kopete/libkopete/kopetecontactlist.cpp496
-rw-r--r--kopete/libkopete/kopetecontactlist.h66
-rw-r--r--kopete/libkopete/kopetecontactlistelement.cpp120
-rw-r--r--kopete/libkopete/kopetecontactlistelement.h30
-rw-r--r--kopete/libkopete/kopetecontactproperty.cpp20
-rw-r--r--kopete/libkopete/kopetecontactproperty.h26
-rw-r--r--kopete/libkopete/kopeteeventpresentation.cpp18
-rw-r--r--kopete/libkopete/kopeteeventpresentation.h12
-rw-r--r--kopete/libkopete/kopeteglobal.cpp92
-rw-r--r--kopete/libkopete/kopeteglobal.h18
-rw-r--r--kopete/libkopete/kopetegroup.cpp80
-rw-r--r--kopete/libkopete/kopetegroup.h20
-rw-r--r--kopete/libkopete/kopetemessage.cpp262
-rw-r--r--kopete/libkopete/kopetemessage.h82
-rw-r--r--kopete/libkopete/kopetemessageevent.cpp6
-rw-r--r--kopete/libkopete/kopetemessageevent.h4
-rw-r--r--kopete/libkopete/kopetemessagehandler.cpp6
-rw-r--r--kopete/libkopete/kopetemessagehandler.h8
-rw-r--r--kopete/libkopete/kopetemessagehandlerchain.cpp16
-rw-r--r--kopete/libkopete/kopetemessagehandlerchain.h4
-rw-r--r--kopete/libkopete/kopetemetacontact.cpp334
-rw-r--r--kopete/libkopete/kopetemetacontact.h72
-rw-r--r--kopete/libkopete/kopetemimesourcefactory.cpp32
-rw-r--r--kopete/libkopete/kopetemimesourcefactory.h4
-rw-r--r--kopete/libkopete/kopetemimetypehandler.cpp40
-rw-r--r--kopete/libkopete/kopetemimetypehandler.h16
-rw-r--r--kopete/libkopete/kopetenotifydataobject.cpp86
-rw-r--r--kopete/libkopete/kopetenotifydataobject.h16
-rw-r--r--kopete/libkopete/kopetenotifyevent.cpp34
-rw-r--r--kopete/libkopete/kopetenotifyevent.h10
-rw-r--r--kopete/libkopete/kopeteonlinestatus.cpp50
-rw-r--r--kopete/libkopete/kopeteonlinestatus.h42
-rw-r--r--kopete/libkopete/kopeteonlinestatusmanager.cpp90
-rw-r--r--kopete/libkopete/kopeteonlinestatusmanager.h16
-rw-r--r--kopete/libkopete/kopetepassword.cpp98
-rw-r--r--kopete/libkopete/kopetepassword.h28
-rw-r--r--kopete/libkopete/kopetepasswordedaccount.cpp22
-rw-r--r--kopete/libkopete/kopetepasswordedaccount.h10
-rw-r--r--kopete/libkopete/kopetepicture.cpp50
-rw-r--r--kopete/libkopete/kopetepicture.h40
-rw-r--r--kopete/libkopete/kopeteplugin.cpp30
-rw-r--r--kopete/libkopete/kopeteplugin.h26
-rw-r--r--kopete/libkopete/kopetepluginmanager.cpp124
-rw-r--r--kopete/libkopete/kopetepluginmanager.h30
-rw-r--r--kopete/libkopete/kopeteprefs.cpp92
-rw-r--r--kopete/libkopete/kopeteprefs.h108
-rw-r--r--kopete/libkopete/kopeteproperties.cpp12
-rw-r--r--kopete/libkopete/kopeteproperties.h42
-rw-r--r--kopete/libkopete/kopeteprotocol.cpp98
-rw-r--r--kopete/libkopete/kopeteprotocol.h16
-rw-r--r--kopete/libkopete/kopetesimplemessagehandler.cpp8
-rw-r--r--kopete/libkopete/kopetesimplemessagehandler.h2
-rw-r--r--kopete/libkopete/kopetetask.cpp26
-rw-r--r--kopete/libkopete/kopetetask.h12
-rw-r--r--kopete/libkopete/kopetetransfermanager.cpp48
-rw-r--r--kopete/libkopete/kopetetransfermanager.h44
-rw-r--r--kopete/libkopete/kopeteuiglobal.cpp8
-rw-r--r--kopete/libkopete/kopeteuiglobal.h6
-rw-r--r--kopete/libkopete/kopeteutils.cpp52
-rw-r--r--kopete/libkopete/kopeteutils.h36
-rw-r--r--kopete/libkopete/kopetewalletmanager.cpp26
-rw-r--r--kopete/libkopete/kopetewalletmanager.h4
-rw-r--r--kopete/libkopete/managedconnectionaccount.cpp14
-rw-r--r--kopete/libkopete/managedconnectionaccount.h10
-rw-r--r--kopete/libkopete/networkstatuscommon.cpp4
-rw-r--r--kopete/libkopete/networkstatuscommon.h12
-rw-r--r--kopete/libkopete/private/kopetecommand.cpp34
-rw-r--r--kopete/libkopete/private/kopetecommand.h30
-rw-r--r--kopete/libkopete/private/kopeteemoticons.cpp170
-rw-r--r--kopete/libkopete/private/kopeteemoticons.h36
-rw-r--r--kopete/libkopete/private/kopeteutils_private.cpp6
-rw-r--r--kopete/libkopete/private/kopeteutils_private.h14
-rw-r--r--kopete/libkopete/private/kopeteviewmanager.cpp62
-rw-r--r--kopete/libkopete/private/kopeteviewmanager.h2
-rw-r--r--kopete/libkopete/tests/kopetecontactlist_test.cpp10
-rw-r--r--kopete/libkopete/tests/kopeteemoticontest.cpp42
-rw-r--r--kopete/libkopete/tests/kopetemessage_test.cpp110
-rw-r--r--kopete/libkopete/tests/kopetepasswordtest_program.cpp32
-rw-r--r--kopete/libkopete/tests/kopetepasswordtest_program.h6
-rw-r--r--kopete/libkopete/tests/kopetepropertiestest.cpp12
-rw-r--r--kopete/libkopete/tests/kopetewallettest_program.cpp24
-rw-r--r--kopete/libkopete/tests/kopetewallettest_program.h2
-rw-r--r--kopete/libkopete/tests/mock/kopeteaccount_mock.cpp6
-rw-r--r--kopete/libkopete/tests/mock/kopeteaccount_mock.h6
-rw-r--r--kopete/libkopete/tests/mock/kopetecontact_mock.cpp2
-rw-r--r--kopete/libkopete/tests/mock/kopetecontact_mock.h2
-rw-r--r--kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp8
-rw-r--r--kopete/libkopete/tests/mock/kopeteprotocol_mock.h8
-rw-r--r--kopete/libkopete/ui/accountselector.cpp36
-rw-r--r--kopete/libkopete/ui/accountselector.h8
-rw-r--r--kopete/libkopete/ui/addcontactpage.cpp2
-rw-r--r--kopete/libkopete/ui/addcontactpage.h4
-rw-r--r--kopete/libkopete/ui/addressbooklinkwidget.cpp22
-rw-r--r--kopete/libkopete/ui/addressbooklinkwidget.h8
-rw-r--r--kopete/libkopete/ui/addressbookselectordialog.cpp22
-rw-r--r--kopete/libkopete/ui/addressbookselectordialog.h6
-rw-r--r--kopete/libkopete/ui/addressbookselectorwidget.cpp46
-rw-r--r--kopete/libkopete/ui/addressbookselectorwidget.h8
-rw-r--r--kopete/libkopete/ui/addresseeitem.cpp18
-rw-r--r--kopete/libkopete/ui/addresseeitem.h8
-rw-r--r--kopete/libkopete/ui/contactaddednotifydialog.cpp38
-rw-r--r--kopete/libkopete/ui/contactaddednotifydialog.h14
-rw-r--r--kopete/libkopete/ui/editaccountwidget.h2
-rw-r--r--kopete/libkopete/ui/kopetecontactaction.cpp8
-rw-r--r--kopete/libkopete/ui/kopetecontactaction.h2
-rw-r--r--kopete/libkopete/ui/kopetefileconfirmdialog.cpp22
-rw-r--r--kopete/libkopete/ui/kopetefileconfirmdialog.h8
-rw-r--r--kopete/libkopete/ui/kopetelistview.cpp60
-rw-r--r--kopete/libkopete/ui/kopetelistview.h10
-rw-r--r--kopete/libkopete/ui/kopetelistviewitem.cpp246
-rw-r--r--kopete/libkopete/ui/kopetelistviewitem.h70
-rw-r--r--kopete/libkopete/ui/kopetelistviewsearchline.cpp18
-rw-r--r--kopete/libkopete/ui/kopetelistviewsearchline.h12
-rw-r--r--kopete/libkopete/ui/kopetepasswordwidget.cpp32
-rw-r--r--kopete/libkopete/ui/kopetepasswordwidget.h8
-rw-r--r--kopete/libkopete/ui/kopetestdaction.cpp50
-rw-r--r--kopete/libkopete/ui/kopetestdaction.h46
-rw-r--r--kopete/libkopete/ui/kopeteview.cpp4
-rw-r--r--kopete/libkopete/ui/kopeteview.h20
-rw-r--r--kopete/libkopete/ui/kopeteviewplugin.cpp2
-rw-r--r--kopete/libkopete/ui/kopeteviewplugin.h2
-rw-r--r--kopete/libkopete/ui/kopetewidgets.cpp92
-rw-r--r--kopete/libkopete/ui/metacontactselectorwidget.cpp74
-rw-r--r--kopete/libkopete/ui/metacontactselectorwidget.h12
-rw-r--r--kopete/libkopete/ui/userinfodialog.cpp82
-rw-r--r--kopete/libkopete/ui/userinfodialog.h32
-rw-r--r--kopete/libkopete/webcamwidget.cpp36
-rw-r--r--kopete/libkopete/webcamwidget.h18
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.cpp48
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.h20
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.cpp42
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.h2
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp6
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.h14
-rw-r--r--kopete/plugins/alias/aliasplugin.cpp2
-rw-r--r--kopete/plugins/alias/aliasplugin.h2
-rw-r--r--kopete/plugins/alias/aliaspreferences.cpp142
-rw-r--r--kopete/plugins/alias/aliaspreferences.h14
-rw-r--r--kopete/plugins/alias/editaliasdialog.cpp14
-rw-r--r--kopete/plugins/alias/editaliasdialog.h2
-rw-r--r--kopete/plugins/autoreplace/autoreplaceconfig.cpp18
-rw-r--r--kopete/plugins/autoreplace/autoreplaceconfig.h10
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.cpp28
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.h10
-rw-r--r--kopete/plugins/autoreplace/autoreplacepreferences.cpp62
-rw-r--r--kopete/plugins/autoreplace/autoreplacepreferences.h6
-rw-r--r--kopete/plugins/connectionstatus/connectionstatusplugin.cpp18
-rw-r--r--kopete/plugins/connectionstatus/connectionstatusplugin.h6
-rw-r--r--kopete/plugins/contactnotes/contactnotesedit.cpp12
-rw-r--r--kopete/plugins/contactnotes/contactnotesedit.h10
-rw-r--r--kopete/plugins/contactnotes/contactnotesplugin.cpp14
-rw-r--r--kopete/plugins/contactnotes/contactnotesplugin.h12
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.cpp10
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.h4
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp88
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.h16
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.cpp8
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.h2
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.cpp16
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.h6
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp48
-rw-r--r--kopete/plugins/cryptography/kgpginterface.h24
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.cpp58
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.h32
-rw-r--r--kopete/plugins/cryptography/popuppublic.cpp170
-rw-r--r--kopete/plugins/cryptography/popuppublic.h18
-rw-r--r--kopete/plugins/highlight/filter.h14
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp104
-rw-r--r--kopete/plugins/highlight/highlightconfig.h8
-rw-r--r--kopete/plugins/highlight/highlightplugin.cpp16
-rw-r--r--kopete/plugins/highlight/highlightplugin.h8
-rw-r--r--kopete/plugins/highlight/highlightpreferences.cpp64
-rw-r--r--kopete/plugins/highlight/highlightpreferences.h6
-rw-r--r--kopete/plugins/history/converter.cpp140
-rw-r--r--kopete/plugins/history/historydialog.cpp208
-rw-r--r--kopete/plugins/history/historydialog.h30
-rw-r--r--kopete/plugins/history/historyguiclient.cpp22
-rw-r--r--kopete/plugins/history/historyguiclient.h4
-rw-r--r--kopete/plugins/history/historylogger.cpp276
-rw-r--r--kopete/plugins/history/historylogger.h42
-rw-r--r--kopete/plugins/history/historyplugin.cpp38
-rw-r--r--kopete/plugins/history/historyplugin.h10
-rw-r--r--kopete/plugins/history/historypreferences.cpp24
-rw-r--r--kopete/plugins/history/historypreferences.h6
-rw-r--r--kopete/plugins/latex/latexguiclient.cpp18
-rw-r--r--kopete/plugins/latex/latexguiclient.h4
-rw-r--r--kopete/plugins/latex/latexplugin.cpp88
-rw-r--r--kopete/plugins/latex/latexplugin.h14
-rw-r--r--kopete/plugins/latex/latexpreferences.cpp10
-rw-r--r--kopete/plugins/latex/latexpreferences.h4
-rw-r--r--kopete/plugins/motionautoaway/motionawayplugin.cpp16
-rw-r--r--kopete/plugins/motionautoaway/motionawayplugin.h18
-rw-r--r--kopete/plugins/motionautoaway/motionawaypreferences.cpp16
-rw-r--r--kopete/plugins/motionautoaway/motionawaypreferences.h2
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.cpp8
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.h4
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.cpp44
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.h16
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.cpp20
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.h4
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.cpp10
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.h4
-rw-r--r--kopete/plugins/nowlistening/nlamarok.cpp26
-rw-r--r--kopete/plugins/nowlistening/nljuk.cpp42
-rw-r--r--kopete/plugins/nowlistening/nlkaffeine.cpp18
-rw-r--r--kopete/plugins/nowlistening/nlkscd.cpp22
-rw-r--r--kopete/plugins/nowlistening/nlmediaplayer.h16
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.cpp36
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.h4
-rw-r--r--kopete/plugins/nowlistening/nlxmms.cpp2
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.cpp10
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.h4
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp102
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.h16
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.cpp24
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.h2
-rw-r--r--kopete/plugins/smpppdcs/detectordcop.cpp4
-rw-r--r--kopete/plugins/smpppdcs/detectordcop.h4
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.cpp12
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.h6
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.cpp6
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.h6
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.cpp2
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.h2
-rw-r--r--kopete/plugins/smpppdcs/kinternetiface.h2
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp22
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h24
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp24
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h4
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp18
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h18
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp36
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h4
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsiface.h2
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.cpp30
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.h8
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.cpp58
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.h10
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp32
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.h6
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.cpp4
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.h4
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.cpp30
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.h6
-rw-r--r--kopete/plugins/smpppdcs/unittest/clienttest.cpp10
-rw-r--r--kopete/plugins/statistics/statisticscontact.cpp128
-rw-r--r--kopete/plugins/statistics/statisticscontact.h40
-rw-r--r--kopete/plugins/statistics/statisticsdb.cpp36
-rw-r--r--kopete/plugins/statistics/statisticsdb.h4
-rw-r--r--kopete/plugins/statistics/statisticsdcopiface.h20
-rw-r--r--kopete/plugins/statistics/statisticsdialog.cpp164
-rw-r--r--kopete/plugins/statistics/statisticsdialog.h12
-rw-r--r--kopete/plugins/statistics/statisticsplugin.cpp98
-rw-r--r--kopete/plugins/statistics/statisticsplugin.h36
-rw-r--r--kopete/plugins/texteffect/texteffectconfig.cpp10
-rw-r--r--kopete/plugins/texteffect/texteffectconfig.h8
-rw-r--r--kopete/plugins/texteffect/texteffectplugin.cpp18
-rw-r--r--kopete/plugins/texteffect/texteffectplugin.h8
-rw-r--r--kopete/plugins/texteffect/texteffectpreferences.cpp66
-rw-r--r--kopete/plugins/texteffect/texteffectpreferences.h4
-rw-r--r--kopete/plugins/translator/translatordialog.cpp4
-rw-r--r--kopete/plugins/translator/translatordialog.h6
-rw-r--r--kopete/plugins/translator/translatorguiclient.cpp22
-rw-r--r--kopete/plugins/translator/translatorguiclient.h6
-rw-r--r--kopete/plugins/translator/translatorlanguages.cpp6
-rw-r--r--kopete/plugins/translator/translatorlanguages.h34
-rw-r--r--kopete/plugins/translator/translatorplugin.cpp108
-rw-r--r--kopete/plugins/translator/translatorplugin.h30
-rw-r--r--kopete/plugins/translator/translatorprefs.cpp8
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.cpp98
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.h16
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.cpp10
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.h2
-rw-r--r--kopete/protocols/gadu/gaduaccount.cpp226
-rw-r--r--kopete/protocols/gadu/gaduaccount.h32
-rw-r--r--kopete/protocols/gadu/gaduaddcontactpage.cpp34
-rw-r--r--kopete/protocols/gadu/gaduaddcontactpage.h10
-rw-r--r--kopete/protocols/gadu/gaduaway.cpp10
-rw-r--r--kopete/protocols/gadu/gaduaway.h6
-rw-r--r--kopete/protocols/gadu/gaducommands.cpp46
-rw-r--r--kopete/protocols/gadu/gaducommands.h34
-rw-r--r--kopete/protocols/gadu/gaducontact.cpp42
-rw-r--r--kopete/protocols/gadu/gaducontact.h24
-rw-r--r--kopete/protocols/gadu/gaducontactlist.cpp44
-rw-r--r--kopete/protocols/gadu/gaducontactlist.h36
-rw-r--r--kopete/protocols/gadu/gadudcc.cpp20
-rw-r--r--kopete/protocols/gadu/gadudcc.h8
-rw-r--r--kopete/protocols/gadu/gadudccserver.cpp18
-rw-r--r--kopete/protocols/gadu/gadudccserver.h16
-rw-r--r--kopete/protocols/gadu/gadudcctransaction.cpp40
-rw-r--r--kopete/protocols/gadu/gadudcctransaction.h16
-rw-r--r--kopete/protocols/gadu/gadueditaccount.cpp56
-rw-r--r--kopete/protocols/gadu/gadueditaccount.h4
-rw-r--r--kopete/protocols/gadu/gadueditcontact.cpp34
-rw-r--r--kopete/protocols/gadu/gadueditcontact.h6
-rw-r--r--kopete/protocols/gadu/gaduprotocol.cpp28
-rw-r--r--kopete/protocols/gadu/gaduprotocol.h14
-rw-r--r--kopete/protocols/gadu/gadupubdir.cpp78
-rw-r--r--kopete/protocols/gadu/gadupubdir.h8
-rw-r--r--kopete/protocols/gadu/gaduregisteraccount.cpp54
-rw-r--r--kopete/protocols/gadu/gaduregisteraccount.h16
-rw-r--r--kopete/protocols/gadu/gadurichtextformat.cpp74
-rw-r--r--kopete/protocols/gadu/gadurichtextformat.h14
-rw-r--r--kopete/protocols/gadu/gadusession.cpp62
-rw-r--r--kopete/protocols/gadu/gadusession.h66
-rw-r--r--kopete/protocols/groupwise/gwaccount.cpp262
-rw-r--r--kopete/protocols/groupwise/gwaccount.h44
-rw-r--r--kopete/protocols/groupwise/gwbytestream.cpp20
-rw-r--r--kopete/protocols/groupwise/gwbytestream.h4
-rw-r--r--kopete/protocols/groupwise/gwconnector.cpp14
-rw-r--r--kopete/protocols/groupwise/gwconnector.h8
-rw-r--r--kopete/protocols/groupwise/gwcontact.cpp30
-rw-r--r--kopete/protocols/groupwise/gwcontact.h24
-rw-r--r--kopete/protocols/groupwise/gwcontactlist.cpp80
-rw-r--r--kopete/protocols/groupwise/gwcontactlist.h24
-rw-r--r--kopete/protocols/groupwise/gwmessagemanager.cpp88
-rw-r--r--kopete/protocols/groupwise/gwmessagemanager.h8
-rw-r--r--kopete/protocols/groupwise/gwprotocol.cpp60
-rw-r--r--kopete/protocols/groupwise/gwprotocol.h16
-rw-r--r--kopete/protocols/groupwise/libgroupwise/bytestream.cpp34
-rw-r--r--kopete/protocols/groupwise/libgroupwise/bytestream.h28
-rw-r--r--kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp26
-rw-r--r--kopete/protocols/groupwise/libgroupwise/chatroommanager.h4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/client.cpp182
-rw-r--r--kopete/protocols/groupwise/libgroupwise/client.h52
-rw-r--r--kopete/protocols/groupwise/libgroupwise/connector.cpp10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/connector.h14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp84
-rw-r--r--kopete/protocols/groupwise/libgroupwise/coreprotocol.h22
-rw-r--r--kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp32
-rw-r--r--kopete/protocols/groupwise/libgroupwise/eventprotocol.h8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/eventtransfer.h26
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwchatrooms.h34
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp96
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwclientstream.h26
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwerror.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwerror.h46
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwfield.cpp34
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwfield.h50
-rw-r--r--kopete/protocols/groupwise/libgroupwise/gwglobal.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp18
-rw-r--r--kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/privacymanager.cpp64
-rw-r--r--kopete/protocols/groupwise/libgroupwise/privacymanager.h34
-rw-r--r--kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp298
-rw-r--r--kopete/protocols/groupwise/libgroupwise/qca/src/qca.h150
-rw-r--r--kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h92
-rw-r--r--kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp20
-rw-r--r--kopete/protocols/groupwise/libgroupwise/qcatlshandler.h8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/request.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/request.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/requestfactory.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/requestfactory.h4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/response.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp54
-rw-r--r--kopete/protocols/groupwise/libgroupwise/responseprotocol.h8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/rtf.cc42
-rw-r--r--kopete/protocols/groupwise/libgroupwise/rtf2html.h20
-rw-r--r--kopete/protocols/groupwise/libgroupwise/safedelete.cpp16
-rw-r--r--kopete/protocols/groupwise/libgroupwise/safedelete.h16
-rw-r--r--kopete/protocols/groupwise/libgroupwise/securestream.cpp108
-rw-r--r--kopete/protocols/groupwise/libgroupwise/securestream.h40
-rw-r--r--kopete/protocols/groupwise/libgroupwise/stream.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/stream.h22
-rw-r--r--kopete/protocols/groupwise/libgroupwise/task.cpp42
-rw-r--r--kopete/protocols/groupwise/libgroupwise/task.h14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h30
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp32
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h16
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp24
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h20
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp12
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp24
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp24
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/logintask.h4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp16
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp20
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp8
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/statustask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp10
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp14
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h6
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp12
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tlshandler.cpp4
-rw-r--r--kopete/protocols/groupwise/libgroupwise/tlshandler.h26
-rw-r--r--kopete/protocols/groupwise/libgroupwise/transfer.cpp2
-rw-r--r--kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp42
-rw-r--r--kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h24
-rw-r--r--kopete/protocols/groupwise/ui/gwaddcontactpage.cpp34
-rw-r--r--kopete/protocols/groupwise/ui/gwaddcontactpage.h8
-rw-r--r--kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp38
-rw-r--r--kopete/protocols/groupwise/ui/gwchatpropsdialog.h4
-rw-r--r--kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp28
-rw-r--r--kopete/protocols/groupwise/ui/gwchatsearchdialog.h2
-rw-r--r--kopete/protocols/groupwise/ui/gwcontactproperties.cpp42
-rw-r--r--kopete/protocols/groupwise/ui/gwcontactproperties.h10
-rw-r--r--kopete/protocols/groupwise/ui/gweditaccountwidget.cpp28
-rw-r--r--kopete/protocols/groupwise/ui/gweditaccountwidget.h8
-rw-r--r--kopete/protocols/groupwise/ui/gwprivacydialog.cpp90
-rw-r--r--kopete/protocols/groupwise/ui/gwprivacydialog.h4
-rw-r--r--kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp14
-rw-r--r--kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h2
-rw-r--r--kopete/protocols/groupwise/ui/gwsearch.cpp52
-rw-r--r--kopete/protocols/groupwise/ui/gwsearch.h10
-rw-r--r--kopete/protocols/irc/ircaccount.cpp224
-rw-r--r--kopete/protocols/irc/ircaccount.h108
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.cpp30
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.h6
-rw-r--r--kopete/protocols/irc/ircchannelcontact.cpp122
-rw-r--r--kopete/protocols/irc/ircchannelcontact.h60
-rw-r--r--kopete/protocols/irc/irccontact.cpp134
-rw-r--r--kopete/protocols/irc/irccontact.h38
-rw-r--r--kopete/protocols/irc/irccontactmanager.cpp90
-rw-r--r--kopete/protocols/irc/irccontactmanager.h48
-rw-r--r--kopete/protocols/irc/ircguiclient.cpp18
-rw-r--r--kopete/protocols/irc/ircguiclient.h6
-rw-r--r--kopete/protocols/irc/ircprotocol.cpp488
-rw-r--r--kopete/protocols/irc/ircprotocol.h86
-rw-r--r--kopete/protocols/irc/ircservercontact.cpp64
-rw-r--r--kopete/protocols/irc/ircservercontact.h22
-rw-r--r--kopete/protocols/irc/ircsignalhandler.cpp88
-rw-r--r--kopete/protocols/irc/ircsignalhandler.h100
-rw-r--r--kopete/protocols/irc/irctransferhandler.cpp36
-rw-r--r--kopete/protocols/irc/irctransferhandler.h6
-rw-r--r--kopete/protocols/irc/ircusercontact.cpp146
-rw-r--r--kopete/protocols/irc/ircusercontact.h52
-rw-r--r--kopete/protocols/irc/kcodecaction.cpp38
-rw-r--r--kopete/protocols/irc/kcodecaction.h14
-rw-r--r--kopete/protocols/irc/ksparser.cpp96
-rw-r--r--kopete/protocols/irc/ksparser.h38
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.cpp110
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.h336
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_commands.cpp102
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_ctcp.cpp134
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp132
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.cpp34
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.h52
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.cpp118
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.h84
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.cpp16
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.h24
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.cpp100
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.h58
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.cpp22
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.h24
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.cpp44
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.h16
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.cpp82
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.h12
-rw-r--r--kopete/protocols/irc/ui/channellist.cpp166
-rw-r--r--kopete/protocols/irc/ui/channellist.h38
-rw-r--r--kopete/protocols/irc/ui/channellistdialog.cpp16
-rw-r--r--kopete/protocols/irc/ui/channellistdialog.h4
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.cpp116
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.h12
-rw-r--r--kopete/protocols/irc/ui/networkconfig.ui.h4
-rw-r--r--kopete/protocols/jabber/jabberaccount.cpp190
-rw-r--r--kopete/protocols/jabber/jabberaccount.h34
-rw-r--r--kopete/protocols/jabber/jabberbasecontact.cpp68
-rw-r--r--kopete/protocols/jabber/jabberbasecontact.h8
-rw-r--r--kopete/protocols/jabber/jabberbookmarks.cpp38
-rw-r--r--kopete/protocols/jabber/jabberbookmarks.h14
-rw-r--r--kopete/protocols/jabber/jabberbytestream.cpp20
-rw-r--r--kopete/protocols/jabber/jabberbytestream.h4
-rw-r--r--kopete/protocols/jabber/jabbercapabilitiesmanager.cpp148
-rw-r--r--kopete/protocols/jabber/jabbercapabilitiesmanager.h36
-rw-r--r--kopete/protocols/jabber/jabberchatsession.cpp44
-rw-r--r--kopete/protocols/jabber/jabberchatsession.h8
-rw-r--r--kopete/protocols/jabber/jabberclient.cpp218
-rw-r--r--kopete/protocols/jabber/jabberclient.h70
-rw-r--r--kopete/protocols/jabber/jabberconnector.cpp14
-rw-r--r--kopete/protocols/jabber/jabberconnector.h8
-rw-r--r--kopete/protocols/jabber/jabbercontact.cpp192
-rw-r--r--kopete/protocols/jabber/jabbercontact.h24
-rw-r--r--kopete/protocols/jabber/jabbercontactpool.cpp14
-rw-r--r--kopete/protocols/jabber/jabbercontactpool.h6
-rw-r--r--kopete/protocols/jabber/jabberfiletransfer.cpp32
-rw-r--r--kopete/protocols/jabber/jabberfiletransfer.h10
-rw-r--r--kopete/protocols/jabber/jabberformlineedit.cpp4
-rw-r--r--kopete/protocols/jabber/jabberformlineedit.h12
-rw-r--r--kopete/protocols/jabber/jabberformtranslator.cpp20
-rw-r--r--kopete/protocols/jabber/jabberformtranslator.h6
-rw-r--r--kopete/protocols/jabber/jabbergroupchatmanager.cpp12
-rw-r--r--kopete/protocols/jabber/jabbergroupchatmanager.h2
-rw-r--r--kopete/protocols/jabber/jabbergroupcontact.cpp34
-rw-r--r--kopete/protocols/jabber/jabbergroupcontact.h10
-rw-r--r--kopete/protocols/jabber/jabbergroupmembercontact.cpp18
-rw-r--r--kopete/protocols/jabber/jabbergroupmembercontact.h4
-rw-r--r--kopete/protocols/jabber/jabberprotocol.cpp92
-rw-r--r--kopete/protocols/jabber/jabberprotocol.h22
-rw-r--r--kopete/protocols/jabber/jabberresource.cpp16
-rw-r--r--kopete/protocols/jabber/jabberresource.h8
-rw-r--r--kopete/protocols/jabber/jabberresourcepool.cpp20
-rw-r--r--kopete/protocols/jabber/jabberresourcepool.h6
-rw-r--r--kopete/protocols/jabber/jabbertransport.cpp46
-rw-r--r--kopete/protocols/jabber/jabbertransport.h10
-rw-r--r--kopete/protocols/jabber/jingle/jinglesession.cpp4
-rw-r--r--kopete/protocols/jabber/jingle/jinglesession.h12
-rw-r--r--kopete/protocols/jabber/jingle/jinglesessionmanager.cpp16
-rw-r--r--kopete/protocols/jabber/jingle/jinglesessionmanager.h14
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicecaller.cpp48
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicecaller.h6
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesession.cpp32
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesession.h8
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp46
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h2
-rw-r--r--kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp12
-rw-r--r--kopete/protocols/jabber/jingle/jinglewatchsessiontask.h4
-rw-r--r--kopete/protocols/jabber/kioslave/jabberdisco.cpp32
-rw-r--r--kopete/protocols/jabber/kioslave/jabberdisco.h16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp74
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h20
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h10
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp158
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h22
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.h6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp234
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.h46
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp70
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h14
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp36
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.h12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h28
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h4
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.h8
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp32
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h4
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/im.h388
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/xmpp.h224
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp190
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp386
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.h112
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp134
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h58
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h10
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp88
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp8
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp102
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp174
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h32
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp322
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h132
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h92
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp116
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp122
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/td.h12
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp108
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h54
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp304
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp414
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp406
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h114
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp294
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h178
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp176
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h60
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.h150
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qcaprovider.h92
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberbrowse.cpp18
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberbrowse.h4
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp14
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchangepassword.h2
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatjoin.h2
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp16
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatroomslist.h10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberregister.cpp12
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberregister.h10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbersendraw.cpp22
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbersendraw.h6
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberservices.cpp38
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberservices.h16
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbervcard.cpp72
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbervcard.h6
-rw-r--r--kopete/protocols/jabber/ui/jabberaddcontactpage.cpp32
-rw-r--r--kopete/protocols/jabber/ui/jabberaddcontactpage.h8
-rw-r--r--kopete/protocols/jabber/ui/jabberchooseserver.cpp22
-rw-r--r--kopete/protocols/jabber/ui/jabberchooseserver.h6
-rw-r--r--kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp40
-rw-r--r--kopete/protocols/jabber/ui/jabbereditaccountwidget.h4
-rw-r--r--kopete/protocols/jabber/ui/jabberregisteraccount.cpp52
-rw-r--r--kopete/protocols/jabber/ui/jabberregisteraccount.h10
-rw-r--r--kopete/protocols/meanwhile/meanwhileaccount.cpp36
-rw-r--r--kopete/protocols/meanwhile/meanwhileaccount.h20
-rw-r--r--kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp16
-rw-r--r--kopete/protocols/meanwhile/meanwhileaddcontactpage.h4
-rw-r--r--kopete/protocols/meanwhile/meanwhilecontact.cpp24
-rw-r--r--kopete/protocols/meanwhile/meanwhilecontact.h14
-rw-r--r--kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp22
-rw-r--r--kopete/protocols/meanwhile/meanwhileeditaccountwidget.h4
-rw-r--r--kopete/protocols/meanwhile/meanwhileplugin.cpp10
-rw-r--r--kopete/protocols/meanwhile/meanwhileplugin.h6
-rw-r--r--kopete/protocols/meanwhile/meanwhileprotocol.cpp30
-rw-r--r--kopete/protocols/meanwhile/meanwhileprotocol.h14
-rw-r--r--kopete/protocols/meanwhile/meanwhilesession.cpp54
-rw-r--r--kopete/protocols/meanwhile/meanwhilesession.h14
-rw-r--r--kopete/protocols/msn/config/msnpreferences.cpp2
-rw-r--r--kopete/protocols/msn/dispatcher.cpp166
-rw-r--r--kopete/protocols/msn/dispatcher.h42
-rw-r--r--kopete/protocols/msn/incomingtransfer.cpp66
-rw-r--r--kopete/protocols/msn/incomingtransfer.h4
-rw-r--r--kopete/protocols/msn/messageformatter.cpp36
-rw-r--r--kopete/protocols/msn/messageformatter.h8
-rw-r--r--kopete/protocols/msn/msnaccount.cpp324
-rw-r--r--kopete/protocols/msn/msnaccount.h82
-rw-r--r--kopete/protocols/msn/msnaddcontactpage.cpp16
-rw-r--r--kopete/protocols/msn/msnaddcontactpage.h10
-rw-r--r--kopete/protocols/msn/msnchallengehandler.cpp38
-rw-r--r--kopete/protocols/msn/msnchallengehandler.h18
-rw-r--r--kopete/protocols/msn/msnchatsession.cpp182
-rw-r--r--kopete/protocols/msn/msnchatsession.h34
-rw-r--r--kopete/protocols/msn/msncontact.cpp108
-rw-r--r--kopete/protocols/msn/msncontact.h40
-rw-r--r--kopete/protocols/msn/msndebugrawcmddlg.cpp14
-rw-r--r--kopete/protocols/msn/msndebugrawcmddlg.h8
-rw-r--r--kopete/protocols/msn/msnfiletransfersocket.cpp102
-rw-r--r--kopete/protocols/msn/msnfiletransfersocket.h34
-rw-r--r--kopete/protocols/msn/msninvitation.cpp34
-rw-r--r--kopete/protocols/msn/msninvitation.h20
-rw-r--r--kopete/protocols/msn/msnnotifysocket.cpp256
-rw-r--r--kopete/protocols/msn/msnnotifysocket.h84
-rw-r--r--kopete/protocols/msn/msnprotocol.cpp44
-rw-r--r--kopete/protocols/msn/msnprotocol.h20
-rw-r--r--kopete/protocols/msn/msnsecureloginhandler.cpp28
-rw-r--r--kopete/protocols/msn/msnsecureloginhandler.h14
-rw-r--r--kopete/protocols/msn/msnsocket.cpp170
-rw-r--r--kopete/protocols/msn/msnsocket.h68
-rw-r--r--kopete/protocols/msn/msnswitchboardsocket.cpp298
-rw-r--r--kopete/protocols/msn/msnswitchboardsocket.h70
-rw-r--r--kopete/protocols/msn/outgoingtransfer.cpp68
-rw-r--r--kopete/protocols/msn/outgoingtransfer.h16
-rw-r--r--kopete/protocols/msn/p2p.cpp50
-rw-r--r--kopete/protocols/msn/p2p.h36
-rw-r--r--kopete/protocols/msn/sha1.cpp16
-rw-r--r--kopete/protocols/msn/sha1.h8
-rw-r--r--kopete/protocols/msn/transport.cpp60
-rw-r--r--kopete/protocols/msn/transport.h34
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.cpp90
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.h6
-rw-r--r--kopete/protocols/msn/webcam.cpp196
-rw-r--r--kopete/protocols/msn/webcam.h20
-rw-r--r--kopete/protocols/msn/webcam/mimicwrapper.cpp28
-rw-r--r--kopete/protocols/msn/webcam/mimicwrapper.h6
-rw-r--r--kopete/protocols/msn/webcam/msnwebcamdialog.cpp24
-rw-r--r--kopete/protocols/msn/webcam/msnwebcamdialog.h6
-rw-r--r--kopete/protocols/oscar/aim/aimaccount.cpp222
-rw-r--r--kopete/protocols/oscar/aim/aimaccount.h46
-rw-r--r--kopete/protocols/oscar/aim/aimchatsession.cpp6
-rw-r--r--kopete/protocols/oscar/aim/aimchatsession.h8
-rw-r--r--kopete/protocols/oscar/aim/aimcontact.cpp172
-rw-r--r--kopete/protocols/oscar/aim/aimcontact.h36
-rw-r--r--kopete/protocols/oscar/aim/aimjoinchat.cpp26
-rw-r--r--kopete/protocols/oscar/aim/aimjoinchat.h16
-rw-r--r--kopete/protocols/oscar/aim/aimprotocol.cpp54
-rw-r--r--kopete/protocols/oscar/aim/aimprotocol.h14
-rw-r--r--kopete/protocols/oscar/aim/aimuserinfo.cpp70
-rw-r--r--kopete/protocols/oscar/aim/aimuserinfo.h8
-rw-r--r--kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp14
-rw-r--r--kopete/protocols/oscar/aim/ui/aimaddcontactpage.h10
-rw-r--r--kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp34
-rw-r--r--kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h6
-rw-r--r--kopete/protocols/oscar/icq/icqaccount.cpp88
-rw-r--r--kopete/protocols/oscar/icq/icqaccount.h24
-rw-r--r--kopete/protocols/oscar/icq/icqcontact.cpp154
-rw-r--r--kopete/protocols/oscar/icq/icqcontact.h30
-rw-r--r--kopete/protocols/oscar/icq/icqpresence.cpp14
-rw-r--r--kopete/protocols/oscar/icq/icqprotocol.cpp98
-rw-r--r--kopete/protocols/oscar/icq/icqprotocol.h50
-rw-r--r--kopete/protocols/oscar/icq/icqreadaway.cpp36
-rw-r--r--kopete/protocols/oscar/icq/icqreadaway.h8
-rw-r--r--kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp30
-rw-r--r--kopete/protocols/oscar/icq/ui/icqaddcontactpage.h8
-rw-r--r--kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp14
-rw-r--r--kopete/protocols/oscar/icq/ui/icqauthreplydialog.h8
-rw-r--r--kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp32
-rw-r--r--kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h8
-rw-r--r--kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp72
-rw-r--r--kopete/protocols/oscar/icq/ui/icqsearchdialog.h2
-rw-r--r--kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp84
-rw-r--r--kopete/protocols/oscar/icq/ui/icquserinfowidget.h2
-rw-r--r--kopete/protocols/oscar/liboscar/aimlogintask.cpp24
-rw-r--r--kopete/protocols/oscar/liboscar/aimlogintask.h18
-rw-r--r--kopete/protocols/oscar/liboscar/blmlimitstask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/buddyicontask.cpp28
-rw-r--r--kopete/protocols/oscar/liboscar/buddyicontask.h16
-rw-r--r--kopete/protocols/oscar/liboscar/buffer.cpp74
-rw-r--r--kopete/protocols/oscar/liboscar/buffer.h42
-rw-r--r--kopete/protocols/oscar/liboscar/bytestream.cpp34
-rw-r--r--kopete/protocols/oscar/liboscar/bytestream.h28
-rw-r--r--kopete/protocols/oscar/liboscar/changevisibilitytask.cpp16
-rw-r--r--kopete/protocols/oscar/liboscar/chatnavservicetask.cpp36
-rw-r--r--kopete/protocols/oscar/liboscar/chatnavservicetask.h12
-rw-r--r--kopete/protocols/oscar/liboscar/chatservicetask.cpp48
-rw-r--r--kopete/protocols/oscar/liboscar/chatservicetask.h14
-rw-r--r--kopete/protocols/oscar/liboscar/client.cpp308
-rw-r--r--kopete/protocols/oscar/liboscar/client.h154
-rw-r--r--kopete/protocols/oscar/liboscar/clientreadytask.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/clientreadytask.h8
-rw-r--r--kopete/protocols/oscar/liboscar/closeconnectiontask.cpp20
-rw-r--r--kopete/protocols/oscar/liboscar/closeconnectiontask.h16
-rw-r--r--kopete/protocols/oscar/liboscar/connection.cpp22
-rw-r--r--kopete/protocols/oscar/liboscar/connection.h22
-rw-r--r--kopete/protocols/oscar/liboscar/connectionhandler.cpp32
-rw-r--r--kopete/protocols/oscar/liboscar/connectionhandler.h14
-rw-r--r--kopete/protocols/oscar/liboscar/connector.cpp10
-rw-r--r--kopete/protocols/oscar/liboscar/connector.h14
-rw-r--r--kopete/protocols/oscar/liboscar/coreprotocol.cpp38
-rw-r--r--kopete/protocols/oscar/liboscar/coreprotocol.h18
-rw-r--r--kopete/protocols/oscar/liboscar/flapprotocol.cpp12
-rw-r--r--kopete/protocols/oscar/liboscar/flapprotocol.h4
-rw-r--r--kopete/protocols/oscar/liboscar/icbmparamstask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/icqlogintask.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/icqlogintask.h2
-rw-r--r--kopete/protocols/oscar/liboscar/icqtask.cpp10
-rw-r--r--kopete/protocols/oscar/liboscar/icquserinfo.cpp18
-rw-r--r--kopete/protocols/oscar/liboscar/icquserinfo.h98
-rw-r--r--kopete/protocols/oscar/liboscar/icquserinfotask.cpp16
-rw-r--r--kopete/protocols/oscar/liboscar/icquserinfotask.h42
-rw-r--r--kopete/protocols/oscar/liboscar/inputprotocolbase.cpp14
-rw-r--r--kopete/protocols/oscar/liboscar/inputprotocolbase.h12
-rw-r--r--kopete/protocols/oscar/liboscar/locationrightstask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/logintask.cpp24
-rw-r--r--kopete/protocols/oscar/liboscar/logintask.h28
-rw-r--r--kopete/protocols/oscar/liboscar/messagereceivertask.cpp32
-rw-r--r--kopete/protocols/oscar/liboscar/messagereceivertask.h10
-rw-r--r--kopete/protocols/oscar/liboscar/offlinemessagestask.cpp12
-rw-r--r--kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp4
-rw-r--r--kopete/protocols/oscar/liboscar/onlinenotifiertask.h4
-rw-r--r--kopete/protocols/oscar/liboscar/oscarbytestream.cpp20
-rw-r--r--kopete/protocols/oscar/liboscar/oscarbytestream.h4
-rw-r--r--kopete/protocols/oscar/liboscar/oscarclientstream.cpp74
-rw-r--r--kopete/protocols/oscar/liboscar/oscarclientstream.h16
-rw-r--r--kopete/protocols/oscar/liboscar/oscarconnector.cpp14
-rw-r--r--kopete/protocols/oscar/liboscar/oscarconnector.h8
-rw-r--r--kopete/protocols/oscar/liboscar/oscarmessage.cpp56
-rw-r--r--kopete/protocols/oscar/liboscar/oscarmessage.h56
-rw-r--r--kopete/protocols/oscar/liboscar/oscartypeclasses.cpp56
-rw-r--r--kopete/protocols/oscar/liboscar/oscartypeclasses.h40
-rw-r--r--kopete/protocols/oscar/liboscar/oscartypes.h28
-rw-r--r--kopete/protocols/oscar/liboscar/oscarutils.cpp38
-rw-r--r--kopete/protocols/oscar/liboscar/oscarutils.h26
-rw-r--r--kopete/protocols/oscar/liboscar/ownuserinfotask.cpp10
-rw-r--r--kopete/protocols/oscar/liboscar/ownuserinfotask.h4
-rw-r--r--kopete/protocols/oscar/liboscar/prmparamstask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/profiletask.cpp12
-rw-r--r--kopete/protocols/oscar/liboscar/profiletask.h8
-rw-r--r--kopete/protocols/oscar/liboscar/rateclass.cpp18
-rw-r--r--kopete/protocols/oscar/liboscar/rateclass.h18
-rw-r--r--kopete/protocols/oscar/liboscar/rateclassmanager.cpp24
-rw-r--r--kopete/protocols/oscar/liboscar/rateclassmanager.h8
-rw-r--r--kopete/protocols/oscar/liboscar/rateinfotask.cpp18
-rw-r--r--kopete/protocols/oscar/liboscar/rateinfotask.h4
-rw-r--r--kopete/protocols/oscar/liboscar/rtf.cc40
-rw-r--r--kopete/protocols/oscar/liboscar/rtf2html.h20
-rw-r--r--kopete/protocols/oscar/liboscar/safedelete.cpp16
-rw-r--r--kopete/protocols/oscar/liboscar/safedelete.h16
-rw-r--r--kopete/protocols/oscar/liboscar/senddcinfotask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/sendidletimetask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/sendmessagetask.cpp12
-rw-r--r--kopete/protocols/oscar/liboscar/sendmessagetask.h2
-rw-r--r--kopete/protocols/oscar/liboscar/serverredirecttask.cpp14
-rw-r--r--kopete/protocols/oscar/liboscar/serverredirecttask.h22
-rw-r--r--kopete/protocols/oscar/liboscar/serverversionstask.cpp4
-rw-r--r--kopete/protocols/oscar/liboscar/serverversionstask.h4
-rw-r--r--kopete/protocols/oscar/liboscar/servicesetuptask.cpp20
-rw-r--r--kopete/protocols/oscar/liboscar/snacprotocol.cpp12
-rw-r--r--kopete/protocols/oscar/liboscar/snacprotocol.h4
-rw-r--r--kopete/protocols/oscar/liboscar/ssiactivatetask.cpp2
-rw-r--r--kopete/protocols/oscar/liboscar/ssiauthtask.cpp26
-rw-r--r--kopete/protocols/oscar/liboscar/ssiauthtask.h14
-rw-r--r--kopete/protocols/oscar/liboscar/ssilisttask.cpp14
-rw-r--r--kopete/protocols/oscar/liboscar/ssimanager.cpp96
-rw-r--r--kopete/protocols/oscar/liboscar/ssimanager.h42
-rw-r--r--kopete/protocols/oscar/liboscar/ssimodifytask.cpp54
-rw-r--r--kopete/protocols/oscar/liboscar/ssimodifytask.h12
-rw-r--r--kopete/protocols/oscar/liboscar/ssiparamstask.cpp4
-rw-r--r--kopete/protocols/oscar/liboscar/stream.cpp4
-rw-r--r--kopete/protocols/oscar/liboscar/stream.h6
-rw-r--r--kopete/protocols/oscar/liboscar/task.cpp36
-rw-r--r--kopete/protocols/oscar/liboscar/task.h10
-rw-r--r--kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp10
-rw-r--r--kopete/protocols/oscar/liboscar/tests/clientstream_test.h6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ipaddrtest.h6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/kunittest.cpp30
-rw-r--r--kopete/protocols/oscar/liboscar/tests/kunittest.h12
-rw-r--r--kopete/protocols/oscar/liboscar/tests/logintest.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/tests/logintest.h6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/redirecttest.cpp6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/redirecttest.h8
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp16
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ssigrouptest.h6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ssitest.cpp24
-rw-r--r--kopete/protocols/oscar/liboscar/tests/ssitest.h6
-rw-r--r--kopete/protocols/oscar/liboscar/tests/tester.h32
-rw-r--r--kopete/protocols/oscar/liboscar/tests/userinfotest.cpp14
-rw-r--r--kopete/protocols/oscar/liboscar/tests/userinfotest.h6
-rw-r--r--kopete/protocols/oscar/liboscar/transfer.cpp36
-rw-r--r--kopete/protocols/oscar/liboscar/transfer.h12
-rw-r--r--kopete/protocols/oscar/liboscar/typingnotifytask.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/typingnotifytask.h10
-rw-r--r--kopete/protocols/oscar/liboscar/userdetails.cpp56
-rw-r--r--kopete/protocols/oscar/liboscar/userdetails.h24
-rw-r--r--kopete/protocols/oscar/liboscar/userinfotask.cpp22
-rw-r--r--kopete/protocols/oscar/liboscar/userinfotask.h16
-rw-r--r--kopete/protocols/oscar/liboscar/usersearchtask.cpp4
-rw-r--r--kopete/protocols/oscar/liboscar/usersearchtask.h8
-rw-r--r--kopete/protocols/oscar/liboscar/warningtask.cpp8
-rw-r--r--kopete/protocols/oscar/liboscar/warningtask.h8
-rw-r--r--kopete/protocols/oscar/oscaraccount.cpp222
-rw-r--r--kopete/protocols/oscar/oscaraccount.h40
-rw-r--r--kopete/protocols/oscar/oscarcontact.cpp44
-rw-r--r--kopete/protocols/oscar/oscarcontact.h24
-rw-r--r--kopete/protocols/oscar/oscarencodingselectiondialog.cpp12
-rw-r--r--kopete/protocols/oscar/oscarencodingselectiondialog.h4
-rw-r--r--kopete/protocols/oscar/oscarlistnonservercontacts.cpp10
-rw-r--r--kopete/protocols/oscar/oscarlistnonservercontacts.h8
-rw-r--r--kopete/protocols/oscar/oscarmyselfcontact.cpp2
-rw-r--r--kopete/protocols/oscar/oscarversionupdater.cpp62
-rw-r--r--kopete/protocols/oscar/oscarversionupdater.h12
-rw-r--r--kopete/protocols/oscar/oscarvisibilitydialog.cpp42
-rw-r--r--kopete/protocols/oscar/oscarvisibilitydialog.h10
-rw-r--r--kopete/protocols/sms/serviceloader.cpp6
-rw-r--r--kopete/protocols/sms/serviceloader.h8
-rw-r--r--kopete/protocols/sms/services/gsmlib.cpp72
-rw-r--r--kopete/protocols/sms/services/gsmlib.h46
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.cpp6
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.h6
-rw-r--r--kopete/protocols/sms/services/smsclient.cpp60
-rw-r--r--kopete/protocols/sms/services/smsclient.h16
-rw-r--r--kopete/protocols/sms/services/smssend.cpp68
-rw-r--r--kopete/protocols/sms/services/smssend.h22
-rw-r--r--kopete/protocols/sms/services/smssendprovider.cpp68
-rw-r--r--kopete/protocols/sms/services/smssendprovider.h36
-rw-r--r--kopete/protocols/sms/smsaccount.cpp32
-rw-r--r--kopete/protocols/sms/smsaccount.h14
-rw-r--r--kopete/protocols/sms/smsaddcontactpage.cpp12
-rw-r--r--kopete/protocols/sms/smsaddcontactpage.h6
-rw-r--r--kopete/protocols/sms/smscontact.cpp32
-rw-r--r--kopete/protocols/sms/smscontact.h22
-rw-r--r--kopete/protocols/sms/smseditaccountwidget.cpp42
-rw-r--r--kopete/protocols/sms/smseditaccountwidget.h12
-rw-r--r--kopete/protocols/sms/smsprotocol.cpp26
-rw-r--r--kopete/protocols/sms/smsprotocol.h22
-rw-r--r--kopete/protocols/sms/smsservice.cpp4
-rw-r--r--kopete/protocols/sms/smsservice.h16
-rw-r--r--kopete/protocols/sms/smsuserpreferences.cpp2
-rw-r--r--kopete/protocols/sms/smsuserpreferences.h4
-rw-r--r--kopete/protocols/testbed/testbedaccount.cpp22
-rw-r--r--kopete/protocols/testbed/testbedaccount.h10
-rw-r--r--kopete/protocols/testbed/testbedaddcontactpage.cpp16
-rw-r--r--kopete/protocols/testbed/testbedaddcontactpage.h2
-rw-r--r--kopete/protocols/testbed/testbedcontact.cpp22
-rw-r--r--kopete/protocols/testbed/testbedcontact.h14
-rw-r--r--kopete/protocols/testbed/testbededitaccountwidget.cpp12
-rw-r--r--kopete/protocols/testbed/testbededitaccountwidget.h6
-rw-r--r--kopete/protocols/testbed/testbedfakeserver.cpp12
-rw-r--r--kopete/protocols/testbed/testbedfakeserver.h12
-rw-r--r--kopete/protocols/testbed/testbedincomingmessage.cpp2
-rw-r--r--kopete/protocols/testbed/testbedincomingmessage.h6
-rw-r--r--kopete/protocols/testbed/testbedprotocol.cpp30
-rw-r--r--kopete/protocols/testbed/testbedprotocol.h12
-rw-r--r--kopete/protocols/testbed/ui/testbedwebcamdialog.cpp30
-rw-r--r--kopete/protocols/testbed/ui/testbedwebcamdialog.h16
-rw-r--r--kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp106
-rw-r--r--kopete/protocols/winpopup/libwinpopup/libwinpopup.h46
-rw-r--r--kopete/protocols/winpopup/wpaccount.cpp34
-rw-r--r--kopete/protocols/winpopup/wpaccount.h26
-rw-r--r--kopete/protocols/winpopup/wpaddcontact.cpp30
-rw-r--r--kopete/protocols/winpopup/wpaddcontact.h4
-rw-r--r--kopete/protocols/winpopup/wpcontact.cpp30
-rw-r--r--kopete/protocols/winpopup/wpcontact.h20
-rw-r--r--kopete/protocols/winpopup/wpeditaccount.cpp12
-rw-r--r--kopete/protocols/winpopup/wpeditaccount.h2
-rw-r--r--kopete/protocols/winpopup/wpprotocol.cpp42
-rw-r--r--kopete/protocols/winpopup/wpprotocol.h28
-rw-r--r--kopete/protocols/winpopup/wpuserinfo.cpp20
-rw-r--r--kopete/protocols/winpopup/wpuserinfo.h6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/bytestream.cpp34
-rw-r--r--kopete/protocols/yahoo/libkyahoo/bytestream.h28
-rw-r--r--kopete/protocols/yahoo/libkyahoo/changestatustask.cpp2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/changestatustask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/chatsessiontask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/client.cpp360
-rw-r--r--kopete/protocols/yahoo/libkyahoo/client.h182
-rw-r--r--kopete/protocols/yahoo/libkyahoo/conferencetask.cpp68
-rw-r--r--kopete/protocols/yahoo/libkyahoo/conferencetask.h22
-rw-r--r--kopete/protocols/yahoo/libkyahoo/connector.cpp10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/connector.h14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp36
-rw-r--r--kopete/protocols/yahoo/libkyahoo/coreprotocol.h14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp32
-rw-r--r--kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h12
-rw-r--r--kopete/protocols/yahoo/libkyahoo/listtask.cpp16
-rw-r--r--kopete/protocols/yahoo/libkyahoo/listtask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/logintask.cpp92
-rw-r--r--kopete/protocols/yahoo/libkyahoo/logintask.h42
-rw-r--r--kopete/protocols/yahoo/libkyahoo/logofftask.cpp2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp26
-rw-r--r--kopete/protocols/yahoo/libkyahoo/messagereceivertask.h10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/modifybuddytask.h22
-rw-r--r--kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp42
-rw-r--r--kopete/protocols/yahoo/libkyahoo/modifyyabtask.h6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/oscartypes.h2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/pingtask.cpp2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp32
-rw-r--r--kopete/protocols/yahoo/libkyahoo/receivefiletask.h14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/requestpicturetask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/safedelete.cpp16
-rw-r--r--kopete/protocols/yahoo/libkyahoo/safedelete.h16
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendauthresptask.h8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp34
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendfiletask.h22
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendmessagetask.h8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp2
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendnotifytask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp40
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendpicturetask.h18
-rw-r--r--kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp32
-rw-r--r--kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h12
-rw-r--r--kopete/protocols/yahoo/libkyahoo/stealthtask.cpp4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/stealthtask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/stream.cpp4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/stream.h6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/task.cpp40
-rw-r--r--kopete/protocols/yahoo/libkyahoo/task.h14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/tests/logintest.h6
-rw-r--r--kopete/protocols/yahoo/libkyahoo/webcamtask.cpp118
-rw-r--r--kopete/protocols/yahoo/libkyahoo/webcamtask.h44
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yabentry.cpp32
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yabentry.h10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yabtask.cpp30
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yabtask.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h18
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp20
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoobytestream.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp50
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahoochattask.h28
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp76
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahooclientstream.h16
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp14
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahooconnector.h8
-rw-r--r--kopete/protocols/yahoo/libkyahoo/yahootypes.h10
-rw-r--r--kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp34
-rw-r--r--kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h4
-rw-r--r--kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp36
-rw-r--r--kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h18
-rw-r--r--kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp36
-rw-r--r--kopete/protocols/yahoo/ui/yahooinvitelistimpl.h24
-rw-r--r--kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp60
-rw-r--r--kopete/protocols/yahoo/ui/yahoouserinfodialog.h2
-rw-r--r--kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp40
-rw-r--r--kopete/protocols/yahoo/ui/yahoowebcamdialog.h12
-rw-r--r--kopete/protocols/yahoo/yahooaccount.cpp770
-rw-r--r--kopete/protocols/yahoo/yahooaccount.h156
-rw-r--r--kopete/protocols/yahoo/yahooaddcontact.cpp8
-rw-r--r--kopete/protocols/yahoo/yahooaddcontact.h2
-rw-r--r--kopete/protocols/yahoo/yahoochatsession.cpp54
-rw-r--r--kopete/protocols/yahoo/yahoochatsession.h2
-rw-r--r--kopete/protocols/yahoo/yahooconferencemessagemanager.cpp20
-rw-r--r--kopete/protocols/yahoo/yahooconferencemessagemanager.h6
-rw-r--r--kopete/protocols/yahoo/yahoocontact.cpp144
-rw-r--r--kopete/protocols/yahoo/yahoocontact.h28
-rw-r--r--kopete/protocols/yahoo/yahooeditaccount.cpp44
-rw-r--r--kopete/protocols/yahoo/yahooeditaccount.h2
-rw-r--r--kopete/protocols/yahoo/yahooprotocol.cpp92
-rw-r--r--kopete/protocols/yahoo/yahooprotocol.h16
-rw-r--r--kopete/protocols/yahoo/yahooverifyaccount.cpp18
-rw-r--r--kopete/protocols/yahoo/yahooverifyaccount.h4
-rw-r--r--kopete/protocols/yahoo/yahoowebcam.cpp28
-rw-r--r--kopete/protocols/yahoo/yahoowebcam.h16
-rw-r--r--kpf/src/ActiveMonitor.cpp44
-rw-r--r--kpf/src/ActiveMonitor.h22
-rw-r--r--kpf/src/ActiveMonitorItem.cpp22
-rw-r--r--kpf/src/ActiveMonitorItem.h18
-rw-r--r--kpf/src/ActiveMonitorWindow.cpp6
-rw-r--r--kpf/src/ActiveMonitorWindow.h6
-rw-r--r--kpf/src/Applet.cpp86
-rw-r--r--kpf/src/Applet.h24
-rw-r--r--kpf/src/AppletItem.cpp58
-rw-r--r--kpf/src/AppletItem.h10
-rw-r--r--kpf/src/BandwidthGraph.cpp60
-rw-r--r--kpf/src/BandwidthGraph.h28
-rw-r--r--kpf/src/ByteRange.cpp16
-rw-r--r--kpf/src/ByteRange.h10
-rw-r--r--kpf/src/ConfigDialogPage.cpp100
-rw-r--r--kpf/src/ConfigDialogPage.h26
-rw-r--r--kpf/src/Defaults.cpp28
-rw-r--r--kpf/src/Defaults.h6
-rw-r--r--kpf/src/DirSelectWidget.cpp32
-rw-r--r--kpf/src/DirSelectWidget.h10
-rw-r--r--kpf/src/DirectoryLister.cpp76
-rw-r--r--kpf/src/DirectoryLister.h6
-rw-r--r--kpf/src/ErrorMessageConfigDialog.cpp38
-rw-r--r--kpf/src/ErrorMessageConfigDialog.h14
-rw-r--r--kpf/src/Help.cpp2
-rw-r--r--kpf/src/Help.h4
-rw-r--r--kpf/src/KPFInterface.cpp16
-rw-r--r--kpf/src/KPFInterface.h16
-rw-r--r--kpf/src/PortValidator.cpp12
-rw-r--r--kpf/src/PortValidator.h6
-rw-r--r--kpf/src/PropertiesDialogPlugin.cpp200
-rw-r--r--kpf/src/PropertiesDialogPlugin.h10
-rw-r--r--kpf/src/Request.cpp56
-rw-r--r--kpf/src/Request.h44
-rw-r--r--kpf/src/Resource.cpp40
-rw-r--r--kpf/src/Resource.h10
-rw-r--r--kpf/src/Response.cpp40
-rw-r--r--kpf/src/Response.h4
-rw-r--r--kpf/src/RootValidator.cpp18
-rw-r--r--kpf/src/RootValidator.h6
-rw-r--r--kpf/src/Server.cpp68
-rw-r--r--kpf/src/Server.h18
-rw-r--r--kpf/src/ServerPrivate.h20
-rw-r--r--kpf/src/ServerSocket.cpp6
-rw-r--r--kpf/src/ServerSocket.h4
-rw-r--r--kpf/src/ServerWizard.cpp124
-rw-r--r--kpf/src/ServerWizard.h30
-rw-r--r--kpf/src/SingleServerConfigDialog.cpp8
-rw-r--r--kpf/src/SingleServerConfigDialog.h2
-rw-r--r--kpf/src/StartingKPFDialog.cpp28
-rw-r--r--kpf/src/StartingKPFDialog.h4
-rw-r--r--kpf/src/Utils.cpp70
-rw-r--r--kpf/src/Utils.h44
-rw-r--r--kpf/src/WebServer.cpp76
-rw-r--r--kpf/src/WebServer.h18
-rw-r--r--kpf/src/WebServerManager.cpp40
-rw-r--r--kpf/src/WebServerManager.h32
-rw-r--r--kpf/src/WebServerSocket.cpp2
-rw-r--r--kpf/src/WebServerSocket.h2
-rw-r--r--kppp/accounting.cpp94
-rw-r--r--kppp/accounting.h42
-rw-r--r--kppp/accounts.cpp148
-rw-r--r--kppp/accounts.h46
-rw-r--r--kppp/acctselect.cpp112
-rw-r--r--kppp/acctselect.h36
-rw-r--r--kppp/connect.cpp182
-rw-r--r--kppp/connect.h58
-rw-r--r--kppp/conwindow.cpp86
-rw-r--r--kppp/conwindow.h60
-rw-r--r--kppp/debug.cpp34
-rw-r--r--kppp/debug.h30
-rw-r--r--kppp/docking.cpp18
-rw-r--r--kppp/docking.h18
-rw-r--r--kppp/edit.cpp376
-rw-r--r--kppp/edit.h160
-rw-r--r--kppp/general.cpp280
-rw-r--r--kppp/general.h78
-rw-r--r--kppp/iplined.cpp10
-rw-r--r--kppp/iplined.h4
-rw-r--r--kppp/kpppwidget.cpp260
-rw-r--r--kppp/kpppwidget.h72
-rw-r--r--kppp/loginterm.cpp30
-rw-r--r--kppp/loginterm.h22
-rw-r--r--kppp/logview/export.cpp92
-rw-r--r--kppp/logview/export.h102
-rw-r--r--kppp/logview/log.cpp22
-rw-r--r--kppp/logview/log.h10
-rw-r--r--kppp/logview/loginfo.cpp18
-rw-r--r--kppp/logview/loginfo.h18
-rw-r--r--kppp/logview/main.cpp20
-rw-r--r--kppp/logview/main.h6
-rw-r--r--kppp/logview/monthly.cpp198
-rw-r--r--kppp/logview/monthly.h34
-rw-r--r--kppp/macros.h2
-rw-r--r--kppp/main.cpp44
-rw-r--r--kppp/main.h2
-rw-r--r--kppp/miniterm.cpp66
-rw-r--r--kppp/miniterm.h52
-rw-r--r--kppp/modem.cpp66
-rw-r--r--kppp/modem.h16
-rw-r--r--kppp/modemcmds.cpp154
-rw-r--r--kppp/modemcmds.h100
-rw-r--r--kppp/modemdb.cpp74
-rw-r--r--kppp/modemdb.h28
-rw-r--r--kppp/modeminfo.cpp60
-rw-r--r--kppp/modeminfo.h40
-rw-r--r--kppp/modems.cpp84
-rw-r--r--kppp/modems.h32
-rw-r--r--kppp/newwidget.cpp4
-rw-r--r--kppp/newwidget.h6
-rw-r--r--kppp/pppdargs.cpp70
-rw-r--r--kppp/pppdargs.h20
-rw-r--r--kppp/pppdata.cpp296
-rw-r--r--kppp/pppdata.h256
-rw-r--r--kppp/ppplog.cpp72
-rw-r--r--kppp/ppplog.h4
-rw-r--r--kppp/pppstatdlg.cpp94
-rw-r--r--kppp/pppstatdlg.h86
-rw-r--r--kppp/pppstats.cpp4
-rw-r--r--kppp/pppstats.h10
-rw-r--r--kppp/providerdb.cpp184
-rw-r--r--kppp/providerdb.h60
-rw-r--r--kppp/pwentry.cpp38
-rw-r--r--kppp/pwentry.h26
-rw-r--r--kppp/requester.cpp22
-rw-r--r--kppp/requester.h12
-rw-r--r--kppp/ruleset.cpp110
-rw-r--r--kppp/ruleset.h50
-rw-r--r--kppp/runtests.cpp10
-rw-r--r--kppp/scriptedit.cpp24
-rw-r--r--kppp/scriptedit.h14
-rw-r--r--krdc/events.h22
-rw-r--r--krdc/hostpreferences.cpp50
-rw-r--r--krdc/hostpreferences.h34
-rw-r--r--krdc/hostprofiles.ui.h12
-rw-r--r--krdc/keycapturedialog.cpp14
-rw-r--r--krdc/keycapturedialog.h2
-rw-r--r--krdc/kfullscreenpanel.cpp22
-rw-r--r--krdc/kfullscreenpanel.h30
-rw-r--r--krdc/krdc.cpp238
-rw-r--r--krdc/krdc.h78
-rw-r--r--krdc/kremoteview.cpp4
-rw-r--r--krdc/kremoteview.h12
-rw-r--r--krdc/kservicelocator.cpp142
-rw-r--r--krdc/kservicelocator.h74
-rw-r--r--krdc/main.cpp54
-rw-r--r--krdc/main.h18
-rw-r--r--krdc/maindialog.cpp10
-rw-r--r--krdc/maindialog.h6
-rw-r--r--krdc/maindialogwidget.cpp114
-rw-r--r--krdc/maindialogwidget.h20
-rw-r--r--krdc/preferencesdialog.cpp16
-rw-r--r--krdc/preferencesdialog.h2
-rw-r--r--krdc/rdp/krdpview.cpp62
-rw-r--r--krdc/rdp/krdpview.h34
-rw-r--r--krdc/rdp/rdphostpref.cpp16
-rw-r--r--krdc/rdp/rdphostpref.h20
-rw-r--r--krdc/smartptr.h6
-rw-r--r--krdc/vnc/kvncview.cpp132
-rw-r--r--krdc/vnc/kvncview.h52
-rw-r--r--krdc/vnc/pointerlatencyometer.h4
-rw-r--r--krdc/vnc/threads.cpp40
-rw-r--r--krdc/vnc/threads.h42
-rw-r--r--krdc/vnc/vnchostpref.cpp14
-rw-r--r--krdc/vnc/vnchostpref.h8
-rw-r--r--krfb/kcm_krfb/kcm_krfb.cpp62
-rw-r--r--krfb/kcm_krfb/kcm_krfb.h8
-rw-r--r--krfb/kinetd/kinetd.cpp130
-rw-r--r--krfb/kinetd/kinetd.h74
-rw-r--r--krfb/krfb/configuration.cc98
-rw-r--r--krfb/krfb/configuration.h28
-rw-r--r--krfb/krfb/connectiondialog.cc8
-rw-r--r--krfb/krfb/connectiondialog.h4
-rw-r--r--krfb/krfb/invitation.cc34
-rw-r--r--krfb/krfb/invitation.h20
-rw-r--r--krfb/krfb/invitedialog.cc18
-rw-r--r--krfb/krfb/invitedialog.h2
-rw-r--r--krfb/krfb/krfbifaceimpl.h4
-rw-r--r--krfb/krfb/main.cpp66
-rw-r--r--krfb/krfb/manageinvitations.ui.h2
-rw-r--r--krfb/krfb/personalinvitedialog.cc12
-rw-r--r--krfb/krfb/personalinvitedialog.h10
-rw-r--r--krfb/krfb/rfbcontroller.cc82
-rw-r--r--krfb/krfb/rfbcontroller.h40
-rw-r--r--krfb/krfb/trayicon.cpp32
-rw-r--r--krfb/krfb/trayicon.h16
-rw-r--r--krfb/krfb/xupdatescanner.cc6
-rw-r--r--krfb/krfb/xupdatescanner.h8
-rw-r--r--krfb/libvncserver/main.c6
-rw-r--r--krfb/libvncserver/rfb.h6
-rw-r--r--krfb/libvncserver/rfbserver.c4
-rw-r--r--krfb/libvncserver/sockets.c2
-rw-r--r--krfb/srvloc/kinetinterface.cpp20
-rw-r--r--krfb/srvloc/kinetinterface.h14
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.cpp10
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.h26
-rw-r--r--krfb/srvloc/kserviceregistry.cpp40
-rw-r--r--krfb/srvloc/kserviceregistry.h28
-rw-r--r--krfb/srvloc/uuid.cpp4
-rw-r--r--krfb/srvloc/uuid.h4
-rw-r--r--ksirc/FilterRuleEditor.cpp62
-rw-r--r--ksirc/FilterRuleEditor.h8
-rw-r--r--ksirc/KSOpenkSirc/enter_combo.cpp4
-rw-r--r--ksirc/KSOpenkSirc/enter_combo.h24
-rw-r--r--ksirc/KSOpenkSirc/open_ksirc.cpp100
-rw-r--r--ksirc/KSOpenkSirc/open_ksirc.h16
-rw-r--r--ksirc/KSOpenkSirc/serverDataType.h46
-rw-r--r--ksirc/KSOpenkSirc/serverFileParser.cpp26
-rw-r--r--ksirc/KSOpenkSirc/serverFileParser.h2
-rw-r--r--ksirc/KSPrefs/ksprefs.cpp72
-rw-r--r--ksirc/KSPrefs/ksprefs.h2
-rw-r--r--ksirc/KSPrefs/page_autoconnect.cpp84
-rw-r--r--ksirc/KSPrefs/page_autoconnect.h4
-rw-r--r--ksirc/KSPrefs/page_colors.cpp44
-rw-r--r--ksirc/KSPrefs/page_colors.h12
-rw-r--r--ksirc/KSPrefs/page_font.cpp12
-rw-r--r--ksirc/KSPrefs/page_font.h6
-rw-r--r--ksirc/KSPrefs/page_general.cpp10
-rw-r--r--ksirc/KSPrefs/page_general.h2
-rw-r--r--ksirc/KSPrefs/page_irccolors.cpp6
-rw-r--r--ksirc/KSPrefs/page_irccolors.h2
-rw-r--r--ksirc/KSPrefs/page_looknfeel.cpp18
-rw-r--r--ksirc/KSPrefs/page_looknfeel.h4
-rw-r--r--ksirc/KSPrefs/page_rmbmenu.cpp48
-rw-r--r--ksirc/KSPrefs/page_rmbmenu.h2
-rw-r--r--ksirc/KSPrefs/page_servchan.cpp30
-rw-r--r--ksirc/KSPrefs/page_servchan.h2
-rw-r--r--ksirc/KSPrefs/page_shortcuts.cpp8
-rw-r--r--ksirc/KSPrefs/page_shortcuts.h2
-rw-r--r--ksirc/KSPrefs/page_startup.cpp24
-rw-r--r--ksirc/KSPrefs/page_startup.h2
-rw-r--r--ksirc/KSProgress/ksprogress.cpp8
-rw-r--r--ksirc/KSProgress/ksprogress.h12
-rw-r--r--ksirc/KSProgress/ksprogressdata.cpp10
-rw-r--r--ksirc/KSProgress/ksprogressdata.h10
-rw-r--r--ksirc/KSTicker/kspainter.cpp22
-rw-r--r--ksirc/KSTicker/kspainter.h20
-rw-r--r--ksirc/KSTicker/ksticker.cpp112
-rw-r--r--ksirc/KSTicker/ksticker.h60
-rw-r--r--ksirc/KSTicker/ksttest.cpp24
-rw-r--r--ksirc/KSTicker/ksttest.h2
-rw-r--r--ksirc/KSTicker/speeddialog.cpp10
-rw-r--r--ksirc/KSTicker/speeddialog.h2
-rw-r--r--ksirc/KSTicker/speeddialogData.cpp50
-rw-r--r--ksirc/KSTicker/speeddialogData.h16
-rw-r--r--ksirc/NewWindowDialog.cpp24
-rw-r--r--ksirc/NewWindowDialog.h4
-rw-r--r--ksirc/ahistlineedit.cpp98
-rw-r--r--ksirc/ahistlineedit.h30
-rw-r--r--ksirc/alistbox.cpp86
-rw-r--r--ksirc/alistbox.h54
-rw-r--r--ksirc/baserules.cpp24
-rw-r--r--ksirc/baserules.h4
-rw-r--r--ksirc/boundscheckingarray.h8
-rw-r--r--ksirc/chanButtons.cpp110
-rw-r--r--ksirc/chanButtons.h30
-rw-r--r--ksirc/chanparser.cpp226
-rw-r--r--ksirc/chanparser.h68
-rw-r--r--ksirc/charSelector.cpp30
-rw-r--r--ksirc/charSelector.h14
-rw-r--r--ksirc/colorpicker.cpp140
-rw-r--r--ksirc/colorpicker.h34
-rw-r--r--ksirc/dccManager.cpp80
-rw-r--r--ksirc/dccManager.h50
-rw-r--r--ksirc/dccMgrTest.cpp2
-rw-r--r--ksirc/dccNew.cpp58
-rw-r--r--ksirc/dccNew.h10
-rw-r--r--ksirc/dccToplevel.cpp14
-rw-r--r--ksirc/dccToplevel.h6
-rw-r--r--ksirc/displayMgr.h14
-rw-r--r--ksirc/displayMgrMDI.cpp68
-rw-r--r--ksirc/displayMgrMDI.h18
-rw-r--r--ksirc/displayMgrSDI.cpp14
-rw-r--r--ksirc/displayMgrSDI.h12
-rw-r--r--ksirc/dockservercontroller.cpp144
-rw-r--r--ksirc/dockservercontroller.h68
-rw-r--r--ksirc/ioBroadcast.cpp10
-rw-r--r--ksirc/ioBroadcast.h4
-rw-r--r--ksirc/ioDCC.cpp276
-rw-r--r--ksirc/ioDCC.h36
-rw-r--r--ksirc/ioDiscard.cpp4
-rw-r--r--ksirc/ioDiscard.h4
-rw-r--r--ksirc/ioLAG.cpp12
-rw-r--r--ksirc/ioLAG.h12
-rw-r--r--ksirc/ioNotify.cpp10
-rw-r--r--ksirc/ioNotify.h12
-rw-r--r--ksirc/iocontroller.cpp66
-rw-r--r--ksirc/iocontroller.h14
-rw-r--r--ksirc/ksirc.cpp26
-rw-r--r--ksirc/ksircchannel.h32
-rw-r--r--ksirc/ksircprocess.cpp132
-rw-r--r--ksirc/ksircprocess.h44
-rw-r--r--ksirc/ksircserver.h28
-rw-r--r--ksirc/ksopts.cpp74
-rw-r--r--ksirc/ksopts.h108
-rw-r--r--ksirc/ksparser.cpp52
-rw-r--r--ksirc/ksparser.h24
-rw-r--r--ksirc/kstextview.cpp314
-rw-r--r--ksirc/kstextview.h192
-rw-r--r--ksirc/kstextviewtest.cpp28
-rw-r--r--ksirc/ksview.cpp118
-rw-r--r--ksirc/ksview.h30
-rw-r--r--ksirc/logfile.cpp32
-rw-r--r--ksirc/logfile.h16
-rw-r--r--ksirc/mditoplevel.cpp84
-rw-r--r--ksirc/mditoplevel.h48
-rw-r--r--ksirc/messageReceiver.cpp14
-rw-r--r--ksirc/messageReceiver.h24
-rw-r--r--ksirc/nickColourMaker.cpp10
-rw-r--r--ksirc/nickColourMaker.h16
-rw-r--r--ksirc/objFinder.cpp62
-rw-r--r--ksirc/objFinder.h20
-rw-r--r--ksirc/puke/commands.h10
-rw-r--r--ksirc/puke/controller.cpp60
-rw-r--r--ksirc/puke/controller.h46
-rw-r--r--ksirc/puke/palistbox.cpp4
-rw-r--r--ksirc/puke/palistbox.h2
-rw-r--r--ksirc/puke/pbutton.cpp34
-rw-r--r--ksirc/puke/pbutton.h8
-rw-r--r--ksirc/puke/pframe.cpp16
-rw-r--r--ksirc/puke/pframe.h8
-rw-r--r--ksirc/puke/pkfiledialog.cpp6
-rw-r--r--ksirc/puke/pkfiledialog.h2
-rw-r--r--ksirc/puke/plabel.cpp24
-rw-r--r--ksirc/puke/plabel.h8
-rw-r--r--ksirc/puke/playout.cpp18
-rw-r--r--ksirc/puke/playout.h12
-rw-r--r--ksirc/puke/plined.cpp24
-rw-r--r--ksirc/puke/plined.h8
-rw-r--r--ksirc/puke/plistbox.cpp32
-rw-r--r--ksirc/puke/plistbox.h8
-rw-r--r--ksirc/puke/pmenudta.cpp14
-rw-r--r--ksirc/puke/pmenudta.h18
-rw-r--r--ksirc/puke/pmessage.h6
-rw-r--r--ksirc/puke/pobject.cpp26
-rw-r--r--ksirc/puke/pobject.h20
-rw-r--r--ksirc/puke/pobjfinder.cpp14
-rw-r--r--ksirc/puke/pobjfinder.h4
-rw-r--r--ksirc/puke/ppopmenu.cpp26
-rw-r--r--ksirc/puke/ppopmenu.h8
-rw-r--r--ksirc/puke/pprogress.cpp12
-rw-r--r--ksirc/puke/pprogress.h2
-rw-r--r--ksirc/puke/ppushbt.cpp14
-rw-r--r--ksirc/puke/ppushbt.h8
-rw-r--r--ksirc/puke/ptabdialog.cpp20
-rw-r--r--ksirc/puke/ptabdialog.h10
-rw-r--r--ksirc/puke/ptablevw.cpp8
-rw-r--r--ksirc/puke/ptablevw.h8
-rw-r--r--ksirc/puke/pwidget.cpp66
-rw-r--r--ksirc/puke/pwidget.h34
-rw-r--r--ksirc/servercontroller.cpp250
-rw-r--r--ksirc/servercontroller.h66
-rw-r--r--ksirc/ssfeprompt.cpp12
-rw-r--r--ksirc/ssfeprompt.h6
-rw-r--r--ksirc/ssfepromptdata.cpp14
-rw-r--r--ksirc/ssfepromptdata.h12
-rw-r--r--ksirc/stringparserstate.h2
-rw-r--r--ksirc/topic.cpp108
-rw-r--r--ksirc/topic.h34
-rw-r--r--ksirc/toplevel.cpp526
-rw-r--r--ksirc/toplevel.h116
-rw-r--r--ksirc/usercontrolmenu.cpp14
-rw-r--r--ksirc/usercontrolmenu.h16
-rw-r--r--ktalkd/kcmktalkd/answmachpage.cpp56
-rw-r--r--ktalkd/kcmktalkd/answmachpage.h46
-rw-r--r--ktalkd/kcmktalkd/forwmachpage.cpp30
-rw-r--r--ktalkd/kcmktalkd/forwmachpage.h32
-rw-r--r--ktalkd/kcmktalkd/main.cpp26
-rw-r--r--ktalkd/kcmktalkd/main.h6
-rw-r--r--ktalkd/kcmktalkd/soundpage.cpp78
-rw-r--r--ktalkd/kcmktalkd/soundpage.h32
-rw-r--r--ktalkd/ktalkd/machines/forwmach.cpp2
-rw-r--r--ktalkd/ktalkd/machines/talkconn.cpp4
-rw-r--r--ktalkd/ktalkd/readcfg++.cpp30
-rw-r--r--ktalkd/ktalkd/unixsock.cpp18
-rw-r--r--ktalkd/ktalkdlg/ktalkdlg.cpp44
-rw-r--r--lanbrowsing/kcmlisa/findnic.cpp26
-rw-r--r--lanbrowsing/kcmlisa/findnic.h24
-rw-r--r--lanbrowsing/kcmlisa/kcmkiolan.cpp42
-rw-r--r--lanbrowsing/kcmlisa/kcmkiolan.h8
-rw-r--r--lanbrowsing/kcmlisa/kcmlisa.cpp182
-rw-r--r--lanbrowsing/kcmlisa/kcmlisa.h28
-rw-r--r--lanbrowsing/kcmlisa/kcmreslisa.cpp130
-rw-r--r--lanbrowsing/kcmlisa/kcmreslisa.h22
-rw-r--r--lanbrowsing/kcmlisa/main.cpp12
-rw-r--r--lanbrowsing/kcmlisa/portsettingsbar.cpp12
-rw-r--r--lanbrowsing/kcmlisa/portsettingsbar.h8
-rw-r--r--lanbrowsing/kcmlisa/setupwizard.cpp152
-rw-r--r--lanbrowsing/kcmlisa/setupwizard.h60
-rw-r--r--lanbrowsing/kio_lan/kio_lan.cpp36
-rw-r--r--lanbrowsing/kio_lan/kio_lan.h24
-rw-r--r--librss/article.cpp42
-rw-r--r--librss/article.h24
-rw-r--r--librss/document.cpp332
-rw-r--r--librss/document.h30
-rw-r--r--librss/global.h4
-rw-r--r--librss/image.cpp48
-rw-r--r--librss/image.h22
-rw-r--r--librss/loader.cpp52
-rw-r--r--librss/loader.h18
-rw-r--r--librss/testlibrss.cpp4
-rw-r--r--librss/testlibrss.h2
-rw-r--r--librss/textinput.cpp26
-rw-r--r--librss/textinput.h16
-rw-r--r--librss/tools_p.cpp12
-rw-r--r--librss/tools_p.h2
-rw-r--r--wifi/interface_dcop.h2
-rw-r--r--wifi/interface_wireless.cpp26
-rw-r--r--wifi/interface_wireless.h38
-rw-r--r--wifi/interface_wireless_wirelessextensions.cpp70
-rw-r--r--wifi/interface_wireless_wirelessextensions.h18
-rw-r--r--wifi/kcmwifi/configcrypto.ui.h8
-rw-r--r--wifi/kcmwifi/ifconfigpage.cpp76
-rw-r--r--wifi/kcmwifi/ifconfigpage.h2
-rw-r--r--wifi/kcmwifi/kcmwifi.cpp42
-rw-r--r--wifi/kcmwifi/kcmwifi.h6
-rw-r--r--wifi/kcmwifi/mainconfig.cpp16
-rw-r--r--wifi/kcmwifi/mainconfig.h2
-rw-r--r--wifi/kcmwifi/vendorconfig.cpp34
-rw-r--r--wifi/kcmwifi/wificonfig.cpp66
-rw-r--r--wifi/kcmwifi/wificonfig.h52
-rw-r--r--wifi/kwifimanager.cpp176
-rw-r--r--wifi/kwifimanager.h32
-rw-r--r--wifi/kwireless/kwireless.cpp8
-rw-r--r--wifi/kwireless/kwireless.h8
-rw-r--r--wifi/kwireless/kwirelesswidget.cpp76
-rw-r--r--wifi/kwireless/kwirelesswidget.h48
-rw-r--r--wifi/kwireless/linuxwirelesswidget.cpp18
-rw-r--r--wifi/kwireless/linuxwirelesswidget.h4
-rw-r--r--wifi/kwireless/propertytable.cpp30
-rw-r--r--wifi/kwireless/propertytable.h12
-rw-r--r--wifi/locator.cpp16
-rw-r--r--wifi/locator.h14
-rw-r--r--wifi/networkscanning.cpp46
-rw-r--r--wifi/networkscanning.h8
-rw-r--r--wifi/picture.cpp24
-rw-r--r--wifi/picture.h10
-rw-r--r--wifi/speed.cpp10
-rw-r--r--wifi/speed.h6
-rw-r--r--wifi/statistics.cpp20
-rw-r--r--wifi/statistics.h4
-rw-r--r--wifi/status.cpp38
-rw-r--r--wifi/status.h20
-rw-r--r--wifi/strength.cpp50
-rw-r--r--wifi/strength.h14
1799 files changed, 37520 insertions, 37520 deletions
diff --git a/dcoprss/article.cpp b/dcoprss/article.cpp
index d191bd74..4d06a7d8 100644
--- a/dcoprss/article.cpp
+++ b/dcoprss/article.cpp
@@ -32,18 +32,18 @@ RSSArticle::~RSSArticle()
delete m_Art;
}
-QString RSSArticle::title()
+TQString RSSArticle::title()
{
//kdDebug() << "Get title " << m_Art->title() << endl;
return m_Art->title();
}
-QString RSSArticle::description()
+TQString RSSArticle::description()
{
return m_Art->description();
}
-QString RSSArticle::link()
+TQString RSSArticle::link()
{
return m_Art->link().prettyURL();
}
diff --git a/dcoprss/cache.cpp b/dcoprss/cache.cpp
index 9c80a9a3..c4a566aa 100644
--- a/dcoprss/cache.cpp
+++ b/dcoprss/cache.cpp
@@ -28,14 +28,14 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qdatastream.h>
-#include <qfile.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
bool CacheEntry::isValid() const
{
// Cache entries get invalid after on hour. One shouldn't hardcode this
// but for now it'll do.
- return m_timeStamp.secsTo( QDateTime::currentDateTime() ) < 3600;
+ return m_timeStamp.secsTo( TQDateTime::currentDateTime() ) < 3600;
}
Cache *Cache::m_instance = 0;
@@ -47,14 +47,14 @@ Cache &Cache::self()
return *m_instance;
}
-QString Cache::getCacheKey( const QString &server, const QString &method,
- const QValueList<QVariant> &args )
+TQString Cache::getCacheKey( const TQString &server, const TQString &method,
+ const TQValueList<TQVariant> &args )
{
- QString key;
- key = server + QString::fromLatin1( "__" );
- key += method + QString::fromLatin1( "__" );
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQString key;
+ key = server + TQString::fromLatin1( "__" );
+ key += method + TQString::fromLatin1( "__" );
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
key += KXMLRPC::Query::marshal( *it );
@@ -73,56 +73,56 @@ Cache::~Cache()
void Cache::load()
{
- QFile file( cacheFileName() );
+ TQFile file( cacheFileName() );
if ( !file.open( IO_ReadOnly ) ) {
kdDebug() << "Failed to open cache file " << cacheFileName() << endl;
return;
}
- QDataStream stream( &file );
+ TQDataStream stream( &file );
while ( !stream.atEnd() ) {
- QString key;
+ TQString key;
stream >> key;
CacheEntry *entry = new CacheEntry;
stream >> *entry;
- QDict<CacheEntry>::insert( key, entry );
+ TQDict<CacheEntry>::insert( key, entry );
}
}
void Cache::save()
{
- QFile file( cacheFileName() );
+ TQFile file( cacheFileName() );
if ( !file.open( IO_WriteOnly ) ) {
kdDebug() << "Failed to open cache file " << cacheFileName() << endl;
return;
}
- QDataStream stream( &file );
+ TQDataStream stream( &file );
- QDictIterator<CacheEntry> it( *this );
+ TQDictIterator<CacheEntry> it( *this );
for ( ; it.current() != 0; ++it )
stream << it.currentKey() << *it.current();
}
-void Cache::touch( const QString &key )
+void Cache::touch( const TQString &key )
{
CacheEntry *entry = find( key );
if ( !entry )
return;
- entry->m_timeStamp = QDateTime::currentDateTime();
+ entry->m_timeStamp = TQDateTime::currentDateTime();
}
-void Cache::insert( const QString &key, const KXMLRPC::Query::Result &result )
+void Cache::insert( const TQString &key, const KXMLRPC::Query::Result &result )
{
CacheEntry *entry = new CacheEntry;
- entry->m_timeStamp = QDateTime::currentDateTime();
+ entry->m_timeStamp = TQDateTime::currentDateTime();
entry->m_result = result;
- QDict<CacheEntry>::insert( key, entry );
+ TQDict<CacheEntry>::insert( key, entry );
}
-QString Cache::cacheFileName() const
+TQString Cache::cacheFileName() const
{
return locateLocal( "appdata", "cache/dcoprss.cache" );
}
diff --git a/dcoprss/cache.h b/dcoprss/cache.h
index 8248b609..3bf73e12 100644
--- a/dcoprss/cache.h
+++ b/dcoprss/cache.h
@@ -25,41 +25,41 @@
#ifndef CACHE_H
#define CACHE_H
-#include <qcstring.h>
-#include <qdatetime.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
#include <xmlrpciface.h>
class CacheEntry
{
friend class Cache;
- friend QDataStream &operator>>( QDataStream &s, CacheEntry &e );
+ friend TQDataStream &operator>>( TQDataStream &s, CacheEntry &e );
public:
- const QDateTime &timeStamp() const { return m_timeStamp; }
+ const TQDateTime &timeStamp() const { return m_timeStamp; }
const KXMLRPC::Query::Result result() const { return m_result; }
bool isValid() const;
private:
- QDateTime m_timeStamp;
+ TQDateTime m_timeStamp;
KXMLRPC::Query::Result m_result;
};
-class Cache : public QDict<CacheEntry>
+class Cache : public TQDict<CacheEntry>
{
public:
static Cache &self();
- static QString getCacheKey( const QString &server,
- const QString &method,
- const QValueList<QVariant> &args );
+ static TQString getCacheKey( const TQString &server,
+ const TQString &method,
+ const TQValueList<TQVariant> &args );
void load();
void save();
- void touch( const QString &key );
+ void touch( const TQString &key );
- void insert( const QString &key, const KXMLRPC::Query::Result &result );
+ void insert( const TQString &key, const KXMLRPC::Query::Result &result );
private:
Cache();
@@ -67,17 +67,17 @@ class Cache : public QDict<CacheEntry>
Cache &operator=( const Cache &rhs ); // disabled
~Cache();
- QString cacheFileName() const;
+ TQString cacheFileName() const;
static Cache *m_instance;
};
-inline QDataStream &operator<<( QDataStream &s, const CacheEntry &e )
+inline TQDataStream &operator<<( TQDataStream &s, const CacheEntry &e )
{
return s << e.timeStamp() << e.result();
}
-inline QDataStream &operator>>( QDataStream &s, CacheEntry &e )
+inline TQDataStream &operator>>( TQDataStream &s, CacheEntry &e )
{
return s >> e.m_timeStamp >> e.m_result;
}
diff --git a/dcoprss/client.cpp b/dcoprss/client.cpp
index b74894de..f84fc0f9 100644
--- a/dcoprss/client.cpp
+++ b/dcoprss/client.cpp
@@ -2,10 +2,10 @@
#include <kapplication.h>
#include <dcopclient.h>
#include <dcopref.h>
-#include <qdatastream.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <stdlib.h>
/*
@@ -19,13 +19,13 @@ public:
// get our DCOP client and attach so that we may use it
DCOPClient *client = app->dcopClient();
client->attach();
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
kdDebug() << "Looking for rss service..." << endl;
if (!client->isApplicationRegistered("rssservice"))
{
kdDebug() << "Could not find service so I am starting it..." << endl;
- if(KApplication::startServiceByName("rssservice",QStringList(), &error, &appID ))
+ if(KApplication::startServiceByName("rssservice",TQStringList(), &error, &appID ))
{
kdDebug() << "Starting rssservice failed with message: " << error << endl;
exit(0);
@@ -39,14 +39,14 @@ public:
else
kdDebug() << "attached dcop signals..." << endl;
- QString url("http://freshmeat.net/backend/fm.rdf");
+ TQString url("http://freshmeat.net/backend/fm.rdf");
DCOPRef m_rssservice("rssservice","RSSService");
- m_rssservice.call("load(QString)", url);
- QStringList returnList = m_rssservice.call("list()");
- DCOPRef doc = m_rssservice.call("document(QString)", returnList[0]);
- QString title = doc.call("title()");
- QString link = doc.call("link()");
- QString description = doc.call("description()");
+ m_rssservice.call("load(TQString)", url);
+ TQStringList returnList = m_rssservice.call("list()");
+ DCOPRef doc = m_rssservice.call("document(TQString)", returnList[0]);
+ TQString title = doc.call("title()");
+ TQString link = doc.call("link()");
+ TQString description = doc.call("description()");
kdDebug() << title << endl;
kdDebug() << link << endl;
kdDebug() << description << endl;
@@ -55,9 +55,9 @@ public:
k_dcop:
virtual void refresh(DCOPRef doc)
{
- QString title = doc.call("title()");
- QString link = doc.call("link()");
- QString description = doc.call("description()");
+ TQString title = doc.call("title()");
+ TQString link = doc.call("link()");
+ TQString description = doc.call("description()");
kdDebug() << title << endl;
kdDebug() << link << endl;
kdDebug() << description << endl;
diff --git a/dcoprss/document.cpp b/dcoprss/document.cpp
index b43f600e..fb5cd904 100644
--- a/dcoprss/document.cpp
+++ b/dcoprss/document.cpp
@@ -16,20 +16,20 @@
* *
***************************************************************************/
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kurl.h>
#include "service.h"
-RSSDocument::RSSDocument(const QString& url) :
- QObject(), DCOPObject(), m_Url(url)
+RSSDocument::RSSDocument(const TQString& url) :
+ TQObject(), DCOPObject(), m_Url(url)
{
m_list.setAutoDelete( true );
m_Doc = 0L;
- m_pix = QPixmap();
+ m_pix = TQPixmap();
m_isLoading = false;
m_maxAge = 60;
- m_Timeout = QDateTime::currentDateTime();
+ m_Timeout = TQDateTime::currentDateTime();
m_state.clear();
}
@@ -79,8 +79,8 @@ void RSSDocument::loadingComplete(Loader *ldr, Document doc, Status stat)
Image *img = m_Doc->image();
if ( img )
{
- connect(img, SIGNAL(gotPixmap(const QPixmap &)),
- SLOT(pixmapLoaded(const QPixmap &)));
+ connect(img, TQT_SIGNAL(gotPixmap(const TQPixmap &)),
+ TQT_SLOT(pixmapLoaded(const TQPixmap &)));
img->getPixmap();
pixmapUpdating(DCOPRef(this));
}
@@ -94,13 +94,13 @@ void RSSDocument::loadingComplete(Loader *ldr, Document doc, Status stat)
}
}
-void RSSDocument::pixmapLoaded(const QPixmap &pix )
+void RSSDocument::pixmapLoaded(const TQPixmap &pix )
{
m_pix = pix;
pixmapUpdated(DCOPRef(this));
}
-QString RSSDocument::webMaster()
+TQString RSSDocument::webMaster()
{
if( m_Doc != 0L)
return m_Doc->webMaster();
@@ -108,7 +108,7 @@ QString RSSDocument::webMaster()
return "";
}
-QString RSSDocument::managingEditor()
+TQString RSSDocument::managingEditor()
{
if( m_Doc != 0L)
return m_Doc->managingEditor();
@@ -116,7 +116,7 @@ QString RSSDocument::managingEditor()
return "";
}
-QString RSSDocument::rating()
+TQString RSSDocument::rating()
{
if( m_Doc != 0L)
return m_Doc->rating();
@@ -124,23 +124,23 @@ QString RSSDocument::rating()
return "";
}
-QDateTime RSSDocument::lastBuildDate()
+TQDateTime RSSDocument::lastBuildDate()
{
if( m_Doc != 0L)
return m_Doc->lastBuildDate();
else
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
-QDateTime RSSDocument::pubDate()
+TQDateTime RSSDocument::pubDate()
{
if( m_Doc != 0L)
return m_Doc->pubDate();
else
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
-QString RSSDocument::copyright()
+TQString RSSDocument::copyright()
{
if( m_Doc != 0L)
return m_Doc->copyright();
@@ -148,20 +148,20 @@ QString RSSDocument::copyright()
return "";
}
-QStringList RSSDocument::articles()
+TQStringList RSSDocument::articles()
{
if( m_Doc != 0L)
{
kdDebug() << "Document giving articles..." << endl;
Article::List list = m_Doc->articles();
- QStringList stringList;
+ TQStringList stringList;
for(Article::List::ConstIterator it = list.begin(); it != list.end(); ++it)
stringList.append((*it).title());
return stringList;
}
else
- return QStringList();
+ return TQStringList();
}
DCOPRef RSSDocument::article(int idx)
@@ -179,7 +179,7 @@ int RSSDocument::count()
return 0;
}
-QString RSSDocument::link()
+TQString RSSDocument::link()
{
if( m_Doc != 0L)
return m_Doc->link().prettyURL();
@@ -187,7 +187,7 @@ QString RSSDocument::link()
return "";
}
-QString RSSDocument::description()
+TQString RSSDocument::description()
{
if( m_Doc != 0L)
return m_Doc->description();
@@ -195,7 +195,7 @@ QString RSSDocument::description()
return "";
}
-QString RSSDocument::title()
+TQString RSSDocument::title()
{
if( m_Doc != 0L)
return m_Doc->title();
@@ -203,7 +203,7 @@ QString RSSDocument::title()
return "";
}
-QString RSSDocument::verbVersion()
+TQString RSSDocument::verbVersion()
{
if( m_Doc != 0L)
return m_Doc->verbVersion();
@@ -211,7 +211,7 @@ QString RSSDocument::verbVersion()
return "";
}
-QString RSSDocument::pixmapURL()
+TQString RSSDocument::pixmapURL()
{
if( m_Doc != 0L)
if( m_Doc->image() )
@@ -222,7 +222,7 @@ QString RSSDocument::pixmapURL()
return "";
}
-QPixmap RSSDocument::pixmap()
+TQPixmap RSSDocument::pixmap()
{
return m_pix;
}
@@ -243,14 +243,14 @@ bool RSSDocument::pixmapValid()
void RSSDocument::refresh()
{
kdDebug() << "Mod time " << m_Timeout.toString() << endl;
- kdDebug() << "Current time " << QDateTime::currentDateTime().toString() << endl;
+ kdDebug() << "Current time " << TQDateTime::currentDateTime().toString() << endl;
- if(!m_isLoading && (QDateTime::currentDateTime() >= m_Timeout))
+ if(!m_isLoading && (TQDateTime::currentDateTime() >= m_Timeout))
{
kdDebug() << "Document going to refresh" << endl;
m_isLoading = true;
Loader *loader = Loader::create(this,
- SLOT(loadingComplete(Loader *, Document, Status)));
+ TQT_SLOT(loadingComplete(Loader *, Document, Status)));
loader->loadFrom(KURL( m_Url ), new FileRetriever());
documentUpdating(DCOPRef(this));
}
@@ -266,8 +266,8 @@ void RSSDocument::refresh()
Image *img = m_Doc->image();
if ( img )
{
- connect(img, SIGNAL(gotPixmap(const QPixmap &)),
- SLOT(pixmapLoaded(const QPixmap &)));
+ connect(img, TQT_SIGNAL(gotPixmap(const TQPixmap &)),
+ TQT_SLOT(pixmapLoaded(const TQPixmap &)));
img->getPixmap();
pixmapUpdating(DCOPRef(this));
}
@@ -289,17 +289,17 @@ void RSSDocument::setMaxAge(int _min)
m_Timeout.addSecs(m_maxAge);
}
-int RSSDocument::state( const QString &title) const
+int RSSDocument::state( const TQString &title) const
{
return m_state[title];
}
-void RSSDocument::setState( const QString &title, int s )
+void RSSDocument::setState( const TQString &title, int s )
{
m_state[title] = s;
}
-void RSSDocument::read( const QString &title)
+void RSSDocument::read( const TQString &title)
{
m_state[title] = 3;
}
diff --git a/dcoprss/feedbrowser.cpp b/dcoprss/feedbrowser.cpp
index 59a55040..eae10f63 100644
--- a/dcoprss/feedbrowser.cpp
+++ b/dcoprss/feedbrowser.cpp
@@ -9,18 +9,18 @@
#include <klocale.h>
#include <dcopclient.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qvbox.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqvbox.h>
-CategoryItem::CategoryItem( KListView *parent, const QString &category )
+CategoryItem::CategoryItem( KListView *parent, const TQString &category )
: KListViewItem( parent ),
m_category( category )
{
init();
}
-CategoryItem::CategoryItem( KListViewItem *parent, const QString &category )
+CategoryItem::CategoryItem( KListViewItem *parent, const TQString &category )
: KListViewItem( parent ),
m_category( category )
{
@@ -47,18 +47,18 @@ void CategoryItem::setOpen( bool open )
void CategoryItem::populate()
{
m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" );
- connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ),
- this, SLOT( gotCategories( const QStringList & ) ) );
+ connect( m_dcopIface, TQT_SIGNAL( gotCategories( const TQStringList & ) ),
+ this, TQT_SLOT( gotCategories( const TQStringList & ) ) );
m_dcopIface->getCategories( m_category );
}
-void CategoryItem::gotCategories( const QStringList &categories )
+void CategoryItem::gotCategories( const TQStringList &categories )
{
delete m_dcopIface;
m_dcopIface = 0;
- QStringList::ConstIterator it = categories.begin();
- QStringList::ConstIterator end = categories.end();
+ TQStringList::ConstIterator it = categories.begin();
+ TQStringList::ConstIterator end = categories.end();
for ( ; it != end; ++it )
new CategoryItem( this, *it );
@@ -66,45 +66,45 @@ void CategoryItem::gotCategories( const QStringList &categories )
KListViewItem::setOpen( true );
}
-DCOPRSSIface::DCOPRSSIface( QObject *parent, const char *name ) :
- QObject( parent, name ), DCOPObject( "FeedBrowser" )
+DCOPRSSIface::DCOPRSSIface( TQObject *parent, const char *name ) :
+ TQObject( parent, name ), DCOPObject( "FeedBrowser" )
{
- connectDCOPSignal( "rssservice", "RSSQuery", "gotCategories(QStringList)",
- "slotGotCategories(QStringList)", false );
+ connectDCOPSignal( "rssservice", "RSSQuery", "gotCategories(TQStringList)",
+ "slotGotCategories(TQStringList)", false );
}
-void DCOPRSSIface::getCategories( const QString &cat )
+void DCOPRSSIface::getCategories( const TQString &cat )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << cat;
kapp->dcopClient()->send( "rssservice", "RSSQuery",
- "getCategories(QString)", data );
+ "getCategories(TQString)", data );
}
-void DCOPRSSIface::slotGotCategories( const QStringList &categories )
+void DCOPRSSIface::slotGotCategories( const TQStringList &categories )
{
emit gotCategories( categories );
}
-FeedBrowserDlg::FeedBrowserDlg( QWidget *parent, const char *name )
+FeedBrowserDlg::FeedBrowserDlg( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "DCOPRSS Feed Browser" ),
Close, Close, true )
{
m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" );
- connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ),
- this, SLOT( gotTopCategories( const QStringList & ) ) );
+ connect( m_dcopIface, TQT_SIGNAL( gotCategories( const TQStringList & ) ),
+ this, TQT_SLOT( gotTopCategories( const TQStringList & ) ) );
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
m_feedList = new KListView( mainWidget, "m_feedList" );
m_feedList->setAllColumnsShowFocus( true );
m_feedList->setRootIsDecorated( true );
m_feedList->addColumn( i18n( "Name" ) );
- connect( m_feedList, SIGNAL( executed( QListViewItem * ) ),
- this, SLOT( itemSelected( QListViewItem * ) ) );
- connect( m_feedList, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( itemSelected( QListViewItem * ) ) );
+ connect( m_feedList, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ this, TQT_SLOT( itemSelected( TQListViewItem * ) ) );
+ connect( m_feedList, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQT_SLOT( itemSelected( TQListViewItem * ) ) );
resize( 500, 400 );
@@ -116,15 +116,15 @@ void FeedBrowserDlg::getTopCategories()
m_dcopIface->getCategories( "Top" );
}
-void FeedBrowserDlg::gotTopCategories( const QStringList &categories )
+void FeedBrowserDlg::gotTopCategories( const TQStringList &categories )
{
- QStringList::ConstIterator it = categories.begin();
- QStringList::ConstIterator end = categories.end();
+ TQStringList::ConstIterator it = categories.begin();
+ TQStringList::ConstIterator end = categories.end();
for ( ; it != end; ++it )
new CategoryItem( m_feedList, *it );
}
-void FeedBrowserDlg::itemSelected( QListViewItem *item )
+void FeedBrowserDlg::itemSelected( TQListViewItem *item )
{
item->setOpen( !item->isOpen() );
}
diff --git a/dcoprss/feedbrowser.h b/dcoprss/feedbrowser.h
index 829ecd5e..9b8ce86f 100644
--- a/dcoprss/feedbrowser.h
+++ b/dcoprss/feedbrowser.h
@@ -1,45 +1,45 @@
#ifndef FEEDBROWSER_H
#define FEEDBROWSER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
#include <kdialogbase.h>
#include <klistview.h>
-class DCOPRSSIface : public QObject, public DCOPObject
+class DCOPRSSIface : public TQObject, public DCOPObject
{
K_DCOP
Q_OBJECT
public:
- DCOPRSSIface( QObject *parent, const char *name = 0 );
+ DCOPRSSIface( TQObject *parent, const char *name = 0 );
k_dcop:
- void slotGotCategories( const QStringList &categories );
+ void slotGotCategories( const TQStringList &categories );
public slots:
- void getCategories( const QString &cat = "Top" );
+ void getCategories( const TQString &cat = "Top" );
signals:
- void gotCategories( const QStringList &categories );
+ void gotCategories( const TQStringList &categories );
};
-class CategoryItem : public QObject, public KListViewItem
+class CategoryItem : public TQObject, public KListViewItem
{
Q_OBJECT
public:
- CategoryItem( KListView *parent, const QString &category );
- CategoryItem( KListViewItem *parent, const QString &category );
+ CategoryItem( KListView *parent, const TQString &category );
+ CategoryItem( KListViewItem *parent, const TQString &category );
virtual void setOpen( bool open );
private slots:
- void gotCategories( const QStringList &categories );
+ void gotCategories( const TQStringList &categories );
private:
void populate();
void init();
- QString m_category;
+ TQString m_category;
bool m_populated;
DCOPRSSIface *m_dcopIface;
};
@@ -49,11 +49,11 @@ class FeedBrowserDlg : public KDialogBase
Q_OBJECT
friend class CategoryItem;
public:
- FeedBrowserDlg( QWidget *parent, const char *name = 0 );
+ FeedBrowserDlg( TQWidget *parent, const char *name = 0 );
private slots:
- void itemSelected( QListViewItem *item );
- void gotTopCategories( const QStringList &categories );
+ void itemSelected( TQListViewItem *item );
+ void gotTopCategories( const TQStringList &categories );
private:
void getTopCategories();
diff --git a/dcoprss/query.cpp b/dcoprss/query.cpp
index b2c29fdf..9c324890 100644
--- a/dcoprss/query.cpp
+++ b/dcoprss/query.cpp
@@ -27,35 +27,35 @@
using KXMLRPC::Server;
-void SlotCaller::call( QObject *object, const char *slot,
+void SlotCaller::call( TQObject *object, const char *slot,
const KXMLRPC::Query::Result &result )
{
SlotCaller caller;
- connect( &caller, SIGNAL( signal( const KXMLRPC::Query::Result &) ),
+ connect( &caller, TQT_SIGNAL( signal( const KXMLRPC::Query::Result &) ),
object, slot );
emit caller.signal( result );
}
-QueryService::QueryService( RSSService *service ) : QObject(), DCOPObject( "RSSQuery" ),
+QueryService::QueryService( RSSService *service ) : TQObject(), DCOPObject( "RSSQuery" ),
m_service( service )
{
m_xmlrpcServer = new KXMLRPC::Server( KURL( "http://www.syndic8.com/xmlrpc.php"), this );
}
-QStringList QueryService::listActive()
+TQStringList QueryService::listActive()
{
if ( !m_service )
- return QStringList();
+ return TQStringList();
return m_service->list();
}
-void QueryService::cachedCall( const QString &method,
- const QValueList<QVariant> &args,
+void QueryService::cachedCall( const TQString &method,
+ const TQValueList<TQVariant> &args,
const char *slot )
{
kdDebug() << "Calling " << method << endl;
- const QString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(),
+ const TQString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(),
method, args );
CacheEntry *cacheEntry = Cache::self().find( cacheKey );
@@ -70,7 +70,7 @@ void QueryService::cachedCall( const QString &method,
void QueryService::updateCache( const KXMLRPC::Query::Result &result )
{
- const QString cacheKey = Cache::getCacheKey( result.server(),
+ const TQString cacheKey = Cache::getCacheKey( result.server(),
result.method(),
result.args() );
@@ -81,57 +81,57 @@ void QueryService::updateCache( const KXMLRPC::Query::Result &result )
}
}
-void QueryService::findFeeds( const QString &query )
+void QueryService::findFeeds( const TQString &query )
{
kdDebug() << "QueryService::findFeeds()" << endl;
- QStringList args;
+ TQStringList args;
args << query << "headlines_rank";
cachedCall( "syndic8.FindFeeds", Server::toVariantList( args ),
- SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::findSites( const QString& query )
+void QueryService::findSites( const TQString& query )
{
kdDebug() << "QueryService::findSites()" << endl;
cachedCall( "syndic8.FindSites", Server::toVariantList( query ),
- SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::getFeedInfo( const QVariant& ids )
+void QueryService::getFeedInfo( const TQVariant& ids )
{
kdDebug() << "QueryService::getFeedInfo()" << endl;
cachedCall( "syndic8.GetFeedInfo", Server::toVariantList( ids ),
- SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::getCategories( const QString &category )
+void QueryService::getCategories( const TQString &category )
{
kdDebug() << "QueryService::getCategories()" << endl;
if ( category == "Top" ) {
- cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( QString::fromLatin1( "DMOZ" ) ),
- SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
+ cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( TQString::fromLatin1( "DMOZ" ) ),
+ TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
} else {
- QStringList args;
+ TQStringList args;
args << "DMOZ" << category;
cachedCall( "syndic8.GetCategoryChildren", Server::toVariantList( args ),
- SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
}
}
-void QueryService::getFeedsInCategory( const QString &category )
+void QueryService::getFeedsInCategory( const TQString &category )
{
kdDebug() << "QueryService::getFeedsInCategory()" << endl;
- QStringList args;
+ TQStringList args;
args << "DMOZ" << category;
cachedCall( "syndic8.GetFeedsInCategory", Server::toVariantList( args ),
- SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) );
}
void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result )
@@ -144,11 +144,11 @@ void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result )
updateCache( result );
- QValueList<int> ids;
+ TQValueList<int> ids;
- const QValueList<QVariant> values = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = values.begin();
- QValueList<QVariant>::ConstIterator end = values.end();
+ const TQValueList<TQVariant> values = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = values.begin();
+ TQValueList<TQVariant>::ConstIterator end = values.end();
for ( ; it != end; ++it ) {
ids << ( *it ).toInt();
kdDebug() << "Found feed #" << ( *it ).toInt() << endl;
@@ -166,17 +166,17 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result )
updateCache( result );
- QMap<QString, QString> links;
- QValueList<RSSNewsFeed> feeds;
+ TQMap<TQString, TQString> links;
+ TQValueList<RSSNewsFeed> feeds;
- const QValueList<QVariant> feedInfos = result.data();
- QValueList<QVariant>::ConstIterator it = feedInfos.begin();
- QValueList<QVariant>::ConstIterator end = feedInfos.end();
+ const TQValueList<TQVariant> feedInfos = result.data();
+ TQValueList<TQVariant>::ConstIterator it = feedInfos.begin();
+ TQValueList<TQVariant>::ConstIterator end = feedInfos.end();
for ( ; it != end; ++it ) {
- const QMap<QString, QVariant> feedInfo = ( *it ).toMap();
+ const TQMap<TQString, TQVariant> feedInfo = ( *it ).toMap();
- const QString name = feedInfo[ "sitename" ].toString();
- const QString link = feedInfo[ "dataurl" ].toString();
+ const TQString name = feedInfo[ "sitename" ].toString();
+ const TQString link = feedInfo[ "dataurl" ].toString();
links[ name ] = link;
RSSNewsFeed feed;
@@ -189,7 +189,7 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result )
feed.m_editor = feedInfo[ "editor" ].toString();
feed.m_publisher = feedInfo[ "publisher" ].toString();
feed.m_creator = feedInfo[ "creator" ].toString();
- QDateTime dateTime;
+ TQDateTime dateTime;
dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_created" ].toString() ) );
feed.m_dateCreated = dateTime;
dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_approved" ].toString() ) );
@@ -231,11 +231,11 @@ void QueryService::slotGotCategories( const KXMLRPC::Query::Result &result )
updateCache( result );
- QStringList categories;
+ TQStringList categories;
- const QValueList<QVariant> cats = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = cats.begin();
- QValueList<QVariant>::ConstIterator end = cats.end();
+ const TQValueList<TQVariant> cats = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = cats.begin();
+ TQValueList<TQVariant>::ConstIterator end = cats.end();
for ( ; it != end; ++it )
categories << ( *it ).toString();
@@ -254,11 +254,11 @@ void QueryService::slotGotFeedsInCategory( const KXMLRPC::Query::Result &result
updateCache( result );
- QValueList<int> ids;
+ TQValueList<int> ids;
- const QValueList<QVariant> values = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = values.begin();
- QValueList<QVariant>::ConstIterator end = values.end();
+ const TQValueList<TQVariant> values = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = values.begin();
+ TQValueList<TQVariant>::ConstIterator end = values.end();
for ( ; it != end; ++it ) {
ids << ( *it ).toInt();
kdDebug() << "Got feed in category: #" << ( *it ).toInt() << endl;
diff --git a/dcoprss/query.h b/dcoprss/query.h
index d87e0505..dbaf5093 100644
--- a/dcoprss/query.h
+++ b/dcoprss/query.h
@@ -24,10 +24,10 @@
#include <dcopobject.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
class RSSService;
@@ -39,7 +39,7 @@ class SlotCaller : public QObject
{
Q_OBJECT
public:
- static void call( QObject *object, const char *slot,
+ static void call( TQObject *object, const char *slot,
const KXMLRPC::Query::Result &value );
signals:
@@ -49,7 +49,7 @@ class SlotCaller : public QObject
SlotCaller() { }
};
-class QueryService : public QObject, public DCOPObject
+class QueryService : public TQObject, public DCOPObject
{
K_DCOP
Q_OBJECT
@@ -57,23 +57,23 @@ class QueryService : public QObject, public DCOPObject
QueryService( RSSService *service );
k_dcop_signals:
- void feedIds( QValueList<int> ids );
- void feedInfo(QMap<QString, QString> links);
- void feedInfo(QValueList<RSSNewsFeed> feeds);
- void gotCategories( const QStringList &categories );
- void gotFeedsInCategory( const QValueList<int> &ids );
+ void feedIds( TQValueList<int> ids );
+ void feedInfo(TQMap<TQString, TQString> links);
+ void feedInfo(TQValueList<RSSNewsFeed> feeds);
+ void gotCategories( const TQStringList &categories );
+ void gotFeedsInCategory( const TQValueList<int> &ids );
k_dcop:
/**
* Lists the active feeds in use...
**/
- QStringList listActive(); // just for testing...
+ TQStringList listActive(); // just for testing...
/**
* Query the www.syndic8.com XML-RPC interface for the
* string. The RSS ids are treturned in a integer list.
**/
- void findFeeds( const QString& query );
+ void findFeeds( const TQString& query );
/**
* Query the www.syndic8.com XML-RPC interface for the
@@ -81,26 +81,26 @@ class QueryService : public QObject, public DCOPObject
* each feed in the feed list. The RSS ids are treturned
* in a integer list.
**/
- void findSites( const QString& query );
+ void findSites( const TQString& query );
/**
* Query the www.syndic8.com XML-RPC interface for the
- * requested RSS feed(s). Returned is a QMap with the format
+ * requested RSS feed(s). Returned is a TQMap with the format
* of Name (Site URL), RSS URL
**/
- void getFeedInfo( const QVariant& ids );
+ void getFeedInfo( const TQVariant& ids );
/**
* Returns the list of subcategories in the specified category.
* If no "Top" is specified, the root categories are returned.
*/
- void getCategories( const QString &category );
+ void getCategories( const TQString &category );
/**
* Queries the database for the list of needsfeed ID's which are
* associated with the given category.
*/
- void getFeedsInCategory( const QString &category );
+ void getFeedsInCategory( const TQString &category );
private slots:
@@ -110,7 +110,7 @@ class QueryService : public QObject, public DCOPObject
void slotGotFeedsInCategory( const KXMLRPC::Query::Result &result );
private:
- void cachedCall( const QString &method, const QValueList<QVariant> &args,
+ void cachedCall( const TQString &method, const TQValueList<TQVariant> &args,
const char *slot );
void updateCache( const KXMLRPC::Query::Result &result );
diff --git a/dcoprss/rssnewsfeed.h b/dcoprss/rssnewsfeed.h
index 3c2e04b5..ee300655 100644
--- a/dcoprss/rssnewsfeed.h
+++ b/dcoprss/rssnewsfeed.h
@@ -11,76 +11,76 @@
#ifndef RSSNEWSFEED_H
#define RSSNEWSFEED_H
-#include <qdatetime.h>
-#include <qstringlist.h>
-#include <qvariant.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
#include <kdatastream.h>
class QueryService;
class RSSNewsFeed
{
- friend QDataStream &operator>>( QDataStream &stream, RSSNewsFeed &feed );
- friend QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed );
+ friend TQDataStream &operator>>( TQDataStream &stream, RSSNewsFeed &feed );
+ friend TQDataStream &operator<<( TQDataStream &stream, const RSSNewsFeed &feed );
friend class QueryService;
public:
unsigned int id() const { return m_id; }
- QString name() const { return m_name; }
- QString description() const { return m_description; }
- QString origin() const { return m_origin; }
- QString languageCode() const { return m_languageCode; }
- QString status() const { return m_status; }
- QString version() const { return m_version; }
- QString homePage() const { return m_homePage; }
- QString sourceFile() const { return m_sourceFile; }
- QString imageUrl() const { return m_imageUrl; }
- QString webmaster() const { return m_webmaster; }
- QString editor() const { return m_editor; }
- QString publisher() const { return m_publisher; }
- QString creator() const { return m_creator; }
- const QDateTime &dateCreated() const { return m_dateCreated; }
- const QDateTime &dateApproved() const { return m_dateApproved; }
- const QDateTime dateXmlChanged() const { return m_dateXmlChanged; }
+ TQString name() const { return m_name; }
+ TQString description() const { return m_description; }
+ TQString origin() const { return m_origin; }
+ TQString languageCode() const { return m_languageCode; }
+ TQString status() const { return m_status; }
+ TQString version() const { return m_version; }
+ TQString homePage() const { return m_homePage; }
+ TQString sourceFile() const { return m_sourceFile; }
+ TQString imageUrl() const { return m_imageUrl; }
+ TQString webmaster() const { return m_webmaster; }
+ TQString editor() const { return m_editor; }
+ TQString publisher() const { return m_publisher; }
+ TQString creator() const { return m_creator; }
+ const TQDateTime &dateCreated() const { return m_dateCreated; }
+ const TQDateTime &dateApproved() const { return m_dateApproved; }
+ const TQDateTime dateXmlChanged() const { return m_dateXmlChanged; }
bool fetchable() const { return m_fetchable; }
unsigned int views() const { return m_views; }
unsigned int headlinesPerDay() const { return m_headlinesPerDay; }
unsigned int headlinesRank() const { return m_headlinesRank; }
- QString toolkit() const { return m_toolkit; }
- QString toolkitVersion() const { return m_toolkitVersion; }
+ TQString toolkit() const { return m_toolkit; }
+ TQString toolkitVersion() const { return m_toolkitVersion; }
unsigned int pollingInterval() const { return m_pollingInterval; }
- const QDateTime &lastPoll() const { return m_lastPoll; }
- QStringList categories() const { return m_categories; }
+ const TQDateTime &lastPoll() const { return m_lastPoll; }
+ TQStringList categories() const { return m_categories; }
private:
unsigned int m_id;
- QString m_name;
- QString m_description;
- QString m_origin;
- QString m_languageCode;
- QString m_status;
- QString m_version;
- QString m_homePage;
- QString m_sourceFile;
- QString m_imageUrl;
- QString m_webmaster;
- QString m_editor;
- QString m_publisher;
- QString m_creator;
- QDateTime m_dateCreated;
- QDateTime m_dateApproved;
- QDateTime m_dateXmlChanged;
+ TQString m_name;
+ TQString m_description;
+ TQString m_origin;
+ TQString m_languageCode;
+ TQString m_status;
+ TQString m_version;
+ TQString m_homePage;
+ TQString m_sourceFile;
+ TQString m_imageUrl;
+ TQString m_webmaster;
+ TQString m_editor;
+ TQString m_publisher;
+ TQString m_creator;
+ TQDateTime m_dateCreated;
+ TQDateTime m_dateApproved;
+ TQDateTime m_dateXmlChanged;
bool m_fetchable;
unsigned int m_views;
unsigned int m_headlinesPerDay;
unsigned int m_headlinesRank;
- QString m_toolkit;
- QString m_toolkitVersion;
+ TQString m_toolkit;
+ TQString m_toolkitVersion;
unsigned int m_pollingInterval;
- QDateTime m_lastPoll;
- QStringList m_categories;
+ TQDateTime m_lastPoll;
+ TQStringList m_categories;
};
-inline QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed )
+inline TQDataStream &operator<<( TQDataStream &stream, const RSSNewsFeed &feed )
{
return stream << feed.m_id << feed.m_name << feed.m_description
<< feed.m_origin << feed.m_languageCode << feed.m_status
@@ -94,7 +94,7 @@ inline QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed )
<< feed.m_categories;
}
-inline QDataStream &operator>>( QDataStream &stream, RSSNewsFeed &feed )
+inline TQDataStream &operator>>( TQDataStream &stream, RSSNewsFeed &feed )
{
int i;
stream >> feed.m_id >> feed.m_name >> feed.m_description
diff --git a/dcoprss/service.cpp b/dcoprss/service.cpp
index 74544dc1..54e987b2 100644
--- a/dcoprss/service.cpp
+++ b/dcoprss/service.cpp
@@ -34,16 +34,16 @@ RSSService::~RSSService()
}
-QStringList RSSService::list()
+TQStringList RSSService::list()
{
- QStringList lst;
- QDictIterator<RSSDocument> itr(m_list);
+ TQStringList lst;
+ TQDictIterator<RSSDocument> itr(m_list);
for(; itr.current(); ++itr)
lst.append(itr.currentKey());
return lst;
}
-DCOPRef RSSService::add(QString id)
+DCOPRef RSSService::add(TQString id)
{
if(m_list.find(id) == 0L) { // add a new one only if we need to
m_list.insert(id, new RSSDocument(id));
@@ -53,14 +53,14 @@ DCOPRef RSSService::add(QString id)
return document(id);
}
-void RSSService::remove(QString id)
+void RSSService::remove(TQString id)
{
m_list.remove(id);
removed(id);
saveLinks();
}
-DCOPRef RSSService::document(QString id)
+DCOPRef RSSService::document(TQString id)
{
if( m_list[id] )
return DCOPRef(m_list[id]);
@@ -81,9 +81,9 @@ void RSSService::loadLinks()
{
KConfig *conf = kapp->config();
conf->setGroup("RSS Links");
- const QStringList links = conf->readListEntry ("links");
- QStringList::ConstIterator it = links.begin();
- QStringList::ConstIterator end = links.end();
+ const TQStringList links = conf->readListEntry ("links");
+ TQStringList::ConstIterator it = links.begin();
+ TQStringList::ConstIterator end = links.end();
for ( ; it != end; ++it )
add( *it );
}
@@ -92,8 +92,8 @@ void RSSService::saveLinks()
{
KConfig *conf = kapp->config();
conf->setGroup("RSS Links");
- QStringList lst;
- QDictIterator<RSSDocument> itr(m_list);
+ TQStringList lst;
+ TQDictIterator<RSSDocument> itr(m_list);
for(; itr.current(); ++itr)
lst.append(itr.currentKey());
diff --git a/dcoprss/service.h b/dcoprss/service.h
index 35cf229e..64a3589e 100644
--- a/dcoprss/service.h
+++ b/dcoprss/service.h
@@ -21,12 +21,12 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
#include <librss/global.h>
#include <librss/loader.h>
#include <librss/document.h>
@@ -47,7 +47,7 @@ class RSSService : public DCOPObject
private:
- QDict<RSSDocument> m_list;
+ TQDict<RSSDocument> m_list;
public:
RSSService();
@@ -59,14 +59,14 @@ class RSSService : public DCOPObject
k_dcop_signals:
/**
* Emmitted when a new document has been added. You can then
- * use document(QString) to get the dcop ref for the object.
+ * use document(TQString) to get the dcop ref for the object.
* Note: this document may or may not be valid at this
* point so you should connect your dcop signals and then
* do a documentValid() on the dcop ref to make sure of its
* state.
**/
- void added(QString);
+ void added(TQString);
/**
* Emmitted when the document has been removed.
* note at this point the DCOPRef for this object is
@@ -75,7 +75,7 @@ class RSSService : public DCOPObject
* process of loading the document call will be safely ignored
* and you will be notified of the updates.
**/
- void removed(QString);
+ void removed(TQString);
k_dcop:
/**
* Add a new rdf file resource. This will return a dcop reference to the resource. If its a new
@@ -83,50 +83,50 @@ class RSSService : public DCOPObject
* once this reference has been returned you may connect dcop signals and then call
* refresh on the RSSDocument. The document will not be updated until refresh is called.
**/
- DCOPRef add(QString url);
+ DCOPRef add(TQString url);
/**
* Return a list of current rss documents
**/
- QStringList list();
+ TQStringList list();
/**
* Remove an rss document resource. NOTE: Be aware that others may be using this
* resource and if you remove it they may break. Likewise be aware that someone may
* decide to remove your resource on you so you should always check to see if the resource
* is valid before you access it.
**/
- void remove(QString url);
+ void remove(TQString url);
/**
* Return the reference to a requested resource. If this resource is not present a null dcopref is
* returned.
**/
- DCOPRef document(QString url);
+ DCOPRef document(TQString url);
/**
* Exit the RSSService. This will clean everything up and exit.
**/
void exit();
};
-class RSSDocument : public QObject, public DCOPObject
+class RSSDocument : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
private:
bool m_isLoading;
- QString m_Url;
+ TQString m_Url;
Document *m_Doc;
- QPixmap m_pix;
- QPtrList<RSSArticle> m_list;
- QMap<QString,int> m_state;
- QDateTime m_Timeout;
+ TQPixmap m_pix;
+ TQPtrList<RSSArticle> m_list;
+ TQMap<TQString,int> m_state;
+ TQDateTime m_Timeout;
int m_maxAge;
private slots:
- void pixmapLoaded(const QPixmap&);
+ void pixmapLoaded(const TQPixmap&);
void loadingComplete(Loader *, Document, Status);
public:
- RSSDocument(const QString& url);
+ RSSDocument(const TQString& url);
~RSSDocument();
k_dcop_signals:
@@ -161,31 +161,31 @@ class RSSDocument : public QObject, public DCOPObject
/**
* Return the webmaster information from the RSS::Document
**/
- QString webMaster();
+ TQString webMaster();
/**
* Return the manageing editor from the RSS::Document
**/
- QString managingEditor();
+ TQString managingEditor();
/**
* Returns the rating of the RSS::Document
**/
- QString rating();
+ TQString rating();
/**
* Returns the last build date from the RSS::Document
**/
- QDateTime lastBuildDate();
+ TQDateTime lastBuildDate();
/**
* Returns the publication date from the RSS::Document
**/
- QDateTime pubDate();
+ TQDateTime pubDate();
/**
* Returns the copyright information from the RSS::Document
**/
- QString copyright();
+ TQString copyright();
/**
* Returns a list of article titles
**/
- QStringList articles();
+ TQStringList articles();
/**
* Returns the number of articles
**/
@@ -197,27 +197,27 @@ class RSSDocument : public QObject, public DCOPObject
/**
* Returns the link from the RSS::Document
**/
- QString link();
+ TQString link();
/**
* Returns the description from the RSS::Document
**/
- QString description();
+ TQString description();
/**
* Returns the title from the RSS::Document
**/
- QString title();
+ TQString title();
/**
* Returns the text version from the RSS::Document
**/
- QString verbVersion();
+ TQString verbVersion();
/**
* Returns the url for the pixmap from the RSS::Document
**/
- QString pixmapURL();
+ TQString pixmapURL();
/**
* Returns the actual pixmap from the RSS::Document's RSS::Image
**/
- QPixmap pixmap();
+ TQPixmap pixmap();
/**
* Returns if the RSSDocument contains a valid RSS::Document yet.
**/
@@ -249,17 +249,17 @@ class RSSDocument : public QObject, public DCOPObject
* 2 - unread
* 3 - read
*/
- int state( const QString &title) const;
+ int state( const TQString &title) const;
/**
* Set the article state
*/
- void setState( const QString &title, int s );
+ void setState( const TQString &title, int s );
/**
* Convience method that will set a title to read.
*/
- void read( const QString &title);
+ void read( const TQString &title);
};
class RSSArticle : public DCOPObject
@@ -277,14 +277,14 @@ class RSSArticle : public DCOPObject
/**
* Return the articles title
**/
- QString title();
+ TQString title();
/**
* Return the articles description
**/
- QString description();
+ TQString description();
/**
* Return the link to the article
**/
- QString link();
+ TQString link();
};
#endif
diff --git a/dcoprss/xmlrpciface.cpp b/dcoprss/xmlrpciface.cpp
index e86639eb..64259bbb 100644
--- a/dcoprss/xmlrpciface.cpp
+++ b/dcoprss/xmlrpciface.cpp
@@ -29,46 +29,46 @@
#include <klocale.h>
#include <kmdcodec.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace KXMLRPC;
-Query *Query::create( QObject *parent, const char *name )
+Query *Query::create( TQObject *parent, const char *name )
{
return new Query( parent, name );
}
-void Query::call( const QString &server, const QString &method,
- const QValueList<QVariant> &args, const QString &userAgent )
+void Query::call( const TQString &server, const TQString &method,
+ const TQValueList<TQVariant> &args, const TQString &userAgent )
{
m_buffer.open( IO_ReadWrite );
m_server = server;
m_method = method;
m_args = args;
- const QString xmlMarkup = markupCall( method, args );
+ const TQString xmlMarkup = markupCall( method, args );
- QByteArray postData;
- QDataStream stream( postData, IO_WriteOnly );
+ TQByteArray postData;
+ TQDataStream stream( postData, IO_WriteOnly );
stream.writeRawBytes( xmlMarkup.utf8(), xmlMarkup.length() );
KIO::TransferJob *job = KIO::http_post( KURL( server ), postData, false );
job->addMetaData( "UserAgent", userAgent );
job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" );
- connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ),
- this, SLOT( slotInfoMessage( KIO::Job *, const QString & ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
-void Query::slotInfoMessage( KIO::Job *, const QString &msg )
+void Query::slotInfoMessage( KIO::Job *, const TQString &msg )
{
emit infoMessage( msg );
}
-void Query::slotData( KIO::Job *, const QByteArray &data )
+void Query::slotData( KIO::Job *, const TQByteArray &data )
{
m_buffer.writeBlock( data );
}
@@ -90,7 +90,7 @@ void Query::slotResult( KIO::Job *job )
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( m_buffer.buffer() ) ) {
response.m_errorCode = -1;
response.m_errorString = i18n( "Received invalid XML markup" );
@@ -119,17 +119,17 @@ void Query::slotResult( KIO::Job *job )
delete this;
}
-bool Query::isMessageResponse( const QDomDocument &doc ) const
+bool Query::isMessageResponse( const TQDomDocument &doc ) const
{
return doc.documentElement().firstChild().toElement().tagName().lower() == "params";
}
-Query::Result Query::parseMessageResponse( const QDomDocument &doc ) const
+Query::Result Query::parseMessageResponse( const TQDomDocument &doc ) const
{
Result response;
response.m_success = true;
- QDomNode paramNode = doc.documentElement().firstChild().firstChild();
+ TQDomNode paramNode = doc.documentElement().firstChild().firstChild();
while ( !paramNode.isNull() ) {
response.m_data << demarshal( paramNode.firstChild().toElement() );
paramNode = paramNode.nextSibling();
@@ -138,35 +138,35 @@ Query::Result Query::parseMessageResponse( const QDomDocument &doc ) const
return response;
}
-bool Query::isFaultResponse( const QDomDocument &doc ) const
+bool Query::isFaultResponse( const TQDomDocument &doc ) const
{
return doc.documentElement().firstChild().toElement().tagName().lower() == "fault";
}
-Query::Result Query::parseFaultResponse( const QDomDocument &doc ) const
+Query::Result Query::parseFaultResponse( const TQDomDocument &doc ) const
{
Result response;
response.m_success = false;
- QDomNode errorNode = doc.documentElement().firstChild().firstChild();
- const QVariant errorVariant = demarshal( errorNode.toElement() );
+ TQDomNode errorNode = doc.documentElement().firstChild().firstChild();
+ const TQVariant errorVariant = demarshal( errorNode.toElement() );
response.m_errorCode = errorVariant.toMap()[ "faultCode" ].toInt();
response.m_errorString = errorVariant.toMap()[ "faultString" ].toString();
return response;
}
-QString Query::markupCall( const QString &cmd,
- const QValueList<QVariant> &args ) const
+TQString Query::markupCall( const TQString &cmd,
+ const TQValueList<TQVariant> &args ) const
{
- QString markup = "<?xml version='1.0' ?><methodCall>";
+ TQString markup = "<?xml version='1.0' ?><methodCall>";
markup += "<methodName>" + cmd + "</methodName>";
if ( !args.isEmpty() ) {
markup += "<params>";
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
markup += "<param>" + marshal( *it ) + "</param>";
markup += "</params>";
@@ -177,46 +177,46 @@ QString Query::markupCall( const QString &cmd,
return markup;
}
-QString Query::marshal( const QVariant &arg )
+TQString Query::marshal( const TQVariant &arg )
{
- QString s = "<value>";
+ TQString s = "<value>";
switch ( arg.type() ) {
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
s += "<string>" + arg.toString() + "</string>";
break;
- case QVariant::Int:
- s += "<int>" + QString::number( arg.toInt() ) + "</int>";
+ case TQVariant::Int:
+ s += "<int>" + TQString::number( arg.toInt() ) + "</int>";
break;
- case QVariant::Double:
- s += "<double>" + QString::number( arg.toDouble() ) + "</double>";
+ case TQVariant::Double:
+ s += "<double>" + TQString::number( arg.toDouble() ) + "</double>";
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
s += "<boolean>";
s += arg.toBool() ? "true" : "false";
s += "</boolean>";
break;
- case QVariant::ByteArray:
+ case TQVariant::ByteArray:
s += "<base64>" + KCodecs::base64Encode( arg.toByteArray() ) + "</base64>";
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
s += "<datetime.iso8601>" + arg.toDateTime().toString( Qt::ISODate ) + "</datetime.iso8601>";
break;
- case QVariant::List: {
+ case TQVariant::List: {
s += "<array><data>";
- const QValueList<QVariant> args = arg.toList();
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ const TQValueList<TQVariant> args = arg.toList();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
s += marshal( *it );
s += "</data></array>";
break;
}
- case QVariant::Map: {
+ case TQVariant::Map: {
s += "<struct>";
- QMap<QString, QVariant> map = arg.toMap();
- QMap<QString, QVariant>::ConstIterator it = map.begin();
- QMap<QString, QVariant>::ConstIterator end = map.end();
+ TQMap<TQString, TQVariant> map = arg.toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it = map.begin();
+ TQMap<TQString, TQVariant>::ConstIterator end = map.end();
for ( ; it != end; ++it ) {
s += "<member>";
s += "<name>" + it.key() + "</name>";
@@ -233,127 +233,127 @@ QString Query::marshal( const QVariant &arg )
return s + "</value>";
}
-QVariant Query::demarshal( const QDomElement &elem )
+TQVariant Query::demarshal( const TQDomElement &elem )
{
Q_ASSERT( elem.tagName().lower() == "value" );
if ( !elem.firstChild().isElement() )
- return QVariant( elem.text() );
+ return TQVariant( elem.text() );
- const QDomElement typeElement = elem.firstChild().toElement();
- const QString typeName = typeElement.tagName().lower();
+ const TQDomElement typeElement = elem.firstChild().toElement();
+ const TQString typeName = typeElement.tagName().lower();
if ( typeName == "string" )
- return QVariant( typeElement.text() );
+ return TQVariant( typeElement.text() );
else if ( typeName == "i4" || typeName == "int" )
- return QVariant( typeElement.text().toInt() );
+ return TQVariant( typeElement.text().toInt() );
else if ( typeName == "double" )
- return QVariant( typeElement.text().toDouble() );
+ return TQVariant( typeElement.text().toDouble() );
else if ( typeName == "boolean" ) {
if ( typeElement.text().lower() == "true" || typeElement.text() == "1" )
- return QVariant( true );
+ return TQVariant( true );
else
- return QVariant( false );
+ return TQVariant( false );
} else if ( typeName == "base64" )
- return QVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
+ return TQVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
else if ( typeName == "datetime" || typeName == "datetime.iso8601" )
- return QVariant( QDateTime::fromString( typeElement.text(), Qt::ISODate ) );
+ return TQVariant( TQDateTime::fromString( typeElement.text(), Qt::ISODate ) );
else if ( typeName == "array" ) {
- QValueList<QVariant> values;
- QDomNode valueNode = typeElement.firstChild().firstChild();
+ TQValueList<TQVariant> values;
+ TQDomNode valueNode = typeElement.firstChild().firstChild();
while ( !valueNode.isNull() ) {
values << demarshal( valueNode.toElement() );
valueNode = valueNode.nextSibling();
}
- return QVariant( values );
+ return TQVariant( values );
} else if ( typeName == "struct" ) {
- QMap<QString, QVariant> map;
- QDomNode memberNode = typeElement.firstChild();
+ TQMap<TQString, TQVariant> map;
+ TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() ) {
- const QString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
- const QVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
+ const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
+ const TQVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
map[ key ] = data;
memberNode = memberNode.nextSibling();
}
- return QVariant( map );
+ return TQVariant( map );
} else
kdWarning() << "Cannot demarshal unknown type " << typeName << endl;
- return QVariant();
+ return TQVariant();
}
-Query::Query( QObject *parent, const char *name ) : QObject( parent, name )
+Query::Query( TQObject *parent, const char *name ) : TQObject( parent, name )
{
}
-QValueList<QVariant> Server::toVariantList( const QVariant &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQVariant &arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( int arg )
+TQValueList<TQVariant> Server::toVariantList( int arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( bool arg )
+TQValueList<TQVariant> Server::toVariantList( bool arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( double arg )
+TQValueList<TQVariant> Server::toVariantList( double arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( const QString &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQString &arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( const QCString &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQCString &arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( const QByteArray &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQByteArray &arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( const QDateTime &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQDateTime &arg )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
return args;
}
-QValueList<QVariant> Server::toVariantList( const QStringList &arg )
+TQValueList<TQVariant> Server::toVariantList( const TQStringList &arg )
{
- QValueList<QVariant> args;
- QStringList::ConstIterator it = arg.begin();
- QStringList::ConstIterator end = arg.end();
+ TQValueList<TQVariant> args;
+ TQStringList::ConstIterator it = arg.begin();
+ TQStringList::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
return args;
}
-Server::Server( const KURL &url, QObject *parent, const char *name )
- : QObject( parent, name )
+Server::Server( const KURL &url, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
if ( url.isValid() )
m_url = url;
@@ -364,8 +364,8 @@ void Server::setUrl( const KURL &url )
m_url = url.isValid() ? url : KURL();
}
-void Server::call( const QString &method, const QValueList<QVariant> &args,
- QObject *receiver, const char *slot )
+void Server::call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject *receiver, const char *slot )
{
if ( m_url.isEmpty() ) {
kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl;
@@ -373,16 +373,16 @@ void Server::call( const QString &method, const QValueList<QVariant> &args,
}
Query *query = Query::create( this );
- connect( query, SIGNAL( infoMessage( const QString & ) ),
- this, SIGNAL( infoMessage( const QString & ) ) );
- connect( query, SIGNAL( finished( const KXMLRPC::Query::Result & ) ),
+ connect( query, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ this, TQT_SIGNAL( infoMessage( const TQString & ) ) );
+ connect( query, TQT_SIGNAL( finished( const KXMLRPC::Query::Result & ) ),
receiver, slot );
query->call( m_url.url(), method, args, m_userAgent );
}
-void Server::call( const QString &method, const QValueList<QVariant> &args,
- QObject *receiver, const char *slot,
- QObject *infoObject, const char *infoSlot )
+void Server::call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject *receiver, const char *slot,
+ TQObject *infoObject, const char *infoSlot )
{
if ( m_url.isEmpty() ) {
kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl;
@@ -390,9 +390,9 @@ void Server::call( const QString &method, const QValueList<QVariant> &args,
}
Query *query = Query::create( this );
- connect( query, SIGNAL( infoMessage( const QString &msg ) ),
+ connect( query, TQT_SIGNAL( infoMessage( const TQString &msg ) ),
infoObject, infoSlot );
- connect( query, SIGNAL( finished( const KXMLRPC::Query::Result & ) ),
+ connect( query, TQT_SIGNAL( finished( const KXMLRPC::Query::Result & ) ),
receiver, slot );
query->call( m_url.url(), method, args, m_userAgent );
}
diff --git a/dcoprss/xmlrpciface.h b/dcoprss/xmlrpciface.h
index f7897e10..d3b1a4b0 100644
--- a/dcoprss/xmlrpciface.h
+++ b/dcoprss/xmlrpciface.h
@@ -27,11 +27,11 @@
#include <kurl.h>
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qobject.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqobject.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
class QDomDocument;
class QDomElement;
@@ -54,62 +54,62 @@ namespace KXMLRPC
class Result
{
friend class Query;
- friend QDataStream &operator>>( QDataStream &s, Query::Result &r );
+ friend TQDataStream &operator>>( TQDataStream &s, Query::Result &r );
public:
Result() { }
bool success() const { return m_success; }
int errorCode() const { return m_errorCode; }
- QString errorString() const { return m_errorString; }
- QValueList<QVariant> data() const { return m_data; }
- QString server() const { return m_server; }
- QString method() const { return m_method; }
- QValueList<QVariant> args() const { return m_args; }
+ TQString errorString() const { return m_errorString; }
+ TQValueList<TQVariant> data() const { return m_data; }
+ TQString server() const { return m_server; }
+ TQString method() const { return m_method; }
+ TQValueList<TQVariant> args() const { return m_args; }
private:
bool m_success;
int m_errorCode;
- QString m_errorString;
- QValueList<QVariant> m_data;
- QString m_server;
- QString m_method;
- QValueList<QVariant> m_args;
+ TQString m_errorString;
+ TQValueList<TQVariant> m_data;
+ TQString m_server;
+ TQString m_method;
+ TQValueList<TQVariant> m_args;
};
- static Query *create( QObject *parent = 0, const char *name = 0 );
- static QString marshal( const QVariant &v );
- static QVariant demarshal( const QDomElement &e );
+ static Query *create( TQObject *parent = 0, const char *name = 0 );
+ static TQString marshal( const TQVariant &v );
+ static TQVariant demarshal( const TQDomElement &e );
public slots:
- void call( const QString &server, const QString &method,
- const QValueList<QVariant> &args = QValueList<QVariant>(),
- const QString &userAgent = "KDE-XMLRPC" );
+ void call( const TQString &server, const TQString &method,
+ const TQValueList<TQVariant> &args = TQValueList<TQVariant>(),
+ const TQString &userAgent = "KDE-XMLRPC" );
signals:
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
void finished( const KXMLRPC::Query::Result &result );
private slots:
- void slotInfoMessage( KIO::Job *job, const QString &msg );
- void slotData( KIO::Job *job, const QByteArray &data );
+ void slotInfoMessage( KIO::Job *job, const TQString &msg );
+ void slotData( KIO::Job *job, const TQByteArray &data );
void slotResult( KIO::Job *job );
private:
- bool isMessageResponse( const QDomDocument &doc ) const;
- bool isFaultResponse( const QDomDocument &doc ) const;
+ bool isMessageResponse( const TQDomDocument &doc ) const;
+ bool isFaultResponse( const TQDomDocument &doc ) const;
- Result parseMessageResponse( const QDomDocument &doc ) const;
- Result parseFaultResponse( const QDomDocument &doc ) const;
+ Result parseMessageResponse( const TQDomDocument &doc ) const;
+ Result parseFaultResponse( const TQDomDocument &doc ) const;
- QString markupCall( const QString &method,
- const QValueList<QVariant> &args ) const;
+ TQString markupCall( const TQString &method,
+ const TQValueList<TQVariant> &args ) const;
- Query( QObject *parent = 0, const char *name = 0 );
+ Query( TQObject *parent = 0, const char *name = 0 );
- QBuffer m_buffer;
- QString m_server;
- QString m_method;
- QValueList<QVariant> m_args;
+ TQBuffer m_buffer;
+ TQString m_server;
+ TQString m_method;
+ TQValueList<TQVariant> m_args;
};
class Server : public QObject
@@ -117,44 +117,44 @@ namespace KXMLRPC
Q_OBJECT
public:
Server( const KURL &url = KURL(),
- QObject *parent = 0, const char *name = 0 );
+ TQObject *parent = 0, const char *name = 0 );
const KURL &url() const { return m_url; }
void setUrl( const KURL &url );
- QString userAgent() const { return m_userAgent; }
- void setUserAgent( const QString &userAgent) { m_userAgent = userAgent; }
+ TQString userAgent() const { return m_userAgent; }
+ void setUserAgent( const TQString &userAgent) { m_userAgent = userAgent; }
template <typename T>
- void call( const QString &method, const QValueList<T> &arg,
- QObject *object, const char *slot );
-
- static QValueList<QVariant> toVariantList( const QVariant &arg );
- static QValueList<QVariant> toVariantList( int arg );
- static QValueList<QVariant> toVariantList( bool arg );
- static QValueList<QVariant> toVariantList( double arg );
- static QValueList<QVariant> toVariantList( const QString &arg );
- static QValueList<QVariant> toVariantList( const QCString &arg );
- static QValueList<QVariant> toVariantList( const QByteArray &arg );
- static QValueList<QVariant> toVariantList( const QDateTime &arg );
- static QValueList<QVariant> toVariantList( const QStringList &arg );
+ void call( const TQString &method, const TQValueList<T> &arg,
+ TQObject *object, const char *slot );
+
+ static TQValueList<TQVariant> toVariantList( const TQVariant &arg );
+ static TQValueList<TQVariant> toVariantList( int arg );
+ static TQValueList<TQVariant> toVariantList( bool arg );
+ static TQValueList<TQVariant> toVariantList( double arg );
+ static TQValueList<TQVariant> toVariantList( const TQString &arg );
+ static TQValueList<TQVariant> toVariantList( const TQCString &arg );
+ static TQValueList<TQVariant> toVariantList( const TQByteArray &arg );
+ static TQValueList<TQVariant> toVariantList( const TQDateTime &arg );
+ static TQValueList<TQVariant> toVariantList( const TQStringList &arg );
signals:
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
public slots:
- void call( const QString &method, const QValueList<QVariant> &args,
- QObject *object, const char *slot );
- void call( const QString &method, const QValueList<QVariant> &args,
- QObject *object, const char *slot,
- QObject *infoObject, const char *infoSlot );
+ void call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject *object, const char *slot );
+ void call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject *object, const char *slot,
+ TQObject *infoObject, const char *infoSlot );
private:
KURL m_url;
- QString m_userAgent;
+ TQString m_userAgent;
};
- inline QDataStream &operator>>( QDataStream &s, Query::Result &r )
+ inline TQDataStream &operator>>( TQDataStream &s, Query::Result &r )
{
return s >> r.m_errorCode >> r.m_errorString >> r.m_data
>> r.m_server >> r.m_method >> r.m_args;
@@ -162,20 +162,20 @@ namespace KXMLRPC
}
template <typename T>
-void KXMLRPC::Server::call( const QString &method, const QValueList<T> &arg,
- QObject *object, const char *slot )
+void KXMLRPC::Server::call( const TQString &method, const TQValueList<T> &arg,
+ TQObject *object, const char *slot )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
- typename QValueList<T>::ConstIterator it = arg.begin();
- typename QValueList<T>::ConstIterator end = arg.end();
+ typename TQValueList<T>::ConstIterator it = arg.begin();
+ typename TQValueList<T>::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
call( method, args, object, slot );
}
-inline QDataStream &operator<<( QDataStream &s, const KXMLRPC::Query::Result &r )
+inline TQDataStream &operator<<( TQDataStream &s, const KXMLRPC::Query::Result &r )
{
return s << r.errorCode() << r.errorString() << r.data()
<< r.server() << r.method() << r.args();
diff --git a/filesharing/advanced/kcm_sambaconf/common.cpp b/filesharing/advanced/kcm_sambaconf/common.cpp
index 74a6ddd3..cac856f0 100644
--- a/filesharing/advanced/kcm_sambaconf/common.cpp
+++ b/filesharing/advanced/kcm_sambaconf/common.cpp
@@ -26,21 +26,21 @@
* *
******************************************************************************/
-#include <qstring.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
+#include <tqstring.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
#include "common.h"
-void setComboToString(QComboBox* combo,const QString & s)
+void setComboToString(TQComboBox* combo,const TQString & s)
{
int i = combo->listBox()->index(combo->listBox()->findItem(s,Qt::ExactMatch));
combo->setCurrentItem(i);
}
-bool boolFromText(const QString & value, bool testTrue)
+bool boolFromText(const TQString & value, bool testTrue)
{
- QString lower = value.lower();
+ TQString lower = value.lower();
if (testTrue) {
if (lower=="yes" ||
@@ -61,7 +61,7 @@ bool boolFromText(const QString & value, bool testTrue)
}
}
-QString textFromBool(bool value)
+TQString textFromBool(bool value)
{
if (value)
return "yes";
diff --git a/filesharing/advanced/kcm_sambaconf/common.h b/filesharing/advanced/kcm_sambaconf/common.h
index 4da6dccc..52d0a4a4 100644
--- a/filesharing/advanced/kcm_sambaconf/common.h
+++ b/filesharing/advanced/kcm_sambaconf/common.h
@@ -33,8 +33,8 @@ class QString;
class QComboBox;
-void setComboToString(QComboBox*,const QString &);
-bool boolFromText(const QString & value,bool testTrue=true);
-QString textFromBool(bool value);
+void setComboToString(TQComboBox*,const TQString &);
+bool boolFromText(const TQString & value,bool testTrue=true);
+TQString textFromBool(bool value);
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
index 1b252ed5..c2437f04 100644
--- a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
+++ b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
@@ -27,12 +27,12 @@
******************************************************************************/
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-#include <qstringlist.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
+#include <tqstringlist.h>
#include <kurlrequester.h>
#include <klocale.h>
@@ -56,73 +56,73 @@ DictManager::DictManager(SambaShare* share):
DictManager::~DictManager() {
}
-void DictManager::handleUnsupportedWidget(const QString & s, QWidget* w) {
+void DictManager::handleUnsupportedWidget(const TQString & s, TQWidget* w) {
w->setEnabled(false);
- QToolTip::add(w,i18n("The option <em>%1</em> is not supported by your Samba version").arg(s));
+ TQToolTip::add(w,i18n("The option <em>%1</em> is not supported by your Samba version").arg(s));
}
-void DictManager::add(const QString & key, QLineEdit* lineEdit) {
+void DictManager::add(const TQString & key, TQLineEdit* lineEdit) {
if (_share->optionSupported(key)) {
lineEditDict.insert(key,lineEdit);
- connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot()));
+ connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,lineEdit);
}
-void DictManager::add(const QString & key, QCheckBox* checkBox){
+void DictManager::add(const TQString & key, TQCheckBox* checkBox){
if (_share->optionSupported(key)) {
checkBoxDict.insert(key,checkBox);
- connect(checkBox, SIGNAL(clicked()), this, SLOT(changedSlot()));
+ connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,checkBox);
}
-void DictManager::add(const QString & key, KURLRequester* urlRq){
+void DictManager::add(const TQString & key, KURLRequester* urlRq){
if (_share->optionSupported(key)) {
urlRequesterDict.insert(key,urlRq);
- connect(urlRq, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot()));
+ connect(urlRq, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,urlRq);
}
-void DictManager::add(const QString & key, QSpinBox* spinBox){
+void DictManager::add(const TQString & key, TQSpinBox* spinBox){
if (_share->optionSupported(key)) {
spinBoxDict.insert(key,spinBox);
- connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(changedSlot()));
+ connect(spinBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,spinBox);
}
-void DictManager::add(const QString & key, QComboBox* comboBox, QStringList* values){
+void DictManager::add(const TQString & key, TQComboBox* comboBox, TQStringList* values){
if (_share->optionSupported(key)) {
comboBoxDict.insert(key,comboBox);
comboBoxValuesDict.insert(key,values);
- connect(comboBox, SIGNAL(activated(int)), this, SLOT(changedSlot()));
+ connect(comboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,comboBox);
}
void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){
- QDictIterator<QCheckBox> checkBoxIt( checkBoxDict );
+ TQDictIterator<TQCheckBox> checkBoxIt( checkBoxDict );
for( ; checkBoxIt.current(); ++checkBoxIt ) {
checkBoxIt.current()->setChecked(share->getBoolValue(checkBoxIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<QLineEdit> lineEditIt( lineEditDict );
+ TQDictIterator<TQLineEdit> lineEditIt( lineEditDict );
for( ; lineEditIt.current(); ++lineEditIt ) {
lineEditIt.current()->setText(share->getValue(lineEditIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
+ TQDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
for( ; urlRequesterIt.current(); ++urlRequesterIt ) {
urlRequesterIt.current()->setURL(share->getValue(urlRequesterIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<QSpinBox> spinBoxIt( spinBoxDict );
+ TQDictIterator<TQSpinBox> spinBoxIt( spinBoxDict );
for( ; spinBoxIt.current(); ++spinBoxIt ) {
spinBoxIt.current()->setValue(share->getValue(spinBoxIt.currentKey(),globalValue,defaultValue).toInt());
@@ -133,11 +133,11 @@ void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){
}
void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defaultValue) {
- QDictIterator<QComboBox> comboBoxIt( comboBoxDict );
+ TQDictIterator<TQComboBox> comboBoxIt( comboBoxDict );
for( ; comboBoxIt.current(); ++comboBoxIt ) {
- QStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()];
- QString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue);
+ TQStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()];
+ TQString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue);
if (value.isNull())
continue;
@@ -147,9 +147,9 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau
int comboIndex = 0;
- QStringList::iterator it;
+ TQStringList::iterator it;
for ( it = v->begin(); it != v->end(); ++it ) {
- QString lower = (*it).lower();
+ TQString lower = (*it).lower();
if ( lower == "yes" &&
boolFromText(value))
break;
@@ -170,34 +170,34 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau
void DictManager::save(SambaShare* share, bool globalValue, bool defaultValue){
- QDictIterator<QCheckBox> checkBoxIt( checkBoxDict );
+ TQDictIterator<TQCheckBox> checkBoxIt( checkBoxDict );
for( ; checkBoxIt.current(); ++checkBoxIt ) {
share->setValue(checkBoxIt.currentKey(),checkBoxIt.current()->isChecked(), globalValue, defaultValue );
}
- QDictIterator<QLineEdit> lineEditIt( lineEditDict );
+ TQDictIterator<TQLineEdit> lineEditIt( lineEditDict );
for( ; lineEditIt.current(); ++lineEditIt ) {
share->setValue(lineEditIt.currentKey(),lineEditIt.current()->text(), globalValue, defaultValue );
}
- QDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
+ TQDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
for( ; urlRequesterIt.current(); ++urlRequesterIt ) {
share->setValue(urlRequesterIt.currentKey(),urlRequesterIt.current()->url(), globalValue, defaultValue );
}
- QDictIterator<QSpinBox> spinBoxIt( spinBoxDict );
+ TQDictIterator<TQSpinBox> spinBoxIt( spinBoxDict );
for( ; spinBoxIt.current(); ++spinBoxIt ) {
share->setValue(spinBoxIt.currentKey(),spinBoxIt.current()->value(), globalValue, defaultValue );
}
- QDictIterator<QComboBox> comboBoxIt( comboBoxDict );
+ TQDictIterator<TQComboBox> comboBoxIt( comboBoxDict );
for( ; comboBoxIt.current(); ++comboBoxIt ) {
- QStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()];
+ TQStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()];
int i = comboBoxIt.current()->currentItem();
share->setValue(comboBoxIt.currentKey(),(*values)[i], globalValue, defaultValue );
diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.h b/filesharing/advanced/kcm_sambaconf/dictmanager.h
index 3f053330..90c9be22 100644
--- a/filesharing/advanced/kcm_sambaconf/dictmanager.h
+++ b/filesharing/advanced/kcm_sambaconf/dictmanager.h
@@ -48,26 +48,26 @@ Q_OBJECT
DictManager(SambaShare *share);
virtual ~DictManager();
- void add(const QString &, QLineEdit*);
- void add(const QString &, QCheckBox*);
- void add(const QString &, KURLRequester*);
- void add(const QString &, QSpinBox*);
- void add(const QString &, QComboBox*, QStringList*);
+ void add(const TQString &, TQLineEdit*);
+ void add(const TQString &, TQCheckBox*);
+ void add(const TQString &, KURLRequester*);
+ void add(const TQString &, TQSpinBox*);
+ void add(const TQString &, TQComboBox*, TQStringList*);
void load(SambaShare* share, bool globalValue=true, bool defaultValue=true);
void save(SambaShare* share, bool globalValue=true, bool defaultValue=true);
protected :
- QDict<QLineEdit> lineEditDict;
- QDict<QCheckBox> checkBoxDict;
- QDict<KURLRequester> urlRequesterDict;
- QDict<QSpinBox> spinBoxDict;
- QDict<QComboBox> comboBoxDict;
- QDict<QStringList> comboBoxValuesDict;
+ TQDict<TQLineEdit> lineEditDict;
+ TQDict<TQCheckBox> checkBoxDict;
+ TQDict<KURLRequester> urlRequesterDict;
+ TQDict<TQSpinBox> spinBoxDict;
+ TQDict<TQComboBox> comboBoxDict;
+ TQDict<TQStringList> comboBoxValuesDict;
SambaShare* _share;
- void handleUnsupportedWidget(const QString &, QWidget*);
+ void handleUnsupportedWidget(const TQString &, TQWidget*);
void loadComboBoxes(SambaShare*, bool, bool);
protected slots:
diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
index faa94479..53b7c812 100644
--- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
@@ -30,12 +30,12 @@
#include <stdio.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include "filemodedlgimpl.h"
-FileModeDlgImpl::FileModeDlgImpl(QWidget* parent, QLineEdit* edit)
+FileModeDlgImpl::FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit)
: FileModeDlg(parent)
{
assert(edit);
@@ -76,27 +76,27 @@ void FileModeDlgImpl::init()
void FileModeDlgImpl::accept()
{
- QString s = "";
+ TQString s = "";
- s += QString::number(
+ s += TQString::number(
(stickyBitChk->isChecked() ? 1 : 0) +
(setGIDChk->isChecked() ? 2 : 0) +
(setUIDChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(ownerExecChk->isChecked() ? 1 : 0) +
(ownerWriteChk->isChecked() ? 2 : 0) +
(ownerReadChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(groupExecChk->isChecked() ? 1 : 0) +
(groupWriteChk->isChecked() ? 2 : 0) +
(groupReadChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(othersExecChk->isChecked() ? 1 : 0) +
(othersWriteChk->isChecked() ? 2 : 0) +
(othersReadChk->isChecked() ? 4 : 0)
@@ -104,7 +104,7 @@ void FileModeDlgImpl::accept()
// it's an octal number so start with a 0
// but remove all the other trailing 0's
- s = QString::number( s.toInt());
+ s = TQString::number( s.toInt());
s = "0"+s;
_edit->setText(s);
diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
index 3ad39ea6..60652330 100644
--- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
@@ -39,8 +39,8 @@ class QLineEdit;
/**
* Small dialog to change the UNIX access rights
- * It is called with a QLineEdit as parameter.
- * The class then takes the text from the QLineEdit and
+ * It is called with a TQLineEdit as parameter.
+ * The class then takes the text from the TQLineEdit and
* interprets it as an oktal UNIX access right string
* e.g. 0744
* After the user has changed the access rights with the dialog
@@ -52,10 +52,10 @@ class FileModeDlgImpl : public FileModeDlg
{
Q_OBJECT
public:
- FileModeDlgImpl(QWidget* parent, QLineEdit* edit);
+ FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit);
~FileModeDlgImpl();
protected:
- QLineEdit* _edit;
+ TQLineEdit* _edit;
void init();
protected slots:
virtual void accept();
diff --git a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
index 090e270f..550c6d33 100644
--- a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
@@ -8,20 +8,20 @@
*****************************************************************************/
-void GroupSelectDlg::init(const QStringList & specifiedGroups)
+void GroupSelectDlg::init(const TQStringList & specifiedGroups)
{
- QStringList unixGroups = getUnixGroups();
+ TQStringList unixGroups = getUnixGroups();
- for (QStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it)
+ for (TQStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it)
{
if ( ! specifiedGroups.contains(*it))
- new QListViewItem(groupListView, *it, QString::number(getGroupGID(*it)));
+ new TQListViewItem(groupListView, *it, TQString::number(getGroupGID(*it)));
}
}
void GroupSelectDlg::accept()
{
- QListViewItemIterator it( groupListView);
+ TQListViewItemIterator it( groupListView);
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() )
@@ -39,13 +39,13 @@ void GroupSelectDlg::accept()
if (bothRadio->isChecked())
groupKind = "@";
- QDialog::accept();
+ TQDialog::accept();
}
-QStringList GroupSelectDlg::getSelectedGroups()
+TQStringList GroupSelectDlg::getSelectedGroups()
{
return selectedGroups;
}
@@ -57,7 +57,7 @@ int GroupSelectDlg::getAccess()
}
-QString GroupSelectDlg::getGroupKind()
+TQString GroupSelectDlg::getGroupKind()
{
return groupKind;
}
diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
index 2b35b4af..b4ced9f9 100644
--- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
+++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
@@ -28,12 +28,12 @@
#include <assert.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qgroupbox.h>
-#include <qcursor.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqgroupbox.h>
+#include <tqcursor.h>
#include <kpopupmenu.h>
@@ -62,7 +62,7 @@
#define HIDDENTABINDEX 5
-HiddenListViewItem::HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false )
+HiddenListViewItem::HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false )
: QMultiCheckListItem( parent )
{
setPixmap( COL_NAME, fi->pixmap(KIcon::SizeSmall));
@@ -91,15 +91,15 @@ KFileItem* HiddenListViewItem::getFileItem()
}
-void HiddenListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void HiddenListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
if (isOn(COL_VETO))
- _cg.setColor(QColorGroup::Base,lightGray);
+ _cg.setColor(TQColorGroup::Base,lightGray);
if (isOn(COL_HIDDEN))
- _cg.setColor(QColorGroup::Text,gray);
+ _cg.setColor(TQColorGroup::Text,gray);
QMultiCheckListItem::paintCell(p, _cg, column, width, alignment);
}
@@ -121,45 +121,45 @@ HiddenFileView::HiddenFileView(ShareDlgImpl* shareDlg, SambaShare* share)
_dlg->hiddenChk->setTristate(true);
_dlg->vetoChk->setTristate(true);
- connect( _dlg->hiddenChk, SIGNAL(toggled(bool)), this, SLOT( hiddenChkClicked(bool) ));
- connect( _dlg->vetoChk, SIGNAL(toggled(bool)), this, SLOT( vetoChkClicked(bool) ));
- connect( _dlg->vetoOplockChk, SIGNAL(toggled(bool)), this, SLOT( vetoOplockChkClicked(bool) ));
+ connect( _dlg->hiddenChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( hiddenChkClicked(bool) ));
+ connect( _dlg->vetoChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoChkClicked(bool) ));
+ connect( _dlg->vetoOplockChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoOplockChkClicked(bool) ));
_dlg->hiddenEdit->setText( _share->getValue("hide files") );
- connect( _dlg->hiddenEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->hiddenEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
_dlg->vetoEdit->setText( _share->getValue("veto files") );
- connect( _dlg->vetoEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->vetoEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
_dlg->vetoOplockEdit->setText( _share->getValue("veto oplock files") );
- connect( _dlg->vetoOplockEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->vetoOplockEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
-// new QLabel(i18n("Hint")+" : ",grid);
-// new QLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid);
-// new QLabel(i18n("Example")+" : ",grid);
-// new QLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid);
+// new TQLabel(i18n("Hint")+" : ",grid);
+// new TQLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid);
+// new TQLabel(i18n("Example")+" : ",grid);
+// new TQLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid);
_dir = new KDirLister(true);
_dir->setShowingDotFiles(true);
- connect( _dir, SIGNAL(newItems(const KFileItemList &)),
- this, SLOT(insertNewFiles(const KFileItemList &)));
+ connect( _dir, TQT_SIGNAL(newItems(const KFileItemList &)),
+ this, TQT_SLOT(insertNewFiles(const KFileItemList &)));
- connect( _dir, SIGNAL(deleteItem(KFileItem*)),
- this, SLOT(deleteItem(KFileItem*)));
+ connect( _dir, TQT_SIGNAL(deleteItem(KFileItem*)),
+ this, TQT_SLOT(deleteItem(KFileItem*)));
- connect( _dir, SIGNAL(refreshItems(const KFileItemList &)),
- this, SLOT(refreshItems(const KFileItemList &)));
+ connect( _dir, TQT_SIGNAL(refreshItems(const KFileItemList &)),
+ this, TQT_SLOT(refreshItems(const KFileItemList &)));
- connect( _hiddenActn, SIGNAL(toggled(bool)), this, SLOT(hiddenChkClicked(bool)));
- connect( _vetoActn, SIGNAL(toggled(bool)), this, SLOT(vetoChkClicked(bool)));
- connect( _vetoOplockActn, SIGNAL(toggled(bool)), this, SLOT(vetoOplockChkClicked(bool)));
+ connect( _hiddenActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hiddenChkClicked(bool)));
+ connect( _vetoActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoChkClicked(bool)));
+ connect( _vetoOplockActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoOplockChkClicked(bool)));
}
void HiddenFileView::initListView()
{
_dlg->hiddenListView->setMultiSelection(true);
- _dlg->hiddenListView->setSelectionMode(QListView::Extended);
+ _dlg->hiddenListView->setSelectionMode(TQListView::Extended);
_dlg->hiddenListView->setAllColumnsShowFocus(true);
_hiddenList = createRegExpList(_share->getValue("hide files"));
@@ -172,15 +172,15 @@ void HiddenFileView::initListView()
_vetoActn->plug(_popup);
_vetoOplockActn->plug(_popup);
- connect( _dlg->hiddenListView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect( _dlg->hiddenListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)),
- this, SLOT(showContextMenu()));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)),
+ this, TQT_SLOT(showContextMenu()));
- connect( _dlg->hideDotFilesChk, SIGNAL(toggled(bool)), this, SLOT(hideDotFilesChkClicked(bool)));
- connect( _dlg->hideUnreadableChk, SIGNAL(toggled(bool)), this, SLOT(hideUnreadableChkClicked(bool)));
+ connect( _dlg->hideDotFilesChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideDotFilesChkClicked(bool)));
+ connect( _dlg->hideUnreadableChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideUnreadableChkClicked(bool)));
- connect( _dlg->hiddenListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)),
- this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int)));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)),
+ this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)));
}
HiddenFileView::~HiddenFileView()
@@ -198,7 +198,7 @@ void HiddenFileView::load()
void HiddenFileView::save()
{
- QString s = _dlg->hiddenEdit->text().stripWhiteSpace();
+ TQString s = _dlg->hiddenEdit->text().stripWhiteSpace();
// its important that the string ends with an '/'
// otherwise Samba won't recognize the last entry
if ( (!s.isEmpty()) && (s.right(1)!="/"))
@@ -279,7 +279,7 @@ void HiddenFileView::refreshItems( const KFileItemList& /*items*/ )
void HiddenFileView::showContextMenu()
{
- _popup->exec(QCursor::pos());
+ _popup->exec(TQCursor::pos());
}
@@ -360,7 +360,7 @@ void HiddenFileView::selectionChanged()
}
}
-void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit, int column,QPtrList<QRegExp> & reqExpList,bool b) {
+void HiddenFileView::checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit, int column,TQPtrList<TQRegExp> & reqExpList,bool b) {
// We don't save the old state so
// disable the tristate mode
chkBox->setTristate(false);
@@ -378,7 +378,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
continue;
if (!b) {
- QRegExp* rx = getRegExpListMatch(item->text(0),reqExpList);
+ TQRegExp* rx = getRegExpListMatch(item->text(0),reqExpList);
// Perhaps the file was hidden because it started with a dot
if (!rx && item->text(0)[0]=='.' && _dlg->hideDotFilesChk->isChecked()) {
@@ -387,7 +387,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
"do you want to uncheck all files starting with a dot?</qt>"),i18n("Files Starting With Dot"),i18n("Uncheck Hidden"), i18n("Keep Hidden"));
if (result == KMessageBox::No) {
- QPtrList<HiddenListViewItem> lst = getMatchingItems(QRegExp(".*",false,true));
+ TQPtrList<HiddenListViewItem> lst = getMatchingItems(TQRegExp(".*",false,true));
deselect(lst);
} else {
_dlg->hideDotFilesChk->setChecked(false);
@@ -396,7 +396,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
} else {
if (rx) {
// perhaps it is matched by a wildcard string
- QString p = rx->pattern();
+ TQString p = rx->pattern();
if ( p.find("*") > -1 ||
p.find("?") > -1 )
{
@@ -407,7 +407,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
"do you want to uncheck all files matching <b>'%1'</b>?").arg(rx->pattern()).arg(rx->pattern()).arg(rx->pattern()),
i18n("Wildcarded String"),i18n("Uncheck Matches"),i18n("Keep Selected"));
- QPtrList<HiddenListViewItem> lst = getMatchingItems( *rx );
+ TQPtrList<HiddenListViewItem> lst = getMatchingItems( *rx );
if (result == KMessageBox::No) {
deselect(lst);
@@ -425,7 +425,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
}
}
else {
- reqExpList.append( new QRegExp(item->text(0)) );
+ reqExpList.append( new TQRegExp(item->text(0)) );
updateEdit(edit, reqExpList);
}
@@ -451,24 +451,24 @@ void HiddenFileView::vetoChkClicked(bool b)
}
/**
- * Sets the text of the QLineEdit edit to the entries of the passed QRegExp-List
+ * Sets the text of the TQLineEdit edit to the entries of the passed QRegExp-List
**/
-void HiddenFileView::updateEdit(QLineEdit* edit, QPtrList<QRegExp> & lst)
+void HiddenFileView::updateEdit(TQLineEdit* edit, TQPtrList<TQRegExp> & lst)
{
- QString s="";
+ TQString s="";
- QRegExp* rx;
- for(rx = static_cast<QRegExp*>(lst.first()); rx;
- rx = static_cast<QRegExp*>(lst.next()) )
+ TQRegExp* rx;
+ for(rx = static_cast<TQRegExp*>(lst.first()); rx;
+ rx = static_cast<TQRegExp*>(lst.next()) )
{
- s+= rx->pattern()+QString("/");
+ s+= rx->pattern()+TQString("/");
}
edit->setText(s);
}
-void HiddenFileView::setState(QPtrList<HiddenListViewItem> & lst, int column, bool b) {
+void HiddenFileView::setState(TQPtrList<HiddenListViewItem> & lst, int column, bool b) {
HiddenListViewItem* item;
for(item = static_cast<HiddenListViewItem*>(lst.first()); item;
item = static_cast<HiddenListViewItem*>(lst.next()) )
@@ -478,7 +478,7 @@ void HiddenFileView::setState(QPtrList<HiddenListViewItem> & lst, int column, bo
}
-void HiddenFileView::deselect(QPtrList<HiddenListViewItem> & lst)
+void HiddenFileView::deselect(TQPtrList<HiddenListViewItem> & lst)
{
HiddenListViewItem* item;
for(item = static_cast<HiddenListViewItem*>(lst.first()); item;
@@ -489,9 +489,9 @@ void HiddenFileView::deselect(QPtrList<HiddenListViewItem> & lst)
}
-QPtrList<HiddenListViewItem> HiddenFileView::getMatchingItems(const QRegExp & rx)
+TQPtrList<HiddenListViewItem> HiddenFileView::getMatchingItems(const TQRegExp & rx)
{
- QPtrList<HiddenListViewItem> lst;
+ TQPtrList<HiddenListViewItem> lst;
HiddenListViewItem* item;
for (item = static_cast<HiddenListViewItem*>(_dlg->hiddenListView->firstChild());item;
@@ -523,44 +523,44 @@ void HiddenFileView::updateView()
}
-QPtrList<QRegExp> HiddenFileView::createRegExpList(const QString & s)
+TQPtrList<TQRegExp> HiddenFileView::createRegExpList(const TQString & s)
{
- QPtrList<QRegExp> lst;
+ TQPtrList<TQRegExp> lst;
bool cs = _share->getBoolValue("case sensitive");
if (!s.isEmpty())
{
- QStringList l = QStringList::split("/",s);
+ TQStringList l = TQStringList::split("/",s);
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- lst.append( new QRegExp(*it,cs,true) );
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ lst.append( new TQRegExp(*it,cs,true) );
}
}
return lst;
}
-bool HiddenFileView::matchHidden(const QString & s)
+bool HiddenFileView::matchHidden(const TQString & s)
{
- QPtrList<QRegExp> hiddenList(_hiddenList);
+ TQPtrList<TQRegExp> hiddenList(_hiddenList);
if (_dlg->hideDotFilesChk->isChecked())
- hiddenList.append( new QRegExp(".*",false,true) );
+ hiddenList.append( new TQRegExp(".*",false,true) );
return matchRegExpList(s,hiddenList);
}
-bool HiddenFileView::matchVeto(const QString & s)
+bool HiddenFileView::matchVeto(const TQString & s)
{
return matchRegExpList(s,_vetoList);
}
-bool HiddenFileView::matchVetoOplock(const QString & s)
+bool HiddenFileView::matchVetoOplock(const TQString & s)
{
return matchRegExpList(s,_vetoOplockList);
}
-bool HiddenFileView::matchRegExpList(const QString & s, QPtrList<QRegExp> & lst)
+bool HiddenFileView::matchRegExpList(const TQString & s, TQPtrList<TQRegExp> & lst)
{
if (getRegExpListMatch(s,lst))
return true;
@@ -569,19 +569,19 @@ bool HiddenFileView::matchRegExpList(const QString & s, QPtrList<QRegExp> & lst)
}
-QRegExp* HiddenFileView::getHiddenMatch(const QString & s)
+TQRegExp* HiddenFileView::getHiddenMatch(const TQString & s)
{
return getRegExpListMatch(s,_hiddenList);
}
-QRegExp* HiddenFileView::getVetoMatch(const QString & s)
+TQRegExp* HiddenFileView::getVetoMatch(const TQString & s)
{
return getRegExpListMatch(s,_vetoList);
}
-QRegExp* HiddenFileView::getRegExpListMatch(const QString & s, QPtrList<QRegExp> & lst)
+TQRegExp* HiddenFileView::getRegExpListMatch(const TQString & s, TQPtrList<TQRegExp> & lst)
{
- QRegExp* rx;
+ TQRegExp* rx;
for ( rx = lst.first(); rx; rx = lst.next() )
{
@@ -602,7 +602,7 @@ void HiddenFileView::hideUnreadableChkClicked(bool)
updateView();
}
-void HiddenFileView::slotMouseButtonPressed( int, QListViewItem*, const QPoint&, int c ) {
+void HiddenFileView::slotMouseButtonPressed( int, TQListViewItem*, const TQPoint&, int c ) {
columnClicked(c);
}
diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
index ca3cb1c3..a2ec3468 100644
--- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
+++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
@@ -43,10 +43,10 @@ class HiddenListViewItem : public QMultiCheckListItem
{
Q_OBJECT
public:
- HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock );
+ HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock );
~HiddenListViewItem();
- virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
KFileItem* getFileItem();
protected:
@@ -89,9 +89,9 @@ protected:
ShareDlgImpl* _dlg;
KDirLister* _dir;
- QPtrList<QRegExp> _hiddenList;
- QPtrList<QRegExp> _vetoList;
- QPtrList<QRegExp> _vetoOplockList;
+ TQPtrList<TQRegExp> _hiddenList;
+ TQPtrList<TQRegExp> _vetoList;
+ TQPtrList<TQRegExp> _vetoOplockList;
KToggleAction* _hiddenActn;
KToggleAction* _vetoActn;
@@ -101,22 +101,22 @@ protected:
void initListView();
- QPtrList<QRegExp> createRegExpList(const QString & s);
- bool matchHidden(const QString & s);
- bool matchVeto(const QString & s);
- bool matchVetoOplock(const QString & s);
- bool matchRegExpList(const QString & s, QPtrList<QRegExp> & lst);
+ TQPtrList<TQRegExp> createRegExpList(const TQString & s);
+ bool matchHidden(const TQString & s);
+ bool matchVeto(const TQString & s);
+ bool matchVetoOplock(const TQString & s);
+ bool matchRegExpList(const TQString & s, TQPtrList<TQRegExp> & lst);
- QRegExp* getHiddenMatch(const QString & s);
- QRegExp* getVetoMatch(const QString & s);
- QRegExp* getRegExpListMatch(const QString & s, QPtrList<QRegExp> & lst);
+ TQRegExp* getHiddenMatch(const TQString & s);
+ TQRegExp* getVetoMatch(const TQString & s);
+ TQRegExp* getRegExpListMatch(const TQString & s, TQPtrList<TQRegExp> & lst);
- QPtrList<HiddenListViewItem> getMatchingItems(const QRegExp & rx);
+ TQPtrList<HiddenListViewItem> getMatchingItems(const TQRegExp & rx);
- void setState(QPtrList<HiddenListViewItem> & lst,int column, bool b);
- void deselect(QPtrList<HiddenListViewItem> & lst);
+ void setState(TQPtrList<HiddenListViewItem> & lst,int column, bool b);
+ void deselect(TQPtrList<HiddenListViewItem> & lst);
- void updateEdit(QLineEdit* edit, QPtrList<QRegExp> & lst);
+ void updateEdit(TQLineEdit* edit, TQPtrList<TQRegExp> & lst);
protected slots:
// slots for KDirListener :
@@ -128,13 +128,13 @@ protected slots:
void hiddenChkClicked(bool b);
void vetoChkClicked(bool b);
void vetoOplockChkClicked(bool b);
- void checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit,int column,QPtrList<QRegExp> &reqExpList,bool b);
+ void checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit,int column,TQPtrList<TQRegExp> &reqExpList,bool b);
void columnClicked(int column);
void showContextMenu();
void updateView();
void hideDotFilesChkClicked(bool);
void hideUnreadableChkClicked(bool);
- void slotMouseButtonPressed( int button, QListViewItem * item, const QPoint & pos, int c );
+ void slotMouseButtonPressed( int button, TQListViewItem * item, const TQPoint & pos, int c );
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
index bcc5fe53..8af0c9ab 100644
--- a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
@@ -13,5 +13,5 @@ void JoinDomainDlg::accept() {
return;
}
- QDialog::accept();
+ TQDialog::accept();
}
diff --git a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
index 56debcde..51c9c5d4 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
@@ -33,12 +33,12 @@ void KcmPrinterDlg::init()
void KcmPrinterDlg::accept()
{
- QDialog::accept();
+ TQDialog::accept();
}
void KcmPrinterDlg::reject()
{
- QDialog::reject();
+ TQDialog::reject();
}
void KcmPrinterDlg::printersChkToggled( bool )
diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp
index eb073c0c..78f3c7fb 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp
+++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp
@@ -32,17 +32,17 @@
#include <assert.h>
#include <unistd.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpainter.h>
-#include <qcheckbox.h>
-#include <qlistbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpainter.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kglobal.h>
@@ -75,8 +75,8 @@
#define COL_NOPASSWORD 3
-ShareListViewItem::ShareListViewItem(QListView * parent, SambaShare* share)
- : QListViewItem(parent)
+ShareListViewItem::ShareListViewItem(TQListView * parent, SambaShare* share)
+ : TQListViewItem(parent)
{
setShare(share);
}
@@ -120,7 +120,7 @@ void ShareListViewItem::updateShare()
setPixmap(3,createPropertyPixmap());
}
-QPixmap ShareListViewItem::createPropertyPixmap()
+TQPixmap ShareListViewItem::createPropertyPixmap()
{
// Create a big pixmap wich holds the
// icons which are needed
@@ -133,11 +133,11 @@ QPixmap ShareListViewItem::createPropertyPixmap()
int totalWidth = (w+margin)*numberOfPix;
- QPixmap pix(totalWidth,h);
+ TQPixmap pix(totalWidth,h);
pix.fill(); // Fill with white
- QPainter p(&pix);
+ TQPainter p(&pix);
int x = 0;
@@ -171,10 +171,10 @@ QPixmap ShareListViewItem::createPropertyPixmap()
p.end();
- return QPixmap(pix);
+ return TQPixmap(pix);
}
-KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name)
+KcmSambaConf::KcmSambaConf(TQWidget *parent, const char *name)
: KCModule(parent,name)
{
_dictMngr = 0L;
@@ -182,10 +182,10 @@ KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name)
m_smbConfConfigWidget = 0L;
- QBoxLayout * l = new QHBoxLayout( this );
+ TQBoxLayout * l = new TQHBoxLayout( this );
l->setAutoAdd( TRUE );
- QString smbFile = SambaFile::findSambaConf();
+ TQString smbFile = SambaFile::findSambaConf();
if (smbFile.isNull()) {
createSmbConfigWidget();
return;
@@ -202,11 +202,11 @@ KcmSambaConf::~KcmSambaConf() {
void KcmSambaConf::createSmbConfigWidget() {
m_smbConfConfigWidget = new SmbConfConfigWidget(this);
- connect( m_smbConfConfigWidget, SIGNAL(smbConfChoosed(const QString &)),
- this, SLOT(slotSpecifySmbConf(const QString &)));
+ connect( m_smbConfConfigWidget, TQT_SIGNAL(smbConfChoosed(const TQString &)),
+ this, TQT_SLOT(slotSpecifySmbConf(const TQString &)));
}
-void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) {
+void KcmSambaConf::slotSpecifySmbConf(const TQString & smbConf) {
if (m_smbConfConfigWidget) {
m_smbConfConfigWidget->hide();
}
@@ -218,7 +218,7 @@ void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) {
if (getuid() != 0) {
for (int i=0;i<_interface->mainTab->count();i++) {
- QWidget* w = _interface->mainTab->page(i);
+ TQWidget* w = _interface->mainTab->page(i);
w->setEnabled(false);
}
}
@@ -231,61 +231,61 @@ void KcmSambaConf::init() {
_interface = new KcmInterface(this);
- connect ( _interface->sambaUserPasswordBtn, SIGNAL(clicked()), this, SLOT(sambaUserPasswordBtnClicked()));
+ connect ( _interface->sambaUserPasswordBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(sambaUserPasswordBtnClicked()));
- connect ( _interface->editShareBtn, SIGNAL(clicked()), this, SLOT(editShare()));
- connect ( _interface->addShareBtn, SIGNAL(clicked()), this, SLOT(addShare()));
- connect ( _interface->removeShareBtn, SIGNAL(clicked()), this, SLOT(removeShare()));
+ connect ( _interface->editShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShare()));
+ connect ( _interface->addShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addShare()));
+ connect ( _interface->removeShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeShare()));
- connect ( _interface->editPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinter()));
- connect ( _interface->addPrinterBtn, SIGNAL(clicked()), this, SLOT(addPrinter()));
- connect ( _interface->removePrinterBtn, SIGNAL(clicked()), this, SLOT(removePrinter()));
+ connect ( _interface->editPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinter()));
+ connect ( _interface->addPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addPrinter()));
+ connect ( _interface->removePrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removePrinter()));
- connect ( _interface->editDefaultPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinterDefaults()));
- connect ( _interface->editDefaultShareBtn, SIGNAL(clicked()), this, SLOT(editShareDefaults()));
+ connect ( _interface->editDefaultPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinterDefaults()));
+ connect ( _interface->editDefaultShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShareDefaults()));
- connect( _interface->domainRadio, SIGNAL(toggled(bool)),
- _interface->joinADomainBtn, SLOT( setEnabled(bool) ));
+ connect( _interface->domainRadio, TQT_SIGNAL(toggled(bool)),
+ _interface->joinADomainBtn, TQT_SLOT( setEnabled(bool) ));
- connect(_interface->nullPasswordsChk,SIGNAL(toggled(bool)),
- this, SLOT(nullPasswordsEnabled(bool)));
+ connect(_interface->nullPasswordsChk,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(nullPasswordsEnabled(bool)));
- connect( _interface->addSambaUserBtn, SIGNAL(clicked()),
- this, SLOT( addSambaUserBtnClicked() ));
+ connect( _interface->addSambaUserBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT( addSambaUserBtnClicked() ));
- connect( _interface->removeSambaUserBtn, SIGNAL(clicked()),
- this, SLOT( removeSambaUserBtnClicked() ));
+ connect( _interface->removeSambaUserBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT( removeSambaUserBtnClicked() ));
_interface->removeSambaUserBtn->setIconSet(SmallIconSet("1rightarrow"));
_interface->addSambaUserBtn->setIconSet(SmallIconSet("1leftarrow"));
- connect( _interface->sambaUsersListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)),
- this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int)));
+ connect( _interface->sambaUsersListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)),
+ this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)));
- connect( _interface->joinADomainBtn, SIGNAL(clicked()),
- this, SLOT( joinADomainBtnClicked() ));
+ connect( _interface->joinADomainBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT( joinADomainBtnClicked() ));
- connect( _interface->loadBtn, SIGNAL(clicked()),
- this, SLOT( loadBtnClicked() ));
+ connect( _interface->loadBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT( loadBtnClicked() ));
- connect( _interface, SIGNAL(changed()), this, SLOT(configChanged()));
+ connect( _interface, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged()));
}
void KcmSambaConf::initAdvancedTab()
{
- QVBoxLayout *l = new QVBoxLayout(_interface->advancedFrame);
+ TQVBoxLayout *l = new TQVBoxLayout(_interface->advancedFrame);
l->setAutoAdd(true);
l->setMargin(0);
_janus = new KJanusWidget(_interface->advancedFrame,0,KJanusWidget::TreeList);
_janus->setRootIsDecorated(false);
_janus->setShowIconsInTreeList(true);
- QWidget *w;
- QFrame *f;
- QString label;
- QPixmap icon;
+ TQWidget *w;
+ TQFrame *f;
+ TQString label;
+ TQPixmap icon;
for (int i=0;i<_interface->advancedTab->count();)
{
@@ -334,19 +334,19 @@ void KcmSambaConf::initAdvancedTab()
if (label == i18n("Commands"))
icon = SmallIcon("konsole");
else {
- icon = QPixmap(16,16);
+ icon = TQPixmap(16,16);
icon.fill();
}
//SmallIcon("empty2");
f = _janus->addPage( label,label,icon );
- l = new QVBoxLayout(f);
+ l = new TQVBoxLayout(f);
l->setAutoAdd(true);
l->setMargin(0);
_interface->advancedTab->removePage(w);
- w->reparent(f,QPoint(1,1),TRUE);
+ w->reparent(f,TQPoint(1,1),TRUE);
}
@@ -366,11 +366,11 @@ void KcmSambaConf::editShare()
return;
ShareDlgImpl* dlg = new ShareDlgImpl(_interface,item->getShare());
- connect(dlg, SIGNAL(changed()), this, SLOT(configChanged()));
+ connect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged()));
dlg->exec();
item->updateShare();
- disconnect(dlg, SIGNAL(changed()), this, SLOT(configChanged()));
+ disconnect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged()));
delete dlg;
@@ -385,7 +385,7 @@ void KcmSambaConf::addShare()
ShareDlgImpl* dlg = new ShareDlgImpl(_interface,share);
dlg->exec();
- if (dlg->result() == QDialog::Rejected )
+ if (dlg->result() == TQDialog::Rejected )
removeShare();
else {
item->updateShare();
@@ -435,7 +435,7 @@ void KcmSambaConf::addPrinter()
PrinterDlgImpl* dlg = new PrinterDlgImpl(_interface,share);
dlg->exec();
- if (dlg->result() == QDialog::Rejected )
+ if (dlg->result() == TQDialog::Rejected )
removePrinter();
else
{
@@ -493,7 +493,7 @@ void KcmSambaConf::loadBtnClicked() {
load( _interface->configUrlRq->url());
}
-void KcmSambaConf::load(const QString & smbFile)
+void KcmSambaConf::load(const TQString & smbFile)
{
kdDebug(5009) << "loading " << smbFile << endl;
_smbconf = smbFile;
@@ -504,14 +504,14 @@ void KcmSambaConf::load(const QString & smbFile)
_sambaFile = new SambaFile(_smbconf,false);
- connect( _sambaFile, SIGNAL(completed()), this, SLOT(fillFields()));
- connect( _sambaFile, SIGNAL(canceled(const QString &)), this, SLOT(loadCanceled(const QString &)));
+ connect( _sambaFile, TQT_SIGNAL(completed()), this, TQT_SLOT(fillFields()));
+ connect( _sambaFile, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(loadCanceled(const TQString &)));
_sambaFile->load();
}
-void KcmSambaConf::loadCanceled(const QString & msg) {
+void KcmSambaConf::loadCanceled(const TQString & msg) {
KMessageBox::sorry(0L,msg,i18n("Error while opening file"));
}
@@ -579,7 +579,7 @@ void KcmSambaConf::fillFields()
loadUserTab();
- connect(_dictMngr, SIGNAL(changed()), this, SLOT(configChanged()));
+ connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged()));
}
@@ -597,7 +597,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share)
_interface->guestAccountCombo->insertStringList( getUnixUsers() );
setComboIndexToValue(_interface->guestAccountCombo,"guest account",share);
- QString value = share->getValue("map to guest",false,true);
+ TQString value = share->getValue("map to guest",false,true);
_interface->allowGuestLoginsChk->setChecked( value.lower()!="never" );
@@ -605,7 +605,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share)
_dictMngr->add("bind interfaces only",_interface->bindInterfacesOnlyChk);
- QString s = share->getValue("security",false,true).lower();
+ TQString s = share->getValue("security",false,true).lower();
int i = 0;
if ( s == "share" ) i = 0; else
@@ -624,7 +624,7 @@ void KcmSambaConf::loadSecurity(SambaShare*)
{
_dictMngr->add("map to guest",_interface->mapToGuestCombo,
- new QStringList(QStringList() << "Never" << "Bad User" << "Bad Password" ));
+ new TQStringList(TQStringList() << "Never" << "Bad User" << "Bad Password" ));
_dictMngr->add("password server", _interface->passwordServerEdit);
@@ -667,18 +667,18 @@ void KcmSambaConf::loadSecurity(SambaShare*)
_dictMngr->add("ntlm auth",_interface->ntlmAuthChk);
_dictMngr->add("use spnego",_interface->useSpnegoChk);
_dictMngr->add("server schannel",_interface->serverSchannelCombo,
- new QStringList(QStringList() << "Yes" << "No" << "Auto" ));
+ new TQStringList(TQStringList() << "Yes" << "No" << "Auto" ));
_dictMngr->add("server signing",_interface->serverSigningCombo,
- new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" ));
+ new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" ));
_dictMngr->add("client lanman auth",_interface->clientLanmanAuthChk);
_dictMngr->add("client plaintext auth",_interface->clientPlaintextAuthChk);
_dictMngr->add("client ntlmv2 auth",_interface->clientNTLMv2AuthChk);
_dictMngr->add("client use spnego",_interface->clientUseSpnegoChk);
_dictMngr->add("client schannel",_interface->clientSchannelCombo,
- new QStringList(QStringList() << "Yes" << "No" << "Auto" ));
+ new TQStringList(TQStringList() << "Yes" << "No" << "Auto" ));
_dictMngr->add("client signing",_interface->clientSigningCombo,
- new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" ));
+ new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" ));
@@ -813,16 +813,16 @@ void KcmSambaConf::loadProtocol(SambaShare*)
_dictMngr->add("smb ports", _interface->smbPortsEdit);
_dictMngr->add("announce as", _interface->announceAsCombo,
- new QStringList(QStringList() << "NT" << "NT workstation" << "win95" << "WfW"));
+ new TQStringList(TQStringList() << "NT" << "NT workstation" << "win95" << "WfW"));
_dictMngr->add("protocol", _interface->protocolCombo,
- new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" ));
+ new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" ));
_dictMngr->add("max protocol", _interface->maxProtocolCombo,
- new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus"));
+ new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus"));
_dictMngr->add("min protocol", _interface->minProtocolCombo,
- new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus"));
+ new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus"));
}
@@ -832,7 +832,7 @@ void KcmSambaConf::loadSocket(SambaShare* share)
_dictMngr->add("socket address", _interface->socketAddressEdit);
- QString s = share->getValue("socket options");
+ TQString s = share->getValue("socket options");
s = s.simplifyWhiteSpace();
// The string s has now the form :
@@ -862,7 +862,7 @@ void KcmSambaConf::loadSSL(SambaShare*)
// SSL
_dictMngr->add("ssl version",_interface->sslVersionCombo,
- new QStringList(QStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" ));
+ new TQStringList(TQStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" ));
_dictMngr->add("ssl",_interface->sslChk);
_dictMngr->add("ssl require server cert",_interface->sslRequireServercertChk);
@@ -933,7 +933,7 @@ void KcmSambaConf::loadWinbind(SambaShare* )
_dictMngr->add("winbind cache time", _interface->winbindCacheTimeSpin);
_dictMngr->add("acl compatibility",_interface->aclCompatibilityCombo,
- new QStringList(QStringList() << "winnt" << "win2k" << ""));
+ new TQStringList(TQStringList() << "winnt" << "win2k" << ""));
_dictMngr->add("winbind enum users",_interface->winbindEnumUsersChk);
_dictMngr->add("winbind enum groups",_interface->winbindEnumGroupsChk);
@@ -975,10 +975,10 @@ void KcmSambaConf::loadLDAP(SambaShare*)
_dictMngr->add("ldap delete dn",_interface->ldapDeleteDnChk);
_dictMngr->add("ldap ssl", _interface->ldapSslCombo,
- new QStringList(QStringList() << "No" << "Start_tls" << "Yes"));
+ new TQStringList(TQStringList() << "No" << "Start_tls" << "Yes"));
_dictMngr->add("ldap sync", _interface->ldapSyncCombo,
- new QStringList(QStringList() << "Yes" << "No" << "Only"));
+ new TQStringList(TQStringList() << "Yes" << "No" << "Only"));
}
@@ -992,7 +992,7 @@ void KcmSambaConf::loadBrowsing(SambaShare*)
_dictMngr->add("preload", _interface->preloadEdit);
_dictMngr->add("lm announce", _interface->lmAnnounceCombo,
- new QStringList(QStringList() << "Yes" << "No" << "Auto"));
+ new TQStringList(TQStringList() << "Yes" << "No" << "Auto"));
}
void KcmSambaConf::loadCommands(SambaShare*)
@@ -1008,7 +1008,7 @@ void KcmSambaConf::loadCommands(SambaShare*)
}
-void KcmSambaConf::setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share)
+void KcmSambaConf::setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share)
{
int i = box->listBox()->index(box->listBox()->findItem(share->getValue(value,false,true),Qt::ExactMatch));
box->setCurrentItem(i);
@@ -1048,7 +1048,7 @@ void KcmSambaConf::loadUserTab()
SambaShare* share = _sambaFile->getShare("global");
- QStringList added;
+ TQStringList added;
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
SambaUserList sambaList = passwd.getSambaUserList();
@@ -1058,7 +1058,7 @@ void KcmSambaConf::loadUserTab()
{
QMultiCheckListItem* item = new QMultiCheckListItem(_interface->sambaUsersListView);
item->setText(0,user->name);
- item->setText(1,QString::number(user->uid));
+ item->setText(1,TQString::number(user->uid));
item->setOn(COL_DISABLED,user->isDisabled);
item->setOn(COL_NOPASSWORD,user->hasNoPassword);
@@ -1076,15 +1076,15 @@ void KcmSambaConf::loadUserTab()
UnixUser *unixUser;
for ( unixUser = unixList.first(); unixUser; unixUser = unixList.next() )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
it=added.find(unixUser->name);
if (it == added.end())
- new KListViewItem(_interface->unixUsersListView, unixUser->name, QString::number(unixUser->uid));
+ new KListViewItem(_interface->unixUsersListView, unixUser->name, TQString::number(unixUser->uid));
}
- _interface->unixUsersListView->setSelectionMode(QListView::Extended);
- _interface->sambaUsersListView->setSelectionMode(QListView::Extended);
+ _interface->unixUsersListView->setSelectionMode(TQListView::Extended);
+ _interface->sambaUsersListView->setSelectionMode(TQListView::Extended);
}
@@ -1095,7 +1095,7 @@ void KcmSambaConf::joinADomainBtnClicked() {
int result = dlg->exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
SmbPasswdFile passwd;
if (!passwd.joinADomain(dlg->domainEdit->text(),
dlg->domainControllerEdit->text(),
@@ -1109,7 +1109,7 @@ void KcmSambaConf::joinADomainBtnClicked() {
}
-void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint &,int col) {
+void KcmSambaConf::slotMouseButtonPressed(int,TQListViewItem* item,const TQPoint &,int col) {
if (col < 2)
return;
@@ -1146,7 +1146,7 @@ void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint &
void KcmSambaConf::nullPasswordsEnabled(bool b)
{
- QListViewItemIterator it( _interface->sambaUsersListView );
+ TQListViewItemIterator it( _interface->sambaUsersListView );
for ( ; it.current(); ++it ) {
QMultiCheckListItem* sambaItem = static_cast<QMultiCheckListItem*>(it.current());
sambaItem->setDisabled(COL_NOPASSWORD,!b);
@@ -1160,17 +1160,17 @@ void KcmSambaConf::saveUserTab()
void KcmSambaConf::addSambaUserBtnClicked()
{
- QPtrList<QListViewItem> list = _interface->unixUsersListView->selectedItems();
+ TQPtrList<TQListViewItem> list = _interface->unixUsersListView->selectedItems();
SambaShare* share = _sambaFile->getShare("global");
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = list.first(); item; item = list.first() )
{
SambaUser user( item->text(0), item->text(1).toInt() );
- QCString password;
+ TQCString password;
int passResult = KPasswordDialog::getNewPassword(password,
i18n("<qt>Please enter a password for the user <b>%1</b></qt>").arg(user.name));
if (passResult != KPasswordDialog::Accepted) {
@@ -1186,7 +1186,7 @@ void KcmSambaConf::addSambaUserBtnClicked()
QMultiCheckListItem* sambaItem = new QMultiCheckListItem(_interface->sambaUsersListView);
sambaItem->setText(0,user.name);
- sambaItem->setText(1,QString::number(user.uid));
+ sambaItem->setText(1,TQString::number(user.uid));
sambaItem->setOn(COL_DISABLED,false);
sambaItem->setOn(COL_NOPASSWORD,false);
if ( ! _interface->nullPasswordsChk->isOn())
@@ -1200,12 +1200,12 @@ void KcmSambaConf::addSambaUserBtnClicked()
void KcmSambaConf::removeSambaUserBtnClicked()
{
- QPtrList<QListViewItem> list = _interface->sambaUsersListView->selectedItems();
+ TQPtrList<TQListViewItem> list = _interface->sambaUsersListView->selectedItems();
SambaShare* share = _sambaFile->getShare("global");
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = list.first(); item; item = list.first() )
{
SambaUser user( item->text(0), item->text(1).toInt() );
@@ -1223,17 +1223,17 @@ void KcmSambaConf::removeSambaUserBtnClicked()
void KcmSambaConf::sambaUserPasswordBtnClicked()
{
- QPtrList<QListViewItem> list = _interface->sambaUsersListView->selectedItems();
+ TQPtrList<TQListViewItem> list = _interface->sambaUsersListView->selectedItems();
SambaShare* share = _sambaFile->getShare("global");
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = list.first(); item; item = list.next() )
{
SambaUser user( item->text(0), item->text(1).toInt() );
- QCString password;
+ TQCString password;
int passResult = KPasswordDialog::getNewPassword(password,
i18n("Please enter a password for the user %1").arg(user.name));
if (passResult != KPasswordDialog::Accepted)
@@ -1267,13 +1267,13 @@ void KcmSambaConf::save() {
// Base settings
_smbconf = _interface->configUrlRq->url();
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),false);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),false);
config.writeEntry("SMBCONF",_smbconf);
config.sync();
// Security
- QString s;
+ TQString s;
switch (_interface->securityLevelBtnGrp->id(_interface->securityLevelBtnGrp->selected())) {
case 0 : s = "share";break;
@@ -1294,7 +1294,7 @@ void KcmSambaConf::save() {
if (_interface->otherWinsRadio->isChecked())
share->setValue("wins server",_interface->winsServerEdit->text(), false,true);
else
- share->setValue("wins server",QString(""), false,true);
+ share->setValue("wins server",TQString(""), false,true);
// socket options
@@ -1308,14 +1308,14 @@ void KcmSambaConf::save() {
}
-bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name )
+bool KcmSambaConf::getSocketBoolValue( const TQString & str, const TQString & name )
{
- QString s = str;
+ TQString s = str;
int i = s.find(name ,0,false);
if (i > -1)
{
- s = s.remove(0,i+1+QString(name).length());
+ s = s.remove(0,i+1+TQString(name).length());
if ( s.startsWith("=") )
{
@@ -1332,9 +1332,9 @@ bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name
return false;
}
-int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name )
+int KcmSambaConf::getSocketIntValue( const TQString & str, const TQString & name )
{
- QString s = str;
+ TQString s = str;
int i = s.find(name ,0,false);
if (i > -1)
@@ -1361,9 +1361,9 @@ int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name )
return 0;
}
-QString KcmSambaConf::socketOptions()
+TQString KcmSambaConf::socketOptions()
{
- QString s = "";
+ TQString s = "";
if ( _interface->SO_KEEPALIVEChk->isChecked() )
s+="SO_KEEPALIVE ";
@@ -1385,25 +1385,25 @@ QString KcmSambaConf::socketOptions()
if ( _interface->SO_SNDBUFChk->isChecked() ) {
s+= "SO_SNDBUF=";
- s+= QString::number( _interface->SO_SNDBUFSpin->value() );
+ s+= TQString::number( _interface->SO_SNDBUFSpin->value() );
s+= " ";
}
if ( _interface->SO_RCVBUFChk->isChecked() ) {
s+= "SO_RCVBUF=";
- s+= QString::number( _interface->SO_RCVBUFSpin->value() );
+ s+= TQString::number( _interface->SO_RCVBUFSpin->value() );
s+= " ";
}
if ( _interface->SO_SNDLOWATChk->isChecked() ) {
s+= "SO_SNDLOWAT=";
- s+= QString::number( _interface->SO_SNDLOWATSpin->value() );
+ s+= TQString::number( _interface->SO_SNDLOWATSpin->value() );
s+= " ";
}
if ( _interface->SO_RCVLOWATChk->isChecked() ) {
s+= "SO_RCVLOWAT=";
- s+= QString::number( _interface->SO_RCVLOWATSpin->value() );
+ s+= TQString::number( _interface->SO_RCVLOWATSpin->value() );
s+= " ";
}
@@ -1423,7 +1423,7 @@ void KcmSambaConf::configChanged() {
emit changed(true);
}
-QString KcmSambaConf::quickHelp() const
+TQString KcmSambaConf::quickHelp() const
{
return i18n("<h1>Samba Configuration</h1> here you can configure your SAMBA server.");
}
@@ -1432,7 +1432,7 @@ QString KcmSambaConf::quickHelp() const
extern "C"
{
- KDE_EXPORT KCModule *create_KcmSambaConf(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_KcmSambaConf(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("kfileshare");
return new KcmSambaConf(parent, name);
diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
index c17ec3b0..8d281555 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
+++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
@@ -34,20 +34,20 @@
#include <kcmodule.h>
#include <kcminterface.h>
#include <share.h>
-#include <qptrlist.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqlistview.h>
class SambaShare;
class SambaFile;
class QPixmap;
/**
-* A QListViewItem which holds a SambaShare object
+* A TQListViewItem which holds a SambaShare object
**/
class ShareListViewItem : public QListViewItem
{
public:
- ShareListViewItem(QListView * parent, SambaShare* share);
+ ShareListViewItem(TQListView * parent, SambaShare* share);
SambaShare* getShare() const;
void setShare(SambaShare* share);
@@ -55,7 +55,7 @@ public:
protected:
SambaShare* _share;
- QPixmap createPropertyPixmap();
+ TQPixmap createPropertyPixmap();
};
@@ -70,14 +70,14 @@ class KcmSambaConf: public KCModule
{
Q_OBJECT
public:
- KcmSambaConf(QWidget *parent = 0L, const char *name = 0L);
+ KcmSambaConf(TQWidget *parent = 0L, const char *name = 0L);
virtual ~KcmSambaConf();
- void load(const QString &);
+ void load(const TQString &);
void save();
void defaults();
int buttons();
- QString quickHelp() const;
+ TQString quickHelp() const;
public slots:
void configChanged();
@@ -98,7 +98,7 @@ class KcmSambaConf: public KCModule
/**
* The path of the smb.conf file
**/
- QString _smbconf;
+ TQString _smbconf;
SambaFile* _sambaFile;
DictManager* _dictMngr;
@@ -106,10 +106,10 @@ class KcmSambaConf: public KCModule
void init();
void loadUserTab();
void saveUserTab();
- bool getSocketBoolValue( const QString & str, const QString & name );
- int getSocketIntValue( const QString & str, const QString & name );
- QString socketOptions();
- void setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share);
+ bool getSocketBoolValue( const TQString & str, const TQString & name );
+ int getSocketIntValue( const TQString & str, const TQString & name );
+ TQString socketOptions();
+ void setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share);
void loadBaseSettings(SambaShare*s=0L);
void loadSecurity(SambaShare* );
@@ -142,13 +142,13 @@ class KcmSambaConf: public KCModule
void addSambaUserBtnClicked();
void removeSambaUserBtnClicked();
void sambaUserPasswordBtnClicked();
- void slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int);
+ void slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int);
void joinADomainBtnClicked();
void nullPasswordsEnabled(bool);
void loadBtnClicked();
- void loadCanceled(const QString & msg);
+ void loadCanceled(const TQString & msg);
void fillFields();
- void slotSpecifySmbConf(const QString &);
+ void slotSpecifySmbConf(const TQString &);
private:
KcmInterface* _interface;
diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
index af763729..83ea5180 100644
--- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
+++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
@@ -23,8 +23,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
* *
******************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
#include "sambashare.h"
#include "linuxpermissionchecker.h"
-LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent = 0L)
+LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,TQWidget* parent = 0L)
{
m_sambaShare = share;
m_parent = parent;
@@ -44,7 +44,7 @@ LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent
return;
}
- m_fi = QFileInfo(share->getValue("path"));
+ m_fi = TQFileInfo(share->getValue("path"));
if ( ! m_fi.exists()) {
kdDebug(5009) << "LinuxPermissionChecker: path does not exists !" << endl;
@@ -80,17 +80,17 @@ bool LinuxPermissionChecker::checkAllUserPermissions() {
if ( ! m_fi.exists())
return true;
- QStringList readList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("read list"));
+ TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("read list"));
- for ( QStringList::Iterator it = readList.begin(); it != readList.end(); ++it )
+ for ( TQStringList::Iterator it = readList.begin(); it != readList.end(); ++it )
{
if (!checkUserReadPermissions(*it))
return false;
}
- QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("write list"));
+ TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("write list"));
- for ( QStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it )
+ for ( TQStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it )
{
if (!checkUserWritePermissions(*it))
return false;
@@ -107,7 +107,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() {
if (!isPublic)
return true;
- QString guestAccount = m_sambaShare->getValue("guest account");
+ TQString guestAccount = m_sambaShare->getValue("guest account");
if ( ! checkUserReadPermissions(guestAccount,false))
{
@@ -139,7 +139,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() {
return true;
}
-bool LinuxPermissionChecker::checkUserPermissions(const QString & user) {
+bool LinuxPermissionChecker::checkUserPermissions(const TQString & user) {
if ( ! checkUserReadPermissions(user))
return false;
@@ -149,14 +149,14 @@ bool LinuxPermissionChecker::checkUserPermissions(const QString & user) {
return true;
}
-bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, bool showMessageBox) {
+bool LinuxPermissionChecker::checkUserWritePermissions(const TQString & user, bool showMessageBox) {
// If no write permissions are given, we don't need to check them.
if (m_sambaShare->getBoolValue("read only"))
return true;
- if (! ((m_fi.permission(QFileInfo::WriteOther)) ||
- (m_fi.permission(QFileInfo::WriteUser) && user == m_fi.owner()) ||
- (m_fi.permission(QFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group())))
+ if (! ((m_fi.permission(TQFileInfo::WriteOther)) ||
+ (m_fi.permission(TQFileInfo::WriteUser) && user == m_fi.owner()) ||
+ (m_fi.permission(TQFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group())))
)
{
if (!showMessageBox)
@@ -176,10 +176,10 @@ bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, boo
return true;
}
-bool LinuxPermissionChecker::checkUserReadPermissions(const QString & user, bool showMessageBox) {
- if (! ((m_fi.permission(QFileInfo::ReadOther)) ||
- (m_fi.permission(QFileInfo::ReadUser) && user == m_fi.owner()) ||
- (m_fi.permission(QFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group())))
+bool LinuxPermissionChecker::checkUserReadPermissions(const TQString & user, bool showMessageBox) {
+ if (! ((m_fi.permission(TQFileInfo::ReadOther)) ||
+ (m_fi.permission(TQFileInfo::ReadUser) && user == m_fi.owner()) ||
+ (m_fi.permission(TQFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group())))
)
{
if (!showMessageBox)
diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
index c4c1a6fc..2d2397d8 100644
--- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
+++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
@@ -26,7 +26,7 @@
#ifndef LINUXPERMISSIONCHECKER_H
#define LINUXPERMISSIONCHECKER_H
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
class SambaShare;
class QWidget;
@@ -43,7 +43,7 @@ class QWidget;
*/
class LinuxPermissionChecker{
public:
- LinuxPermissionChecker(SambaShare*,QWidget* parent );
+ LinuxPermissionChecker(SambaShare*,TQWidget* parent );
~LinuxPermissionChecker();
/**
@@ -79,25 +79,25 @@ protected:
* Checks all permissions of the given un?x user
* @return @see #check
*/
- bool checkUserPermissions(const QString & user);
+ bool checkUserPermissions(const TQString & user);
/**
* Checks the write permissions of the given un?x user
* Does not show a dialog if showMessageBox is false
* @return @see #check
*/
- bool checkUserWritePermissions(const QString & user,bool showMessageBox = true);
+ bool checkUserWritePermissions(const TQString & user,bool showMessageBox = true);
/**
* Checks the read permissions of the given un?x user
* Does not show a dialog if showMessageBox is false
* @return @see #check
*/
- bool checkUserReadPermissions(const QString & user,bool showMessageBox = true);
+ bool checkUserReadPermissions(const TQString & user,bool showMessageBox = true);
- QWidget* m_parent;
+ TQWidget* m_parent;
SambaShare* m_sambaShare;
- QFileInfo m_fi;
+ TQFileInfo m_fi;
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/passwd.cpp b/filesharing/advanced/kcm_sambaconf/passwd.cpp
index 78e9c8ad..eb3fe5b1 100644
--- a/filesharing/advanced/kcm_sambaconf/passwd.cpp
+++ b/filesharing/advanced/kcm_sambaconf/passwd.cpp
@@ -57,16 +57,16 @@ UnixUserList getUnixUserList()
return list;
}
-QStringList getUnixUsers()
+TQStringList getUnixUsers()
{
- QStringList list;
+ TQStringList list;
struct passwd* p;
while ((p = getpwent()))
{
if (p)
- list.append(QString(p->pw_name));
+ list.append(TQString(p->pw_name));
}
endpwent();
@@ -76,16 +76,16 @@ QStringList getUnixUsers()
return list;
}
-QStringList getUnixGroups()
+TQStringList getUnixGroups()
{
- QStringList list;
+ TQStringList list;
struct group* g;
while ((g = getgrent()))
{
if (g)
- list.append(QString(g->gr_name));
+ list.append(TQString(g->gr_name));
}
endgrent();
@@ -95,7 +95,7 @@ QStringList getUnixGroups()
return list;
}
-int getUserUID(const QString & name)
+int getUserUID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -109,7 +109,7 @@ int getUserUID(const QString & name)
return -1;
}
-int getUserGID(const QString & name)
+int getUserGID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -123,7 +123,7 @@ int getUserGID(const QString & name)
return -1;
}
-int getGroupGID(const QString & name)
+int getGroupGID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -137,19 +137,19 @@ int getGroupGID(const QString & name)
return -1;
}
-bool isUserInGroup(const QString & user, const QString & group) {
+bool isUserInGroup(const TQString & user, const TQString & group) {
struct group* g;
while ((g = getgrent()))
{
- if (g && QString(g->gr_name) == group) {
+ if (g && TQString(g->gr_name) == group) {
char** names = g->gr_mem;
int i = 0;
char* name = names[0];
while (name != 0L) {
i++;
- if (QString(name) == user) {
+ if (TQString(name) == user) {
endgrent();
return true;
}
diff --git a/filesharing/advanced/kcm_sambaconf/passwd.h b/filesharing/advanced/kcm_sambaconf/passwd.h
index 8c9dba19..f5b5228e 100644
--- a/filesharing/advanced/kcm_sambaconf/passwd.h
+++ b/filesharing/advanced/kcm_sambaconf/passwd.h
@@ -29,28 +29,28 @@
#ifndef PASSWD_H
#define PASSWD_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class UnixUser
{
public:
- QString name;
+ TQString name;
int uid;
};
-typedef QPtrList<UnixUser> UnixUserList;
+typedef TQPtrList<UnixUser> UnixUserList;
UnixUserList getUnixUserList();
-QStringList getUnixUsers();
-QStringList getUnixGroups();
-int getUserUID(const QString &);
-int getUserGID(const QString &);
-int getGroupGID(const QString &);
-bool isUserInGroup(const QString &, const QString &);
+TQStringList getUnixUsers();
+TQStringList getUnixGroups();
+int getUserUID(const TQString &);
+int getUserGID(const TQString &);
+int getGroupGID(const TQString &);
+bool isUserInGroup(const TQString &, const TQString &);
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
index 531e4673..3858101d 100644
--- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
@@ -30,17 +30,17 @@
/**
* @author Jan Schäfer
**/
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qgroupbox.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqgroupbox.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
#include <klineedit.h>
#include <kurlrequester.h>
@@ -61,7 +61,7 @@
#include "dictmanager.h"
-PrinterDlgImpl::PrinterDlgImpl(QWidget* parent, SambaShare* share)
+PrinterDlgImpl::PrinterDlgImpl(TQWidget* parent, SambaShare* share)
: KcmPrinterDlg(parent,"sharedlgimpl")
{
if (!share) {
@@ -81,9 +81,9 @@ void PrinterDlgImpl::initDialog()
if (!_share)
return;
- QPtrList<KMPrinter> *printerList = KMManager::self()->printerListComplete();
+ TQPtrList<KMPrinter> *printerList = KMManager::self()->printerListComplete();
- for (QPtrListIterator<KMPrinter> it(*printerList); it.current(); ++it)
+ for (TQPtrListIterator<KMPrinter> it(*printerList); it.current(); ++it)
{
if (!it.current()->isSpecial()){
queueCombo->insertItem(it.current()->printerName());
@@ -108,7 +108,7 @@ void PrinterDlgImpl::initDialog()
_userTab = new UserTabImpl(this,_share);
_tabs->insertTab(_userTab,i18n("&Users"),1);
_userTab->load();
- connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
// Printing
@@ -120,7 +120,7 @@ void PrinterDlgImpl::initDialog()
_dictMngr->add("max print jobs",maxPrintJobsSpin);
_dictMngr->add("max reported print jobs",maxReportedPrintJobsSpin);
_dictMngr->add("printing",printingCombo,
- new QStringList(QStringList()
+ new TQStringList(TQStringList()
<< "sysv" << "aix" << "hpux" << "bsd" << "qnx"
<< "plp" << "lprng" << "softq" << "cups" << "nt" << "os2"));
@@ -156,7 +156,7 @@ void PrinterDlgImpl::initDialog()
_dictMngr->add("root postexec",rootPostExecEdit);
_dictMngr->load( _share );
- connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
}
@@ -200,19 +200,19 @@ void PrinterDlgImpl::printersChkToggled(bool b)
int w = 64 + dist;
int h = 64 + 2*dist;
- QPixmap pix(w,h);
+ TQPixmap pix(w,h);
pix.fill(); // fill with white
- QPixmap pix2 = DesktopIcon("printer1");
+ TQPixmap pix2 = DesktopIcon("printer1");
// Draw the printericon three times
- QPainter p(&pix);
+ TQPainter p(&pix);
p.drawPixmap(dist+dist/2,0,pix2);
p.drawPixmap(dist/2,dist,pix2);
p.drawPixmap(dist+dist/2,2*dist,pix2);
p.end();
- QBitmap mask(w,h);
+ TQBitmap mask(w,h);
mask.fill(Qt::black); // everything is transparent
diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
index 6e473821..265429f8 100644
--- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
@@ -50,7 +50,7 @@ Q_OBJECT
public :
- PrinterDlgImpl(QWidget* parent, SambaShare* share);
+ PrinterDlgImpl(TQWidget* parent, SambaShare* share);
~PrinterDlgImpl();
protected :
diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
index e7e0e260..19729e8d 100644
--- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
+++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qpen.h>
-#include <qpainter.h>
-#include <qvbox.h>
-#include <qheader.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqvbox.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -40,8 +40,8 @@
static const int BoxSize = 16;
-QMultiCheckListItem::QMultiCheckListItem( QListView *parent=0) :
- QListViewItem(parent) {
+QMultiCheckListItem::QMultiCheckListItem( TQListView *parent=0) :
+ TQListViewItem(parent) {
}
void QMultiCheckListItem::setOn(int column, bool b) {
@@ -83,56 +83,56 @@ void QMultiCheckListItem::setDisabled(int column, bool b) {
}
disableStates.setBit(column,b);
-// KMessageBox::information(0L,QString("setDisabled"),QString("disable %1 ").arg(column));
+// KMessageBox::information(0L,TQString("setDisabled"),TQString("disable %1 ").arg(column));
repaint();
}
-void QMultiCheckListItem::paintCell(QPainter *p,const QColorGroup & cg, int col, int width, int align)
+void QMultiCheckListItem::paintCell(TQPainter *p,const TQColorGroup & cg, int col, int width, int align)
{
if ( !p )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
- QListViewItem::paintCell(p,cg,col,width,align );
+ TQListViewItem::paintCell(p,cg,col,width,align );
int marg = lv->itemMargin();
// int width = BoxSize + marg*2;
// use a provate color group and set the text/highlighted text colors
- QColorGroup mcg = cg;
+ TQColorGroup mcg = cg;
if (checkBoxColumns.testBit(col)) {
// Bold/Italic/use default checkboxes
// code allmost identical to QCheckListItem
Q_ASSERT( lv ); //###
// I use the text color of defaultStyles[0], normalcol in parent listview
-// mcg.setColor( QColorGroup::Text, ((StyleListView*)lv)->normalcol );
+// mcg.setColor( TQColorGroup::Text, ((StyleListView*)lv)->normalcol );
int x = 0;
if ( align == AlignCenter ) {
- QFontMetrics fm( lv->font() );
+ TQFontMetrics fm( lv->font() );
x = (width - BoxSize - fm.width(text(0)))/2;
}
int y = (height() - BoxSize) / 2;
if ( !isEnabled() || disableStates.testBit(col))
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
else
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
if ( isSelected() && lv->header()->mapToSection( 0 ) != 0 ) {
p->fillRect( 0, 0, x + marg + BoxSize + 4, height(),
- mcg.brush( QColorGroup::Highlight ) );
+ mcg.brush( TQColorGroup::Highlight ) );
if ( isEnabled() )
- p->setPen( QPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :)
+ p->setPen( TQPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :)
}
p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
x++;
y++;
if ( checkStates.testBit(col) ) {
- QPointArray a( 7*2 );
+ TQPointArray a( 7*2 );
int i, xx, yy;
xx = x+1+marg;
yy = y+5;
diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
index 48fa1727..ab4aa8b4 100644
--- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
+++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
@@ -29,15 +29,15 @@
#ifndef _QMULTICHECKLISTITEM_H_
#define _QMULTICHECKLISTITEM_H_
-#include <qlistview.h>
+#include <tqlistview.h>
-#include <qbitarray.h>
+#include <tqbitarray.h>
-class QMultiCheckListItem : public QObject, public QListViewItem {
+class QMultiCheckListItem : public TQObject, public TQListViewItem {
Q_OBJECT
public:
- QMultiCheckListItem( QListView *parent);
+ QMultiCheckListItem( TQListView *parent);
~QMultiCheckListItem() {};
virtual bool isOn(int column);
@@ -46,7 +46,7 @@ Q_OBJECT
protected:
/* reimp */
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
public slots:
virtual void setOn(int, bool);
@@ -56,9 +56,9 @@ Q_OBJECT
signals:
void stateChanged(int, bool);
private:
- QBitArray checkStates;
- QBitArray checkBoxColumns;
- QBitArray disableStates;
+ TQBitArray checkStates;
+ TQBitArray checkBoxColumns;
+ TQBitArray disableStates;
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.cpp b/filesharing/advanced/kcm_sambaconf/sambafile.cpp
index e8dbc5f8..25392514 100644
--- a/filesharing/advanced/kcm_sambaconf/sambafile.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sambafile.cpp
@@ -17,13 +17,13 @@
*/
-#include <qfile.h>
-#include <qprocess.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqprocess.h>
+#include <tqfileinfo.h>
#include <ksimpleconfig.h>
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kio/job.h>
#include <kprocess.h>
#include <kmessagebox.h>
@@ -41,20 +41,20 @@
SambaConfigFile::SambaConfigFile(SambaFile* sambaFile)
{
- QDict<QString>(10,false);
+ TQDict<TQString>(10,false);
setAutoDelete(true);
_sambaFile = sambaFile;
}
-QString SambaConfigFile::getDefaultValue(const QString & name)
+TQString SambaConfigFile::getDefaultValue(const TQString & name)
{
SambaShare* defaults = _sambaFile->getTestParmValues();
- QString s = defaults->getValue(name,false,false);
+ TQString s = defaults->getValue(name,false,false);
return s;
}
-SambaShare* SambaConfigFile::addShare(const QString & name)
+SambaShare* SambaConfigFile::addShare(const TQString & name)
{
SambaShare* newShare = new SambaShare(name,this);
addShare(name,newShare);
@@ -62,25 +62,25 @@ SambaShare* SambaConfigFile::addShare(const QString & name)
}
-void SambaConfigFile::addShare(const QString & name, SambaShare* share)
+void SambaConfigFile::addShare(const TQString & name, SambaShare* share)
{
insert(name,share),
_shareList.append(name);
}
-void SambaConfigFile::removeShare(const QString & name)
+void SambaConfigFile::removeShare(const TQString & name)
{
remove(name);
_shareList.remove(name);
}
-QStringList SambaConfigFile::getShareList()
+TQStringList SambaConfigFile::getShareList()
{
return _shareList;
}
-SambaFile::SambaFile(const QString & _path, bool _readonly)
+SambaFile::SambaFile(const TQString & _path, bool _readonly)
: readonly(_readonly),
changed(false),
path(_path),
@@ -105,9 +105,9 @@ bool SambaFile::isRemoteFile() {
}
/** No descriptions */
-QString SambaFile::findShareByPath(const QString & path) const
+TQString SambaFile::findShareByPath(const TQString & path) const
{
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
KURL url(path);
url.adjustPath(-1);
@@ -115,7 +115,7 @@ QString SambaFile::findShareByPath(const QString & path) const
{
SambaShare* share = it.current();
- QString *s = share->find("path");
+ TQString *s = share->find("path");
if (s) {
KURL curUrl(*s);
curUrl.adjustPath(-1);
@@ -127,7 +127,7 @@ QString SambaFile::findShareByPath(const QString & path) const
}
}
- return QString::null;
+ return TQString::null;
}
bool SambaFile::save() {
@@ -147,7 +147,7 @@ bool SambaFile::slotApply()
// if not we have to save the results in
// a temporary file and copy it afterwards
// over the smb.conf file with kdesu.
- if (QFileInfo(path).isWritable())
+ if (TQFileInfo(path).isWritable())
{
saveTo(path);
changed = false;
@@ -166,14 +166,14 @@ bool SambaFile::slotApply()
return false;
}
- QFileInfo fi(path);
+ TQFileInfo fi(path);
KURL url(path);
if (KURL(path).isLocalFile()) {
KProcess proc;
kdDebug(5009) << "SambaFile::slotApply: is local file!" << endl;
- QString suCommand=QString("cp %1 %2; rm %3")
+ TQString suCommand=TQString("cp %1 %2; rm %3")
.arg(_tempFile->name())
.arg(path)
.arg(_tempFile->name());
@@ -200,8 +200,8 @@ bool SambaFile::slotApply()
srcURL.setPath( _tempFile->name() );
KIO::FileCopyJob * job = KIO::file_copy( srcURL, url, -1, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotSaveJobFinished ( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotSaveJobFinished ( KIO::Job * ) ) );
return (job->error()==0);
}
@@ -211,20 +211,20 @@ bool SambaFile::slotApply()
/**
* Returns a name which isn't already used for a share
**/
-QString SambaFile::getUnusedName(const QString alreadyUsedName) const
+TQString SambaFile::getUnusedName(const TQString alreadyUsedName) const
{
- QString init = i18n("Unnamed");
- if (alreadyUsedName != QString::null)
+ TQString init = i18n("Unnamed");
+ if (alreadyUsedName != TQString::null)
init = alreadyUsedName;
- QString s = init;
+ TQString s = init;
int i = 2;
while (_sambaConfig->find(s))
{
- s = init+QString::number(i);
+ s = init+TQString::number(i);
i++;
}
@@ -233,7 +233,7 @@ QString SambaFile::getUnusedName(const QString alreadyUsedName) const
-SambaShare* SambaFile::newShare(const QString & name)
+SambaShare* SambaFile::newShare(const TQString & name)
{
if (_sambaConfig->find(name))
return 0L;
@@ -247,7 +247,7 @@ SambaShare* SambaFile::newShare(const QString & name)
}
-SambaShare* SambaFile::newShare(const QString & name, const QString & path)
+SambaShare* SambaFile::newShare(const TQString & name, const TQString & path)
{
SambaShare* share = newShare(name);
if (share)
@@ -258,7 +258,7 @@ SambaShare* SambaFile::newShare(const QString & name, const QString & path)
return share;
}
-SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer)
+SambaShare* SambaFile::newPrinter(const TQString & name, const TQString & printer)
{
SambaShare* share = newShare(name);
@@ -273,7 +273,7 @@ SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer)
/** No descriptions */
-void SambaFile::removeShare(const QString & share)
+void SambaFile::removeShare(const TQString & share)
{
changed = true;
@@ -285,13 +285,13 @@ void SambaFile::removeShare(SambaShare* share)
removeShare(share->getName());
}
-void SambaFile::removeShareByPath(const QString & path) {
- QString share = findShareByPath(path);
+void SambaFile::removeShareByPath(const TQString & path) {
+ TQString share = findShareByPath(path);
removeShare(share);
}
/** No descriptions */
-SambaShare* SambaFile::getShare(const QString & share) const
+SambaShare* SambaFile::getShare(const TQString & share) const
{
SambaShare *s = _sambaConfig->find(share);
@@ -305,7 +305,7 @@ SambaShareList* SambaFile::getSharedDirs() const
{
SambaShareList* list = new SambaShareList();
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
for( ; it.current(); ++it )
{
@@ -326,7 +326,7 @@ SambaShareList* SambaFile::getSharedPrinters() const
{
SambaShareList* list = new SambaShareList();
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
for( ; it.current(); ++it )
{
@@ -344,11 +344,11 @@ int SambaFile::getSambaVersion() {
KProcess testParam;
testParam << "testparm";
testParam << "-V";
- _parmOutput = QString("");
+ _parmOutput = TQString("");
_sambaVersion = 2;
- connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));
+ connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int)));
@@ -378,10 +378,10 @@ SambaShare* SambaFile::getTestParmValues(bool reload)
testParam << "/dev/null";
- _parmOutput = QString("");
+ _parmOutput = TQString("");
- connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));
+ connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int)));
if (testParam.start(KProcess::Block,KProcess::Stdout))
{
@@ -394,23 +394,23 @@ SambaShare* SambaFile::getTestParmValues(bool reload)
void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int buflen)
{
- _parmOutput+=QString::fromLatin1(buffer,buflen);
+ _parmOutput+=TQString::fromLatin1(buffer,buflen);
}
void SambaFile::parseParmStdOutput()
{
- QTextIStream s(&_parmOutput);
+ TQTextIStream s(&_parmOutput);
if (_testParmValues)
delete _testParmValues;
_testParmValues = new SambaShare(_sambaConfig);
- QString section="";
+ TQString section="";
while (!s.atEnd())
{
- QString line = s.readLine().stripWhiteSpace();
+ TQString line = s.readLine().stripWhiteSpace();
// empty lines
if (line.isEmpty())
@@ -437,8 +437,8 @@ void SambaFile::parseParmStdOutput()
int i = line.find('=');
if (i>-1) {
- QString name = line.left(i).stripWhiteSpace();
- QString value = line.mid(i+1).stripWhiteSpace();
+ TQString name = line.left(i).stripWhiteSpace();
+ TQString value = line.mid(i+1).stripWhiteSpace();
_testParmValues->setValue(name,value,false,false);
}
@@ -452,9 +452,9 @@ void SambaFile::parseParmStdOutput()
* Try to find the samba config file position
* First tries the config file, then checks
* several common positions
-* If nothing is found returns QString::null
+* If nothing is found returns TQString::null
**/
-QString SambaFile::findSambaConf()
+TQString SambaFile::findSambaConf()
{
return KSambaShare::instance()->smbConfPath();
}
@@ -490,7 +490,7 @@ bool SambaFile::load()
destURL.setPath( localPath );
KIO::FileCopyJob * job = KIO::file_copy( url, destURL, 0600, true, false, true );
// emit started( d->m_job );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
return true;
} else {
localPath = path;
@@ -503,14 +503,14 @@ bool SambaFile::load()
bool SambaFile::openFile() {
- QFile f(localPath);
+ TQFile f(localPath);
if (!f.open(IO_ReadOnly)) {
- //throw SambaFileLoadException(QString("<qt>Could not open file <em>%1</em> for reading.</qt>").arg(path));
+ //throw SambaFileLoadException(TQString("<qt>Could not open file <em>%1</em> for reading.</qt>").arg(path));
return false;
}
- QTextStream s(&f);
+ TQTextStream s(&f);
delete _sambaConfig;
@@ -518,12 +518,12 @@ bool SambaFile::openFile() {
SambaShare *currentShare = 0L;
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
- QStringList comments;
+ TQString completeLine;
+ TQStringList comments;
while (!s.eof())
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine)
{
@@ -555,7 +555,7 @@ bool SambaFile::openFile() {
if ('[' == completeLine[0])
{
// get the name of the section
- QString section = completeLine.mid(1,completeLine.length()-2);
+ TQString section = completeLine.mid(1,completeLine.length()-2);
currentShare = _sambaConfig->addShare(section);
currentShare->setComments(comments);
comments.clear();
@@ -568,8 +568,8 @@ bool SambaFile::openFile() {
if (i>-1)
{
- QString name = completeLine.left(i).stripWhiteSpace();
- QString value = completeLine.mid(i+1).stripWhiteSpace();
+ TQString name = completeLine.left(i).stripWhiteSpace();
+ TQString value = completeLine.mid(i+1).stripWhiteSpace();
if (currentShare)
{
@@ -591,24 +591,24 @@ bool SambaFile::openFile() {
return true;
}
-bool SambaFile::saveTo(const QString & path)
+bool SambaFile::saveTo(const TQString & path)
{
- QFile f(path);
+ TQFile f(path);
if (!f.open(IO_WriteOnly))
return false;
- QTextStream s(&f);
+ TQTextStream s(&f);
- QStringList shareList = _sambaConfig->getShareList();
+ TQStringList shareList = _sambaConfig->getShareList();
- for ( QStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it )
+ for ( TQStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it )
{
SambaShare* share = _sambaConfig->find(*it);
// First add all comments of the share to the file
- QStringList comments = share->getComments();
- for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
+ TQStringList comments = share->getComments();
+ for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
{
s << *cmtIt << endl;
@@ -624,14 +624,14 @@ bool SambaFile::saveTo(const QString & path)
s << "[" << share->getName() << "]" << endl;
// Add all options of the share
- QStringList optionList = share->getOptionList();
+ TQStringList optionList = share->getOptionList();
- for ( QStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt )
+ for ( TQStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt )
{
// Add the comments of the option
comments = share->getComments(*optionIt);
- for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
+ for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
{
s << *cmtIt << endl;
}
@@ -651,21 +651,21 @@ bool SambaFile::saveTo(const QString & path)
SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config)
{
- QStringList groups = config->groupList();
+ TQStringList groups = config->groupList();
SambaConfigFile* samba = new SambaConfigFile(this);
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- QMap<QString,QString> entries = config->entryMap(*it);
+ TQMap<TQString,TQString> entries = config->entryMap(*it);
SambaShare *share = new SambaShare(*it,samba);
samba->insert(*it,share);
- for (QMap<QString,QString>::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 )
+ for (TQMap<TQString,TQString>::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 )
{
if (!it2.data().isEmpty())
- share->setValue(it2.key(),QString(it2.data()),false,false);
+ share->setValue(it2.key(),TQString(it2.data()),false,false);
}
}
@@ -674,11 +674,11 @@ SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config)
}
-KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QString & path)
+KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & path)
{
KSimpleConfig *config = new KSimpleConfig(path,false);
- QDictIterator<SambaShare> it(*sambaConfig);
+ TQDictIterator<SambaShare> it(*sambaConfig);
for ( ; it.current(); ++it )
{
@@ -686,7 +686,7 @@ KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QS
config->setGroup(it.currentKey());
- QDictIterator<QString> it2(*share);
+ TQDictIterator<TQString> it2(*share);
for (; it2.current(); ++it2 )
{
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.h b/filesharing/advanced/kcm_sambaconf/sambafile.h
index ab5d58c4..543082ba 100644
--- a/filesharing/advanced/kcm_sambaconf/sambafile.h
+++ b/filesharing/advanced/kcm_sambaconf/sambafile.h
@@ -21,9 +21,9 @@
#define SAMBAFILE_H
-#include <qdict.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kio/job.h>
#include "sambashare.h"
@@ -39,49 +39,49 @@ class SambaFile;
class SambaFileLoadException
{
public:
- SambaFileLoadException(const QString & msg) { message = msg; };
+ SambaFileLoadException(const TQString & msg) { message = msg; };
- QString getMessage() { return message; };
+ TQString getMessage() { return message; };
protected:
- QString message;
+ TQString message;
};
-class SambaConfigFile : public QDict<SambaShare>
+class SambaConfigFile : public TQDict<SambaShare>
{
public:
SambaConfigFile(SambaFile*);
- QString getDefaultValue(const QString & name);
- QStringList getShareList();
- void addShare(const QString & name, SambaShare* share);
- SambaShare* addShare(const QString & name);
- void removeShare(const QString & name);
+ TQString getDefaultValue(const TQString & name);
+ TQStringList getShareList();
+ void addShare(const TQString & name, SambaShare* share);
+ SambaShare* addShare(const TQString & name);
+ void removeShare(const TQString & name);
protected:
SambaFile* _sambaFile;
- QStringList _shareList;
+ TQStringList _shareList;
};
class SambaFile : public QObject
{
Q_OBJECT
public:
- SambaFile(const QString & _path, bool _readonly=true);
+ SambaFile(const TQString & _path, bool _readonly=true);
~SambaFile();
/** No descriptions */
- QString findShareByPath(const QString & path) const;
- void removeShareByPath(const QString & path);
+ TQString findShareByPath(const TQString & path) const;
+ void removeShareByPath(const TQString & path);
- SambaShare* newShare(const QString & name);
- SambaShare* newShare(const QString & name, const QString & path);
- SambaShare* newPrinter(const QString & name, const QString & printer);
+ SambaShare* newShare(const TQString & name);
+ SambaShare* newShare(const TQString & name, const TQString & path);
+ SambaShare* newPrinter(const TQString & name, const TQString & printer);
- void removeShare(const QString & share);
+ void removeShare(const TQString & share);
void removeShare(SambaShare* share);
- void renameShare(const QString & oldName, const QString & newName);
+ void renameShare(const TQString & oldName, const TQString & newName);
- SambaShare* getShare(const QString & share) const;
+ SambaShare* getShare(const TQString & share) const;
/**
* Returns a list of all shared directories
@@ -100,7 +100,7 @@ public:
* E.g.: if public is already used, the method could return
* public2
**/
- QString getUnusedName(const QString alreadyUsedName=QString::null) const;
+ TQString getUnusedName(const TQString alreadyUsedName=TQString::null) const;
/**
* Returns all values of the global section
@@ -111,7 +111,7 @@ public:
**/
SambaShare* getTestParmValues(bool reload=false);
- static QString findSambaConf();
+ static TQString findSambaConf();
int getSambaVersion();
@@ -135,21 +135,21 @@ public:
* Save all data to the specified file
* if successful returns true otherwise false
**/
- bool saveTo(const QString & path);
+ bool saveTo(const TQString & path);
protected:
bool readonly;
bool changed;
- QString path;
- QString localPath;
+ TQString path;
+ TQString localPath;
SambaConfigFile *_sambaConfig;
SambaShare* _testParmValues;
- QString _parmOutput;
+ TQString _parmOutput;
int _sambaVersion;
void parseParmStdOutput();
SambaConfigFile* getSambaConfigFile(KSimpleConfig* config);
- KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const QString & filename);
+ KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & filename);
@@ -170,7 +170,7 @@ protected slots:
void slotSaveJobFinished( KIO::Job *);
signals:
- void canceled(const QString &);
+ void canceled(const TQString &);
void completed();
};
diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.cpp b/filesharing/advanced/kcm_sambaconf/sambashare.cpp
index 68afef2a..a2c58565 100644
--- a/filesharing/advanced/kcm_sambaconf/sambashare.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sambashare.cpp
@@ -27,34 +27,34 @@
******************************************************************************/
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "sambafile.h"
#include "sambashare.h"
#include "common.h"
SambaShare::SambaShare(SambaConfigFile* sambaFile)
- : QDict<QString>(10,false)
+ : TQDict<TQString>(10,false)
{
_sambaFile = sambaFile;
setName("defaults");
setAutoDelete(true);
}
-SambaShare::SambaShare(const QString & name, SambaConfigFile* sambaFile)
- : QDict<QString>(10,false)
+SambaShare::SambaShare(const TQString & name, SambaConfigFile* sambaFile)
+ : TQDict<TQString>(10,false)
{
_sambaFile = sambaFile;
setName(name);
setAutoDelete(true);
}
-const QString& SambaShare::getName() const
+const TQString& SambaShare::getName() const
{
return _name;
}
-bool SambaShare::setName(const QString & name, bool testWetherExists)
+bool SambaShare::setName(const TQString & name, bool testWetherExists)
{
if ( testWetherExists &&
@@ -66,9 +66,9 @@ bool SambaShare::setName(const QString & name, bool testWetherExists)
return true;
}
-bool SambaShare::optionSupported(const QString & name)
+bool SambaShare::optionSupported(const TQString & name)
{
- QString defaultValue = _sambaFile->getDefaultValue(name);
+ TQString defaultValue = _sambaFile->getDefaultValue(name);
// kdDebug(5009) << name << " = " << defaultValue << " null : " << defaultValue.isNull() << endl;
return ! defaultValue.isNull();
}
@@ -78,12 +78,12 @@ bool SambaShare::optionSupported(const QString & name)
* if no value is set yet the default value
* will be returned.
**/
-QString SambaShare::getValue(const QString & name, bool globalValue, bool defaultValue)
+TQString SambaShare::getValue(const TQString & name, bool globalValue, bool defaultValue)
{
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- QString* str = find(synonym);
- QString ret;
+ TQString* str = find(synonym);
+ TQString ret;
if (str) {
ret = *str;
@@ -102,20 +102,20 @@ QString SambaShare::getValue(const QString & name, bool globalValue, bool defaul
return ret;
}
-bool SambaShare::getBoolValue(const QString & name, bool globalValue, bool defaultValue)
+bool SambaShare::getBoolValue(const TQString & name, bool globalValue, bool defaultValue)
{
return boolFromText(getValue(name,globalValue,defaultValue));
}
-QString SambaShare::getGlobalValue(const QString & name, bool defaultValue)
+TQString SambaShare::getGlobalValue(const TQString & name, bool defaultValue)
{
if (!_sambaFile)
return getValue(name,false,defaultValue);
SambaShare* globals = _sambaFile->find("global");
- QString s = globals->getValue(name,false,defaultValue);
+ TQString s = globals->getValue(name,false,defaultValue);
return s;
}
@@ -126,14 +126,14 @@ QString SambaShare::getGlobalValue(const QString & name, bool defaultValue)
* if no synonym exists the original parameter in lower
* case is returned
**/
-QString SambaShare::getSynonym(const QString & name) const
+TQString SambaShare::getSynonym(const TQString & name) const
{
// idmap config is an exception and shouldn't be set to lower
- QString sname = name.left(12).stripWhiteSpace();
+ TQString sname = name.left(12).stripWhiteSpace();
if ( sname == "idmap config" ) return name;
- QString lname = name.lower().stripWhiteSpace();
+ TQString lname = name.lower().stripWhiteSpace();
if (lname == "browsable") return "browseable";
if (lname == "allow hosts") return "hosts allow";
@@ -172,11 +172,11 @@ QString SambaShare::getSynonym(const QString & name) const
return lname;
}
-void SambaShare::setValue(const QString & name, const QString & value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, const TQString & value, bool globalValue, bool defaultValue)
{
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- QString newValue = value;
+ TQString newValue = value;
if (newValue.isNull())
newValue = "";
@@ -190,7 +190,7 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob
newValue = textFromBool(!boolFromText(value));
}
- QString global = "";
+ TQString global = "";
if (globalValue && !hasComments(synonym))
{
@@ -224,32 +224,32 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob
_optionList.append(synonym);
}
- replace(synonym,new QString(newValue));
+ replace(synonym,new TQString(newValue));
}
-void SambaShare::setValue(const QString & name, bool value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, bool value, bool globalValue, bool defaultValue)
{
setValue(name,textFromBool(value),globalValue, defaultValue);
}
-void SambaShare::setValue(const QString & name, int value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, int value, bool globalValue, bool defaultValue)
{
- setValue(name,QString::number(value),globalValue, defaultValue);
+ setValue(name,TQString::number(value),globalValue, defaultValue);
}
/**
* Returns the default value of the parameter
**/
-QString SambaShare::getDefaultValue(const QString & name)
+TQString SambaShare::getDefaultValue(const TQString & name)
{
- QString defaultValue = _sambaFile->getDefaultValue(name);
+ TQString defaultValue = _sambaFile->getDefaultValue(name);
if (defaultValue.isNull())
defaultValue = "";
return defaultValue;
}
-bool SambaShare::getDefaultBoolValue(const QString & name)
+bool SambaShare::getDefaultBoolValue(const TQString & name)
{
return boolFromText(getDefaultValue(name));
@@ -258,32 +258,32 @@ bool SambaShare::getDefaultBoolValue(const QString & name)
/**
* Sets the comments for the passed option
**/
-void SambaShare::setComments(const QString & name, const QStringList & commentList)
+void SambaShare::setComments(const TQString & name, const TQStringList & commentList)
{
// Only add inempty lists
if (commentList.empty())
return;
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- _commentList.replace(name,new QStringList(commentList));
+ _commentList.replace(name,new TQStringList(commentList));
}
/**
* Returns the comments of the passed option
**/
-QStringList SambaShare::getComments(const QString & name)
+TQStringList SambaShare::getComments(const TQString & name)
{
- QStringList* list = _commentList.find(getSynonym(name));
+ TQStringList* list = _commentList.find(getSynonym(name));
if (list)
- return QStringList(*list);
+ return TQStringList(*list);
else
- return QStringList();
+ return TQStringList();
}
-bool SambaShare::hasComments(const QString & name)
+bool SambaShare::hasComments(const TQString & name)
{
return 0L != _commentList.find(getSynonym(name));
}
@@ -292,7 +292,7 @@ bool SambaShare::hasComments(const QString & name)
* Returns the comments of the share
* e.g. the text above the [...] section
**/
-QStringList SambaShare::getComments()
+TQStringList SambaShare::getComments()
{
return _comments;
}
@@ -301,12 +301,12 @@ QStringList SambaShare::getComments()
* Sets the comments for the share
* e.g. the text above the [...] section
**/
-void SambaShare::setComments(const QStringList & commentList)
+void SambaShare::setComments(const TQStringList & commentList)
{
_comments = commentList;
}
-QStringList SambaShare::getOptionList()
+TQStringList SambaShare::getOptionList()
{
return _optionList;
}
@@ -316,7 +316,7 @@ QStringList SambaShare::getOptionList()
**/
bool SambaShare::isPrinter()
{
- QString* str = find("printable");
+ TQString* str = find("printable");
if (!str)
str = find("print ok");
diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.h b/filesharing/advanced/kcm_sambaconf/sambashare.h
index 78379dde..39107505 100644
--- a/filesharing/advanced/kcm_sambaconf/sambashare.h
+++ b/filesharing/advanced/kcm_sambaconf/sambashare.h
@@ -29,10 +29,10 @@
#ifndef SAMBASHARE_H
#define SAMBASHARE_H
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
class SambaConfigFile;
class QStringList;
@@ -41,7 +41,7 @@ class QStringList;
* A class which represents a Samba share
* @author Jan Sch&auml;fer
**/
-class SambaShare :public QDict<QString>
+class SambaShare :public TQDict<TQString>
{
public:
@@ -54,12 +54,12 @@ public:
* Creates a new SambaShare with the given name
* @param name the name of the share
**/
- SambaShare(const QString & name, SambaConfigFile* sambaFile);
+ SambaShare(const TQString & name, SambaConfigFile* sambaFile);
/**
* Returns the name of the share
**/
- const QString& getName() const;
+ const TQString& getName() const;
/**
@@ -67,13 +67,13 @@ public:
* returns false if the name already exists and the testWetherExists
* parameter is set to true
**/
- bool setName(const QString & name, bool testWetherExists=true);
+ bool setName(const TQString & name, bool testWetherExists=true);
/**
* Tests wether or not the given option is supported by Samba.
* It does this by testing the output of testparm for this option
**/
- bool optionSupported(const QString & name);
+ bool optionSupported(const TQString & name);
/**
* Returns the value of the given parameter
@@ -83,7 +83,7 @@ public:
* @param gobalValue if the gobal value should be returend
* @param defaultValue if the default value should be returned or a null string
**/
- QString getValue(const QString & name, bool globalValue=true, bool defaultValue=true);
+ TQString getValue(const TQString & name, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for boolean parameters
@@ -91,12 +91,12 @@ public:
* because you can't distinguish an unset parameter
* from a false parameter
**/
- bool getBoolValue(const QString & name, bool globalValue=true, bool defaultValue=true);
+ bool getBoolValue(const TQString & name, bool globalValue=true, bool defaultValue=true);
/**
* Returns the value from the [globals] section
**/
- QString getGlobalValue(const QString & name, bool defaultValue=true);
+ TQString getGlobalValue(const TQString & name, bool defaultValue=true);
/**
* Sets the parameter name to the given value
@@ -108,70 +108,70 @@ public:
* exists and it it is different to it. If no global value exists then it is only
* set if different to the default value.
**/
- void setValue(const QString & name,const QString & value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name,const TQString & value, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for boolean parameters
**/
- void setValue(const QString & name, bool value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name, bool value, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for integer parameters
**/
- void setValue(const QString & name, int value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name, int value, bool globalValue=true, bool defaultValue=true);
/**
* Returns the default value of the parameter
* @param name the name of the parameter
**/
- QString getDefaultValue(const QString & name);
+ TQString getDefaultValue(const TQString & name);
/**
* Same as above but for booleans
**/
- bool getDefaultBoolValue(const QString & name);
+ bool getDefaultBoolValue(const TQString & name);
/**
* Returns the default synonym for the given parameter
* if no synonym exists the original parameter in lower
* case is returned
**/
- QString getSynonym(const QString & name) const;
+ TQString getSynonym(const TQString & name) const;
/**
* Returns the comments of the share
* e.g. the text above the [...] section
**/
- QStringList getComments();
+ TQStringList getComments();
/**
* Sets the comments for the share
* e.g. the text above the [...] section
**/
- void setComments(const QStringList & commentList);
+ void setComments(const TQStringList & commentList);
/**
* Sets the comments for the passed option
**/
- void setComments(const QString & name, const QStringList & commentList);
+ void setComments(const TQString & name, const TQStringList & commentList);
/**
* Returns the comments of the passed option
**/
- QStringList getComments(const QString & name);
+ TQStringList getComments(const TQString & name);
/**
* Returns true if the passed option has comments
* otherwise returns false
**/
- bool hasComments(const QString & name);
+ bool hasComments(const TQString & name);
/**
* Returns the list of all options
* the order of the options is exactly the
* order of the insertion of the options
**/
- QStringList getOptionList();
+ TQStringList getOptionList();
/**
* Returns true if this share is a printer
@@ -190,7 +190,7 @@ protected:
* The name of the share
* could be also printers, global and homes
**/
- QString _name;
+ TQString _name;
SambaConfigFile* _sambaFile;
/**
@@ -198,34 +198,34 @@ protected:
* the comments which stood above the option name
* are stored in this QStringList
**/
- QDict<QStringList> _commentList;
+ TQDict<TQStringList> _commentList;
/**
* The comments for this share
**/
- QStringList _comments;
+ TQStringList _comments;
/**
* An extra list which holds
* all stored options
* You might say, hey for what is this ?
- * We have them already stored in the QDict.
+ * We have them already stored in the TQDict.
* That's right, but there is a problem :
- * QDict doesn't preserve the order of
+ * TQDict doesn't preserve the order of
* the inserted items, but when saving
* the options back to the smb.conf
* we want to have exactly the same order
- * so this QStringList is only for saving
+ * so this TQStringList is only for saving
* the order of the options.
* On the other side we need a very fast lookup
* of the options, because we lookup very frequently
* so this is the best way to do both.
**/
- QStringList _optionList;
+ TQStringList _optionList;
};
-typedef QPtrList<SambaShare> SambaShareList;
+typedef TQPtrList<SambaShare> SambaShareList;
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/share.ui.h b/filesharing/advanced/kcm_sambaconf/share.ui.h
index 60f8194e..7de229bc 100644
--- a/filesharing/advanced/kcm_sambaconf/share.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/share.ui.h
@@ -63,8 +63,8 @@ void KcmShareDlg::init()
directoryPixLbl->setPixmap(DesktopIcon("folder"));
PixmapLabel1->setPixmap(SmallIcon("messagebox_warning"));
/*
- QListBoxItem* item = 0;
- QPtrList<QListBoxItem>* selectedList = new QPtrList<QListBoxItem>;
+ TQListBoxItem* item = 0;
+ TQPtrList<TQListBoxItem>* selectedList = new TQPtrList<TQListBoxItem>;
selectedList->setAutoDelete(false);
for (int i=0; i < possible->count(); i++){
item = possible->item(i);
@@ -73,7 +73,7 @@ void KcmShareDlg::init()
}
}
selected->clearSelection();
- for (QPtrListIterator<QListBoxItem> it(*selectedList); it.current(); ++it){
+ for (TQPtrListIterator<TQListBoxItem> it(*selectedList); it.current(); ++it){
possible->takeItem(it.current());
selected->insertItem(it.current());
}
@@ -179,7 +179,7 @@ void KcmShareDlg::publicBaseChk_toggled( bool b)
}
-void KcmShareDlg::pathUrlRq_textChanged( const QString & )
+void KcmShareDlg::pathUrlRq_textChanged( const TQString & )
{
}
diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
index 73ba4741..8640f41b 100644
--- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
@@ -31,24 +31,24 @@
* @author Jan Schäfer
**/
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qgrid.h>
-#include <qcursor.h>
-#include <qtable.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qpixmap.h>
-#include <qframe.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqgrid.h>
+#include <tqcursor.h>
+#include <tqtable.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
#include <klineedit.h>
@@ -80,7 +80,7 @@
-ShareDlgImpl::ShareDlgImpl(QWidget* parent, SambaShare* share)
+ShareDlgImpl::ShareDlgImpl(TQWidget* parent, SambaShare* share)
: KcmShareDlg(parent,"sharedlgimpl")
{
if (!share) {
@@ -122,12 +122,12 @@ void ShareDlgImpl::initDialog()
_userTab = new UserTabImpl(this,_share);
_tabs->insertTab(_userTab,i18n("&Users"),1);
_userTab->load();
- connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
// Filename settings
_dictMngr->add("case sensitive",caseSensitiveCombo,
- new QStringList(QStringList() << "auto" << "yes" << "no"));
+ new TQStringList(TQStringList() << "auto" << "yes" << "no"));
_dictMngr->add("preserve case",preserveCaseChk);
_dictMngr->add("short preserve case",shortPreserveCaseChk);
_dictMngr->add("mangled names",mangledNamesChk);
@@ -137,10 +137,10 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("mangling method",manglingMethodCombo,
- new QStringList(QStringList() << "hash" << "hash2"));
+ new TQStringList(TQStringList() << "hash" << "hash2"));
_dictMngr->add("default case",defaultCaseCombo,
- new QStringList(QStringList() << "Lower" << "Upper"));
+ new TQStringList(TQStringList() << "Lower" << "Upper"));
_dictMngr->add("hide dot files",hideDotFilesChk);
_dictMngr->add("strip dot",hideTrailingDotChk);
@@ -202,7 +202,7 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("level2 oplocks",level2OplocksChk);
_dictMngr->add("posix locking",posixLockingChk);
_dictMngr->add("strict locking",strictLockingCombo,
- new QStringList(QStringList() << "Auto" << "yes" << "no"));
+ new TQStringList(TQStringList() << "Auto" << "yes" << "no"));
_dictMngr->add("share modes",shareModesChk);
_dictMngr->add("oplocks",oplocksChk);
@@ -223,7 +223,7 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("use sendfile",useSendfileChk);
_dictMngr->add("csc policy",cscPolicyCombo,
- new QStringList(QStringList() << "manual" << "documents" << "programs" << "disable"));
+ new TQStringList(TQStringList() << "manual" << "documents" << "programs" << "disable"));
@@ -256,8 +256,8 @@ void ShareDlgImpl::initDialog()
_dictMngr->load( _share );
- connect( _tabs, SIGNAL(currentChanged(QWidget*)), this, SLOT(tabChangedSlot(QWidget*)));
- connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect( _tabs, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(tabChangedSlot(TQWidget*)));
+ connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
}
ShareDlgImpl::~ShareDlgImpl()
@@ -268,17 +268,17 @@ ShareDlgImpl::~ShareDlgImpl()
void ShareDlgImpl::initAdvancedTab()
{
- QVBoxLayout *l = new QVBoxLayout(advancedFrame);
+ TQVBoxLayout *l = new TQVBoxLayout(advancedFrame);
l->setAutoAdd(true);
l->setMargin(0);
_janus = new KJanusWidget(advancedFrame,0,KJanusWidget::TreeList);
_janus->setRootIsDecorated(false);
_janus->setShowIconsInTreeList(true);
- QWidget *w;
- QFrame *f;
- QString label;
- QPixmap icon;
+ TQWidget *w;
+ TQFrame *f;
+ TQString label;
+ TQPixmap icon;
for (int i=0;i<advancedDumpTab->count();)
{
@@ -321,19 +321,19 @@ void ShareDlgImpl::initAdvancedTab()
if (label.lower() == "misc")
icon = SmallIcon("misc");
else {
- icon = QPixmap(16,16);
+ icon = TQPixmap(16,16);
icon.fill();
}
//SmallIcon("empty2");
f = _janus->addPage( label,label,icon );
- l = new QVBoxLayout(f);
+ l = new TQVBoxLayout(f);
l->setAutoAdd(true);
l->setMargin(0);
advancedDumpTab->removePage(w);
- w->reparent(f,QPoint(1,1),TRUE);
+ w->reparent(f,TQPoint(1,1),TRUE);
}
@@ -345,10 +345,10 @@ void ShareDlgImpl::initAdvancedTab()
}
-void ShareDlgImpl::tabChangedSlot(QWidget* w)
+void ShareDlgImpl::tabChangedSlot(TQWidget* w)
{
// We are only interrested in the Hidden files tab
- if ( QString(w->name()) == "hiddenFilesTab" )
+ if ( TQString(w->name()) == "hiddenFilesTab" )
loadHiddenFilesView();
}
@@ -418,15 +418,15 @@ void ShareDlgImpl::homeChkToggled(bool b)
void ShareDlgImpl::accessModifierBtnClicked()
{
- if (!QObject::sender()) {
- kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : QObject::sender() is null!" << endl;
+ if (!TQObject::sender()) {
+ kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : TQObject::sender() is null!" << endl;
return;
}
- QString name = QObject::sender()->name();
+ TQString name = TQObject::sender()->name();
- QLineEdit *edit = 0L;
+ TQLineEdit *edit = 0L;
if (name == "forceCreateModeBtn")
edit = forceCreateModeEdit;
@@ -468,7 +468,7 @@ void ShareDlgImpl::changedSlot() {
emit changed();
}
-void ShareDlgImpl::pathUrlRq_textChanged( const QString & s)
+void ShareDlgImpl::pathUrlRq_textChanged( const TQString & s)
{
if (_fileView && ! _share->isSpecialSection())
_fileView->load();
diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
index 16c3f6d0..a3ef81c4 100644
--- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
@@ -34,7 +34,7 @@
* @author Jan Schäfer
**/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "share.h"
@@ -57,7 +57,7 @@ Q_OBJECT
public :
- ShareDlgImpl(QWidget* parent, SambaShare* share);
+ ShareDlgImpl(TQWidget* parent, SambaShare* share);
~ShareDlgImpl();
bool hasChanged() { return m_changed; };
@@ -89,9 +89,9 @@ protected slots:
virtual void homeChkToggled(bool);
virtual void accessModifierBtnClicked();
virtual void changedSlot();
- virtual void pathUrlRq_textChanged( const QString & );
+ virtual void pathUrlRq_textChanged( const TQString & );
- void tabChangedSlot(QWidget* w);
+ void tabChangedSlot(TQWidget* w);
signals:
void changed();
};
diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
index 03a1e550..00181eaa 100644
--- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
+++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kfiledialog.h>
@@ -39,19 +39,19 @@
#include "smbconfconfigwidget.h"
-SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent)
- : QWidget(parent,"configWidget")
+SmbConfConfigWidget::SmbConfConfigWidget(TQWidget* parent)
+ : TQWidget(parent,"configWidget")
{
- QVBoxLayout *layout = new QVBoxLayout(this,5);
+ TQVBoxLayout *layout = new TQVBoxLayout(this,5);
- QLabel *lbl = new QLabel(i18n("<p>The SAMBA configuration file <strong>'smb.conf'</strong>" \
+ TQLabel *lbl = new TQLabel(i18n("<p>The SAMBA configuration file <strong>'smb.conf'</strong>" \
" could not be found;</p>" \
"make sure you have SAMBA installed.\n\n"), this);
- QHBoxLayout *hbox = new QHBoxLayout(this);
- QPushButton *btn = new QPushButton(i18n("Specify Location"), this);
- connect(btn, SIGNAL(pressed()), this, SLOT( btnPressed()));
+ TQHBoxLayout *hbox = new TQHBoxLayout(this);
+ TQPushButton *btn = new TQPushButton(i18n("Specify Location"), this);
+ connect(btn, TQT_SIGNAL(pressed()), this, TQT_SLOT( btnPressed()));
btn->setDefault(false);
btn->setAutoDefault(false);
@@ -65,13 +65,13 @@ SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent)
}
void SmbConfConfigWidget::btnPressed() {
- QString smbConf = KFileDialog::getOpenFileName("/",
+ TQString smbConf = KFileDialog::getOpenFileName("/",
"smb.conf|Samba conf. File\n"
"*|All Files",0,i18n("Get smb.conf Location"));
if (smbConf.isEmpty())
return;
- if ( ! QFileInfo(smbConf).isReadable() ) {
+ if ( ! TQFileInfo(smbConf).isReadable() ) {
KMessageBox::sorry(this,i18n("<qt>The file <i>%1</i> could not be read.</qt>").arg(smbConf),i18n("Could Not Read File"));
return;
}
diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
index 063dd9e8..6af88aa2 100644
--- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
+++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
@@ -29,17 +29,17 @@
#ifndef SMBCONFCONFIGWIDGET_H
#define SMBCONFCONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class SmbConfConfigWidget : public QWidget {
+class SmbConfConfigWidget : public TQWidget {
Q_OBJECT
public:
- SmbConfConfigWidget(QWidget*);
+ SmbConfConfigWidget(TQWidget*);
protected slots:
void btnPressed();
signals:
- void smbConfChoosed(const QString &);
+ void smbConfChoosed(const TQString &);
};
diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
index f7a2cdd9..8286cdf3 100644
--- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
+++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qstring.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -42,9 +42,9 @@
#include "passwd.h"
-QStringList SambaUserList::getUserNames()
+TQStringList SambaUserList::getUserNames()
{
- QStringList list;
+ TQStringList list;
SambaUser *user;
for ( user = first(); user; user = next() )
@@ -79,14 +79,14 @@ void SmbPasswdFile::setUrl(const KURL & url) {
**/
SambaUserList SmbPasswdFile::getSambaUserList()
{
- QFile f(_url.path());
+ TQFile f(_url.path());
SambaUserList list;
if ( f.open(IO_ReadOnly) )
{
- QTextStream t( &f );
- QString s;
+ TQTextStream t( &f );
+ TQString s;
while ( !t.eof() )
{
s = t.readLine().stripWhiteSpace();
@@ -95,7 +95,7 @@ SambaUserList SmbPasswdFile::getSambaUserList()
if (s.left(1)=="#")
continue;
- QStringList l = QStringList::split(":",s);
+ TQStringList l = TQStringList::split(":",s);
SambaUser* user = new SambaUser(l[0],l[1].toInt());
user->gid = getUserGID(l[0]);
@@ -111,12 +111,12 @@ SambaUserList SmbPasswdFile::getSambaUserList()
return list;
}
-bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) {
+bool SmbPasswdFile::executeSmbpasswd(const TQStringList & args) {
KProcess p;
p << "smbpasswd" << args;
- connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
+ connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
_smbpasswdOutput = "";
@@ -134,15 +134,15 @@ bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) {
* Tries to add the passed user to the smbpasswd file
* returns true if successful otherwise false
**/
-bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password)
+bool SmbPasswdFile::addUser(const SambaUser & user,const TQString & password)
{
KProcess p;
p << "smbpasswd" << "-a" << user.name;
p << password;
- connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
+ connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
_smbpasswdOutput = "";
@@ -162,12 +162,12 @@ bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password)
**/
bool SmbPasswdFile::removeUser(const SambaUser & user)
{
- QStringList l;
+ TQStringList l;
l << "-x" << user.name;
return executeSmbpasswd(l);
}
-bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPassword)
+bool SmbPasswdFile::changePassword(const SambaUser & user, const TQString & newPassword)
{
return addUser(user,newPassword);
}
@@ -175,7 +175,7 @@ bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPa
void SmbPasswdFile::smbpasswdStdOutReceived(KProcess *, char *buffer, int buflen)
{
- _smbpasswdOutput+=QString::fromLatin1(buffer,buflen);
+ _smbpasswdOutput+=TQString::fromLatin1(buffer,buflen);
}
@@ -193,32 +193,32 @@ KURL SmbPasswdFile::getUrlFromSambaFile(const SambaFile * /*file*/)
}
bool SmbPasswdFile::enableUser(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-e" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::disableUser(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-d" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::setNoPassword(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-n" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::setMachineTrustAccount(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-m" << user.name;
return executeSmbpasswd(l);
}
-bool SmbPasswdFile::joinADomain(const QString & domain, const QString & server,
- const QString & user, const QString & password) {
- QStringList l;
+bool SmbPasswdFile::joinADomain(const TQString & domain, const TQString & server,
+ const TQString & user, const TQString & password) {
+ TQStringList l;
l << "-j" << domain;
l << "-r" << server;
l << "-U" << user << "%" << password;
diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
index 2542d3f6..88eb8594 100644
--- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
+++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
@@ -34,7 +34,7 @@
*@author Jan Schäfer
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
class SambaFile;
@@ -46,9 +46,9 @@ class KProcess;
class SambaUser
{
public:
- SambaUser(const QString & aName = QString::null, int anUid = -1) {name = aName; uid = anUid;};
+ SambaUser(const TQString & aName = TQString::null, int anUid = -1) {name = aName; uid = anUid;};
- QString name;
+ TQString name;
int uid;
int gid;
bool isUserAccount;
@@ -58,12 +58,12 @@ public:
};
/**
- * A QPtrList of SambaUser
+ * A TQPtrList of SambaUser
**/
-class SambaUserList : public QPtrList<SambaUser>
+class SambaUserList : public TQPtrList<SambaUser>
{
public:
- QStringList getUserNames();
+ TQStringList getUserNames();
};
/**
@@ -92,13 +92,13 @@ public:
/**
* Calls smbpasswd with the given arguments
**/
- bool executeSmbpasswd(const QStringList & args);
+ bool executeSmbpasswd(const TQStringList & args);
/**
* Tries to add the passed user to the smbpasswd file
* returns true if successful otherwise false
**/
- bool addUser(const SambaUser &, const QString & password);
+ bool addUser(const SambaUser &, const TQString & password);
/**
* Tries to remove the passed user from the smbpasswd file
@@ -110,7 +110,7 @@ public:
* Tries to change the password of the passed user
* if it fails returns false otherwise true
**/
- bool changePassword(const SambaUser &, const QString & password);
+ bool changePassword(const SambaUser &, const TQString & password);
bool enableUser(const SambaUser &);
@@ -120,7 +120,7 @@ public:
bool setMachineTrustAccount(const SambaUser &);
- bool joinADomain(const QString &, const QString &, const QString &, const QString &);
+ bool joinADomain(const TQString &, const TQString &, const TQString &, const TQString &);
/**
* Returns the Url of the smbpasswd file
@@ -132,7 +132,7 @@ public:
static KURL getUrlFromSambaFile(const SambaFile *file);
protected:
KURL _url;
- QString _smbpasswdOutput;
+ TQString _smbpasswdOutput;
protected slots:
void smbpasswdStdOutReceived(KProcess*,char*,int);
diff --git a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
index 8a8fca3a..d403fec0 100644
--- a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
@@ -32,7 +32,7 @@ void SocketOptionsDlg::setShare( SambaShare * share )
_share = share;
- QString s = _share->getValue("socket options");
+ TQString s = _share->getValue("socket options");
s = s.simplifyWhiteSpace();
@@ -59,14 +59,14 @@ SO_RCVLOWATSpin->setValue( getIntValue( s, "SO_RCVLOWAT") );
-bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name )
+bool SocketOptionsDlg::getBoolValue( const TQString & str, const TQString & name )
{
- QString s = str;
+ TQString s = str;
int i = s.find(name ,0,false);
if (i > -1)
{
- s = s.remove(0,i+1+QString(name).length());
+ s = s.remove(0,i+1+TQString(name).length());
if ( s.startsWith("=") )
{
s = s.remove(0,1);
@@ -82,14 +82,14 @@ bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name )
return false;
}
-int SocketOptionsDlg::getIntValue( const QString & str, const QString & name )
+int SocketOptionsDlg::getIntValue( const TQString & str, const TQString & name )
{
- QString s = str;
+ TQString s = str;
int i = s.find(name ,0,false);
if (i > -1)
{
- s = s.remove(0,i+1+QString(name).length());
+ s = s.remove(0,i+1+TQString(name).length());
if ( s.startsWith("=") )
{
s = s.remove(0,1);
diff --git a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
index af323fe6..48b07abe 100644
--- a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
@@ -8,7 +8,7 @@
*****************************************************************************/
-void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
+void UserSelectDlg::init(const TQStringList & specifiedUsers, SambaShare* share)
{
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
SambaUserList sambaList = passwd.getSambaUserList();
@@ -16,7 +16,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
for (SambaUser * user = sambaList.first(); user; user = sambaList.next() )
{
if (! specifiedUsers.contains(user->name))
- new QListViewItem(userListView, user->name, QString::number(user->uid), QString::number(user->gid));
+ new TQListViewItem(userListView, user->name, TQString::number(user->uid), TQString::number(user->gid));
}
}
@@ -24,7 +24,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
void UserSelectDlg::accept()
{
- QListViewItemIterator it( userListView);
+ TQListViewItemIterator it( userListView);
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() )
@@ -33,12 +33,12 @@ void UserSelectDlg::accept()
access = accessBtnGrp->id(accessBtnGrp->selected());
- QDialog::accept();
+ TQDialog::accept();
}
-QStringList UserSelectDlg::getSelectedUsers()
+TQStringList UserSelectDlg::getSelectedUsers()
{
return selectedUsers;
}
diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
index ac23b47c..724518cf 100644
--- a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
@@ -28,14 +28,14 @@
#include <unistd.h> // for getuid
-#include <qcombobox.h>
-#include <qstringlist.h>
+#include <tqcombobox.h>
+#include <tqstringlist.h>
#include <passwd.h>
-#include <qregexp.h>
-#include <qtable.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
+#include <tqregexp.h>
+#include <tqtable.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
#include <klistview.h>
#include <klocale.h>
@@ -57,7 +57,7 @@
* @pre share is not null
* @post _share = share
*/
-UserTabImpl::UserTabImpl(QWidget* parent, SambaShare* share)
+UserTabImpl::UserTabImpl(TQWidget* parent, SambaShare* share)
: UserTab(parent)
{
if (share == 0L) {
@@ -88,18 +88,18 @@ void UserTabImpl::load()
_share->getValue("invalid users"));
}
-void UserTabImpl::loadUsers(const QString & validUsersStr,
- const QString & readListStr,
- const QString & writeListStr,
- const QString & adminUsersStr,
- const QString & invalidUsersStr)
+void UserTabImpl::loadUsers(const TQString & validUsersStr,
+ const TQString & readListStr,
+ const TQString & writeListStr,
+ const TQString & adminUsersStr,
+ const TQString & invalidUsersStr)
{
userTable->setNumRows(0);
- QStringList validUsers = QStringList::split(QRegExp("[,\\s]+"),validUsersStr);
- QStringList readList = QStringList::split(QRegExp("[,\\s]+"),readListStr);
- QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),writeListStr);
- QStringList adminUsers = QStringList::split(QRegExp("[,\\s]+"),adminUsersStr);
- QStringList invalidUsers = QStringList::split(QRegExp("[,\\s]+"),invalidUsersStr);
+ TQStringList validUsers = TQStringList::split(TQRegExp("[,\\s]+"),validUsersStr);
+ TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),readListStr);
+ TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),writeListStr);
+ TQStringList adminUsers = TQStringList::split(TQRegExp("[,\\s]+"),adminUsersStr);
+ TQStringList invalidUsers = TQStringList::split(TQRegExp("[,\\s]+"),invalidUsersStr);
// if the valid users list contains no entries
// then all users are allowed, except those that are
@@ -124,7 +124,7 @@ void UserTabImpl::loadForceCombos() {
forceUserCombo->insertItem("");
forceGroupCombo->insertItem("");
- QStringList unixGroups = getUnixGroups();
+ TQStringList unixGroups = getUnixGroups();
forceUserCombo->insertStringList( getUnixUsers() );
forceGroupCombo->insertStringList( unixGroups );
@@ -137,9 +137,9 @@ void UserTabImpl::loadForceCombos() {
* Remove all duplicates of the different list, so that
* all lists are disjunct.
*/
-void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & readList,
- QStringList & writeList, QStringList & adminUsers,
- QStringList & invalidUsers)
+void UserTabImpl::removeDuplicates( TQStringList & validUsers, TQStringList & readList,
+ TQStringList & writeList, TQStringList & adminUsers,
+ TQStringList & invalidUsers)
{
removeAll(adminUsers, writeList);
@@ -159,31 +159,31 @@ void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & read
/**
* Remove all entries of entryList from the fromList
*/
-void UserTabImpl::removeAll(QStringList & entryList, QStringList & fromList) {
- for (QStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) {
+void UserTabImpl::removeAll(TQStringList & entryList, TQStringList & fromList) {
+ for (TQStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) {
fromList.remove((*it));
}
}
-void UserTabImpl::addListToUserTable(const QStringList & list, int accessRight) {
+void UserTabImpl::addListToUserTable(const TQStringList & list, int accessRight) {
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
addUserToUserTable(*it,accessRight);
}
}
-void UserTabImpl::addUserToUserTable(const QString & user, int accessRight) {
+void UserTabImpl::addUserToUserTable(const TQString & user, int accessRight) {
int row = userTable->numRows();
userTable->setNumRows(row+1);
setAllowedUser(row, user);
- QComboTableItem* comboItem = static_cast<QComboTableItem*>(userTable->item(row,3));
+ TQComboTableItem* comboItem = static_cast<TQComboTableItem*>(userTable->item(row,3));
comboItem->setCurrentItem(accessRight);
}
-QString UserTabImpl::removeQuotationMarks(const QString & name) {
- QString result = name;
+TQString UserTabImpl::removeQuotationMarks(const TQString & name) {
+ TQString result = name;
if (name.left(1) == "\"") {
result = result.left(result.length()-1);
result = result.right(result.length()-1);
@@ -191,8 +191,8 @@ QString UserTabImpl::removeQuotationMarks(const QString & name) {
return result;
}
-QString UserTabImpl::removeGroupTag(const QString & name) {
- QString result = name;
+TQString UserTabImpl::removeGroupTag(const TQString & name) {
+ TQString result = name;
if (nameIsGroup(result)) {
@@ -205,8 +205,8 @@ QString UserTabImpl::removeGroupTag(const QString & name) {
}
-bool UserTabImpl::nameIsGroup(const QString & name) {
- QString quoteless = removeQuotationMarks(name);
+bool UserTabImpl::nameIsGroup(const TQString & name) {
+ TQString quoteless = removeQuotationMarks(name);
if (quoteless.left(1) == "@" ||
quoteless.left(1) == "+" ||
quoteless.left(1) == "&")
@@ -216,27 +216,27 @@ bool UserTabImpl::nameIsGroup(const QString & name) {
}
-void UserTabImpl::setAllowedUser(int i, const QString & name)
+void UserTabImpl::setAllowedUser(int i, const TQString & name)
{
- QStringList accessRights;
+ TQStringList accessRights;
accessRights << i18n("Default") << i18n("Read only") << i18n("Writeable") << i18n("Admin") << i18n("Reject");
- QString uid;
- QString gid;
+ TQString uid;
+ TQString gid;
- QString name2 = name;
+ TQString name2 = name;
if (nameIsGroup(name2))
{
- QString name3 = removeGroupTag(name2);
+ TQString name3 = removeGroupTag(name2);
uid = "";
- gid = QString::number(getGroupGID(name3));
+ gid = TQString::number(getGroupGID(name3));
_specifiedGroups << name3;
}
else
{
- uid = QString::number(getUserUID(name2));
- gid = QString::number(getUserGID(name2));
+ uid = TQString::number(getUserUID(name2));
+ gid = TQString::number(getUserGID(name2));
_specifiedUsers << name2;
}
@@ -244,16 +244,16 @@ void UserTabImpl::setAllowedUser(int i, const QString & name)
name2 = "\""+name2+"\"";
- QTableItem* item = new QTableItem( userTable,QTableItem::Never, name2 );
+ TQTableItem* item = new TQTableItem( userTable,TQTableItem::Never, name2 );
userTable->setItem(i,0,item);
- item = new QTableItem( userTable,QTableItem::Never, uid );
+ item = new TQTableItem( userTable,TQTableItem::Never, uid );
userTable->setItem(i,1,item);
- item = new QTableItem( userTable,QTableItem::Never, gid );
+ item = new TQTableItem( userTable,TQTableItem::Never, gid );
userTable->setItem(i,2,item);
- QComboTableItem* comboItem = new QComboTableItem( userTable,accessRights);
+ TQComboTableItem* comboItem = new TQComboTableItem( userTable,accessRights);
userTable->setItem(i,3,comboItem);
}
@@ -264,10 +264,10 @@ void UserTabImpl::addUserBtnClicked()
UserSelectDlg *dlg = new UserSelectDlg();
dlg->init(_specifiedUsers,_share);
- QStringList selectedUsers = dlg->getSelectedUsers();
+ TQStringList selectedUsers = dlg->getSelectedUsers();
if (dlg->exec()) {
- for (QStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it)
+ for (TQStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it)
{
addUserToUserTable(*it,dlg->getAccess());
}
@@ -276,8 +276,8 @@ void UserTabImpl::addUserBtnClicked()
delete dlg;
} else {
bool ok;
- QString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"),
- QString::null,&ok );
+ TQString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"),
+ TQString::null,&ok );
if (ok)
addUserToUserTable(name,0);
@@ -286,7 +286,7 @@ void UserTabImpl::addUserBtnClicked()
void UserTabImpl::removeSelectedBtnClicked()
{
- QMemArray<int>rows;
+ TQMemArray<int>rows;
int j=0;
@@ -313,12 +313,12 @@ void UserTabImpl::addGroupBtnClicked()
{
GroupSelectDlg *dlg = new GroupSelectDlg();
dlg->init(_specifiedGroups);
- QStringList selectedGroups = dlg->getSelectedGroups();
+ TQStringList selectedGroups = dlg->getSelectedGroups();
if (dlg->exec()) {
- for (QStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it)
+ for (TQStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it)
{
kdDebug(5009) << "GroupKind: " << dlg->getGroupKind() << endl;
- QString name = dlg->getGroupKind() + (*it);
+ TQString name = dlg->getGroupKind() + (*it);
addUserToUserTable(name,dlg->getAccess());
}
}
@@ -328,11 +328,11 @@ void UserTabImpl::addGroupBtnClicked()
void UserTabImpl::expertBtnClicked() {
ExpertUserDlg *dlg = new ExpertUserDlg();
- QString validUsersStr;
- QString readListStr;
- QString writeListStr;
- QString adminUsersStr;
- QString invalidUsersStr;
+ TQString validUsersStr;
+ TQString readListStr;
+ TQString writeListStr;
+ TQString adminUsersStr;
+ TQString invalidUsersStr;
saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr);
@@ -356,11 +356,11 @@ void UserTabImpl::expertBtnClicked() {
void UserTabImpl::save()
{
- QString validUsersStr;
- QString readListStr;
- QString writeListStr;
- QString adminUsersStr;
- QString invalidUsersStr;
+ TQString validUsersStr;
+ TQString readListStr;
+ TQString writeListStr;
+ TQString adminUsersStr;
+ TQString invalidUsersStr;
saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr);
@@ -374,24 +374,24 @@ void UserTabImpl::save()
_share->setValue("force group",forceGroupCombo->currentText( ) );
}
-void UserTabImpl::saveUsers(QString & validUsersStr,
- QString & readListStr,
- QString & writeListStr,
- QString & adminUsersStr,
- QString & invalidUsersStr)
+void UserTabImpl::saveUsers(TQString & validUsersStr,
+ TQString & readListStr,
+ TQString & writeListStr,
+ TQString & adminUsersStr,
+ TQString & invalidUsersStr)
{
- QStringList validUsers;
- QStringList writeList;
- QStringList readList;
- QStringList adminUsers;
- QStringList invalidUsers;
+ TQStringList validUsers;
+ TQStringList writeList;
+ TQStringList readList;
+ TQStringList adminUsers;
+ TQStringList invalidUsers;
bool allowAllUsers = allUnspecifiedUsersCombo->currentItem() == 0;
for (int i=0; i<userTable->numRows(); i++)
{
- QTableItem* item = userTable->item(i,0);
- QComboTableItem* comboItem = static_cast<QComboTableItem*>(userTable->item(i,3));
+ TQTableItem* item = userTable->item(i,0);
+ TQComboTableItem* comboItem = static_cast<TQComboTableItem*>(userTable->item(i,3));
if (! allowAllUsers && comboItem->currentItem() < 4)
validUsers.append(item->text());
diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.h b/filesharing/advanced/kcm_sambaconf/usertabimpl.h
index df8e4a34..408ef853 100644
--- a/filesharing/advanced/kcm_sambaconf/usertabimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.h
@@ -31,7 +31,7 @@
#include "usertab.h"
#include "common.h"
-#include "qstringlist.h"
+#include "tqstringlist.h"
/**
*@author Jan Schäfer
@@ -49,41 +49,41 @@ class UserTabImpl : public UserTab
{
Q_OBJECT
public:
- UserTabImpl(QWidget* parent, SambaShare* share);
+ UserTabImpl(TQWidget* parent, SambaShare* share);
~UserTabImpl();
void load();
void save();
private:
SambaShare* _share;
- QStringList _specifiedUsers;
- QStringList _specifiedGroups;
+ TQStringList _specifiedUsers;
+ TQStringList _specifiedGroups;
- void setAllowedUser(int, const QString &);
- void removeDuplicates( QStringList & validUsers, QStringList & readList,
- QStringList & writeList, QStringList & adminUsers,
- QStringList & invalidUsers);
+ void setAllowedUser(int, const TQString &);
+ void removeDuplicates( TQStringList & validUsers, TQStringList & readList,
+ TQStringList & writeList, TQStringList & adminUsers,
+ TQStringList & invalidUsers);
- void removeAll(QStringList & entryList, QStringList & fromList);
- void addListToUserTable(const QStringList & list, int accessRight);
+ void removeAll(TQStringList & entryList, TQStringList & fromList);
+ void addListToUserTable(const TQStringList & list, int accessRight);
void loadForceCombos();
- void loadUsers(const QString & validUsersStr,
- const QString & readListStr,
- const QString & writeListStr,
- const QString & adminUsersStr,
- const QString & invalidUsersStr);
+ void loadUsers(const TQString & validUsersStr,
+ const TQString & readListStr,
+ const TQString & writeListStr,
+ const TQString & adminUsersStr,
+ const TQString & invalidUsersStr);
- void saveUsers(QString & validUsersStr,
- QString & readListStr,
- QString & writeListStr,
- QString & adminUsersStr,
- QString & invalidUsersStr);
+ void saveUsers(TQString & validUsersStr,
+ TQString & readListStr,
+ TQString & writeListStr,
+ TQString & adminUsersStr,
+ TQString & invalidUsersStr);
- bool nameIsGroup(const QString & name);
- QString removeGroupTag(const QString & name);
- QString removeQuotationMarks(const QString & name);
- void addUserToUserTable(const QString & user, int accessRight);
+ bool nameIsGroup(const TQString & name);
+ TQString removeGroupTag(const TQString & name);
+ TQString removeQuotationMarks(const TQString & name);
+ void addUserToUserTable(const TQString & user, int accessRight);
protected slots:
virtual void addUserBtnClicked();
diff --git a/filesharing/advanced/nfs/nfsdialog.cpp b/filesharing/advanced/nfs/nfsdialog.cpp
index ecf7a90b..926e3229 100644
--- a/filesharing/advanced/nfs/nfsdialog.cpp
+++ b/filesharing/advanced/nfs/nfsdialog.cpp
@@ -18,12 +18,12 @@
*/
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include "nfsfile.h"
#include "nfsdialoggui.h"
-NFSDialog::NFSDialog(QWidget * parent, NFSEntry* entry)
+NFSDialog::NFSDialog(TQWidget * parent, NFSEntry* entry)
: KDialogBase(Plain, i18n("NFS Options"), Ok|Cancel, Ok, parent),
m_nfsEntry(entry),
m_modified(false)
@@ -59,23 +59,23 @@ NFSDialog::~NFSDialog()
}
void NFSDialog::initGUI() {
- QWidget* page = plainPage();
+ TQWidget* page = plainPage();
m_gui = new NFSDialogGUI(page);
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
layout->addWidget( m_gui );
KAccel* accel = new KAccel( m_gui->listView );
- accel->insert( "Delete", Qt::Key_Delete, this, SLOT(slotRemoveHost()));
+ accel->insert( "Delete", Qt::Key_Delete, this, TQT_SLOT(slotRemoveHost()));
}
void NFSDialog::initSlots()
{
- connect( m_gui->removeHostBtn, SIGNAL(clicked()), this, SLOT( slotRemoveHost()));
- connect( m_gui->addHostBtn, SIGNAL(clicked()), this, SLOT( slotAddHost()));
- connect( m_gui->modifyHostBtn, SIGNAL(clicked()), this, SLOT( slotModifyHost()));
- connect( m_gui->listView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT( slotModifyHost()));
+ connect( m_gui->removeHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotRemoveHost()));
+ connect( m_gui->addHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddHost()));
+ connect( m_gui->modifyHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotModifyHost()));
+ connect( m_gui->listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT( slotModifyHost()));
}
@@ -92,17 +92,17 @@ void NFSDialog::initListView()
}
}
-QListViewItem* NFSDialog::createItemFromHost(NFSHost* host)
+TQListViewItem* NFSDialog::createItemFromHost(NFSHost* host)
{
if (!host)
return 0;
- QListViewItem* item = new QListViewItem(m_gui->listView);
+ TQListViewItem* item = new TQListViewItem(m_gui->listView);
updateItem(item, host);
return item;
}
-void NFSDialog::updateItem(QListViewItem* item, NFSHost* host)
+void NFSDialog::updateItem(TQListViewItem* item, NFSHost* host)
{
item->setText(0,host->name);
item->setText(1,host->paramString());
@@ -123,7 +123,7 @@ void NFSDialog::slotAddHost()
dlg->exec();
- if (dlg->result()==QDialog::Accepted) {
+ if (dlg->result()==TQDialog::Accepted) {
m_workEntry->addHost(host);
createItemFromHost(host);
setModified();
@@ -143,13 +143,13 @@ void NFSDialog::slotOk() {
void NFSDialog::slotRemoveHost()
{
- QPtrList<QListViewItem> items = m_gui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems();
if (items.count()==0)
return;
- QListViewItem *item;
+ TQListViewItem *item;
for ( item = items.first(); item; item = items.next() ) {
- QString name = item->text(0);
+ TQString name = item->text(0);
m_gui->listView->takeItem(item);
NFSHost* host = m_workEntry->getHostByName(name);
@@ -169,13 +169,13 @@ void NFSDialog::slotRemoveHost()
void NFSDialog::slotModifyHost()
{
- QPtrList<QListViewItem> items = m_gui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems();
if (items.count()==0)
return;
HostList hostList;
- QListViewItem *item;
+ TQListViewItem *item;
for ( item = items.first(); item; item = items.next() ) {
NFSHost* host = m_workEntry->getHostByName(item->text(0));
@@ -187,7 +187,7 @@ void NFSDialog::slotModifyHost()
}
NFSHostDlg *dlg = new NFSHostDlg(this, &hostList, m_workEntry);
- if (dlg->exec() == QDialog::Accepted &&
+ if (dlg->exec() == TQDialog::Accepted &&
dlg->isModified())
{
setModified();
diff --git a/filesharing/advanced/nfs/nfsdialog.h b/filesharing/advanced/nfs/nfsdialog.h
index 1d6c2b02..571b262b 100644
--- a/filesharing/advanced/nfs/nfsdialog.h
+++ b/filesharing/advanced/nfs/nfsdialog.h
@@ -32,7 +32,7 @@ class NFSDialog : public KDialogBase
{
Q_OBJECT
public:
- NFSDialog(QWidget * parent, NFSEntry* entry);
+ NFSDialog(TQWidget * parent, NFSEntry* entry);
~NFSDialog();
bool modified();
protected:
@@ -41,8 +41,8 @@ protected:
NFSDialogGUI* m_gui;
bool m_modified;
- QListViewItem* createItemFromHost(NFSHost* host);
- void updateItem(QListViewItem* item, NFSHost* host);
+ TQListViewItem* createItemFromHost(NFSHost* host);
+ void updateItem(TQListViewItem* item, NFSHost* host);
void initGUI();
void initListView();
void initSlots();
diff --git a/filesharing/advanced/nfs/nfsentry.cpp b/filesharing/advanced/nfs/nfsentry.cpp
index be741d0c..207e0eae 100644
--- a/filesharing/advanced/nfs/nfsentry.cpp
+++ b/filesharing/advanced/nfs/nfsentry.cpp
@@ -21,11 +21,11 @@
#include "nfsentry.h"
-NFSHost::NFSHost(const QString & hostString)
+NFSHost::NFSHost(const TQString & hostString)
{
readonly = true;
- QString s = hostString;
+ TQString s = hostString;
int l = s.find('(');
int r = s.find(')');
@@ -42,7 +42,7 @@ NFSHost::NFSHost(const QString & hostString)
if (l>=0 && r>=0)
{
- QString params = s.mid(l+1,r-l-1);
+ TQString params = s.mid(l+1,r-l-1);
parseParamsString(params);
}
@@ -77,7 +77,7 @@ void NFSHost::initParams()
}
-void NFSHost::parseParamsString(const QString & s)
+void NFSHost::parseParamsString(const TQString & s)
{
if (s.isEmpty())
@@ -85,8 +85,8 @@ void NFSHost::parseParamsString(const QString & s)
int i;
- QString rest = s;
- QString p;
+ TQString rest = s;
+ TQString p;
do
{
@@ -106,9 +106,9 @@ void NFSHost::parseParamsString(const QString & s)
}
-QString NFSHost::paramString() const
+TQString NFSHost::paramString() const
{
- QString s;
+ TQString s;
if (!readonly) s+="rw,";
if (!rootSquash) s+="no_root_squash,";
@@ -125,10 +125,10 @@ QString NFSHost::paramString() const
if (!hide) s+="nohide,";
if (anongid!=65534)
- s+=QString("anongid=%1,").arg(anongid);
+ s+=TQString("anongid=%1,").arg(anongid);
if (anonuid!=65534)
- s+=QString("anonuid=%1,").arg(anonuid);
+ s+=TQString("anonuid=%1,").arg(anonuid);
// get rid of the last ','
s.truncate(s.length()-1);
@@ -136,9 +136,9 @@ QString NFSHost::paramString() const
return s;
}
-QString NFSHost::toString() const
+TQString NFSHost::toString() const
{
- QString s = name;
+ TQString s = name;
s+='(';
s+=paramString();
@@ -173,9 +173,9 @@ bool NFSHost::isPublic() const {
return name == "*";
}
-void NFSHost::setParam(const QString & s)
+void NFSHost::setParam(const TQString & s)
{
- QString p = s.lower();
+ TQString p = s.lower();
if (p=="ro") {
readonly = true;
@@ -256,10 +256,10 @@ void NFSHost::setParam(const QString & s)
// get anongid or anonuid
if (i>-1)
{
- QString name = p.left(i).lower();
+ TQString name = p.left(i).lower();
kdDebug(5009) << name << endl;
- QString value = p.mid(i+1);
+ TQString value = p.mid(i+1);
kdDebug(5009) << value << endl;
if (name=="anongid")
@@ -271,7 +271,7 @@ void NFSHost::setParam(const QString & s)
}
-NFSEntry::NFSEntry(const QString & path)
+NFSEntry::NFSEntry(const TQString & path)
{
_hosts.setAutoDelete(true);
setPath(path);
@@ -302,9 +302,9 @@ void NFSEntry::copyFrom(NFSEntry* entry) {
}
}
-QString NFSEntry::toString() const
+TQString NFSEntry::toString() const
{
- QString s = _path.stripWhiteSpace();
+ TQString s = _path.stripWhiteSpace();
if (_path.find(' ') > -1) {
s = '"'+s+'"';
@@ -338,7 +338,7 @@ void NFSEntry::removeHost(NFSHost * host)
_hosts.remove(host);
}
-NFSHost* NFSEntry::getHostByName(const QString & name) const
+NFSHost* NFSEntry::getHostByName(const TQString & name) const
{
HostIterator it = getHosts();
NFSHost* host;
@@ -360,7 +360,7 @@ NFSHost* NFSEntry::getPublicHost() const
if (result)
return result;
- return getHostByName(QString::null);
+ return getHostByName(TQString::null);
}
@@ -369,12 +369,12 @@ HostIterator NFSEntry::getHosts() const
return HostIterator(_hosts);
}
-QString NFSEntry::path() const
+TQString NFSEntry::path() const
{
return _path;
}
-void NFSEntry::setPath(const QString & path)
+void NFSEntry::setPath(const TQString & path)
{
_path = path;
}
diff --git a/filesharing/advanced/nfs/nfsentry.h b/filesharing/advanced/nfs/nfsentry.h
index 42f3c5c5..43071504 100644
--- a/filesharing/advanced/nfs/nfsentry.h
+++ b/filesharing/advanced/nfs/nfsentry.h
@@ -21,14 +21,14 @@
#define NFSENTRY_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class NFSHost
{
public:
- NFSHost(const QString & hostString);
+ NFSHost(const TQString & hostString);
~NFSHost();
NFSHost();
@@ -45,55 +45,55 @@ public:
int anonuid;
int anongid;
- QString name;
+ TQString name;
- QString paramString() const;
- QString toString() const;
+ TQString paramString() const;
+ TQString toString() const;
bool isPublic() const;
/** returns a copy of this host */
NFSHost* copy() const;
protected:
- void parseParamsString(const QString &);
- void setParam(const QString &);
+ void parseParamsString(const TQString &);
+ void setParam(const TQString &);
void initParams();
};
-typedef QPtrList<NFSHost> HostList;
-typedef QPtrListIterator<NFSHost> HostIterator;
+typedef TQPtrList<NFSHost> HostList;
+typedef TQPtrListIterator<NFSHost> HostIterator;
class NFSLine {
public:
- virtual QString toString() const = 0;
+ virtual TQString toString() const = 0;
};
-typedef QPtrList<NFSLine> NFSLineList;
-typedef QPtrListIterator<NFSLine> NFSLineIterator;
+typedef TQPtrList<NFSLine> NFSLineList;
+typedef TQPtrListIterator<NFSLine> NFSLineIterator;
class NFSEmptyLine : public NFSLine {
public:
- virtual QString toString() const { return QString::fromLatin1("\n"); }
+ virtual TQString toString() const { return TQString::fromLatin1("\n"); }
virtual ~NFSEmptyLine() {};
};
class NFSComment : public NFSLine {
public:
- NFSComment(const QString & s) { comment = s; }
+ NFSComment(const TQString & s) { comment = s; }
virtual ~NFSComment() {};
- QString comment;
- virtual QString toString() const { return comment; }
+ TQString comment;
+ virtual TQString toString() const { return comment; }
};
class NFSEntry : public NFSLine {
public:
- NFSEntry(const QString & path);
+ NFSEntry(const TQString & path);
virtual ~NFSEntry();
void addHost(NFSHost * host);
void removeHost(NFSHost * host);
- NFSHost* getHostByName(const QString & name) const;
+ NFSHost* getHostByName(const TQString & name) const;
NFSHost* getPublicHost() const;
HostIterator getHosts() const;
@@ -107,14 +107,14 @@ public:
/** removes all hosts */
void clear();
- QString path() const;
- void setPath(const QString &);
+ TQString path() const;
+ void setPath(const TQString &);
- virtual QString toString() const;
+ virtual TQString toString() const;
protected:
HostList _hosts;
- QString _path;
+ TQString _path;
};
#endif
diff --git a/filesharing/advanced/nfs/nfsfile.cpp b/filesharing/advanced/nfs/nfsfile.cpp
index 79fc732e..c61a393c 100644
--- a/filesharing/advanced/nfs/nfsfile.cpp
+++ b/filesharing/advanced/nfs/nfsfile.cpp
@@ -21,10 +21,10 @@
#include <time.h>
#include <unistd.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -65,9 +65,9 @@ bool NFSFile::hasEntry(NFSEntry *entry)
}
-NFSEntry* NFSFile::getEntryByPath(const QString & path)
+NFSEntry* NFSFile::getEntryByPath(const TQString & path)
{
- QString testPath = path.stripWhiteSpace();
+ TQString testPath = path.stripWhiteSpace();
if ( testPath[testPath.length()-1] != '/' )
testPath += '/';
@@ -80,7 +80,7 @@ NFSEntry* NFSFile::getEntryByPath(const QString & path)
return 0L;
}
-bool NFSFile::removeEntryByPath(const QString & path) {
+bool NFSFile::removeEntryByPath(const TQString & path) {
NFSEntry* entry = getEntryByPath(path);
if (!entry)
return false;
@@ -99,7 +99,7 @@ EntryIterator NFSFile::getEntries()
bool NFSFile::load()
{
- QFile f(_url.path());
+ TQFile f(_url.path());
if ( !f.open(IO_ReadOnly) ) {
kdError() << "NFSFile::load: Could not open " << _url.path() << endl;
@@ -109,14 +109,14 @@ bool NFSFile::load()
_entries.clear();
_lines.clear();
- QTextStream s( &f );
+ TQTextStream s( &f );
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
+ TQString completeLine;
while ( !s.eof() )
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine) {
completeLine += currentLine;
@@ -146,8 +146,8 @@ bool NFSFile::load()
continue;
}
- QString path;
- QString hosts;
+ TQString path;
+ TQString hosts;
// Handle quotation marks
if ( completeLine[0] == '"' ) {
@@ -179,13 +179,13 @@ bool NFSFile::load()
kdDebug(5009) << "KNFSShare: Found path: '" << path << "'" << endl;
NFSEntry *entry = new NFSEntry(path);
- QStringList hostList = QStringList::split(' ', hosts);
+ TQStringList hostList = TQStringList::split(' ', hosts);
if (hostList.isEmpty()) {
NFSHost* host = new NFSHost("*");
entry->addHost(host);
} else {
- QStringList::iterator it;
+ TQStringList::iterator it;
for ( it = hostList.begin(); it != hostList.end(); ++it ) {
NFSHost* host = new NFSHost((*it).stripWhiteSpace());
entry->addHost(host);
@@ -205,8 +205,8 @@ bool NFSFile::load()
}
-void NFSFile::saveTo(QTextStream * stream) {
- QPtrListIterator<NFSLine> it(_lines);
+void NFSFile::saveTo(TQTextStream * stream) {
+ TQPtrListIterator<NFSLine> it(_lines);
NFSLine *line;
while ( (line = it.current()) != 0 ) {
@@ -215,12 +215,12 @@ void NFSFile::saveTo(QTextStream * stream) {
}
}
-bool NFSFile::saveTo(const QString& fileName) {
- QFile file(fileName);
+bool NFSFile::saveTo(const TQString& fileName) {
+ TQFile file(fileName);
if (!file.open(IO_WriteOnly))
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
saveTo(&stream);
file.close();
return true;
@@ -228,7 +228,7 @@ bool NFSFile::saveTo(const QString& fileName) {
bool NFSFile::save()
{
- if (QFileInfo(_url.path()).isWritable() ) {
+ if (TQFileInfo(_url.path()).isWritable() ) {
saveTo(_url.path());
} else
{
@@ -240,14 +240,14 @@ bool NFSFile::save()
KProcIO proc;
- QString command = QString("cp %1 %2")
+ TQString command = TQString("cp %1 %2")
.arg(KProcess::quote( tempFile.name() ))
.arg(KProcess::quote( _url.path() ));
if (restartNFSServer)
command +=";exportfs -ra";
- if (!QFileInfo(_url.path()).isWritable() )
+ if (!TQFileInfo(_url.path()).isWritable() )
proc<<"kdesu" << "-d" << "-c"<<command;
if (!proc.start(KProcess::Block, true)) {
diff --git a/filesharing/advanced/nfs/nfsfile.h b/filesharing/advanced/nfs/nfsfile.h
index f48a0942..c46ce595 100644
--- a/filesharing/advanced/nfs/nfsfile.h
+++ b/filesharing/advanced/nfs/nfsfile.h
@@ -24,8 +24,8 @@
#include <kurl.h>
#include "nfsentry.h"
-typedef QPtrList<NFSEntry> EntryList;
-typedef QPtrListIterator<NFSEntry> EntryIterator;
+typedef TQPtrList<NFSEntry> EntryList;
+typedef TQPtrListIterator<NFSEntry> EntryIterator;
class QTextStream;
@@ -37,13 +37,13 @@ public:
void addEntry(NFSEntry *);
void removeEntry(NFSEntry *);
bool hasEntry(NFSEntry *);
- NFSEntry* getEntryByPath(const QString &);
- bool removeEntryByPath(const QString &);
+ NFSEntry* getEntryByPath(const TQString &);
+ bool removeEntryByPath(const TQString &);
EntryIterator getEntries();
bool save();
- bool saveTo(const QString& fileName);
- void saveTo(QTextStream * stream);
+ bool saveTo(const TQString& fileName);
+ void saveTo(TQTextStream * stream);
bool load();
bool restartNFSServer;
diff --git a/filesharing/advanced/nfs/nfshostdlg.cpp b/filesharing/advanced/nfs/nfshostdlg.cpp
index 073170d6..b2205f25 100644
--- a/filesharing/advanced/nfs/nfshostdlg.cpp
+++ b/filesharing/advanced/nfs/nfshostdlg.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -32,19 +32,19 @@
#include "nfsentry.h"
-NFSHostDlg::NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry)
+NFSHostDlg::NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry)
: KDialogBase(Plain, i18n("Host Properties"), Ok|Cancel, Ok, parent),
m_hosts(hosts), m_nfsEntry(entry), m_modified(false)
{
- QWidget* page = plainPage();
+ TQWidget* page = plainPage();
m_gui = new HostProps(page);
- QVBoxLayout *layout = new QVBoxLayout( page, 0, 6 );
+ TQVBoxLayout *layout = new TQVBoxLayout( page, 0, 6 );
layout->addWidget( m_gui );
- connect( m_gui, SIGNAL(modified()), this, SLOT(setModified()));
+ connect( m_gui, TQT_SIGNAL(modified()), this, TQT_SLOT(setModified()));
init();
@@ -96,11 +96,11 @@ void NFSHostDlg::setHostValues(NFSHost* host) {
setCheckBoxValue(m_gui->syncChk, host->sync);
setCheckBoxValue(m_gui->wdelayChk, ! host->wdelay);
- setEditValue(m_gui->anonuidEdit,QString::number(host->anonuid));
- setEditValue(m_gui->anongidEdit,QString::number(host->anongid));
+ setEditValue(m_gui->anonuidEdit,TQString::number(host->anonuid));
+ setEditValue(m_gui->anongidEdit,TQString::number(host->anongid));
}
-void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) {
+void NFSHostDlg::setEditValue(TQLineEdit* edit, const TQString & value) {
if (edit->text().isEmpty())
return;
@@ -108,11 +108,11 @@ void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) {
edit->setText(value);
else
if (edit->text() != value)
- edit->setText(QString::null);
+ edit->setText(TQString::null);
}
-void NFSHostDlg::setCheckBoxValue(QCheckBox* chk, bool value) {
- if (chk->state() == QButton::NoChange)
+void NFSHostDlg::setCheckBoxValue(TQCheckBox* chk, bool value) {
+ if (chk->state() == TQButton::NoChange)
return;
if (chk->isChecked()) {
@@ -153,7 +153,7 @@ bool NFSHostDlg::saveName(NFSHost* host) {
}
host->name="*";
} else {
- QString name = m_gui->nameEdit->text().stripWhiteSpace();
+ TQString name = m_gui->nameEdit->text().stripWhiteSpace();
if (name.isEmpty()) {
KMessageBox::sorry(this,
i18n("Please enter a hostname or an IP address.").arg(name),
@@ -192,15 +192,15 @@ void NFSHostDlg::saveValues(NFSHost* host) {
saveEditValue(host->anongid,m_gui->anongidEdit);
}
-void NFSHostDlg::saveEditValue(int & value, QLineEdit* edit) {
+void NFSHostDlg::saveEditValue(int & value, TQLineEdit* edit) {
if ( edit->text().isEmpty())
return;
value = edit->text().toInt();
}
-void NFSHostDlg::saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg) {
- if (chk->state() == QButton::NoChange)
+void NFSHostDlg::saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg) {
+ if (chk->state() == TQButton::NoChange)
return;
if (neg)
diff --git a/filesharing/advanced/nfs/nfshostdlg.h b/filesharing/advanced/nfs/nfshostdlg.h
index 6580b2bd..9d1989e9 100644
--- a/filesharing/advanced/nfs/nfshostdlg.h
+++ b/filesharing/advanced/nfs/nfshostdlg.h
@@ -32,7 +32,7 @@ class NFSHostDlg : public KDialogBase
{
Q_OBJECT
public:
- NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry);
+ NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry);
virtual ~NFSHostDlg();
bool isModified();
protected:
@@ -48,12 +48,12 @@ protected slots:
private:
void setHostValues(NFSHost* host);
- void setEditValue(QLineEdit* edit, const QString & value);
- void setCheckBoxValue(QCheckBox* chk, bool value);
+ void setEditValue(TQLineEdit* edit, const TQString & value);
+ void setCheckBoxValue(TQCheckBox* chk, bool value);
bool saveName(NFSHost* host);
void saveValues(NFSHost* host);
- void saveEditValue(int & value, QLineEdit* edit);
- void saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg);
+ void saveEditValue(int & value, TQLineEdit* edit);
+ void saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg);
};
#endif
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.cpp b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
index 52d772d7..d0f23a07 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.cpp
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
@@ -17,13 +17,13 @@
*/
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qbuttongroup.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kfileshare.h>
#include <knfsshare.h>
@@ -52,7 +52,7 @@
#define FILESHARE_DEBUG 5009
-PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUrl)
+PropertiesPage::PropertiesPage(TQWidget* parent, KFileItemList items,bool enterUrl)
: PropertiesPageGUI(parent),
m_enterUrl(enterUrl),
m_items(items),
@@ -78,8 +78,8 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr
KFile::ExistingOnly |
KFile::LocalOnly );
urlRq->setURL(m_path);
- connect( urlRq, SIGNAL(textChanged(const QString&)),
- this, SLOT(urlRqTextChanged(const QString&)));
+ connect( urlRq, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(urlRqTextChanged(const TQString&)));
} else {
urlRq->hide();
folderLbl->hide();
@@ -90,7 +90,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr
enableNFS(false,i18n("Reading NFS configuration file ..."));
- //QTimer::singleShot(1, this, SLOT(load));
+ //TQTimer::singleShot(1, this, TQT_SLOT(load));
load();
}
@@ -100,13 +100,13 @@ PropertiesPage::~PropertiesPage()
delete m_sambaFile;
}
-void PropertiesPage::urlRqTextChanged(const QString&) {
+void PropertiesPage::urlRqTextChanged(const TQString&) {
if (!m_enterUrl)
return;
KURL url(urlRq->url());
if (url.isLocalFile()) {
- QFileInfo info(url.path(1));
+ TQFileInfo info(url.path(1));
if (info.exists() &&
info.isDir())
{
@@ -134,18 +134,18 @@ void PropertiesPage::load() {
m_loaded = true;
}
-void PropertiesPage::enableNFS(bool b, const QString & message) {
+void PropertiesPage::enableNFS(bool b, const TQString & message) {
nfsChk->setEnabled(b);
nfsGrp->setEnabled(b);
- QToolTip::add(nfsChk,message);
- QToolTip::add(nfsGrp,message);
+ TQToolTip::add(nfsChk,message);
+ TQToolTip::add(nfsGrp,message);
}
-void PropertiesPage::enableSamba(bool b, const QString & message) {
+void PropertiesPage::enableSamba(bool b, const TQString & message) {
sambaChk->setEnabled(b);
sambaGrp->setEnabled(b);
- QToolTip::add(sambaChk,message);
- QToolTip::add(sambaGrp,message);
+ TQToolTip::add(sambaChk,message);
+ TQToolTip::add(sambaGrp,message);
}
@@ -171,11 +171,11 @@ bool PropertiesPage::save() {
bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool samba)
{
- QString nfsFileName = KNFSShare::instance()->exportsPath();
+ TQString nfsFileName = KNFSShare::instance()->exportsPath();
bool nfsNeedsKDEsu = false;
if (nfs) {
- if (QFileInfo(nfsFileName).isWritable()) {
+ if (TQFileInfo(nfsFileName).isWritable()) {
nfsFile->saveTo(nfsFileName);
} else {
nfsNeedsKDEsu = true;
@@ -185,10 +185,10 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::save: nfs has not changed." << endl;
- QString sambaFileName = KSambaShare::instance()->smbConfPath();
+ TQString sambaFileName = KSambaShare::instance()->smbConfPath();
bool sambaNeedsKDEsu = false;
if (samba) {
- if (QFileInfo(sambaFileName).isWritable()) {
+ if (TQFileInfo(sambaFileName).isWritable()) {
sambaFile->saveTo(sambaFileName);
} else {
sambaNeedsKDEsu = true;
@@ -206,18 +206,18 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool
KProcIO proc;
- QString command;
+ TQString command;
if (nfsNeedsKDEsu) {
nfsFile->saveTo(nfsTempFile.name());
- command += QString("cp %1 %2;exportfs -ra;")
+ command += TQString("cp %1 %2;exportfs -ra;")
.arg(KProcess::quote( nfsTempFile.name() ))
.arg(KProcess::quote( nfsFileName ));
}
if (sambaNeedsKDEsu) {
sambaFile->saveTo(sambaTempFile.name());
- command += QString("cp %1 %2;")
+ command += TQString("cp %1 %2;")
.arg(KProcess::quote( sambaTempFile.name() ))
.arg(KProcess::quote( sambaFileName ));
}
@@ -272,7 +272,7 @@ bool PropertiesPage::checkURL() {
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: enterUrl=true" << endl;
KURL url(urlRq->url());
- QString path = url.path(1);
+ TQString path = url.path(1);
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: m_path='"
<< m_path << "'" << endl;
@@ -306,7 +306,7 @@ bool PropertiesPage::checkURL() {
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: url is local file" << endl;
- QFileInfo info(path);
+ TQFileInfo info(path);
if (!info.exists())
{
@@ -425,7 +425,7 @@ void PropertiesPage::updateNFSEntry() {
void PropertiesPage::moreNFSBtn_clicked() {
updateNFSEntry();
NFSDialog* dlg = new NFSDialog(this,m_nfsEntry);
- if (dlg->exec()==QDialog::Accepted &&
+ if (dlg->exec()==TQDialog::Accepted &&
dlg->modified())
{
kdDebug(FILESHARE_DEBUG) << "NFSDialog::ok" << endl;
@@ -450,7 +450,7 @@ bool PropertiesPage::loadSamba() {
}
enableSamba(true,"");
- QString shareName = m_sambaFile->findShareByPath(m_path);
+ TQString shareName = m_sambaFile->findShareByPath(m_path);
if (shareName.isNull()) {
sambaChk->setChecked(false);
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::loadSamba: shareName is null!"
@@ -552,8 +552,8 @@ bool PropertiesPage::updateSambaShare() {
return true;
}
-void PropertiesPage::setSambaShareBoolValue(const QString & value,
- QCheckBox* chk)
+void PropertiesPage::setSambaShareBoolValue(const TQString & value,
+ TQCheckBox* chk)
{
bool v = m_sambaShare->getBoolValue(value);
if (v == chk->isChecked())
@@ -563,13 +563,13 @@ void PropertiesPage::setSambaShareBoolValue(const QString & value,
m_sambaChanged = true;
}
-QString PropertiesPage::getNewSambaName() {
- QString path = m_path;
+TQString PropertiesPage::getNewSambaName() {
+ TQString path = m_path;
if (path.isNull() && m_enterUrl) {
path = urlRq->url();
}
- QString shareName = KURL(path).fileName();
+ TQString shareName = KURL(path).fileName();
if (!sambaNameEdit->text().isEmpty())
shareName = sambaNameEdit->text();
@@ -599,7 +599,7 @@ void PropertiesPage::moreSambaBtnClicked() {
ShareDlgImpl* dlg = new ShareDlgImpl(this,m_sambaShare);
dlg->directoryGrp->hide();
dlg->pixmapFrame->hide();
- if (dlg->exec() == QDialog::Accepted &&
+ if (dlg->exec() == TQDialog::Accepted &&
dlg->hasChanged()) {
m_sambaChanged = true;
changedSlot();
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.h b/filesharing/advanced/propsdlgplugin/propertiespage.h
index 832518c7..f03de5c1 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.h
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.h
@@ -33,7 +33,7 @@ class PropertiesPage : public PropertiesPageGUI
{
Q_OBJECT
public:
- PropertiesPage(QWidget* parent, KFileItemList items, bool enterUrl=false);
+ PropertiesPage(TQWidget* parent, KFileItemList items, bool enterUrl=false);
virtual ~PropertiesPage();
bool save();
@@ -45,7 +45,7 @@ public slots:
protected:
bool m_enterUrl;
- QString m_path;
+ TQString m_path;
KFileItemList m_items;
NFSFile *m_nfsFile;
NFSEntry *m_nfsEntry;
@@ -61,7 +61,7 @@ protected slots:
virtual void moreNFSBtn_clicked();
virtual void moreSambaBtnClicked();
virtual void sambaChkToggled( bool b );
- virtual void urlRqTextChanged(const QString&);
+ virtual void urlRqTextChanged(const TQString&);
private:
bool loadNFS();
@@ -75,12 +75,12 @@ private:
bool saveSamba();
bool checkURL();
- void setSambaShareBoolValue(const QString & value, QCheckBox* chk);
+ void setSambaShareBoolValue(const TQString & value, TQCheckBox* chk);
void createNewSambaShare();
- QString getNewSambaName();
+ TQString getNewSambaName();
- void enableNFS(bool b,const QString & message);
- void enableSamba(bool b,const QString & message);
+ void enableNFS(bool b,const TQString & message);
+ void enableSamba(bool b,const TQString & message);
};
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
index b5a2ef26..fafb4ece 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
@@ -16,10 +16,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@ class PropsDlgSharePlugin::Private
};
PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
- const char *, const QStringList & )
+ const char *, const TQStringList & )
: KPropsDlgPlugin(dlg), d(0)
{
KGlobal::locale()->insertCatalogue("kfileshare");
@@ -57,30 +57,30 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
}
- QVBox* vbox = properties->addVBoxPage(i18n("&Share"));
+ TQVBox* vbox = properties->addVBoxPage(i18n("&Share"));
properties->setFileSharingPage(vbox);
if (KFileShare::authorization() == KFileShare::UserNotAllowed) {
- QWidget* widget = new QWidget( vbox );
- QVBoxLayout * vLayout = new QVBoxLayout( widget );
+ TQWidget* widget = new TQWidget( vbox );
+ TQVBoxLayout * vLayout = new TQVBoxLayout( widget );
vLayout->setSpacing( KDialog::spacingHint() );
vLayout->setMargin( 0 );
if (KFileShare::sharingEnabled()) {
vLayout->addWidget(
- new QLabel( i18n("You need to be authorized to share directories."),
+ new TQLabel( i18n("You need to be authorized to share directories."),
widget ));
} else {
vLayout->addWidget(
- new QLabel( i18n("File sharing is disabled."), widget));
+ new TQLabel( i18n("File sharing is disabled."), widget));
}
KPushButton* btn = new KPushButton( i18n("Configure File Sharing..."), widget );
- connect( btn, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
btn->setDefault(false);
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
hBox->addWidget( btn, 0, Qt::AlignLeft );
vLayout->addLayout(hBox);
vLayout->addStretch( 10 ); // align items on top
@@ -91,8 +91,8 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
d = new Private();
d->page = new PropertiesPage(vbox, properties->items(),false);
- connect(d->page, SIGNAL(changed()),
- this, SIGNAL(changed()));
+ connect(d->page, TQT_SIGNAL(changed()),
+ this, TQT_SIGNAL(changed()));
kdDebug(5009) << "Fileshare properties dialog plugin loaded" << endl;
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
index 4604467e..56556dae 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
@@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin
{
Q_OBJECT
public:
- PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & );
+ PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & );
virtual ~PropsDlgSharePlugin();
virtual void applyChanges();
diff --git a/filesharing/simple/fileshare.cpp b/filesharing/simple/fileshare.cpp
index 6572ef1a..5b796823 100644
--- a/filesharing/simple/fileshare.cpp
+++ b/filesharing/simple/fileshare.cpp
@@ -16,15 +16,15 @@
*/
#include <unistd.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -53,41 +53,41 @@
#include "fileshare.h"
#include "groupconfigdlg.h"
-typedef KGenericFactory<KFileShareConfig, QWidget > ShareFactory;
+typedef KGenericFactory<KFileShareConfig, TQWidget > ShareFactory;
K_EXPORT_COMPONENT_FACTORY (kcm_fileshare, ShareFactory("kcmfileshare") )
#define FILESHARECONF "/etc/security/fileshare.conf"
#define FILESHARE_DEBUG 5009
-KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStringList &):
+KFileShareConfig::KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &):
KCModule(ShareFactory::instance(), parent, name)
{
KGlobal::locale()->insertCatalogue("kfileshare");
- QBoxLayout* layout = new QVBoxLayout(this,0,
+ TQBoxLayout* layout = new TQVBoxLayout(this,0,
KDialog::spacingHint());
/*
- QVButtonGroup *box = new QVButtonGroup( i18n("File Sharing"), this );
+ TQVButtonGroup *box = new TQVButtonGroup( i18n("File Sharing"), this );
box->layout()->setSpacing( KDialog::spacingHint() );
layout->addWidget(box);
- noSharing=new QRadioButton( i18n("Do &not allow users to share files"), box );
- sharing=new QRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
+ noSharing=new TQRadioButton( i18n("Do &not allow users to share files"), box );
+ sharing=new TQRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
*/
m_ccgui = new ControlCenterGUI(this);
- connect( m_ccgui, SIGNAL( changed()), this, SLOT(configChanged()));
- connect( m_ccgui->allowedUsersBtn, SIGNAL( clicked()),
- this, SLOT(allowedUsersBtnClicked()));
+ connect( m_ccgui, TQT_SIGNAL( changed()), this, TQT_SLOT(configChanged()));
+ connect( m_ccgui->allowedUsersBtn, TQT_SIGNAL( clicked()),
+ this, TQT_SLOT(allowedUsersBtnClicked()));
- QString path = QString::fromLocal8Bit( getenv( "PATH" ) );
- path += QString::fromLatin1(":/usr/sbin");
- QString sambaExec = KStandardDirs::findExe( QString::fromLatin1("smbd"), path );
- QString nfsExec = KStandardDirs::findExe( QString::fromLatin1("rpc.nfsd"), path );
+ TQString path = TQString::fromLocal8Bit( getenv( "PATH" ) );
+ path += TQString::fromLatin1(":/usr/sbin");
+ TQString sambaExec = KStandardDirs::findExe( TQString::fromLatin1("smbd"), path );
+ TQString nfsExec = KStandardDirs::findExe( TQString::fromLatin1("rpc.nfsd"), path );
if ( nfsExec.isEmpty() && sambaExec.isEmpty())
{
- QMessageBox::critical( 0, "File Sharing", QString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
+ TQMessageBox::critical( 0, "File Sharing", TQString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
m_ccgui->shareGrp->setDisabled(true);
m_ccgui->sharedFoldersGroupBox->setDisabled(true);
}
@@ -96,22 +96,22 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
if (nfsExec.isEmpty()) {
m_ccgui->nfsChk->setDisabled(true);
m_ccgui->nfsChk->setChecked(false);
- QToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
+ TQToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
}
if (sambaExec.isEmpty()) {
m_ccgui->sambaChk->setDisabled(true);
m_ccgui->sambaChk->setChecked(false);
- QToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
+ TQToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
}
m_ccgui->infoLbl->hide();
layout->addWidget(m_ccgui);
updateShareListView();
- connect( KNFSShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
- connect( KSambaShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
+ connect( KNFSShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
+ connect( KSambaShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
}
@@ -120,13 +120,13 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
((KFileShare::shareMode() == KFileShare::Advanced) &&
(KFileShare::authorization() == KFileShare::Authorized)))
{
- connect( m_ccgui->addShareBtn, SIGNAL(clicked()),
- this, SLOT(addShareBtnClicked()));
- connect( m_ccgui->changeShareBtn, SIGNAL(clicked()),
- this, SLOT(changeShareBtnClicked()));
- connect( m_ccgui->removeShareBtn, SIGNAL(clicked()),
- this, SLOT(removeShareBtnClicked()));
- m_ccgui->listView->setSelectionMode(QListView::Extended);
+ connect( m_ccgui->addShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addShareBtnClicked()));
+ connect( m_ccgui->changeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(changeShareBtnClicked()));
+ connect( m_ccgui->removeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeShareBtnClicked()));
+ m_ccgui->listView->setSelectionMode(TQListView::Extended);
m_ccgui->shareBtnPnl->setEnabled(true);
}
@@ -147,10 +147,10 @@ void KFileShareConfig::updateShareListView()
KNFSShare* nfs = KNFSShare::instance();
KSambaShare* samba = KSambaShare::instance();
- QStringList dirs = nfs->sharedDirectories();
- QStringList sambaDirs = samba->sharedDirectories();
+ TQStringList dirs = nfs->sharedDirectories();
+ TQStringList sambaDirs = samba->sharedDirectories();
- for ( QStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
// Do not insert duplicates
if (nfs->isDirectoryShared(*it))
continue;
@@ -158,11 +158,11 @@ void KFileShareConfig::updateShareListView()
dirs += *it;
}
- QPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
- QPixmap okPix = SmallIcon("button_ok");
- QPixmap cancelPix = SmallIcon("button_cancel");
+ TQPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
+ TQPixmap okPix = SmallIcon("button_ok");
+ TQPixmap cancelPix = SmallIcon("button_cancel");
- for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
+ for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
KListViewItem* item = new KListViewItem(m_ccgui->listView);
item->setText(0,*it);
item->setPixmap(0, folderPix);
@@ -184,7 +184,7 @@ void KFileShareConfig::updateShareListView()
void KFileShareConfig::allowedUsersBtnClicked() {
GroupConfigDlg dlg(this,m_fileShareGroup,m_restricted,m_rootPassNeeded,
m_ccgui->simpleRadio->isChecked());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
m_fileShareGroup = dlg.fileShareGroup().name();
m_restricted = dlg.restricted();
m_rootPassNeeded = dlg.rootPassNeeded();
@@ -196,7 +196,7 @@ void KFileShareConfig::allowedUsersBtnClicked() {
void KFileShareConfig::load()
{
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
m_ccgui->shareGrp->setChecked( config.readEntry("FILESHARING", "yes") == "yes" );
@@ -220,7 +220,7 @@ void KFileShareConfig::load()
m_smbConf = KSambaShare::instance()->smbConfPath();
}
-bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
+bool KFileShareConfig::addGroupAccessesToFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << m_fileShareGroup << file;
KProcess chmod;
@@ -241,7 +241,7 @@ bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
}
-bool KFileShareConfig::removeGroupAccessesFromFile(const QString & file) {
+bool KFileShareConfig::removeGroupAccessesFromFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << "root" << file;
KProcess chmod;
@@ -291,11 +291,11 @@ void KFileShareConfig::save()
{
setGroupAccesses();
- QDir dir("/etc/security");
+ TQDir dir("/etc/security");
if ( !dir.exists())
dir.mkdir("/etc/security");
- QFile file(FILESHARECONF);
+ TQFile file(FILESHARECONF);
if ( ! file.open(IO_WriteOnly)) {
KMessageBox::detailedError(this,
i18n("Could not save settings."),
@@ -306,7 +306,7 @@ void KFileShareConfig::save()
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << "FILESHARING=";
stream << (m_ccgui->shareGrp->isChecked() ? "yes" : "no");
@@ -340,7 +340,7 @@ void KFileShareConfig::defaults()
m_ccgui->shareGrp->setChecked( false );
}
-QString KFileShareConfig::quickHelp() const
+TQString KFileShareConfig::quickHelp() const
{
return i18n("<h1>File Sharing</h1><p>This module can be used "
"to enable file sharing over the network using "
@@ -354,11 +354,11 @@ void KFileShareConfig::addShareBtnClicked() {
}
-PropertiesPageDlg::PropertiesPageDlg(QWidget*parent, KFileItemList files)
+PropertiesPageDlg::PropertiesPageDlg(TQWidget*parent, KFileItemList files)
: KDialogBase(parent, "sharedlg", true,
i18n("Share Folder"), Ok|Cancel, Ok, true)
{
- QVBox* vbox = makeVBoxMainWidget();
+ TQVBox* vbox = makeVBoxMainWidget();
m_page = new PropertiesPage(vbox,files,true);
}
@@ -380,7 +380,7 @@ void PropertiesPageDlg::slotOk() {
void KFileShareConfig::showShareDialog(const KFileItemList & files) {
PropertiesPageDlg* dlg = new PropertiesPageDlg(this,files);
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
if ( dlg->hasChanged() ) {
updateShareListView();
}
@@ -390,9 +390,9 @@ void KFileShareConfig::showShareDialog(const KFileItemList & files) {
void KFileShareConfig::changeShareBtnClicked() {
KFileItemList files;
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = items.first(); item; item = items.next() ) {
files.append(new KFileItem(KURL::fromPathOrURL(item->text(0)),"",0));
}
@@ -402,8 +402,8 @@ void KFileShareConfig::changeShareBtnClicked() {
void KFileShareConfig::removeShareBtnClicked() {
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem *item;
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
+ TQListViewItem *item;
bool nfs = false;
bool samba = false;
diff --git a/filesharing/simple/fileshare.h b/filesharing/simple/fileshare.h
index 1f5da9e7..d6e8719a 100644
--- a/filesharing/simple/fileshare.h
+++ b/filesharing/simple/fileshare.h
@@ -33,22 +33,22 @@ class KFileShareConfig : public KCModule
Q_OBJECT
public:
- KFileShareConfig(QWidget *parent, const char *name, const QStringList &);
+ KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &);
virtual void load();
virtual void save();
virtual void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
protected:
ControlCenterGUI* m_ccgui;
- QString m_fileShareGroup;
+ TQString m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
- QString m_smbConf;
+ TQString m_smbConf;
void showShareDialog(const KFileItemList & files);
- bool addGroupAccessesToFile(const QString & file);
- bool removeGroupAccessesFromFile(const QString & file);
+ bool addGroupAccessesToFile(const TQString & file);
+ bool removeGroupAccessesFromFile(const TQString & file);
bool setGroupAccesses();
protected slots:
@@ -66,7 +66,7 @@ class PropertiesPageDlg : public KDialogBase
{
Q_OBJECT
public:
- PropertiesPageDlg(QWidget * parent, KFileItemList files);
+ PropertiesPageDlg(TQWidget * parent, KFileItemList files);
~PropertiesPageDlg() {};
bool hasChanged();
protected:
diff --git a/filesharing/simple/groupconfigdlg.cpp b/filesharing/simple/groupconfigdlg.cpp
index f313719d..470f024f 100644
--- a/filesharing/simple/groupconfigdlg.cpp
+++ b/filesharing/simple/groupconfigdlg.cpp
@@ -18,13 +18,13 @@
*/
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klocale.h>
#include <kuser.h>
@@ -40,16 +40,16 @@
#include "groupconfigdlg.h"
-static QString groupListToString(const QValueList<KUserGroup> & list);
-static QString prettyString(const KUser &user);
-static QString fromPrettyString(const QString & s);
-static void removeList(QValueList<KUser> & from, const QValueList<KUser> & that);
-static bool userMod(const QString & user, const QValueList<KUserGroup> & groups);
+static TQString groupListToString(const TQValueList<KUserGroup> & list);
+static TQString prettyString(const KUser &user);
+static TQString fromPrettyString(const TQString & s);
+static void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that);
+static bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups);
-GroupConfigDlg::GroupConfigDlg(QWidget * parent,
- const QString & fileShareGroup, bool restricted,
+GroupConfigDlg::GroupConfigDlg(TQWidget * parent,
+ const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing)
: KDialogBase(parent,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true) ,
@@ -81,12 +81,12 @@ void GroupConfigDlg::initGUI() {
m_gui->groupUsersRadio->setChecked(m_restricted);
m_gui->writeAccessChk->setChecked(!m_rootPassNeeded);
- connect( m_gui->addBtn, SIGNAL(clicked()),
- this, SLOT(slotAddUser()));
- connect( m_gui->removeBtn, SIGNAL(clicked()),
- this, SLOT(slotRemoveUser()));
- connect( m_gui->otherGroupBtn, SIGNAL(clicked()),
- this, SLOT(slotChangeGroup()));
+ connect( m_gui->addBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddUser()));
+ connect( m_gui->removeBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveUser()));
+ connect( m_gui->otherGroupBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeGroup()));
if (m_simpleSharing) {
// if simple sharing users never need the root password
@@ -96,23 +96,23 @@ void GroupConfigDlg::initGUI() {
void GroupConfigDlg::updateListBox() {
m_gui->listBox->clear();
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = m_users.begin(); it != m_users.end(); ++it ) {
m_gui->listBox->insertItem(prettyString(*it));
kdDebug(5009) << "GroupConfigDlg::updateListBox: " << (*it).loginName() << endl;
}
}
-QString prettyString(const KUser &user) {
+TQString prettyString(const KUser &user) {
return user.fullName()+" ("+user.loginName()+")";
}
-QString fromPrettyString(const QString & s) {
+TQString fromPrettyString(const TQString & s) {
// Jan Schaefer (jan)
// i j
int i = s.find('(');
int j = s.find(')');
- QString loginName = s.mid(i+1,j-i-1);
+ TQString loginName = s.mid(i+1,j-i-1);
return loginName;
}
@@ -121,7 +121,7 @@ bool GroupConfigDlg::restricted() {
}
void GroupConfigDlg::slotAddUser() {
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
removeList(allUsers,m_users);
@@ -132,18 +132,18 @@ void GroupConfigDlg::slotAddUser() {
return;
}
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
- QString s = (*it).fullName()+" ("+(*it).loginName()+")";
+ TQString s = (*it).fullName()+" ("+(*it).loginName()+")";
stringList.append(s);
}
stringList.sort();
bool ok;
- QString userName = KInputDialog::getItem(
+ TQString userName = KInputDialog::getItem(
i18n("Select User"),
i18n("Select a user:"),
stringList,
@@ -154,14 +154,14 @@ void GroupConfigDlg::slotAddUser() {
if (!ok)
return;
- QString loginName = fromPrettyString(userName);
+ TQString loginName = fromPrettyString(userName);
KUser user(loginName);
m_users.append(KUser(loginName));
updateListBox();
}
-void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
- QValueList<KUser>::ConstIterator it;
+void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that) {
+ TQValueList<KUser>::ConstIterator it;
for ( it = that.begin(); it != that.end(); ++it ) {
from.remove(*it);
}
@@ -169,7 +169,7 @@ void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
}
bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.append(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not add user '%1' to group '%2'")
@@ -181,7 +181,7 @@ bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
bool GroupConfigDlg::removeUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.remove(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not remove user '%1' from group '%2'")
@@ -203,12 +203,12 @@ void GroupConfigDlg::slotOk() {
return;
}
- QValueList<KUser> addedUsers = m_users;
+ TQValueList<KUser> addedUsers = m_users;
removeList(addedUsers,m_origUsers);
- QValueList<KUser> removedUsers = m_origUsers;
+ TQValueList<KUser> removedUsers = m_origUsers;
removeList(removedUsers,m_users);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = addedUsers.begin(); it != addedUsers.end(); ++it ) {
addUser(*it, m_fileShareGroup);
}
@@ -221,27 +221,27 @@ void GroupConfigDlg::slotOk() {
KDialogBase::slotOk();
}
-bool userMod(const QString & user, const QValueList<KUserGroup> & groups) {
+bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups) {
KProcess proc;
proc << "usermod" << "-G" << groupListToString(groups) << user;
return proc.start(KProcess::Block) && proc.normalExit();
}
void GroupConfigDlg::slotRemoveUser() {
- QListBoxItem* item = m_gui->listBox->selectedItem();
+ TQListBoxItem* item = m_gui->listBox->selectedItem();
if (!item)
return;
- QString loginName = fromPrettyString(item->text());
+ TQString loginName = fromPrettyString(item->text());
KUser user(loginName);
m_users.remove(KUser(loginName));
updateListBox();
m_gui->removeBtn->setEnabled(false);
}
-QString groupListToString(const QValueList<KUserGroup> & list) {
- QValueList<KUserGroup>::ConstIterator it;
- QString result;
+TQString groupListToString(const TQValueList<KUserGroup> & list) {
+ TQValueList<KUserGroup>::ConstIterator it;
+ TQString result;
for ( it = list.begin(); it != list.end(); ++it ) {
result+=(*it).name()+",";
@@ -253,13 +253,13 @@ QString groupListToString(const QValueList<KUserGroup> & list) {
}
void GroupConfigDlg::slotChangeGroup() {
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUserGroup>::iterator it;
+ TQValueList<KUserGroup>::iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QString s = (*it).name();
+ TQString s = (*it).name();
stringList.append(s);
}
@@ -268,31 +268,31 @@ void GroupConfigDlg::slotChangeGroup() {
KDialogBase* dlg = new KDialogBase(this,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true);
- QVBox* vbox = dlg->makeVBoxMainWidget();
+ TQVBox* vbox = dlg->makeVBoxMainWidget();
- QHBox* hbox = new QHBox(vbox);
- QLabel* lbl = new QLabel(i18n("New file share group:"),hbox);
+ TQHBox* hbox = new TQHBox(vbox);
+ TQLabel* lbl = new TQLabel(i18n("New file share group:"),hbox);
KComboBox* combo = new KComboBox(hbox);
combo->insertStringList(stringList);
combo->setEditable(true);
combo->setCurrentText(m_fileShareGroup.name());
- QCheckBox* addChk = new QCheckBox(
+ TQCheckBox* addChk = new TQCheckBox(
i18n("Add users from the old file share group to the new one"),
vbox);
- QCheckBox* removeUsersChk = new QCheckBox(
+ TQCheckBox* removeUsersChk = new TQCheckBox(
i18n("Remove users from old file share group"),
vbox);
- QCheckBox* removeGroupChk = new QCheckBox(
+ TQCheckBox* removeGroupChk = new TQCheckBox(
i18n("Delete the old file share group"),
vbox);
- if (dlg->exec() == QDialog::Accepted) {
- QString groupName = combo->currentText();
+ if (dlg->exec() == TQDialog::Accepted) {
+ TQString groupName = combo->currentText();
if (groupName != m_fileShareGroup.name()) {
- QString oldGroup = m_fileShareGroup.name();
+ TQString oldGroup = m_fileShareGroup.name();
if (allGroups.contains(KUserGroup(groupName)))
setFileShareGroup(KUserGroup(groupName));
else {
@@ -348,8 +348,8 @@ void GroupConfigDlg::setFileShareGroup(const KUserGroup & group) {
}
-bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup & group) {
- QValueList<KUser>::ConstIterator it;
+bool GroupConfigDlg::addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group) {
+ TQValueList<KUser>::ConstIterator it;
bool result = true;
for ( it = users.begin(); it != users.end(); ++it ) {
if (!addUser(*it, group))
@@ -358,16 +358,16 @@ bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup &
return result;
}
-bool GroupConfigDlg::emptyGroup(const QString & s) {
+bool GroupConfigDlg::emptyGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to remove all users from group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to remove all users from group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
bool result = true;
KUserGroup group(s);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
if (!removeUser(*it, group))
result = false;
@@ -375,9 +375,9 @@ bool GroupConfigDlg::emptyGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::deleteGroup(const QString & s) {
+bool GroupConfigDlg::deleteGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to delete group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to delete group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
@@ -391,14 +391,14 @@ bool GroupConfigDlg::deleteGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::createFileShareGroup(const QString & s) {
+bool GroupConfigDlg::createFileShareGroup(const TQString & s) {
if (s.isEmpty()) {
KMessageBox::sorry(this,i18n("Please choose a valid group."));
return false;
}
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("This group '%1' does not exist. Should it be created?").arg(s), QString::null, i18n("Create"), i18n("Do Not Create")))
+ i18n("This group '%1' does not exist. Should it be created?").arg(s), TQString::null, i18n("Create"), i18n("Do Not Create")))
return false;
//debug("CreateFileShareGroup: "+s);
diff --git a/filesharing/simple/groupconfigdlg.h b/filesharing/simple/groupconfigdlg.h
index eab24152..1258422c 100644
--- a/filesharing/simple/groupconfigdlg.h
+++ b/filesharing/simple/groupconfigdlg.h
@@ -21,7 +21,7 @@
#define GROUPCONFIGDLG_H
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kuser.h>
class GroupConfigGUI;
@@ -30,7 +30,7 @@ class GroupConfigDlg : public KDialogBase
{
Q_OBJECT
public:
- GroupConfigDlg(QWidget * parent, const QString & fileShareGroup, bool restricted,
+ GroupConfigDlg(TQWidget * parent, const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing);
~GroupConfigDlg();
KUserGroup fileShareGroup() { return m_fileShareGroup; }
@@ -49,16 +49,16 @@ protected slots:
virtual void slotOk();
private:
- bool createFileShareGroup(const QString & s);
- bool deleteGroup(const QString & s);
- bool emptyGroup(const QString & s);
+ bool createFileShareGroup(const TQString & s);
+ bool deleteGroup(const TQString & s);
+ bool emptyGroup(const TQString & s);
bool addUser(const KUser & user, const KUserGroup & group);
bool removeUser(const KUser & user, const KUserGroup & group);
- bool addUsersToGroup(QValueList<KUser> users,const KUserGroup & group);
+ bool addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group);
void setFileShareGroup(const KUserGroup & group);
- QValueList<KUser> m_origUsers;
- QValueList<KUser> m_users;
+ TQValueList<KUser> m_origUsers;
+ TQValueList<KUser> m_users;
KUserGroup m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
diff --git a/filesharing/simple/groupconfiggui.ui.h b/filesharing/simple/groupconfiggui.ui.h
index 35e82f7f..055fd6c3 100644
--- a/filesharing/simple/groupconfiggui.ui.h
+++ b/filesharing/simple/groupconfiggui.ui.h
@@ -8,7 +8,7 @@
*****************************************************************************/
-void GroupConfigGUI::listBox_selectionChanged( QListBoxItem * i)
+void GroupConfigGUI::listBox_selectionChanged( TQListBoxItem * i)
{
removeBtn->setEnabled(i);
}
diff --git a/filesharing/simple/krichtextlabel.cpp b/filesharing/simple/krichtextlabel.cpp
index 458ade62..089635d7 100644
--- a/filesharing/simple/krichtextlabel.cpp
+++ b/filesharing/simple/krichtextlabel.cpp
@@ -18,35 +18,35 @@
#include "krichtextlabel.h"
-#include <qtooltip.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
#include <kglobalsettings.h>
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
setText(text);
}
-KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
}
@@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth)
updateGeometry();
}
-QSizePolicy KRichTextLabel::sizePolicy() const
+TQSizePolicy KRichTextLabel::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false);
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false);
}
-QSize KRichTextLabel::minimumSizeHint() const
+TQSize KRichTextLabel::minimumSizeHint() const
{
- QString qt_text = qrichtextify( text() );
+ TQString qt_text = qrichtextify( text() );
int pref_width = 0;
int pref_height = 0;
- QSimpleRichText rt(qt_text, font());
+ TQSimpleRichText rt(qt_text, font());
pref_width = m_defaultWidth;
rt.setWidth(pref_width);
int used_width = rt.widthUsed();
@@ -94,16 +94,16 @@ QSize KRichTextLabel::minimumSizeHint() const
pref_width = used_width;
}
- return QSize(pref_width, rt.height());
+ return TQSize(pref_width, rt.height());
}
-QSize KRichTextLabel::sizeHint() const
+TQSize KRichTextLabel::sizeHint() const
{
return minimumSizeHint();
}
-void KRichTextLabel::setText( const QString &text ) {
- QLabel::setText(text);
+void KRichTextLabel::setText( const TQString &text ) {
+ TQLabel::setText(text);
}
void KRichTextLabel::virtual_hook( int, void* )
diff --git a/filesharing/simple/krichtextlabel.h b/filesharing/simple/krichtextlabel.h
index e03fe250..40ead037 100644
--- a/filesharing/simple/krichtextlabel.h
+++ b/filesharing/simple/krichtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KRICHTEXTLABEL_H
#define KRICHTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that supports richtext and proper layout management
+ * @short A replacement for TQLabel that supports richtext and proper layout management
*
* @author Waldo Bastian <bastian@kde.org>
*/
@@ -32,25 +32,25 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KRichTextLabel : public QLabel {
+class KDEUI_EXPORT KRichTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRichTextLabel( QWidget *parent, const char *name = 0 );
- KRichTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRichTextLabel( TQWidget *parent, const char *name = 0 );
+ KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
int defaultWidth() const { return m_defaultWidth; }
void setDefaultWidth(int defaultWidth);
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ TQSizePolicy sizePolicy() const;
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
int m_defaultWidth;
diff --git a/kdict/actions.cpp b/kdict/actions.cpp
index 5ca1aade..2496d1b7 100644
--- a/kdict/actions.cpp
+++ b/kdict/actions.cpp
@@ -17,14 +17,14 @@
#include "actions.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
#include <ktoolbar.h>
-DictComboAction::DictComboAction( const QString &text, QObject *parent, const char *name,
+DictComboAction::DictComboAction( const TQString &text, TQObject *parent, const char *name,
bool editable, bool autoSized )
: KAction( text, 0, parent, name ), m_editable(editable), m_autoSized(autoSized), m_compMode(KGlobalSettings::completionMode())
{
@@ -36,7 +36,7 @@ DictComboAction::~DictComboAction()
}
-int DictComboAction::plug( QWidget *widget, int index )
+int DictComboAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -50,15 +50,15 @@ int DictComboAction::plug( QWidget *widget, int index )
bar->setItemAutoSized(id_,m_autoSized);
if ( m_combo ) {
- connect(bar->getCombo(id_), SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&)));
- connect(bar->getCombo(id_), SIGNAL(activated(int)), SLOT(slotComboActivated(int)));
+ connect(bar->getCombo(id_), TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
+ connect(bar->getCombo(id_), TQT_SIGNAL(activated(int)), TQT_SLOT(slotComboActivated(int)));
if (m_editable)
- m_combo->setInsertionPolicy( QComboBox::NoInsertion );
+ m_combo->setInsertionPolicy( TQComboBox::NoInsertion );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -66,7 +66,7 @@ int DictComboAction::plug( QWidget *widget, int index )
}
-void DictComboAction::unplug( QWidget *widget )
+void DictComboAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -85,7 +85,7 @@ void DictComboAction::unplug( QWidget *widget )
}
-QWidget* DictComboAction::widget()
+TQWidget* DictComboAction::widget()
{
return m_combo;
}
@@ -98,12 +98,12 @@ void DictComboAction::setFocus()
}
-QString DictComboAction::currentText() const
+TQString DictComboAction::currentText() const
{
if (m_combo)
return m_combo->currentText();
else
- return QString::null;
+ return TQString::null;
}
void DictComboAction::selectAll()
@@ -116,7 +116,7 @@ void DictComboAction::selectAll()
}
-void DictComboAction::setEditText(const QString &s)
+void DictComboAction::setEditText(const TQString &s)
{
if (m_combo && m_editable)
m_combo->setEditText(s);
@@ -147,7 +147,7 @@ void DictComboAction::clear()
}
-void DictComboAction::setList(QStringList items)
+void DictComboAction::setList(TQStringList items)
{
if (m_combo) {
m_combo->clear();
@@ -184,7 +184,7 @@ void DictComboAction::slotComboActivated(int i)
}
-void DictComboAction::slotComboActivated(const QString &s)
+void DictComboAction::slotComboActivated(const TQString &s)
{
emit(activated(s));
}
@@ -193,7 +193,7 @@ void DictComboAction::slotComboActivated(const QString &s)
//*********************************************************************************
-DictLabelAction::DictLabelAction( const QString &text, QObject *parent, const char *name )
+DictLabelAction::DictLabelAction( const TQString &text, TQObject *parent, const char *name )
: KAction( text, 0, parent, name )
{
}
@@ -204,7 +204,7 @@ DictLabelAction::~DictLabelAction()
}
-int DictLabelAction::plug( QWidget *widget, int index )
+int DictLabelAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -212,7 +212,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
int id = KAction::getToolButtonID();
- QLabel *label = new QLabel( text(), widget, "kde toolbar widget" );
+ TQLabel *label = new TQLabel( text(), widget, "kde toolbar widget" );
label->setMinimumWidth(label->sizeHint().width());
label->setBackgroundMode( Qt::PaletteButton );
label->setAlignment(AlignCenter | AlignVCenter);
@@ -222,7 +222,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
m_label = label;
@@ -233,7 +233,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
}
-void DictLabelAction::unplug( QWidget *widget )
+void DictLabelAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -252,7 +252,7 @@ void DictLabelAction::unplug( QWidget *widget )
}
-void DictLabelAction::setBuddy(QWidget *buddy)
+void DictLabelAction::setBuddy(TQWidget *buddy)
{
if (m_label && buddy)
m_label->setBuddy(buddy);
@@ -262,8 +262,8 @@ void DictLabelAction::setBuddy(QWidget *buddy)
//*********************************************************************************
-DictButtonAction::DictButtonAction( const QString& text, QObject* receiver,
- const char* slot, QObject* parent, const char* name )
+DictButtonAction::DictButtonAction( const TQString& text, TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name )
: KAction( text, 0, receiver, slot, parent, name )
{
}
@@ -274,7 +274,7 @@ DictButtonAction::~DictButtonAction()
}
-int DictButtonAction::plug( QWidget *widget, int index )
+int DictButtonAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -282,14 +282,14 @@ int DictButtonAction::plug( QWidget *widget, int index )
int id = KAction::getToolButtonID();
- QPushButton *button = new QPushButton( text(), widget );
+ TQPushButton *button = new TQPushButton( text(), widget );
button->adjustSize();
- connect(button,SIGNAL(clicked()),this,SLOT(activate()));
+ connect(button,TQT_SIGNAL(clicked()),this,TQT_SLOT(activate()));
tb->insertWidget( id, button->width(), button, index );
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
m_button = button;
@@ -300,7 +300,7 @@ int DictButtonAction::plug( QWidget *widget, int index )
}
-void DictButtonAction::unplug( QWidget *widget )
+void DictButtonAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
diff --git a/kdict/actions.h b/kdict/actions.h
index 568a9f7c..97759af4 100644
--- a/kdict/actions.h
+++ b/kdict/actions.h
@@ -18,8 +18,8 @@
#ifndef _ACTIONS_H_
#define _ACTIONS_H_
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kglobalsettings.h>
@@ -33,38 +33,38 @@ class DictComboAction : public KAction
Q_OBJECT
public:
- DictComboAction( const QString& text, QObject* parent,
+ DictComboAction( const TQString& text, TQObject* parent,
const char* name, bool editable, bool autoSized );
~DictComboAction();
- virtual int plug( QWidget *w, int index = -1 );
- virtual void unplug( QWidget *w );
+ virtual int plug( TQWidget *w, int index = -1 );
+ virtual void unplug( TQWidget *w );
- QWidget* widget();
+ TQWidget* widget();
void setFocus();
- QString currentText() const;
+ TQString currentText() const;
void selectAll();
- void setEditText(const QString &s);
+ void setEditText(const TQString &s);
void setCurrentItem(int index);
void clearEdit();
void clear();
- void setList(QStringList items);
+ void setList(TQStringList items);
KGlobalSettings::Completion completionMode();
void setCompletionMode(KGlobalSettings::Completion mode);
signals:
void activated(int);
- void activated(const QString&);
+ void activated(const TQString&);
private slots:
void slotComboActivated(int);
- void slotComboActivated(const QString&);
+ void slotComboActivated(const TQString&);
private:
- QGuardedPtr<KComboBox> m_combo;
+ TQGuardedPtr<KComboBox> m_combo;
bool m_editable, m_autoSized;
KGlobalSettings::Completion m_compMode;
};
@@ -75,16 +75,16 @@ class DictLabelAction : public KAction
Q_OBJECT
public:
- DictLabelAction( const QString &text, QObject *parent = 0, const char *name = 0 );
+ DictLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 );
~DictLabelAction();
- virtual int plug( QWidget *widget, int index = -1 );
- virtual void unplug( QWidget *widget );
+ virtual int plug( TQWidget *widget, int index = -1 );
+ virtual void unplug( TQWidget *widget );
- void setBuddy(QWidget *buddy);
+ void setBuddy(TQWidget *buddy);
private:
- QGuardedPtr<QLabel> m_label;
+ TQGuardedPtr<TQLabel> m_label;
};
@@ -94,18 +94,18 @@ class DictButtonAction : public KAction
Q_OBJECT
public:
- DictButtonAction( const QString& text, QObject* receiver,
- const char* slot, QObject* parent, const char* name );
+ DictButtonAction( const TQString& text, TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name );
~DictButtonAction();
- virtual int plug( QWidget *w, int index = -1 );
- virtual void unplug( QWidget *w );
+ virtual int plug( TQWidget *w, int index = -1 );
+ virtual void unplug( TQWidget *w );
int widthHint();
void setWidth(int width);
private:
- QGuardedPtr<QPushButton> m_button;
+ TQGuardedPtr<TQPushButton> m_button;
};
#endif
diff --git a/kdict/applet/kdictapplet.cpp b/kdict/applet/kdictapplet.cpp
index ad907864..6e45de52 100644
--- a/kdict/applet/kdictapplet.cpp
+++ b/kdict/applet/kdictapplet.cpp
@@ -17,11 +17,11 @@
------------------------------------------------------------- */
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kconfig.h>
#include <kcombobox.h>
@@ -36,7 +36,7 @@
//********* PopupBox ********************************************
PopupBox::PopupBox()
- : QHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true)
+ : TQHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true)
{
}
@@ -56,11 +56,11 @@ bool PopupBox::showBox()
}
-void PopupBox::hideEvent(QHideEvent *)
+void PopupBox::hideEvent(TQHideEvent *)
{
emit(hidden());
popupEnabled = false;
- QTimer::singleShot(100, this, SLOT(enablePopup()));
+ TQTimer::singleShot(100, this, TQT_SLOT(enablePopup()));
}
@@ -74,7 +74,7 @@ void PopupBox::enablePopup()
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kdictapplet");
return new DictApplet(configFile, KPanelApplet::Stretch, 0, parent, "kdictapplet");
@@ -82,56 +82,56 @@ extern "C"
}
-DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name)
+DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name), waiting(0)
{
// first the widgets for a horizontal panel
- baseWidget = new QWidget(this);
- QGridLayout *baseLay = new QGridLayout(baseWidget,2,6,0,1);
+ baseWidget = new TQWidget(this);
+ TQGridLayout *baseLay = new TQGridLayout(baseWidget,2,6,0,1);
- textLabel = new QLabel(i18n("Dictionary:"), baseWidget);
+ textLabel = new TQLabel(i18n("Dictionary:"), baseWidget);
textLabel->setBackgroundOrigin(AncestorOrigin);
- QFont f(textLabel->font());
+ TQFont f(textLabel->font());
f.setPixelSize(12);
textLabel->setFont(f);
baseLay->addWidget(textLabel,0,1);
- QToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict"));
+ TQToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict"));
- iconLabel = new QLabel(baseWidget);
+ iconLabel = new TQLabel(baseWidget);
iconLabel->setBackgroundOrigin(AncestorOrigin);
- QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true);
+ TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true);
iconLabel->setPixmap(pm);
baseLay->addWidget(iconLabel,1,0);
iconLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
iconLabel->setFixedWidth(pm.width()+4);
- QToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
+ TQToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
f.setPixelSize(10);
- clipboardBtn = new QPushButton(i18n("C"),baseWidget);
+ clipboardBtn = new TQPushButton(i18n("C"),baseWidget);
clipboardBtn->setBackgroundOrigin(AncestorOrigin);
clipboardBtn->setFont(f);
clipboardBtn->setFixedSize(16,16);
- connect(clipboardBtn, SIGNAL(clicked()), SLOT(queryClipboard()));
+ connect(clipboardBtn, TQT_SIGNAL(clicked()), TQT_SLOT(queryClipboard()));
baseLay->addWidget(clipboardBtn,0,3);
- QToolTip::add(clipboardBtn,i18n("Define selected text"));
+ TQToolTip::add(clipboardBtn,i18n("Define selected text"));
- defineBtn = new QPushButton(i18n("D"),baseWidget);
+ defineBtn = new TQPushButton(i18n("D"),baseWidget);
defineBtn->setBackgroundOrigin(AncestorOrigin);
defineBtn->setFont(f);
defineBtn->setFixedSize(16,16);
defineBtn->setEnabled(false);
- connect(defineBtn, SIGNAL(clicked()), SLOT(startDefine()));
+ connect(defineBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startDefine()));
baseLay->addWidget(defineBtn,0,4);
- QToolTip::add(defineBtn,i18n("Define word/phrase"));
+ TQToolTip::add(defineBtn,i18n("Define word/phrase"));
- matchBtn = new QPushButton(i18n("M"),baseWidget);
+ matchBtn = new TQPushButton(i18n("M"),baseWidget);
matchBtn->setBackgroundOrigin(AncestorOrigin);
matchBtn->setFont(f);
matchBtn->setFixedSize(16,16);
matchBtn->setEnabled(false);
- connect(matchBtn, SIGNAL(clicked()), SLOT(startMatch()));
+ connect(matchBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startMatch()));
baseLay->addWidget(matchBtn,0,5);
- QToolTip::add(matchBtn,i18n("Find matching definitions"));
+ TQToolTip::add(matchBtn,i18n("Find matching definitions"));
completionObject = new KCompletion();
@@ -141,37 +141,37 @@ DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidge
internalCombo->setFocus();
internalCombo->clearEdit();
internalCombo->lineEdit()->installEventFilter( this );
- connect(internalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&)));
- connect(internalCombo, SIGNAL(textChanged(const QString&)), SLOT(comboTextChanged(const QString&)));
- QToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict"));
+ connect(internalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
+ connect(internalCombo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(comboTextChanged(const TQString&)));
+ TQToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict"));
baseLay->addMultiCellWidget(internalCombo,1,1,1,5);
baseLay->setColStretch(2,1);
// widgets for a vertical panel
- verticalBtn = new QPushButton(this);
- connect(verticalBtn, SIGNAL(pressed()), SLOT(showExternalCombo()));
- QToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict"));
+ verticalBtn = new TQPushButton(this);
+ connect(verticalBtn, TQT_SIGNAL(pressed()), TQT_SLOT(showExternalCombo()));
+ TQToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict"));
popupBox = new PopupBox();
popupBox->setFixedSize(160, 22);
- connect(popupBox, SIGNAL(hidden()), SLOT(externalComboHidden()));
+ connect(popupBox, TQT_SIGNAL(hidden()), TQT_SLOT(externalComboHidden()));
externalCombo = new KHistoryCombo(popupBox);
externalCombo->setCompletionObject(completionObject);
- connect(externalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&)));
+ connect(externalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
externalCombo->setFixedSize(160, externalCombo->sizeHint().height());
- connect(internalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(updateCompletionMode(KGlobalSettings::Completion)));
- connect(externalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(updateCompletionMode(KGlobalSettings::Completion)));
+ connect(internalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
+ connect(externalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
// restore history and completion list
KConfig *c = config();
c->setGroup("General");
- QStringList list = c->readListEntry("Completion list");
+ TQStringList list = c->readListEntry("Completion list");
completionObject->setItems(list);
int mode = c->readNumEntry("Completion mode",
KGlobalSettings::completionMode());
@@ -190,7 +190,7 @@ DictApplet::~DictApplet()
KConfig *c = config();
c->setGroup("General");
- QStringList list = completionObject->items();
+ TQStringList list = completionObject->items();
c->writeEntry("Completion list", list);
c->writeEntry("Completion mode", (int) internalCombo->completionMode());
@@ -217,7 +217,7 @@ int DictApplet::heightForWidth(int width) const
}
-void DictApplet::resizeEvent(QResizeEvent*)
+void DictApplet::resizeEvent(TQResizeEvent*)
{
if (orientation() == Horizontal) {
verticalBtn->hide();
@@ -252,22 +252,22 @@ void DictApplet::resizeEvent(QResizeEvent*)
verticalBtn->setFixedSize(width(),width());
KIcon::StdSizes sz = width() < 32 ? KIcon::SizeSmall : (width() < 48 ? KIcon::SizeMedium : KIcon::SizeLarge);
- QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true);
+ TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true);
verticalBtn->setPixmap(pm);
}
}
-bool DictApplet::eventFilter( QObject *o, QEvent * e)
+bool DictApplet::eventFilter( TQObject *o, TQEvent * e)
{
- if (e->type() == QEvent::MouseButtonRelease)
+ if (e->type() == TQEvent::MouseButtonRelease)
emit requestFocus();
return KPanelApplet::eventFilter(o, e);
}
-void DictApplet::sendCommand(const QCString &fun, const QString &data)
+void DictApplet::sendCommand(const TQCString &fun, const TQString &data)
{
if (waiting > 0) {
waiting = 1;
@@ -282,7 +282,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data)
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
} else {
QCStringList list = client->remoteObjects("kdict");
@@ -290,7 +290,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data)
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
}
}
@@ -309,13 +309,13 @@ void DictApplet::sendDelayedCommand()
DCOPClient *client = kapp->dcopClient();
if (!client->isApplicationRegistered("kdict")) {
waiting++;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
} else {
QCStringList list = client->remoteObjects("kdict");
if (list.findIndex("KDictIface")==-1) {
waiting++;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
}
}
@@ -325,9 +325,9 @@ void DictApplet::sendDelayedCommand()
}
-void DictApplet::startQuery(const QString &s)
+void DictApplet::startQuery(const TQString &s)
{
- QString query = s.stripWhiteSpace();
+ TQString query = s.stripWhiteSpace();
if (query.isEmpty())
return;
@@ -336,14 +336,14 @@ void DictApplet::startQuery(const QString &s)
internalCombo->clearEdit();
externalCombo->clearEdit();
- sendCommand("definePhrase(QString)",query);
+ sendCommand("definePhrase(TQString)",query);
if (orientation() == Vertical)
popupBox->hide();
}
-void DictApplet::comboTextChanged(const QString &s)
+void DictApplet::comboTextChanged(const TQString &s)
{
defineBtn->setEnabled(!s.isEmpty());
matchBtn->setEnabled(!s.isEmpty());
@@ -352,7 +352,7 @@ void DictApplet::comboTextChanged(const QString &s)
void DictApplet::queryClipboard()
{
- sendCommand("defineClipboardContent()",QString::null);
+ sendCommand("defineClipboardContent()",TQString::null);
}
@@ -364,23 +364,23 @@ void DictApplet::startDefine()
void DictApplet::startMatch()
{
- QString query = internalCombo->currentText().stripWhiteSpace();
+ TQString query = internalCombo->currentText().stripWhiteSpace();
internalCombo->addToHistory(query);
externalCombo->addToHistory(query);
internalCombo->clearEdit();
externalCombo->clearEdit();
- sendCommand("matchPhrase(QString)",query);
+ sendCommand("matchPhrase(TQString)",query);
}
void DictApplet::showExternalCombo()
{
- QPoint p;
+ TQPoint p;
if (position() == pLeft)
- p = mapToGlobal(QPoint(-popupBox->width()-1, 0));
+ p = mapToGlobal(TQPoint(-popupBox->width()-1, 0));
else
- p = mapToGlobal(QPoint(width()+1, 0));
+ p = mapToGlobal(TQPoint(width()+1, 0));
popupBox->move(p);
if (popupBox->showBox())
externalCombo->setFocus();
diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h
index a9738148..99a7cec4 100644
--- a/kdict/applet/kdictapplet.h
+++ b/kdict/applet/kdictapplet.h
@@ -20,7 +20,7 @@
#ifndef _DICTAPPLET_H_
#define _DICTAPPLET_H_
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kpanelapplet.h>
class QLabel;
@@ -47,7 +47,7 @@ public slots:
void enablePopup();
protected:
- void hideEvent(QHideEvent *);
+ void hideEvent(TQHideEvent *);
private:
bool popupEnabled;
@@ -61,22 +61,22 @@ class DictApplet : public KPanelApplet
Q_OBJECT
public:
- DictApplet(const QString& configFile, Type t = Stretch, int actions = 0, QWidget *parent = 0, const char *name = 0);
+ DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *parent = 0, const char *name = 0);
virtual ~DictApplet();
int widthForHeight(int height) const;
int heightForWidth(int width) const;
protected:
- void resizeEvent(QResizeEvent*);
- bool eventFilter( QObject *, QEvent * );
+ void resizeEvent(TQResizeEvent*);
+ bool eventFilter( TQObject *, TQEvent * );
- void sendCommand(const QCString &fun, const QString &data);
+ void sendCommand(const TQCString &fun, const TQString &data);
protected slots:
void sendDelayedCommand();
- void startQuery(const QString&);
- void comboTextChanged(const QString&);
+ void startQuery(const TQString&);
+ void comboTextChanged(const TQString&);
void queryClipboard();
void startDefine();
void startMatch();
@@ -87,14 +87,14 @@ protected slots:
private:
KHistoryCombo *internalCombo, *externalCombo;
KCompletion *completionObject;
- QLabel *textLabel, *iconLabel;
- QPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn;
- QWidget *baseWidget;
+ TQLabel *textLabel, *iconLabel;
+ TQPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn;
+ TQWidget *baseWidget;
PopupBox *popupBox;
int waiting;
- QCString delayedFunc;
- QString delayedData;
+ TQCString delayedFunc;
+ TQString delayedData;
};
diff --git a/kdict/application.cpp b/kdict/application.cpp
index 28e3a398..b4239929 100644
--- a/kdict/application.cpp
+++ b/kdict/application.cpp
@@ -48,10 +48,10 @@ int Application::newInstance()
{
if (args->count()>0)
{
- QString phrase;
+ TQString phrase;
for (int i=0;i<args->count();i++)
{
- phrase += QString::fromLocal8Bit(args->arg(i));
+ phrase += TQString::fromLocal8Bit(args->arg(i));
if (i+1 < args->count())
phrase += " ";
}
diff --git a/kdict/application.h b/kdict/application.h
index eddb7f44..e5d46c67 100644
--- a/kdict/application.h
+++ b/kdict/application.h
@@ -13,7 +13,7 @@
#define APPLICATION_H
#include <kuniqueapplication.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#define KDICT_VERSION "0.6"
@@ -32,7 +32,7 @@ class Application : public KUniqueApplication
int newInstance();
private:
- QGuardedPtr<TopLevel> m_mainWindow;
+ TQGuardedPtr<TopLevel> m_mainWindow;
};
diff --git a/kdict/dcopinterface.h b/kdict/dcopinterface.h
index f088a842..347a2e15 100644
--- a/kdict/dcopinterface.h
+++ b/kdict/dcopinterface.h
@@ -17,7 +17,7 @@
#define _DCOPINTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KDictIface : virtual public DCOPObject
{
@@ -30,20 +30,20 @@ k_dcop:
virtual void makeActiveWindow() = 0;
/** define/match a word/phrase **/
- virtual void definePhrase(QString phrase) = 0;
- virtual void matchPhrase(QString phrase) = 0;
+ virtual void definePhrase(TQString phrase) = 0;
+ virtual void matchPhrase(TQString phrase) = 0;
virtual void defineClipboardContent() = 0;
virtual void matchClipboardContent() = 0;
/** get info **/
- virtual QStringList getDatabases() = 0;
- virtual QString currentDatabase() = 0;
- virtual QStringList getStrategies() = 0;
- virtual QString currentStrategy() = 0;
+ virtual TQStringList getDatabases() = 0;
+ virtual TQString currentDatabase() = 0;
+ virtual TQStringList getStrategies() = 0;
+ virtual TQString currentStrategy() = 0;
/** set current database/strategy (returns true on success) **/
- virtual bool setDatabase(QString db) = 0;
- virtual bool setStrategy(QString strategy) = 0;
+ virtual bool setDatabase(TQString db) = 0;
+ virtual bool setStrategy(TQString strategy) = 0;
/** navigate in history **/
virtual bool historyGoBack() = 0;
diff --git a/kdict/dict.cpp b/kdict/dict.cpp
index b36f1ac1..74395d4a 100644
--- a/kdict/dict.cpp
+++ b/kdict/dict.cpp
@@ -22,8 +22,8 @@
#include "options.h"
#include "dict.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <klocale.h>
#include <kdebug.h>
@@ -41,9 +41,9 @@
//********* JobData ******************************************
-JobData::JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport,
- int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled,
- QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout)
+JobData::JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport,
+ int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled,
+ TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout)
: type(Ntype), error(ErrNoErr), canceled(false), numFetched(0), newServer(NnewServer),server(Nserver), port(Nport),
timeout(Ntimeout), pipeSize(NpipeSize), idleHold(NidleHold), encoding(Nencoding), authEnabled(NAuthEnabled),
user(Nuser), secret(Nsecret), headLayout(NheadLayout)
@@ -133,7 +133,7 @@ void DictAsyncClient::waitForWork()
if ((tcpSocket!=-1)&&(job->newServer))
doQuit();
- codec = QTextCodec::codecForName(job->encoding.latin1());
+ codec = TQTextCodec::codecForName(job->encoding.latin1());
input[0] = 0; //terminate string
thisLine = input;
nextLine = input;
@@ -181,10 +181,10 @@ void DictAsyncClient::waitForWork()
void DictAsyncClient::define()
{
- QString command;
+ TQString command;
job->defines.clear();
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = job->databases.begin(); it != job->databases.end(); ++it) {
command = "define ";
command += *it;
@@ -201,7 +201,7 @@ void DictAsyncClient::define()
job->strategy = ".";
if (!match())
return;
- job->result = QString::null;
+ job->result = TQString::null;
if (job->numFetched == 0) {
resultAppend("<body>\n<p class=\"heading\">\n");
resultAppend(i18n("No definitions found for \'%1'.").arg(job->query));
@@ -212,8 +212,8 @@ void DictAsyncClient::define()
resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").arg(job->query));
resultAppend("</p>\n<table width=\"100%\" cols=2>\n");
- QString lastDb;
- QStringList::iterator it;
+ TQString lastDb;
+ TQStringList::iterator it;
for (it = job->matches.begin(); it != job->matches.end(); ++it) {
int pos = (*it).find(' ');
if (pos != -1) {
@@ -241,10 +241,10 @@ void DictAsyncClient::define()
}
-QString htmlString(const QString &raw)
+TQString htmlString(const TQString &raw)
{
unsigned int len=raw.length();
- QString ret;
+ TQString ret;
for (unsigned int i=0; i<len; i++) {
switch (raw[i]) {
@@ -259,13 +259,13 @@ QString htmlString(const QString &raw)
}
-QString generateDefineLink(const QString &raw)
+TQString generateDefineLink(const TQString &raw)
{
- QRegExp http("http://[^\\s<>()\"|\\[\\]{}]+");
- QRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+");
+ TQRegExp http("http://[^\\s<>()\"|\\[\\]{}]+");
+ TQRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+");
int matchPos=0, matchLen=0;
bool httpMatch=false;
- QString ret;
+ TQString ret;
matchPos = http.search(raw);
matchLen = http.matchedLength();
@@ -305,8 +305,8 @@ QString generateDefineLink(const QString &raw)
bool DictAsyncClient::getDefinitions()
{
- QCString lastDb,bracketBuff;
- QStrList hashList;
+ TQCString lastDb,bracketBuff;
+ TQStrList hashList;
char *s;
int defCount,response;
@@ -317,7 +317,7 @@ bool DictAsyncClient::getDefinitions()
defCount = 0;
cmdBuffer = "";
do {
- QStringList::iterator it = job->defines.begin();
+ TQStringList::iterator it = job->defines.begin();
cmdBuffer += codec->fromUnicode(*it);
defCount++;
job->defines.remove(it);
@@ -352,7 +352,7 @@ bool DictAsyncClient::getDefinitions()
}
} else {
job->error = JobData::ErrServerError;
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(thisLine);
doQuit();
return false;
@@ -390,7 +390,7 @@ bool DictAsyncClient::getDefinitions()
bodyDone = true;
}
if (!bodyDone) {
- context.update(QCString(line));
+ context.update(TQCString(line));
if (!bracketBuff.isEmpty()) {
s = strchr(line,'}');
if (!s)
@@ -461,7 +461,7 @@ bool DictAsyncClient::getDefinitions()
bool DictAsyncClient::match()
{
- QStringList::iterator it = job->databases.begin();
+ TQStringList::iterator it = job->databases.begin();
int response;
cmdBuffer = "";
@@ -792,13 +792,13 @@ void DictAsyncClient::openConnection()
if (ks.status() == IO_LookupError)
job->error = JobData::ErrBadHost;
else if (ks.status() == IO_ConnectError) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrConnect;
} else if (ks.status() == IO_TimeOutError)
job->error = JobData::ErrTimeout;
else {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrCommunication;
}
@@ -827,7 +827,7 @@ void DictAsyncClient::openConnection()
}
KMD5 context;
- context.update(QCString(msgId));
+ context.update(TQCString(msgId));
context.update(job->secret.local8Bit());
cmdBuffer += "auth " + job->user.local8Bit() + " ";
@@ -898,7 +898,7 @@ bool DictAsyncClient::waitForRead()
if (ret == -1) { // select failed
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -918,7 +918,7 @@ bool DictAsyncClient::waitForRead()
}
if (FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -930,7 +930,7 @@ bool DictAsyncClient::waitForRead()
}
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -961,7 +961,7 @@ bool DictAsyncClient::waitForWrite()
if (ret == -1) { // select failed
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -981,7 +981,7 @@ bool DictAsyncClient::waitForWrite()
}
if (FD_ISSET(tcpSocket,&fdsR)||FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -992,7 +992,7 @@ bool DictAsyncClient::waitForWrite()
return true;
}
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -1032,7 +1032,7 @@ bool DictAsyncClient::sendBuffer()
ret = KSocks::self()->write(tcpSocket,&cmdBuffer.data()[done],todo);
if (ret <= 0) {
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -1077,7 +1077,7 @@ bool DictAsyncClient::getNextLine()
} while ((received<0)&&(errno==EINTR)); // don't get tricked by signals
if (received <= 0) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
closeSocket();
@@ -1121,7 +1121,7 @@ void DictAsyncClient::handleErrors()
int len = strlen(thisLine);
if (len>80)
len = 80;
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(codec->toUnicode(thisLine,len));
switch (strtol(thisLine,0L,0)) {
@@ -1167,7 +1167,7 @@ void DictAsyncClient::resultAppend(const char* str)
}
-void DictAsyncClient::resultAppend(QString str)
+void DictAsyncClient::resultAppend(TQString str)
{
if (job)
job->result += str;
@@ -1203,8 +1203,8 @@ DictInterface::DictInterface()
kapp->exit(1);
}
- notifier = new QSocketNotifier(fdPipeIn[0],QSocketNotifier::Read,this);
- connect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone()));
+ notifier = new TQSocketNotifier(fdPipeIn[0],TQSocketNotifier::Read,this);
+ connect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone()));
// initialize the KSocks stuff in the main thread, otherwise we get
// strange effects on FreeBSD
@@ -1222,7 +1222,7 @@ DictInterface::DictInterface()
DictInterface::~DictInterface()
{
- disconnect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone()));
+ disconnect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone()));
if (0!=pthread_cancel(threadID))
kdWarning() << "pthread_cancel failed!" << endl;
@@ -1271,7 +1271,7 @@ void DictInterface::stop()
}
-void DictInterface::define(const QString &query)
+void DictInterface::define(const TQString &query)
{
JobData *newJob = generateQuery(JobData::TDefine,query);
if (newJob)
@@ -1279,7 +1279,7 @@ void DictInterface::define(const QString &query)
}
-void DictInterface::getDefinitions(QStringList query)
+void DictInterface::getDefinitions(TQStringList query)
{
JobData *newjob = new JobData(JobData::TGetDefinitions,newServer,global->server,global->port,
global->idleHold,global->timeout,global->pipeSize, global->encoding,global->authEnabled,
@@ -1290,7 +1290,7 @@ void DictInterface::getDefinitions(QStringList query)
}
-void DictInterface::match(const QString &query)
+void DictInterface::match(const TQString &query)
{
JobData *newJob = generateQuery(JobData::TMatch,query);
@@ -1306,9 +1306,9 @@ void DictInterface::match(const QString &query)
// fetch detailed db info
-void DictInterface::showDbInfo(const QString &db)
+void DictInterface::showDbInfo(const TQString &db)
{
- QString ndb = db.simplifyWhiteSpace(); // cleanup query string
+ TQString ndb = db.simplifyWhiteSpace(); // cleanup query string
if (ndb.isEmpty())
return;
if (ndb.length()>100) // shorten if necessary
@@ -1362,7 +1362,7 @@ void DictInterface::updateServer()
// client-thread ended
void DictInterface::clientDone()
{
- QString message;
+ TQString message;
cleanPipes(); // read from pipe so that notifier doesn´t fire again
@@ -1372,7 +1372,7 @@ void DictInterface::clientDone()
}
clientDoneInProgress = true;
- QStringList::iterator it;
+ TQStringList::iterator it;
JobData* job = jobList.getFirst();
if (!job->canceled) { // non-interupted job?
if (JobData::ErrNoErr == job->error) {
@@ -1444,7 +1444,7 @@ void DictInterface::clientDone()
emit resultReady(job->result, job->query);
}
} else {
- QString errMsg;
+ TQString errMsg;
switch (job->error) {
case JobData::ErrCommunication:
errMsg = i18n("Communication error:\n\n");
@@ -1514,14 +1514,14 @@ void DictInterface::clientDone()
}
-JobData* DictInterface::generateQuery(JobData::QueryType type, QString query)
+JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
{
query = query.simplifyWhiteSpace(); // cleanup query string
if (query.isEmpty())
return 0L;
if (query.length()>300) // shorten if necessary
query.truncate(300);
- query = query.replace(QRegExp("[\"\\]"), ""); // remove remaining illegal chars...
+ query = query.replace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
if (query.isEmpty())
return 0L;
@@ -1579,7 +1579,7 @@ void DictInterface::startClient()
if (::write(fdPipeOut[1],&buf,1) == -1)
::perror( "startClient()" );
- QString message;
+ TQString message;
switch (jobList.getFirst()->type) {
case JobData::TDefine:
case JobData::TGetDefinitions:
diff --git a/kdict/dict.h b/kdict/dict.h
index adb87ed9..53e5db3d 100644
--- a/kdict/dict.h
+++ b/kdict/dict.h
@@ -20,8 +20,8 @@
#define _DICT_H_
#include <pthread.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
class QSocketNotifier;
struct in_addr;
@@ -65,29 +65,29 @@ public:
ErrMsgTooLong
};
- JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport,
- int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled,
- QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout);
+ JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport,
+ int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled,
+ TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout);
QueryType type;
ErrType error;
bool canceled;
int numFetched;
- QString result;
- QStringList matches;
+ TQString result;
+ TQStringList matches;
- QString query;
- QStringList defines;
+ TQString query;
+ TQStringList defines;
bool newServer;
- QString server;
+ TQString server;
int port, timeout, pipeSize, idleHold;
- QString encoding;
+ TQString encoding;
bool authEnabled;
- QString user, secret;
- QStringList databases,strategies;
- QString strategy;
+ TQString user, secret;
+ TQStringList databases,strategies;
+ TQString strategy;
unsigned int headLayout;
};
@@ -134,16 +134,16 @@ private:
void handleErrors();
void resultAppend(const char* str);
- void resultAppend(QString str);
+ void resultAppend(TQString str);
JobData *job;
char *input;
- QCString cmdBuffer;
+ TQCString cmdBuffer;
const unsigned int inputSize;
char *thisLine, *nextLine, *inputEnd;
int fdPipeIn,fdPipeOut; //IPC-Pipes to/from async thread
int tcpSocket,timeout,idleHold;
- QTextCodec *codec;
+ TQTextCodec *codec;
};
@@ -163,10 +163,10 @@ public slots:
void serverChanged(); // inform the client when server settings get changed
void stop(); // cancel all pending jobs
- void define(const QString &query);
- void getDefinitions(QStringList query);
- void match(const QString &query);
- void showDbInfo(const QString &db); // fetch detailed db info
+ void define(const TQString &query);
+ void getDefinitions(TQStringList query);
+ void match(const TQString &query);
+ void showDbInfo(const TQString &db); // fetch detailed db info
void showDatabases(); // fetch misc. info...
void showStrategies();
void showInfo();
@@ -175,10 +175,10 @@ public slots:
signals:
void infoReady(); // updateServer done
- void resultReady(const QString &result, const QString &query); // define done
- void matchReady(const QStringList &result); // match done
- void started(const QString &message); // Client is active now, activate indicator
- void stopped(const QString &message); // Client is now halted, deactivate indicator
+ void resultReady(const TQString &result, const TQString &query); // define done
+ void matchReady(const TQStringList &result); // match done
+ void started(const TQString &message); // Client is active now, activate indicator
+ void stopped(const TQString &message); // Client is now halted, deactivate indicator
private slots:
@@ -186,16 +186,16 @@ private slots:
private:
- JobData* generateQuery(JobData::QueryType type, QString query);
+ JobData* generateQuery(JobData::QueryType type, TQString query);
void insertJob(JobData* job); // insert in job list, if nesscary cancel/remove previous jobs
void startClient(); // send start signal
void cleanPipes(); // empty the pipes, so that notifier stops firing
- QSocketNotifier *notifier;
+ TQSocketNotifier *notifier;
int fdPipeIn[2],fdPipeOut[2]; //IPC-Pipes to/from async thread
pthread_t threadID;
DictAsyncClient *client;
- QPtrList<JobData> jobList;
+ TQPtrList<JobData> jobList;
bool newServer,clientDoneInProgress;
};
diff --git a/kdict/matchview.cpp b/kdict/matchview.cpp
index 32cd04dd..869ea383 100644
--- a/kdict/matchview.cpp
+++ b/kdict/matchview.cpp
@@ -13,13 +13,13 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqclipboard.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <klocale.h>
@@ -35,26 +35,26 @@
//********* MatchViewItem ********************************************
-MatchViewItem::MatchViewItem(QListView *view, const QString &text)
- : QListViewItem(view,text)
+MatchViewItem::MatchViewItem(TQListView *view, const TQString &text)
+ : TQListViewItem(view,text)
{
}
-MatchViewItem::MatchViewItem(QListView *view,QListViewItem *after,const QString &text)
- : QListViewItem(view,after,text)
+MatchViewItem::MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text)
+ : TQListViewItem(view,after,text)
{
}
-MatchViewItem::MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr)
-: QListViewItem(item,text), command(commandStr)
+MatchViewItem::MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr)
+: TQListViewItem(item,text), command(commandStr)
{
}
-MatchViewItem::MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr)
-: QListViewItem(item,after,text), command(commandStr)
+MatchViewItem::MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr)
+: TQListViewItem(item,after,text), command(commandStr)
{
}
@@ -70,9 +70,9 @@ void MatchViewItem::setOpen(bool o)
listView()->setUpdatesEnabled(false);
MatchViewItem *sub=0;
- QString command, label;
- QRegExp exp("\"*\"", true, true);
- QStringList::iterator it;
+ TQString command, label;
+ TQRegExp exp("\"*\"", true, true);
+ TQStringList::iterator it;
for (it = subEntrys.begin(); it != subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -92,71 +92,71 @@ void MatchViewItem::setOpen(bool o)
}
if (childCount())
- QListViewItem::setOpen(o);
+ TQListViewItem::setOpen(o);
}
-void MatchViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
if(command.isEmpty()) {
- QFont font=p->font();
+ TQFont font=p->font();
font.setBold(true);
p->setFont(font);
}
- QListViewItem::paintCell(p,cg,column,width,alignment);
+ TQListViewItem::paintCell(p,cg,column,width,alignment);
}
//********* MatchView ******************************************
-MatchView::MatchView(QWidget *parent, const char *name)
- : QWidget(parent,name),getOn(false),getAllOn(false)
+MatchView::MatchView(TQWidget *parent, const char *name)
+ : TQWidget(parent,name),getOn(false),getAllOn(false)
{
setCaption(kapp->makeStdCaption(i18n("Match List")));
- QVBoxLayout * boxLayout = new QVBoxLayout(this, 1, 0);
+ TQVBoxLayout * boxLayout = new TQVBoxLayout(this, 1, 0);
boxLayout->addSpacing(1);
- w_strat = new QComboBox(false,this);
+ w_strat = new TQComboBox(false,this);
w_strat->setFixedHeight(w_strat->sizeHint().height());
- connect(w_strat,SIGNAL(activated(int)),this,SLOT(strategySelected(int)));
+ connect(w_strat,TQT_SIGNAL(activated(int)),this,TQT_SLOT(strategySelected(int)));
boxLayout->addWidget(w_strat,0);
boxLayout->addSpacing(1);
- w_list = new QListView(this);
- w_list->setFocusPolicy(QWidget::StrongFocus);
+ w_list = new TQListView(this);
+ w_list->setFocusPolicy(TQWidget::StrongFocus);
w_list->header()->hide();
w_list->addColumn("foo");
- w_list->setColumnWidthMode(0,QListView::Maximum);
+ w_list->setColumnWidthMode(0,TQListView::Maximum);
w_list->setColumnWidth(0,0);
- w_list->setSelectionMode(QListView::Extended);
+ w_list->setSelectionMode(TQListView::Extended);
w_list->setTreeStepSize(18);
w_list->setSorting(-1); // disable sorting
w_list->setMinimumHeight(w_strat->sizeHint().height());
- connect(w_list,SIGNAL(selectionChanged()),SLOT(enableGetButton()));
- connect(w_list,SIGNAL(returnPressed(QListViewItem *)),SLOT(returnPressed(QListViewItem *)));
- connect(w_list,SIGNAL(doubleClicked(QListViewItem *)),SLOT(getOneItem(QListViewItem *)));
- connect(w_list,SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)),
- SLOT(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)));
- connect(w_list,SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),SLOT(buildPopupMenu(QListViewItem *,const QPoint &,int)));
+ connect(w_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(enableGetButton()));
+ connect(w_list,TQT_SIGNAL(returnPressed(TQListViewItem *)),TQT_SLOT(returnPressed(TQListViewItem *)));
+ connect(w_list,TQT_SIGNAL(doubleClicked(TQListViewItem *)),TQT_SLOT(getOneItem(TQListViewItem *)));
+ connect(w_list,TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)));
+ connect(w_list,TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)),TQT_SLOT(buildPopupMenu(TQListViewItem *,const TQPoint &,int)));
boxLayout->addWidget(w_list,1);
boxLayout->addSpacing(1);
- w_get = new QPushButton(i18n("&Get Selected"),this);
+ w_get = new TQPushButton(i18n("&Get Selected"),this);
w_get->setFixedHeight(w_get->sizeHint().height()-3);
w_get->setMinimumWidth(w_get->sizeHint().width()-20);
w_get->setEnabled(false);
- connect(w_get, SIGNAL(clicked()), this, SLOT(getSelected()));
+ connect(w_get, TQT_SIGNAL(clicked()), this, TQT_SLOT(getSelected()));
boxLayout->addWidget(w_get,0);
- w_getAll = new QPushButton(i18n("Get &All"),this);
+ w_getAll = new TQPushButton(i18n("Get &All"),this);
w_getAll->setFixedHeight(w_getAll->sizeHint().height()-3);
w_getAll->setMinimumWidth(w_getAll->sizeHint().width()-20);
w_getAll->setEnabled(false);
- connect(w_getAll, SIGNAL(clicked()), this, SLOT(getAll()));
+ connect(w_getAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(getAll()));
boxLayout->addWidget(w_getAll,0);
- connect(interface,SIGNAL(matchReady(const QStringList &)),this,SLOT(newList(const QStringList &)));
+ connect(interface,TQT_SIGNAL(matchReady(const TQStringList &)),this,TQT_SLOT(newList(const TQStringList &)));
rightBtnMenu = new KPopupMenu();
}
@@ -174,7 +174,7 @@ void MatchView::updateStrategyCombo()
}
-bool MatchView::selectStrategy(const QString &strategy) const
+bool MatchView::selectStrategy(const TQString &strategy) const
{
int newCurrent = global->strategies.findIndex(strategy);
if (newCurrent == -1)
@@ -187,13 +187,13 @@ bool MatchView::selectStrategy(const QString &strategy) const
}
-void MatchView::match(const QString &query)
+void MatchView::match(const TQString &query)
{
interface->match(query.utf8());
}
-void MatchView::closeEvent ( QCloseEvent * e )
+void MatchView::closeEvent ( TQCloseEvent * e )
{
e->accept(); // hides the widget
emit(windowClosed());
@@ -215,22 +215,22 @@ void MatchView::enableGetButton()
}
-void MatchView::mouseButtonPressed(int button, QListViewItem *, const QPoint &, int)
+void MatchView::mouseButtonPressed(int button, TQListViewItem *, const TQPoint &, int)
{
if (button == MidButton)
emit(clipboardRequested());
}
-void MatchView::returnPressed(QListViewItem *)
+void MatchView::returnPressed(TQListViewItem *)
{
getSelected();
}
-void MatchView::getOneItem(QListViewItem *i)
+void MatchView::getOneItem(TQListViewItem *i)
{
- QStringList defines;
+ TQStringList defines;
if ((!i->childCount())&&(i->parent()))
defines.append(((MatchViewItem *)(i))->command);
@@ -248,14 +248,14 @@ void MatchView::getOneItem(QListViewItem *i)
void MatchView::getSelected()
{
- QStringList defines;
+ TQStringList defines;
MatchViewItem *top = static_cast<MatchViewItem*>(w_list->firstChild());
MatchViewItem *sub;
while (top) {
if (top->isSelected()&&(!top->subEntrys.isEmpty())) {
- QString command;
- QStringList::iterator it;
+ TQString command;
+ TQStringList::iterator it;
for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -278,14 +278,14 @@ void MatchView::getSelected()
void MatchView::getAll()
{
- QStringList defines;
+ TQStringList defines;
MatchViewItem *top = static_cast<MatchViewItem*>(w_list->firstChild());
MatchViewItem *sub;
while (top) {
if (!top->subEntrys.isEmpty()) {
- QString command;
- QStringList::iterator it;
+ TQString command;
+ TQStringList::iterator it;
for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -305,7 +305,7 @@ void MatchView::getAll()
}
-void MatchView::doGet(QStringList &defines)
+void MatchView::doGet(TQStringList &defines)
{
if (defines.count() > 0) {
if (defines.count() > global->maxDefinitions) {
@@ -319,7 +319,7 @@ void MatchView::doGet(QStringList &defines)
}
-void MatchView::newList(const QStringList &matches)
+void MatchView::newList(const TQStringList &matches)
{
MatchViewItem *top=0;
bool initialOpen = (matches.count()<200);
@@ -342,9 +342,9 @@ void MatchView::newList(const QStringList &matches)
w_list->setRootIsDecorated(true);
w_getAll->setEnabled(true);
getAllOn = true;
- QString lastDb, db, match;
+ TQString lastDb, db, match;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = matches.begin(); it != matches.end(); ++it) {
db = (*it).section(' ', 0, 0);
@@ -374,42 +374,42 @@ void MatchView::newList(const QStringList &matches)
// construct the right-mouse-button-popup-menu on demand
-void MatchView::buildPopupMenu(QListViewItem *i, const QPoint &_point, int)
+void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int)
{
rightBtnMenu->clear();
if ((i!=0L)&&(i->isExpandable()||i->parent())) {
popupCurrent = (MatchViewItem *)(i);
- rightBtnMenu->insertItem(i18n("&Get"),this,SLOT(popupGetCurrent()));
+ rightBtnMenu->insertItem(i18n("&Get"),this,TQT_SLOT(popupGetCurrent()));
if (!i->isExpandable()) { // toplevel item -> only "get"
- rightBtnMenu->insertItem(i18n("&Match"),this,SLOT(popupMatchCurrent()));
- rightBtnMenu->insertItem(i18n("&Define"),this,SLOT(popupDefineCurrent()));
+ rightBtnMenu->insertItem(i18n("&Match"),this,TQT_SLOT(popupMatchCurrent()));
+ rightBtnMenu->insertItem(i18n("&Define"),this,TQT_SLOT(popupDefineCurrent()));
}
rightBtnMenu->insertSeparator();
}
kapp->clipboard()->setSelectionMode(false);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(true);
text = kapp->clipboard()->text();
}
if (!text.isEmpty()) {
popupClip = kapp->clipboard()->text();
- rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,SLOT(popupMatchClip()));
- rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,SLOT(popupDefineClip()));
+ rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,TQT_SLOT(popupMatchClip()));
+ rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,TQT_SLOT(popupDefineClip()));
rightBtnMenu->insertSeparator();
}
- int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,SLOT(getSelected()));
+ int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,TQT_SLOT(getSelected()));
rightBtnMenu->setItemEnabled(ID,getOn);
- ID = rightBtnMenu->insertItem(i18n("Get &All"),this,SLOT(getAll()));
+ ID = rightBtnMenu->insertItem(i18n("Get &All"),this,TQT_SLOT(getAll()));
rightBtnMenu->setItemEnabled(ID,getAllOn);
if (w_list->childCount()) {
rightBtnMenu->insertSeparator();
- rightBtnMenu->insertItem(i18n("E&xpand List"),this,SLOT(expandList()));
- rightBtnMenu->insertItem(i18n("C&ollapse List"),this,SLOT(collapseList()));
+ rightBtnMenu->insertItem(i18n("E&xpand List"),this,TQT_SLOT(expandList()));
+ rightBtnMenu->insertItem(i18n("C&ollapse List"),this,TQT_SLOT(collapseList()));
}
rightBtnMenu->popup(_point);
@@ -448,7 +448,7 @@ void MatchView::popupMatchClip()
void MatchView::expandList()
{
- QListViewItem *top = w_list->firstChild();
+ TQListViewItem *top = w_list->firstChild();
while (top) {
w_list->setOpen(top,true);
@@ -460,7 +460,7 @@ void MatchView::expandList()
void MatchView::collapseList()
{
w_list->setCurrentItem(w_list->firstChild());
- QListViewItem *top = w_list->firstChild();
+ TQListViewItem *top = w_list->firstChild();
while (top) {
w_list->setOpen(top,false);
diff --git a/kdict/matchview.h b/kdict/matchview.h
index f619820e..7248c35c 100644
--- a/kdict/matchview.h
+++ b/kdict/matchview.h
@@ -17,7 +17,7 @@
#ifndef _MATCHVIEW_H_
#define _MATCHVIEW_H_
-#include <qlistview.h>
+#include <tqlistview.h>
class KPopupMenu;
@@ -28,17 +28,17 @@ class MatchViewItem : public QListViewItem
public:
- MatchViewItem(QListView *view,const QString &text);
- MatchViewItem(QListView *view,QListViewItem *after,const QString &text);
- MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr);
- MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr);
+ MatchViewItem(TQListView *view,const TQString &text);
+ MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text);
+ MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr);
+ MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr);
~MatchViewItem();
void setOpen(bool o);
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
- QString command;
- QStringList subEntrys;
+ TQString command;
+ TQStringList subEntrys;
};
@@ -51,36 +51,36 @@ class MatchView : public QWidget
public:
- MatchView(QWidget *parent=0,const char *name=0);
+ MatchView(TQWidget *parent=0,const char *name=0);
~MatchView();
void updateStrategyCombo();
- bool selectStrategy(const QString &strategy) const;
- void match(const QString &query);
+ bool selectStrategy(const TQString &strategy) const;
+ void match(const TQString &query);
signals:
- void defineRequested(const QString &query);
- void matchRequested(const QString &query);
+ void defineRequested(const TQString &query);
+ void matchRequested(const TQString &query);
void clipboardRequested();
void windowClosed();
protected:
- void closeEvent ( QCloseEvent * e );
+ void closeEvent ( TQCloseEvent * e );
private slots:
void strategySelected(int num);
void enableGetButton();
- void mouseButtonPressed(int, QListViewItem *, const QPoint &, int);
- void returnPressed(QListViewItem *i);
- void getOneItem(QListViewItem *i);
+ void mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int);
+ void returnPressed(TQListViewItem *i);
+ void getOneItem(TQListViewItem *i);
void getSelected();
void getAll();
- void doGet(QStringList &defines);
- void newList(const QStringList &matches);
- void buildPopupMenu(QListViewItem *, const QPoint &, int);
+ void doGet(TQStringList &defines);
+ void newList(const TQStringList &matches);
+ void buildPopupMenu(TQListViewItem *, const TQPoint &, int);
void popupGetCurrent();
void popupDefineCurrent();
void popupMatchCurrent();
@@ -91,15 +91,15 @@ private slots:
private:
- QComboBox *w_strat;
- QListView *w_list;
- QPushButton *w_get,*w_getAll;
+ TQComboBox *w_strat;
+ TQListView *w_list;
+ TQPushButton *w_get,*w_getAll;
bool getOn, getAllOn;
KPopupMenu *rightBtnMenu;
MatchViewItem *popupCurrent;
- QString popupClip; // needed for rightbtn-popup menu
+ TQString popupClip; // needed for rightbtn-popup menu
};
#endif
diff --git a/kdict/options.cpp b/kdict/options.cpp
index a157fbf5..3220b07c 100644
--- a/kdict/options.cpp
+++ b/kdict/options.cpp
@@ -17,14 +17,14 @@
------------------------------------------------------------- */
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qpainter.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqpainter.h>
#include <kcolordialog.h>
#include <kconfig.h>
@@ -67,7 +67,7 @@ void GlobalData::read()
config->setGroup("Colors");
useCustomColors=config->readBoolEntry("customColors", false);
- QColor defCol=KGlobalSettings::textColor();
+ TQColor defCol=KGlobalSettings::textColor();
c_olors[Ctext]=config->readColorEntry("textColor",&defCol);
c_olorNames[Ctext]=i18n("Text");
@@ -95,7 +95,7 @@ void GlobalData::read()
config->setGroup("Fonts");
useCustomFonts=config->readBoolEntry("customFonts", false);
- QFont defFont=KGlobalSettings::generalFont();
+ TQFont defFont=KGlobalSettings::generalFont();
f_onts[Ftext]=config->readFontEntry("textFont",&defFont);
f_ontNames[Ftext]=i18n("Text");
@@ -106,7 +106,7 @@ void GlobalData::read()
// geometry...
config->setGroup("Geometry");
- QSize invalid(-1,-1);
+ TQSize invalid(-1,-1);
optSize = config->readSizeEntry("Opt_Size",&invalid);
setsSize = config->readSizeEntry("Sets_Size",&invalid);
matchSize = config->readSizeEntry("Match_Size",&invalid);
@@ -157,10 +157,10 @@ void GlobalData::read()
config->setGroup("Database_Sets");
databaseSets.setAutoDelete(true);
int num = config->readNumEntry("Num_Sets",0);
- QStringList* temp;
- QString strNum;
+ TQStringList* temp;
+ TQString strNum;
while (num > 0) {
- temp = new QStringList();
+ temp = new TQStringList();
strNum.setNum(num);
*temp = config->readListEntry(strNum);
if (!temp->isEmpty()) {
@@ -217,7 +217,7 @@ void GlobalData::write()
config->writeEntry("Completion_mode", (int)queryComboCompletionMode);
config->setGroup("Query_History");
- QStringList copy;
+ TQStringList copy;
if (saveHistory)
copy = queryHistory;
config->writeEntry("History",copy);
@@ -239,13 +239,13 @@ void GlobalData::write()
config->setGroup("Database_Sets");
config->writeEntry("Num_Sets",databaseSets.count());
- QString strNum;
+ TQString strNum;
for (unsigned int i = 0;i<databaseSets.count();i++)
config->writeEntry(strNum.setNum(i+1),*databaseSets.at(i));
}
-QColor GlobalData::defaultColor(int i)
+TQColor GlobalData::defaultColor(int i)
{
switch(i) {
case Ctext:
@@ -278,7 +278,7 @@ QColor GlobalData::defaultColor(int i)
}
-QColor GlobalData::textColor()
+TQColor GlobalData::textColor()
{
if(useCustomColors)
return c_olors[Ctext];
@@ -287,7 +287,7 @@ QColor GlobalData::textColor()
}
-QColor GlobalData::backgroundColor()
+TQColor GlobalData::backgroundColor()
{
if(useCustomColors)
return c_olors[Cbackground];
@@ -296,7 +296,7 @@ QColor GlobalData::backgroundColor()
}
-QColor GlobalData::headingsTextColor()
+TQColor GlobalData::headingsTextColor()
{
if(useCustomColors)
return c_olors[CheadingsText];
@@ -305,7 +305,7 @@ QColor GlobalData::headingsTextColor()
}
-QColor GlobalData::headingsBackgroundColor()
+TQColor GlobalData::headingsBackgroundColor()
{
if(useCustomColors)
return c_olors[CheadingsBackground];
@@ -314,7 +314,7 @@ QColor GlobalData::headingsBackgroundColor()
}
-QColor GlobalData::linksColor()
+TQColor GlobalData::linksColor()
{
if(useCustomColors)
return c_olors[Clinks];
@@ -323,7 +323,7 @@ QColor GlobalData::linksColor()
}
-QColor GlobalData::visitedLinksColor()
+TQColor GlobalData::visitedLinksColor()
{
if(useCustomColors)
return c_olors[CvisitedLinks];
@@ -332,9 +332,9 @@ QColor GlobalData::visitedLinksColor()
}
-QFont GlobalData::defaultFont(int i)
+TQFont GlobalData::defaultFont(int i)
{
- QFont font = KGlobalSettings::generalFont();
+ TQFont font = KGlobalSettings::generalFont();
if (font.pointSize() < 5)
font.setPointSize(12);
@@ -346,7 +346,7 @@ QFont GlobalData::defaultFont(int i)
}
-QFont GlobalData::textFont()
+TQFont GlobalData::textFont()
{
if(useCustomFonts)
return f_onts[Ftext];
@@ -355,7 +355,7 @@ QFont GlobalData::textFont()
}
-QFont GlobalData::headingsFont()
+TQFont GlobalData::headingsFont()
{
if(useCustomFonts)
return f_onts[Fheadings];
@@ -365,10 +365,10 @@ QFont GlobalData::headingsFont()
// simple password scrambling...
-QString GlobalData::encryptStr(const QString& aStr)
+TQString GlobalData::encryptStr(const TQString& aStr)
{
uint i,val,len = aStr.length();
- QString result;
+ TQString result;
for (i=0; i<len; i++)
{
@@ -384,8 +384,8 @@ QString GlobalData::encryptStr(const QString& aStr)
//********* OptionsDialog::DialogListBox *****************************
-OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, QWidget * parent, const char * name)
- : QListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
+OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, TQWidget * parent, const char * name)
+ : TQListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
{
}
@@ -395,20 +395,20 @@ OptionsDialog::DialogListBox::~DialogListBox()
}
-void OptionsDialog::DialogListBox::keyPressEvent(QKeyEvent *e)
+void OptionsDialog::DialogListBox::keyPressEvent(TQKeyEvent *e)
{
if ((a_lwaysIgnore || !(hasFocus()&&isVisible()))&&((e->key()==Key_Enter)||(e->key()==Key_Return)))
e->ignore();
else
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
//********* OptionsDialog::ColorListItem *****************************
-OptionsDialog::ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxText(text), mColor( color )
+OptionsDialog::ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxText(text), mColor( color )
{
}
@@ -418,9 +418,9 @@ OptionsDialog::ColorListItem::~ColorListItem()
}
-void OptionsDialog::ColorListItem::paint( QPainter *p )
+void OptionsDialog::ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( 30+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -431,13 +431,13 @@ void OptionsDialog::ColorListItem::paint( QPainter *p )
}
-int OptionsDialog::ColorListItem::height(const QListBox *lb ) const
+int OptionsDialog::ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int OptionsDialog::ColorListItem::width(const QListBox *lb ) const
+int OptionsDialog::ColorListItem::width(const TQListBox *lb ) const
{
return( 30 + lb->fontMetrics().width( text() ) + 6 );
}
@@ -446,10 +446,10 @@ int OptionsDialog::ColorListItem::width(const QListBox *lb ) const
//********* OptionsDialog::FontListItem *****************************
-OptionsDialog::FontListItem::FontListItem( const QString &name, const QFont &font )
- : QListBoxText(name), f_ont(font)
+OptionsDialog::FontListItem::FontListItem( const TQString &name, const TQFont &font )
+ : TQListBoxText(name), f_ont(font)
{
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
@@ -458,28 +458,28 @@ OptionsDialog::FontListItem::~FontListItem()
}
-void OptionsDialog::FontListItem::setFont(const QFont &font)
+void OptionsDialog::FontListItem::setFont(const TQFont &font)
{
f_ont = font;
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
-void OptionsDialog::FontListItem::paint( QPainter *p )
+void OptionsDialog::FontListItem::paint( TQPainter *p )
{
- QFont fnt = p->font();
- fnt.setWeight(QFont::Bold);
+ TQFont fnt = p->font();
+ fnt.setWeight(TQFont::Bold);
p->setFont(fnt);
int fontInfoWidth = p->fontMetrics().width(fontInfo);
int h = p->fontMetrics().ascent() + p->fontMetrics().leading()/2;
p->drawText(2, h, fontInfo );
- fnt.setWeight(QFont::Normal);
+ fnt.setWeight(TQFont::Normal);
p->setFont(fnt);
p->drawText(5 + fontInfoWidth, h, text() );
}
-int OptionsDialog::FontListItem::width(const QListBox *lb ) const
+int OptionsDialog::FontListItem::width(const TQListBox *lb ) const
{
return( lb->fontMetrics().width(fontInfo) + lb->fontMetrics().width(text()) + 20 );
}
@@ -488,90 +488,90 @@ int OptionsDialog::FontListItem::width(const QListBox *lb ) const
//********* OptionsDialog ******************************************
-OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
+OptionsDialog::OptionsDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList, i18n("Configure"), Help|Default|Ok|Apply|Cancel, Ok, parent, name, false, true)
{
//******** Server ************************************
serverTab = addPage(i18n("Server"),i18n("DICT Server Configuration"), BarIcon("network", KIcon::SizeMedium ));
- QGridLayout* grid = new QGridLayout(serverTab,10,3,0,spacingHint());
+ TQGridLayout* grid = new TQGridLayout(serverTab,10,3,0,spacingHint());
w_server = new KLineEdit(serverTab);
w_server->setText(global->server);
- QLabel *l = new QLabel(w_server, i18n("Host&name:"), serverTab);
+ TQLabel *l = new TQLabel(w_server, i18n("Host&name:"), serverTab);
grid->addWidget(l,0,0);
grid->addMultiCellWidget(w_server,0,0,1,2);
- connect( w_server, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_server, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_port = new KLineEdit(serverTab);
w_port->setValidator(new KIntValidator(0,65536,this));
- w_port->setText(QString::number(global->port));
- l = new QLabel(w_port, i18n("&Port:"), serverTab);
+ w_port->setText(TQString::number(global->port));
+ l = new TQLabel(w_port, i18n("&Port:"), serverTab);
grid->addWidget(l,1,0);
grid->addWidget(w_port,1,1);
- connect( w_port, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_port, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_idleHold = new KIntSpinBox(0,300,5,0,10,serverTab);
w_idleHold->setSuffix(i18n(" sec"));
w_idleHold->setValue(global->idleHold);
- l = new QLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab);
+ l = new TQLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab);
grid->addWidget(l,2,0);
grid->addWidget(w_idleHold,2,1);
- connect( w_idleHold, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_idleHold, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
w_timeout = new KIntSpinBox(5,600,5,5,10,serverTab);
w_timeout->setSuffix(i18n(" sec"));
w_timeout->setValue(global->timeout);
- l = new QLabel(w_timeout, i18n("T&imeout:"), serverTab);
+ l = new TQLabel(w_timeout, i18n("T&imeout:"), serverTab);
grid->addWidget(l,3,0);
grid->addWidget(w_timeout,3,1);
- connect( w_timeout, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_timeout, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
w_pipesize = new KIntSpinBox(100,5000,2,2,10,serverTab);
w_pipesize->setSuffix(i18n(" bytes"));
w_pipesize->setValue(global->pipeSize);
- l = new QLabel(w_pipesize, i18n("Command &buffer:"), serverTab);
+ l = new TQLabel(w_pipesize, i18n("Command &buffer:"), serverTab);
grid->addWidget(l,4,0);
grid->addWidget(w_pipesize,4,1);
- connect( w_pipesize, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_pipesize, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
- QStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
+ TQStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
int i=0,x=0;
- for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
+ for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
if (KGlobal::charsets()->encodingForName(*it)==global->encoding) {
x = i;
break;
}
i++;
}
- w_encoding = new QComboBox(serverTab);
+ w_encoding = new TQComboBox(serverTab);
w_encoding->insertStringList(encodingNames);
w_encoding->setCurrentItem(x);
- l = new QLabel(w_encoding, i18n("Encod&ing:"), serverTab);
+ l = new TQLabel(w_encoding, i18n("Encod&ing:"), serverTab);
grid->addWidget(l,5,0);
grid->addMultiCellWidget(w_encoding,5,5,1,2);
- connect( w_encoding, SIGNAL( activated(int) ), this, SLOT( slotChanged() ) );
+ connect( w_encoding, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotChanged() ) );
- w_auth = new QCheckBox(i18n("Server requires a&uthentication"),serverTab);
+ w_auth = new TQCheckBox(i18n("Server requires a&uthentication"),serverTab);
w_auth->setChecked(global->authEnabled);
grid->addMultiCellWidget(w_auth,6,6,0,2);
- connect( w_auth, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(w_auth,SIGNAL(toggled(bool)),SLOT(slotAuthRequiredToggled(bool)));
+ connect( w_auth, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(w_auth,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotAuthRequiredToggled(bool)));
w_user = new KLineEdit(serverTab);
w_user->setText(global->user);
- l_user = new QLabel(w_user, i18n("U&ser:"),serverTab);
+ l_user = new TQLabel(w_user, i18n("U&ser:"),serverTab);
grid->addWidget(l_user,7,0);
grid->addMultiCellWidget(w_user,7,7,1,2);
- connect( w_user, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_user, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_secret = new KLineEdit(serverTab);
- w_secret->setEchoMode(QLineEdit::Password);
+ w_secret->setEchoMode(TQLineEdit::Password);
w_secret->setText(global->secret);
- l_secret = new QLabel(w_secret, i18n("Pass&word:"), serverTab);
+ l_secret = new TQLabel(w_secret, i18n("Pass&word:"), serverTab);
grid->addWidget(l_secret,8,0);
grid->addMultiCellWidget(w_secret,8,8,1,2);
- connect( w_secret, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_secret, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
slotAuthRequiredToggled( w_auth->isChecked() );
@@ -581,53 +581,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Appearance ***************************
appTab = addPage(i18n("Appearance"),i18n("Customize Visual Appearance"), BarIcon("appearance", KIcon::SizeMedium ));
- QGridLayout *topL=new QGridLayout(appTab, 8, 3, 0, spacingHint());
+ TQGridLayout *topL=new TQGridLayout(appTab, 8, 3, 0, spacingHint());
//color-list
c_List = new DialogListBox(false, appTab);
topL->addMultiCellWidget(c_List,1,3,0,1);
- connect(c_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotColItemSelected(QListBoxItem*)));
- connect(c_List, SIGNAL(selectionChanged()), SLOT(slotColSelectionChanged()));
+ connect(c_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotColItemSelected(TQListBoxItem*)));
+ connect(c_List, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotColSelectionChanged()));
- c_olorCB = new QCheckBox(i18n("&Use custom colors"),appTab);
+ c_olorCB = new TQCheckBox(i18n("&Use custom colors"),appTab);
topL->addWidget(c_olorCB,0,0);
- connect(c_olorCB, SIGNAL(toggled(bool)), this, SLOT(slotColCheckBoxToggled(bool)));
- connect(c_olorCB, SIGNAL(toggled(bool) ), this, SLOT( slotChanged()));
+ connect(c_olorCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotColCheckBoxToggled(bool)));
+ connect(c_olorCB, TQT_SIGNAL(toggled(bool) ), this, TQT_SLOT( slotChanged()));
- c_olChngBtn=new QPushButton(i18n("Cha&nge..."), appTab);
- connect(c_olChngBtn, SIGNAL(clicked()), SLOT(slotColChangeBtnClicked()));
+ c_olChngBtn=new TQPushButton(i18n("Cha&nge..."), appTab);
+ connect(c_olChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColChangeBtnClicked()));
topL->addWidget(c_olChngBtn,1,2);
- c_olDefBtn=new QPushButton(i18n("Default&s"), appTab);
- connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotColDefaultBtnClicked()));
+ c_olDefBtn=new TQPushButton(i18n("Default&s"), appTab);
+ connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColDefaultBtnClicked()));
topL->addWidget(c_olDefBtn,2,2);
- connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotChanged()));
+ connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
//font-list
f_List = new DialogListBox(false, appTab);
topL->addMultiCellWidget(f_List,5,7,0,1);
- connect(f_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotFontItemSelected(QListBoxItem*)));
- connect(f_List, SIGNAL(selectionChanged()),SLOT(slotFontSelectionChanged()));
+ connect(f_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotFontItemSelected(TQListBoxItem*)));
+ connect(f_List, TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotFontSelectionChanged()));
- f_ontCB = new QCheckBox(i18n("Use custom &fonts"),appTab);
+ f_ontCB = new TQCheckBox(i18n("Use custom &fonts"),appTab);
topL->addWidget(f_ontCB,4,0);
- connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotFontCheckBoxToggled(bool)));
- connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFontCheckBoxToggled(bool)));
+ connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
- f_ntChngBtn=new QPushButton(i18n("Chang&e..."), appTab);
- connect(f_ntChngBtn, SIGNAL(clicked()), SLOT(slotFontChangeBtnClicked()));
+ f_ntChngBtn=new TQPushButton(i18n("Chang&e..."), appTab);
+ connect(f_ntChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontChangeBtnClicked()));
topL->addWidget(f_ntChngBtn,5,2);
- f_ntDefBtn=new QPushButton(i18n("Defaul&ts"), appTab);
- connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotFontDefaultBtnClicked()));
+ f_ntDefBtn=new TQPushButton(i18n("Defaul&ts"), appTab);
+ connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontDefaultBtnClicked()));
topL->addWidget(f_ntDefBtn,6,2);
- connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotChanged()));
+ connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
topL->setColStretch(1,2);
topL->setColStretch(2,0);
topL->setRowStretch(3,1);
topL->setRowStretch(7,1);
- topL->setResizeMode(QLayout::Minimum);
+ topL->setResizeMode(TQLayout::Minimum);
//init
c_olorCB->setChecked(global->useCustomColors);
@@ -643,24 +643,24 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Layout ***************************
layoutTab = addPage(i18n("Layout"),i18n("Customize Output Format"), BarIcon("text_left", KIcon::SizeMedium ));
- QVBoxLayout *vbox = new QVBoxLayout(layoutTab, 0, spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(layoutTab, 0, spacingHint());
- QButtonGroup *bGroup = new QButtonGroup(i18n("Headings"),layoutTab);
- QVBoxLayout *bvbox = new QVBoxLayout(bGroup,8,5);
+ TQButtonGroup *bGroup = new TQButtonGroup(i18n("Headings"),layoutTab);
+ TQVBoxLayout *bvbox = new TQVBoxLayout(bGroup,8,5);
bvbox->addSpacing(fontMetrics().lineSpacing()-4);
- w_layout[0] = new QRadioButton(i18n("O&ne heading for each database"),bGroup);
+ w_layout[0] = new TQRadioButton(i18n("O&ne heading for each database"),bGroup);
w_layout[0]->setChecked(global->headLayout == 0);
bvbox->addWidget(w_layout[0],1);
- w_layout[1] = new QRadioButton(i18n("A&s above, with separators between the definitions"),bGroup);
+ w_layout[1] = new TQRadioButton(i18n("A&s above, with separators between the definitions"),bGroup);
w_layout[1]->setChecked(global->headLayout == 1);
bvbox->addWidget(w_layout[1],1);
- w_layout[2] = new QRadioButton(i18n("A separate heading for &each definition"),bGroup);
+ w_layout[2] = new TQRadioButton(i18n("A separate heading for &each definition"),bGroup);
w_layout[2]->setChecked(global->headLayout == 2);
bvbox->addWidget(w_layout[2],1);
- connect(w_layout[0], SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(w_layout[1], SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(w_layout[2], SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_layout[0], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(w_layout[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(w_layout[2], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
vbox->addWidget(bGroup,0);
vbox->addStretch(1);
@@ -668,53 +668,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Other ***************************
otherTab = addPage(i18n("Miscellaneous"),i18n("Various Settings"), BarIcon("misc", KIcon::SizeMedium ));
- vbox = new QVBoxLayout(otherTab, 0, spacingHint());
+ vbox = new TQVBoxLayout(otherTab, 0, spacingHint());
- QGroupBox *group = new QGroupBox(i18n("Limits"),otherTab);
+ TQGroupBox *group = new TQGroupBox(i18n("Limits"),otherTab);
- grid = new QGridLayout(group,4,2,8,5);
+ grid = new TQGridLayout(group,4,2,8,5);
grid->addRowSpacing(0, fontMetrics().lineSpacing()-4);
w_MaxDefinitions = new KIntSpinBox(100,10000,100,100,10,group);
w_MaxDefinitions->setValue(global->maxDefinitions);
- l = new QLabel(w_MaxDefinitions, i18n("De&finitions:"), group);
+ l = new TQLabel(w_MaxDefinitions, i18n("De&finitions:"), group);
grid->addWidget(l,1,0);
grid->addWidget(w_MaxDefinitions,1,1);
- connect(w_MaxDefinitions, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_MaxDefinitions, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
w_Maxbrowse = new KIntSpinBox(1,100,1,1,10,group);
w_Maxbrowse->setValue(global->maxBrowseListEntrys);
- l = new QLabel(w_Maxbrowse, i18n("Cached &results:"), group);
+ l = new TQLabel(w_Maxbrowse, i18n("Cached &results:"), group);
grid->addWidget(l,2,0);
grid->addWidget(w_Maxbrowse,2,1);
- connect(w_Maxbrowse, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_Maxbrowse, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
w_Maxhist = new KIntSpinBox(10,5000,10,10,10,group);
w_Maxhist->setValue(global->maxHistEntrys);
- l = new QLabel(w_Maxhist, i18n("Hi&story entries:"), group);
+ l = new TQLabel(w_Maxhist, i18n("Hi&story entries:"), group);
grid->addWidget(l,3,0);
grid->addWidget(w_Maxhist,3,1);
- connect(w_Maxhist, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_Maxhist, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
grid->setColStretch(1,1);
vbox->addWidget(group,0);
- group = new QGroupBox(i18n("Other"),otherTab);
+ group = new TQGroupBox(i18n("Other"),otherTab);
- QVBoxLayout *vbox2 = new QVBoxLayout(group, 8, 5);
+ TQVBoxLayout *vbox2 = new TQVBoxLayout(group, 8, 5);
vbox2->addSpacing(fontMetrics().lineSpacing()-4);
- w_Savehist = new QCheckBox(i18n("Sa&ve history on exit"),group);
+ w_Savehist = new TQCheckBox(i18n("Sa&ve history on exit"),group);
w_Savehist->setChecked(global->saveHistory);
vbox2->addWidget(w_Savehist,0);
- connect(w_Savehist, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_Savehist, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
- w_Clipboard = new QCheckBox(i18n("D&efine selected text on start"),group);
+ w_Clipboard = new TQCheckBox(i18n("D&efine selected text on start"),group);
w_Clipboard->setChecked(global->defineClipboard);
vbox2->addWidget(w_Clipboard,1);
- connect(w_Clipboard, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_Clipboard, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
vbox->addWidget(group,0);
vbox->addStretch(2);
@@ -782,7 +782,7 @@ void OptionsDialog::slotOk()
void OptionsDialog::slotDefault()
{
- QStringList encodingNames;
+ TQStringList encodingNames;
int i=0,x=0;
switch(activePageIndex()) {
@@ -793,7 +793,7 @@ void OptionsDialog::slotDefault()
w_timeout->setValue(60);
w_pipesize->setValue(256);
encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
- for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
+ for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
if (KGlobal::charsets()->encodingForName(*it)=="utf8")
x = i;
i++;
@@ -845,11 +845,11 @@ void OptionsDialog::slotColCheckBoxToggled(bool b)
// show color dialog for the entry
-void OptionsDialog::slotColItemSelected(QListBoxItem *it)
+void OptionsDialog::slotColItemSelected(TQListBoxItem *it)
{
if (it) {
ColorListItem *colorItem = static_cast<ColorListItem*>(it);
- QColor col = colorItem->color();
+ TQColor col = colorItem->color();
int result = KColorDialog::getColor(col,this);
if (result == KColorDialog::Accepted) {
@@ -896,11 +896,11 @@ void OptionsDialog::slotFontCheckBoxToggled(bool b)
// show font dialog for the entry
-void OptionsDialog::slotFontItemSelected(QListBoxItem *it)
+void OptionsDialog::slotFontItemSelected(TQListBoxItem *it)
{
if (it) {
FontListItem *fontItem = static_cast<FontListItem*>(it);
- QFont font = fontItem->font();
+ TQFont font = fontItem->font();
int result = KFontDialog::getFont(font,false,this);
if (result == KFontDialog::Accepted) {
diff --git a/kdict/options.h b/kdict/options.h
index ecef7606..c37ee30e 100644
--- a/kdict/options.h
+++ b/kdict/options.h
@@ -18,7 +18,7 @@
#ifndef _KDICT_OPTIONS_H_
#define _KDICT_OPTIONS_H_
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kdialogbase.h>
#include <kglobalsettings.h>
@@ -49,57 +49,57 @@ public:
void write();
// colors...
- const QColor& color(int i) { return c_olors[i]; }
- const QString& colorName(int i) { return c_olorNames[i]; }
+ const TQColor& color(int i) { return c_olors[i]; }
+ const TQString& colorName(int i) { return c_olorNames[i]; }
int colorCount() const { return COL_CNT; }
- QColor defaultColor(int i);
+ TQColor defaultColor(int i);
bool useCustomColors;
- QColor textColor();
- QColor backgroundColor();
- QColor headingsTextColor();
- QColor headingsBackgroundColor();
- QColor linksColor();
- QColor visitedLinksColor();
+ TQColor textColor();
+ TQColor backgroundColor();
+ TQColor headingsTextColor();
+ TQColor headingsBackgroundColor();
+ TQColor linksColor();
+ TQColor visitedLinksColor();
// fonts...
- const QFont& font(int i) { return f_onts[i]; }
- const QString& fontName(int i) { return f_ontNames[i]; }
+ const TQFont& font(int i) { return f_onts[i]; }
+ const TQString& fontName(int i) { return f_ontNames[i]; }
int fontCount() const { return FNT_CNT; }
- QFont defaultFont(int);
+ TQFont defaultFont(int);
bool useCustomFonts;
- QFont textFont();
- QFont headingsFont();
+ TQFont textFont();
+ TQFont headingsFont();
- QString encryptStr(const QString& aStr);
+ TQString encryptStr(const TQString& aStr);
bool defineClipboard; // define clipboard content on startup?
- QSize optSize,setsSize,matchSize; // window geometry
+ TQSize optSize,setsSize,matchSize; // window geometry
bool showMatchList;
- QValueList<int> splitterSizes;
+ TQValueList<int> splitterSizes;
KGlobalSettings::Completion queryComboCompletionMode;
- QStringList queryHistory;
+ TQStringList queryHistory;
bool saveHistory; // save query history to disk on exit?
unsigned int maxHistEntrys, maxBrowseListEntrys, maxDefinitions;
int headLayout;
- QString server; // network client...
+ TQString server; // network client...
int port,timeout,pipeSize,idleHold;
- QString encoding;
+ TQString encoding;
bool authEnabled;
- QString user, secret;
- QStringList serverDatabases, databases, strategies;
- QPtrList<QStringList> databaseSets;
+ TQString user, secret;
+ TQStringList serverDatabases, databases, strategies;
+ TQPtrList<TQStringList> databaseSets;
unsigned int currentDatabase, currentStrategy;
- QColor c_olors[COL_CNT];
- QString c_olorNames[COL_CNT];
- QFont f_onts[FNT_CNT];
- QString f_ontNames[FNT_CNT];
+ TQColor c_olors[COL_CNT];
+ TQString c_olorNames[COL_CNT];
+ TQFont f_onts[FNT_CNT];
+ TQString f_ontNames[FNT_CNT];
- QWidget *topLevel;
+ TQWidget *topLevel;
};
extern GlobalData *global;
@@ -114,59 +114,59 @@ class OptionsDialog : public KDialogBase
public:
- OptionsDialog(QWidget *parent=0, const char *name=0);
+ OptionsDialog(TQWidget *parent=0, const char *name=0);
~OptionsDialog();
//===================================================================================
- class DialogListBox : public QListBox {
+ class DialogListBox : public TQListBox {
public:
// alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus
- DialogListBox(bool alwaysIgnore=false, QWidget * parent=0, const char * name=0);
+ DialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0);
~DialogListBox();
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
bool a_lwaysIgnore;
};
//===================================================================================
- class ColorListItem : public QListBoxText {
+ class ColorListItem : public TQListBoxText {
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
~ColorListItem();
- const QColor& color() { return mColor; }
- void setColor( const QColor &color ) { mColor = color; }
+ const TQColor& color() { return mColor; }
+ void setColor( const TQColor &color ) { mColor = color; }
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
};
//===================================================================================
- class FontListItem : public QListBoxText {
+ class FontListItem : public TQListBoxText {
public:
- FontListItem( const QString &name, const QFont & );
+ FontListItem( const TQString &name, const TQFont & );
~FontListItem();
- const QFont& font() { return f_ont; }
- void setFont( const QFont &);
+ const TQFont& font() { return f_ont; }
+ void setFont( const TQFont &);
protected:
- virtual void paint( QPainter * );
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int width( const TQListBox * ) const;
private:
- QFont f_ont;
- QString fontInfo;
+ TQFont f_ont;
+ TQString fontInfo;
};
//===================================================================================
@@ -186,42 +186,42 @@ protected slots:
//colors
void slotColCheckBoxToggled(bool b);
- void slotColItemSelected(QListBoxItem *); // show color dialog for the entry
+ void slotColItemSelected(TQListBoxItem *); // show color dialog for the entry
void slotColDefaultBtnClicked();
void slotColChangeBtnClicked();
void slotColSelectionChanged();
//fonts
void slotFontCheckBoxToggled(bool b);
- void slotFontItemSelected(QListBoxItem *); // show font dialog for the entry
+ void slotFontItemSelected(TQListBoxItem *); // show font dialog for the entry
void slotFontDefaultBtnClicked();
void slotFontChangeBtnClicked();
void slotFontSelectionChanged();
private:
- QFrame *serverTab;
- QLabel *l_user, *l_secret;
+ TQFrame *serverTab;
+ TQLabel *l_user, *l_secret;
KLineEdit *w_server, *w_user, *w_secret, *w_port;
- QComboBox *w_encoding;
- QCheckBox *w_auth;
+ TQComboBox *w_encoding;
+ TQCheckBox *w_auth;
KIntSpinBox *w_idleHold,*w_timeout,*w_pipesize;
- QFrame *appTab;
+ TQFrame *appTab;
DialogListBox *c_List,
*f_List;
- QCheckBox *c_olorCB,
+ TQCheckBox *c_olorCB,
*f_ontCB;
- QPushButton *c_olDefBtn,
+ TQPushButton *c_olDefBtn,
*c_olChngBtn,
*f_ntDefBtn,
*f_ntChngBtn;
- QFrame *layoutTab;
- QRadioButton *w_layout[3];
+ TQFrame *layoutTab;
+ TQRadioButton *w_layout[3];
- QFrame *otherTab;
- QCheckBox *w_Clipboard, *w_Savehist;
+ TQFrame *otherTab;
+ TQCheckBox *w_Clipboard, *w_Savehist;
KIntSpinBox *w_Maxhist, *w_Maxbrowse, *w_MaxDefinitions;
bool configChanged;
};
diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp
index a2674d68..045b4e49 100644
--- a/kdict/queryview.cpp
+++ b/kdict/queryview.cpp
@@ -15,8 +15,8 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
#include <kfiledialog.h>
#include <ktempfile.h>
@@ -38,9 +38,9 @@
//******** SaveHelper *******************************************
-QString SaveHelper::lastPath;
+TQString SaveHelper::lastPath;
-SaveHelper::SaveHelper(const QString &saveName, const QString &filter, QWidget *parent)
+SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent)
: p_arent(parent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
{
}
@@ -61,7 +61,7 @@ SaveHelper::~SaveHelper()
}
-QFile* SaveHelper::getFile(const QString &dialogTitle)
+TQFile* SaveHelper::getFile(const TQString &dialogTitle)
{
url = KFileDialog::getSaveURL(lastPath+s_aveName,f_ilter,p_arent,dialogTitle);
@@ -72,14 +72,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle)
lastPath.truncate(lastPath.length()-url.fileName().length());
if (url.isLocalFile()) {
- if (QFileInfo(url.path()).exists() &&
+ if (TQFileInfo(url.path()).exists() &&
(KMessageBox::warningContinueCancel(global->topLevel,
i18n("A file named %1 already exists.\nDo you want to replace it?").arg(url.path()),
dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
return 0;
}
- file = new QFile(url.path());
+ file = new TQFile(url.path());
if(!file->open(IO_WriteOnly)) {
KMessageBox::error(global->topLevel, i18n("Unable to save file."));
delete file;
@@ -102,14 +102,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle)
//**** BrowseData ****************************************************
-BrowseData::BrowseData(const QString &Nhtml, const QString &NqueryText)
+BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText)
: html(Nhtml),queryText(NqueryText),xPos(0),yPos(0)
{}
//********* DictHTMLPart ******************************************
-DictHTMLPart::DictHTMLPart(QWidget *parentWidget, const char *widgetname)
+DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname)
: KHTMLPart(parentWidget,widgetname)
{}
@@ -130,8 +130,8 @@ void DictHTMLPart::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event)
//********* QueryView ******************************************
-QueryView::QueryView(QWidget *_parent)
-: QVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false)
+QueryView::QueryView(TQWidget *_parent)
+: TQVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false)
{
browseList.setAutoDelete(true);
@@ -140,16 +140,16 @@ QueryView::QueryView(QWidget *_parent)
part->setJScriptEnabled(false);
part->setJavaEnabled(false);
part->setURLCursor(KCursor::handCursor());
- setFocusPolicy(QWidget::NoFocus);
- connect(part, SIGNAL(completed()), SLOT(partCompleted()));
- connect(part, SIGNAL(middleButtonClicked()), SLOT(middleButtonClicked()));
+ setFocusPolicy(TQWidget::NoFocus);
+ connect(part, TQT_SIGNAL(completed()), TQT_SLOT(partCompleted()));
+ connect(part, TQT_SIGNAL(middleButtonClicked()), TQT_SLOT(middleButtonClicked()));
rightBtnMenu = new KPopupMenu(this);
- connect(part,SIGNAL(popupMenu(const QString &, const QPoint &)),this,SLOT(buildPopupMenu(const QString &, const QPoint &)));
- connect(part->browserExtension(),SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)),
- this,SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &)));
- connect(part->browserExtension(),SIGNAL(enableAction(const char *,bool)),this,SLOT(enableAction(const char *,bool)));
- QTimer::singleShot( 0, this, SLOT(optionsChanged()) );
- connect(interface,SIGNAL(resultReady(const QString &, const QString &)), SLOT(resultReady(const QString &, const QString &)));
+ connect(part,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),this,TQT_SLOT(buildPopupMenu(const TQString &, const TQPoint &)));
+ connect(part->browserExtension(),TQT_SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)),
+ this,TQT_SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &)));
+ connect(part->browserExtension(),TQT_SIGNAL(enableAction(const char *,bool)),this,TQT_SLOT(enableAction(const char *,bool)));
+ TQTimer::singleShot( 0, this, TQT_SLOT(optionsChanged()) );
+ connect(interface,TQT_SIGNAL(resultReady(const TQString &, const TQString &)), TQT_SLOT(resultReady(const TQString &, const TQString &)));
}
@@ -160,9 +160,9 @@ QueryView::~QueryView()
void QueryView::setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo)
{
actBack = NactBack;
- connect(actBack->popupMenu(),SIGNAL(activated(int)),SLOT(browseBack(int)));
+ connect(actBack->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseBack(int)));
actForward = NactForward;
- connect(actForward->popupMenu(),SIGNAL(activated(int)),SLOT(browseForward(int)));
+ connect(actForward->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseForward(int)));
actQueryCombo = NactQueryCombo;
}
@@ -183,26 +183,26 @@ void QueryView::optionsChanged()
{
saveCurrentResultPos();
- currentHTMLHeader = QString("<html><head><style type=\"text/css\">\n");
- currentHTMLHeader += QString("body { background-color:%1; color:%2; }\n").arg(global->backgroundColor().name()).arg(global->textColor().name());
- currentHTMLHeader += QString("a:link, a:active { color:%1; text-decoration:none; }\n").arg(global->linksColor().name());
- currentHTMLHeader += QString("a:visited { color:%1; text-decoration:none; }\n").arg(global->visitedLinksColor().name());
- currentHTMLHeader += QString("a:hover { color:%1; text-decoration:underline; }\n").arg(global->linksColor().name());
- currentHTMLHeader += QString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").arg(global->headingsBackgroundColor().name()).arg(global->headingsTextColor().name()).arg(global->headingsFont().family()).arg(global->headingsFont().pointSize());
+ currentHTMLHeader = TQString("<html><head><style type=\"text/css\">\n");
+ currentHTMLHeader += TQString("body { background-color:%1; color:%2; }\n").arg(global->backgroundColor().name()).arg(global->textColor().name());
+ currentHTMLHeader += TQString("a:link, a:active { color:%1; text-decoration:none; }\n").arg(global->linksColor().name());
+ currentHTMLHeader += TQString("a:visited { color:%1; text-decoration:none; }\n").arg(global->visitedLinksColor().name());
+ currentHTMLHeader += TQString("a:hover { color:%1; text-decoration:underline; }\n").arg(global->linksColor().name());
+ currentHTMLHeader += TQString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").arg(global->headingsBackgroundColor().name()).arg(global->headingsTextColor().name()).arg(global->headingsFont().family()).arg(global->headingsFont().pointSize());
if (global->headingsFont().italic())
- currentHTMLHeader += QString("font-style:italic; ");
+ currentHTMLHeader += TQString("font-style:italic; ");
if (global->headingsFont().bold())
- currentHTMLHeader += QString("font-weight:bold; ");
- currentHTMLHeader += QString("}\n");
- currentHTMLHeader += QString("p.definition { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += QString("table { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += QString("pre { font-family:%1; font-size:%2pt; ").arg(global->textFont().family()).arg(global->textFont().pointSize());
+ currentHTMLHeader += TQString("font-weight:bold; ");
+ currentHTMLHeader += TQString("}\n");
+ currentHTMLHeader += TQString("p.definition { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
+ currentHTMLHeader += TQString("table { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
+ currentHTMLHeader += TQString("pre { font-family:%1; font-size:%2pt; ").arg(global->textFont().family()).arg(global->textFont().pointSize());
if (global->textFont().italic())
- currentHTMLHeader += QString("font-style:italic; ");
+ currentHTMLHeader += TQString("font-style:italic; ");
if (global->textFont().bold())
- currentHTMLHeader += QString("font-weight:bold; ");
- currentHTMLHeader += QString("}\n");
- currentHTMLHeader += QString("</style></head>\n");
+ currentHTMLHeader += TQString("font-weight:bold; ");
+ currentHTMLHeader += TQString("}\n");
+ currentHTMLHeader += TQString("</style></head>\n");
showResult(); // apply changes directly
}
@@ -230,14 +230,14 @@ void QueryView::saveQuery()
{
if (!browseList.isEmpty()) {
BrowseData* brw = browseList.at(browsePos);
- QString fName = brw->queryText+".html";
- fName.replace(QRegExp("[\\s/]"),"_");
+ TQString fName = brw->queryText+".html";
+ fName.replace(TQRegExp("[\\s/]"),"_");
SaveHelper helper(fName,"*.html",global->topLevel);
- QFile *file = helper.getFile(QString::null);
+ TQFile *file = helper.getFile(TQString::null);
if (file) {
- QTextStream stream(file);
- stream.setEncoding(QTextStream::Locale);
+ TQTextStream stream(file);
+ stream.setEncoding(TQTextStream::Locale);
stream << currentHTMLHeader+brw->html;
}
}
@@ -288,14 +288,14 @@ void QueryView::showFindDialog()
}
-void QueryView::paletteChange ( const QPalette & )
+void QueryView::paletteChange ( const TQPalette & )
{
optionsChanged();
}
-void QueryView::fontChange ( const QFont & )
+void QueryView::fontChange ( const TQFont & )
{
optionsChanged();
}
@@ -331,7 +331,7 @@ void QueryView::showResult()
}
-void QueryView::resultReady(const QString &result, const QString &query)
+void QueryView::resultReady(const TQString &result, const TQString &query)
{
BrowseData* brw = new BrowseData(result,query);
@@ -370,8 +370,8 @@ void QueryView::partCompleted()
void QueryView::slotURLRequest (const KURL &url, const KParts::URLArgs &)
{
- QString type = url.host();
- QString urlText = url.prettyURL();
+ TQString type = url.host();
+ TQString urlText = url.prettyURL();
urlText.remove(0,8+type.length());
if (type.length()) { // valid url
@@ -394,40 +394,40 @@ void QueryView::middleButtonClicked()
// construct the right-mouse-button-popup-menu on demand
-void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
+void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
{
rightBtnMenu->clear();
if (!url.isEmpty()) { // menuitem if mouse is over link
KURL u(url);
- QString type = u.host();
+ TQString type = u.host();
popupLink = u.prettyURL();
popupLink.remove(0,8+type.length());
if (type.length()) { // valid url
if(type=="define") {
rightBtnMenu->insertItem(i18n("Define &Synonym"),
- this,SLOT(popupDefineLink()));
+ this,TQT_SLOT(popupDefineLink()));
rightBtnMenu->insertItem(i18n("M&atch Synonym"),
- this,SLOT(popupMatchLink()));
+ this,TQT_SLOT(popupMatchLink()));
rightBtnMenu->insertSeparator();
}
if(type=="dbinfo") {
- rightBtnMenu->insertItem(i18n("D&atabase Information"),this,SLOT(popupDbInfo()));
+ rightBtnMenu->insertItem(i18n("D&atabase Information"),this,TQT_SLOT(popupDbInfo()));
rightBtnMenu->insertSeparator();
}
if(type=="realhttp") {
popupLink.prepend("http://");
rightBtnMenu->insertItem(SmallIcon("fileopen"),
i18n("&Open Link"),
- this,SLOT(popupOpenLink()));
+ this,TQT_SLOT(popupOpenLink()));
rightBtnMenu->insertSeparator();
}
if(type=="realftp") {
popupLink.prepend("ftp://");
rightBtnMenu->insertItem(SmallIcon("fileopen"),
i18n("&Open Link"),
- this,SLOT(popupOpenLink()));
+ this,TQT_SLOT(popupOpenLink()));
rightBtnMenu->insertSeparator();
}
}
@@ -436,24 +436,24 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (part->hasSelection()) {
popupSelect = part->selectedText();
rightBtnMenu->insertItem(i18n("&Define Selection"),
- this,SLOT(popupDefineSelect()));
+ this,TQT_SLOT(popupDefineSelect()));
rightBtnMenu->insertItem(i18n("&Match Selection"),
- this,SLOT(popupMatchSelect()));
+ this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
} else {
kapp->clipboard()->setSelectionMode(false);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(true);
text = kapp->clipboard()->text();
}
if (!text.isEmpty()) {
- popupSelect = QApplication::clipboard()->text();
+ popupSelect = TQApplication::clipboard()->text();
rightBtnMenu->insertItem(SmallIcon("define_clip"),
i18n("&Define Clipboard Content"),
- this,SLOT(popupDefineSelect()));
+ this,TQT_SLOT(popupDefineSelect()));
rightBtnMenu->insertItem(i18n("&Match Clipboard Content"),
- this,SLOT(popupMatchSelect()));
+ this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
}
}
@@ -464,13 +464,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (browseList.at(browsePos-1)->queryText.isEmpty())
rightBtnMenu->insertItem(SmallIcon("back"),
i18n("&Back: Information"),
- this,SLOT(browseBack()));
+ this,TQT_SLOT(browseBack()));
else
rightBtnMenu->insertItem(SmallIcon("back"),
i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)),
- this,SLOT(browseBack()));
+ this,TQT_SLOT(browseBack()));
} else {
- ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, SLOT(browseBack()));
+ ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, TQT_SLOT(browseBack()));
rightBtnMenu->setItemEnabled(ID,false);
}
@@ -478,13 +478,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (browseList.at(browsePos+1)->queryText.isEmpty())
rightBtnMenu->insertItem(SmallIcon("forward"),
i18n("&Forward: Information"),
- this,SLOT(browseForward()));
+ this,TQT_SLOT(browseForward()));
else
rightBtnMenu->insertItem(SmallIcon("forward"),
i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)),
- this,SLOT(browseForward()));
+ this,TQT_SLOT(browseForward()));
} else {
- ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,SLOT(browseForward()));
+ ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,TQT_SLOT(browseForward()));
rightBtnMenu->setItemEnabled(ID,false);
}
@@ -544,7 +544,7 @@ void QueryView::browseBack(int index)
browsePos = x;
actQueryCombo->setEditText(browseList.at(browsePos)->queryText);
showResult();
- QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot
+ TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot
}
}
@@ -557,7 +557,7 @@ void QueryView::browseForward(int index)
browsePos = x;
actQueryCombo->setEditText(browseList.at(browsePos)->queryText);
showResult();
- QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot
+ TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot
}
}
@@ -574,7 +574,7 @@ void QueryView::updateBrowseActions()
actBack->popupMenu()->clear();
int i = browsePos-1;
int num = 1;
- QString s;
+ TQString s;
while ((i>=0)&&(num<=10)) {
s = browseList.at(i)->queryText;
if (s.isEmpty()) s = i18n("Information");
@@ -598,7 +598,7 @@ void QueryView::updateBrowseActions()
actForward->popupMenu()->clear();
int i = browsePos+1;
int num = 1;
- QString s;
+ TQString s;
while ((i<(int)(browseList.count()))&&(num<=10)) {
s = browseList.at(i)->queryText;
if (s.isEmpty()) s = i18n("Information");
diff --git a/kdict/queryview.h b/kdict/queryview.h
index e942d297..e87bd977 100644
--- a/kdict/queryview.h
+++ b/kdict/queryview.h
@@ -19,7 +19,7 @@
#ifndef _QUERYVIEW_H_
#define _QUERYVIEW_H_
-#include <qvbox.h>
+#include <tqvbox.h>
#include <khtml_part.h>
class QFile;
@@ -28,7 +28,7 @@ class KPopupMenu;
class DictComboAction;
-QString getShortString(QString str,unsigned int length);
+TQString getShortString(TQString str,unsigned int length);
//******** SaveHelper *******************************************
@@ -38,20 +38,20 @@ class SaveHelper {
public:
- SaveHelper(const QString &saveName, const QString &filter, QWidget *parent);
+ SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent);
~SaveHelper();
// returns a file open for writing
- QFile* getFile(const QString &dialogTitle);
+ TQFile* getFile(const TQString &dialogTitle);
private:
- QWidget *p_arent;
- QString s_aveName, f_ilter;
+ TQWidget *p_arent;
+ TQString s_aveName, f_ilter;
KURL url;
- QFile* file;
+ TQFile* file;
KTempFile* tmpFile;
- static QString lastPath;
+ static TQString lastPath;
};
@@ -64,10 +64,10 @@ class BrowseData
public:
- BrowseData(const QString &Nhtml, const QString &NqueryText);
+ BrowseData(const TQString &Nhtml, const TQString &NqueryText);
- QString html;
- QString queryText;
+ TQString html;
+ TQString queryText;
int xPos,yPos;
};
@@ -80,7 +80,7 @@ class DictHTMLPart : public KHTMLPart
public:
- DictHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0);
+ DictHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0);
~DictHTMLPart();
signals:
@@ -101,7 +101,7 @@ class QueryView : public QVBox
public:
- QueryView(QWidget *_parent = 0L);
+ QueryView(TQWidget *_parent = 0L);
~QueryView();
void setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo);
@@ -123,30 +123,30 @@ public slots:
signals:
- void defineRequested(const QString &query);
- void matchRequested(const QString &query);
+ void defineRequested(const TQString &query);
+ void matchRequested(const TQString &query);
void clipboardRequested();
void enableCopy(bool selected); // emited when the user selects/deselects text
void enablePrintSave();
void renderingStarted();
void renderingStopped();
- void newCaption(const QString&);
+ void newCaption(const TQString&);
protected:
- void paletteChange ( const QPalette & );
- void fontChange ( const QFont & );
+ void paletteChange ( const TQPalette & );
+ void fontChange ( const TQFont & );
void saveCurrentResultPos();
void showResult();
protected slots:
- void resultReady(const QString &result, const QString &query);
+ void resultReady(const TQString &result, const TQString &query);
void partCompleted();
void slotURLRequest (const KURL &url, const KParts::URLArgs &args);
void middleButtonClicked();
- void buildPopupMenu(const QString &url, const QPoint &point);
+ void buildPopupMenu(const TQString &url, const TQPoint &point);
void popupDefineLink();
void popupMatchLink();
void popupOpenLink();
@@ -166,11 +166,11 @@ private:
DictComboAction *actQueryCombo;
KPopupMenu *rightBtnMenu;
- QString popupLink,popupSelect; // needed for rightbtn-popup menu
+ TQString popupLink,popupSelect; // needed for rightbtn-popup menu
- QPtrList<BrowseData> browseList;
+ TQPtrList<BrowseData> browseList;
unsigned int browsePos; // position in browseList
- QString currentHTMLHeader;
+ TQString currentHTMLHeader;
bool isRendering;
};
diff --git a/kdict/sets.cpp b/kdict/sets.cpp
index 0a252cec..513106da 100644
--- a/kdict/sets.cpp
+++ b/kdict/sets.cpp
@@ -13,10 +13,10 @@
------------------------------------------------------------- */
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <kiconloader.h>
#include <kseparator.h>
@@ -29,44 +29,44 @@
//********* DbSetsDialog ******************************************
-DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
+DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
: KDialogBase(Plain, i18n("Database Sets"),Close | Help, Close, parent, name, false, true)
{
- QFrame* page=plainPage();
+ TQFrame* page=plainPage();
- QStringList sets;
+ TQStringList sets;
for(unsigned int i=1;i<global->databaseSets.count()+1;i++)
sets.append(global->databases[i]);
- QVBoxLayout * topLayout = new QVBoxLayout(page, 0, 0);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(page, 0, 0);
- QHBoxLayout * subLayout1 = new QHBoxLayout(5);
+ TQHBoxLayout * subLayout1 = new TQHBoxLayout(5);
topLayout->addLayout(subLayout1,0);
- w_set = new QComboBox(true,page);
+ w_set = new TQComboBox(true,page);
w_set->setFixedHeight(w_set->sizeHint().height());
- w_set->setInsertionPolicy (QComboBox::NoInsertion);
+ w_set->setInsertionPolicy (TQComboBox::NoInsertion);
w_set->insertStringList(sets);
- connect(w_set, SIGNAL(activated(int)),this, SLOT(activateSet(int)));
- QLabel *l = new QLabel(w_set, i18n("&Set:"),page);
+ connect(w_set, TQT_SIGNAL(activated(int)),this, TQT_SLOT(activateSet(int)));
+ TQLabel *l = new TQLabel(w_set, i18n("&Set:"),page);
l->setMinimumSize(l->sizeHint());
subLayout1->addWidget(l,0);
subLayout1->addWidget(w_set,1);
subLayout1->addSpacing(8);
- w_save = new QPushButton(i18n("S&ave"),page);
- connect(w_save,SIGNAL(clicked()),this, SLOT(transferSet()));
+ w_save = new TQPushButton(i18n("S&ave"),page);
+ connect(w_save,TQT_SIGNAL(clicked()),this, TQT_SLOT(transferSet()));
subLayout1->addWidget(w_save,0);
- QPushButton *btn = new QPushButton(i18n("&New"),page);
+ TQPushButton *btn = new TQPushButton(i18n("&New"),page);
btn->setMinimumSize(btn->sizeHint());
- connect(btn, SIGNAL(clicked()),this, SLOT(newPressed()));
+ connect(btn, TQT_SIGNAL(clicked()),this, TQT_SLOT(newPressed()));
subLayout1->addWidget(btn,0);
- w_delete = new QPushButton(i18n("&Delete"),page);
+ w_delete = new TQPushButton(i18n("&Delete"),page);
w_delete->setMinimumSize(w_delete->sizeHint());
- connect(w_delete, SIGNAL(clicked()),this, SLOT(deletePressed()));
+ connect(w_delete, TQT_SIGNAL(clicked()),this, TQT_SLOT(deletePressed()));
subLayout1->addWidget(w_delete,0);
topLayout->addSpacing(8);
@@ -76,41 +76,41 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
topLayout->addSpacing(8);
- QGridLayout * subLayout2 = new QGridLayout(7,3,6);
+ TQGridLayout * subLayout2 = new TQGridLayout(7,3,6);
topLayout->addLayout(subLayout2,1);
- w_leftBox = new QListBox(page);
- connect(w_leftBox, SIGNAL(selected(int)),this, SLOT(leftSelected(int)));
- connect(w_leftBox, SIGNAL(highlighted(int)),this, SLOT(leftHighlighted(int)));
- QLabel *leftLabel = new QLabel(w_leftBox, i18n("S&elected databases:"),page);
+ w_leftBox = new TQListBox(page);
+ connect(w_leftBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(leftSelected(int)));
+ connect(w_leftBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(leftHighlighted(int)));
+ TQLabel *leftLabel = new TQLabel(w_leftBox, i18n("S&elected databases:"),page);
leftLabel->setMinimumSize(leftLabel->sizeHint());
subLayout2->addWidget(leftLabel,0,0);
subLayout2->addMultiCellWidget(w_leftBox,1,6,0,0);
- w_allLeft = new QPushButton(page);
+ w_allLeft = new TQPushButton(page);
w_allLeft->setIconSet(BarIconSet("2leftarrow"));
- connect(w_allLeft, SIGNAL(clicked()),this, SLOT(allLeftPressed()));
+ connect(w_allLeft, TQT_SIGNAL(clicked()),this, TQT_SLOT(allLeftPressed()));
subLayout2->addWidget(w_allLeft,2,1);
- w_left = new QPushButton(page);
+ w_left = new TQPushButton(page);
w_left->setIconSet(BarIconSet("1leftarrow"));
- connect(w_left, SIGNAL(clicked()),this, SLOT(leftPressed()));
+ connect(w_left, TQT_SIGNAL(clicked()),this, TQT_SLOT(leftPressed()));
subLayout2->addWidget(w_left,3,1);
- w_right = new QPushButton(page);
+ w_right = new TQPushButton(page);
w_right->setIconSet(BarIconSet("1rightarrow"));
- connect(w_right, SIGNAL(clicked()),this, SLOT(rightPressed()));
+ connect(w_right, TQT_SIGNAL(clicked()),this, TQT_SLOT(rightPressed()));
subLayout2->addWidget(w_right,4,1);
- w_allRight = new QPushButton(page);
+ w_allRight = new TQPushButton(page);
w_allRight->setIconSet(BarIconSet("2rightarrow"));
- connect(w_allRight, SIGNAL(clicked()),this, SLOT(allRightPressed()));
+ connect(w_allRight, TQT_SIGNAL(clicked()),this, TQT_SLOT(allRightPressed()));
subLayout2->addWidget(w_allRight,5,1);
- w_rightBox = new QListBox(page);
- connect(w_rightBox, SIGNAL(selected(int)),this, SLOT(rightSelected(int)));
- connect(w_rightBox, SIGNAL(highlighted(int)),this, SLOT(rightHighlighted(int)));
- QLabel *rightLabel = new QLabel(w_rightBox, i18n("A&vailable databases:"),page);
+ w_rightBox = new TQListBox(page);
+ connect(w_rightBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(rightSelected(int)));
+ connect(w_rightBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(rightHighlighted(int)));
+ TQLabel *rightLabel = new TQLabel(w_rightBox, i18n("A&vailable databases:"),page);
rightLabel->setMinimumSize(rightLabel->sizeHint());
subLayout2->addWidget(rightLabel,0,2);
subLayout2->addMultiCellWidget(w_rightBox,1,6,2,2);
@@ -135,7 +135,7 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
}
-void DbSetsDialog::hideEvent(QHideEvent *)
+void DbSetsDialog::hideEvent(TQHideEvent *)
{
global->setsSize = size();
emit(dialogClosed());
@@ -144,14 +144,14 @@ void DbSetsDialog::hideEvent(QHideEvent *)
void DbSetsDialog::newPressed()
{
- QStringList *temp = new QStringList;
+ TQStringList *temp = new QStringList;
temp->append(i18n("New Set"));
global->databaseSets.append(temp);
global->databases.insert(global->databases.at(global->databaseSets.count()),i18n("New Set"));
if (global->currentDatabase >= global->databaseSets.count())
global->currentDatabase++;
- QStringList sets; // reread sets, because w_sets internal list is not correct in all cases
+ TQStringList sets; // reread sets, because w_sets internal list is not correct in all cases
for(unsigned int i=1;i<global->databaseSets.count()+1;i++)
sets.append(global->databases[i]);
w_set->clear();
diff --git a/kdict/sets.h b/kdict/sets.h
index 3e874a6e..64c75de6 100644
--- a/kdict/sets.h
+++ b/kdict/sets.h
@@ -30,7 +30,7 @@ class DbSetsDialog : public KDialogBase
public:
- DbSetsDialog(QWidget *parent=0, const char *name=0);
+ DbSetsDialog(TQWidget *parent=0, const char *name=0);
signals:
@@ -38,7 +38,7 @@ signals:
void dialogClosed();
protected:
- void hideEvent(QHideEvent *);
+ void hideEvent(TQHideEvent *);
private slots:
@@ -60,9 +60,9 @@ private:
void checkButtons();
- QComboBox *w_set;
- QListBox *w_leftBox, *w_rightBox;
- QPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight;
+ TQComboBox *w_set;
+ TQListBox *w_leftBox, *w_rightBox;
+ TQPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight;
};
#endif
diff --git a/kdict/toplevel.cpp b/kdict/toplevel.cpp
index ee334cbd..f0842512 100644
--- a/kdict/toplevel.cpp
+++ b/kdict/toplevel.cpp
@@ -14,7 +14,7 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include <kstdaccel.h>
#include <kstdaction.h>
@@ -35,8 +35,8 @@
#include "toplevel.h"
-// cut a QString and add "..."
-QString getShortString(QString str,unsigned int length)
+// cut a TQString and add "..."
+TQString getShortString(TQString str,unsigned int length)
{
if (str.length()>length) {
str.truncate(length-3);
@@ -50,7 +50,7 @@ DictInterface *interface;
GlobalData *global;
-TopLevel::TopLevel(QWidget* parent, const char* name)
+TopLevel::TopLevel(TQWidget* parent, const char* name)
: DCOPObject("KDictIface"), KMainWindow(parent, name, WType_TopLevel),
optDlg(0L), setsDlg(0L), stopRef(0)
{
@@ -61,26 +61,26 @@ TopLevel::TopLevel(QWidget* parent, const char* name)
global->topLevel = this;
global->read();
interface = new DictInterface();
- connect(interface,SIGNAL(infoReady()),SLOT(stratDbChanged()));
- connect(interface,SIGNAL(started(const QString&)),SLOT(clientStarted(const QString&)));
- connect(interface,SIGNAL(stopped(const QString&)),SLOT(clientStopped(const QString&)));
+ connect(interface,TQT_SIGNAL(infoReady()),TQT_SLOT(stratDbChanged()));
+ connect(interface,TQT_SIGNAL(started(const TQString&)),TQT_SLOT(clientStarted(const TQString&)));
+ connect(interface,TQT_SIGNAL(stopped(const TQString&)),TQT_SLOT(clientStopped(const TQString&)));
queryView = new QueryView(this);
- connect(queryView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&)));
- connect(queryView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&)));
- connect(queryView,SIGNAL(clipboardRequested()),SLOT(defineClipboard()));
- connect(queryView,SIGNAL(enableCopy(bool)),SLOT(enableCopy(bool)));
- connect(queryView,SIGNAL(enablePrintSave()),SLOT(enablePrintSave()));
- connect(queryView,SIGNAL(renderingStarted()),SLOT(renderingStarted()));
- connect(queryView,SIGNAL(renderingStopped()),SLOT(renderingStopped()));
- connect(queryView,SIGNAL(newCaption(const QString&)),SLOT(newCaption(const QString&)));
+ connect(queryView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&)));
+ connect(queryView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&)));
+ connect(queryView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(defineClipboard()));
+ connect(queryView,TQT_SIGNAL(enableCopy(bool)),TQT_SLOT(enableCopy(bool)));
+ connect(queryView,TQT_SIGNAL(enablePrintSave()),TQT_SLOT(enablePrintSave()));
+ connect(queryView,TQT_SIGNAL(renderingStarted()),TQT_SLOT(renderingStarted()));
+ connect(queryView,TQT_SIGNAL(renderingStopped()),TQT_SLOT(renderingStopped()));
+ connect(queryView,TQT_SIGNAL(newCaption(const TQString&)),TQT_SLOT(newCaption(const TQString&)));
matchView = new MatchView();
- connect(matchView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&)));
- connect(matchView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&)));
- connect(matchView,SIGNAL(clipboardRequested()),SLOT(matchClipboard()));
- connect(matchView,SIGNAL(windowClosed()),SLOT(toggleMatchListShow()));
- connect(&resetStatusbarTimer,SIGNAL(timeout()),SLOT(resetStatusbar()));
+ connect(matchView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&)));
+ connect(matchView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&)));
+ connect(matchView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(matchClipboard()));
+ connect(matchView,TQT_SIGNAL(windowClosed()),TQT_SLOT(toggleMatchListShow()));
+ connect(&resetStatusbarTimer,TQT_SIGNAL(timeout()),TQT_SLOT(resetStatusbar()));
setupStatusBar();
setupActions();
@@ -89,12 +89,12 @@ TopLevel::TopLevel(QWidget* parent, const char* name)
if (global->showMatchList)
{ // show splitter, html view & match list
- splitter = new QSplitter(QSplitter::Horizontal,this);
+ splitter = new TQSplitter(TQSplitter::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
queryView->reparent(splitter,0,queryView->pos(),true);
matchView->reparent(splitter,0,matchView->pos(),true);
setCentralWidget(splitter);
- splitter->setResizeMode(matchView,QSplitter::KeepSize);
+ splitter->setResizeMode(matchView,TQSplitter::KeepSize);
adjustMatchViewSize();
}
else
@@ -139,7 +139,7 @@ void TopLevel::makeActiveWindow()
}
-void TopLevel::definePhrase(QString phrase)
+void TopLevel::definePhrase(TQString phrase)
{
kdDebug(5004) << "*DCOP call* TopLevel::definePhrase()" << endl;
define(phrase);
@@ -147,7 +147,7 @@ void TopLevel::definePhrase(QString phrase)
}
-void TopLevel::matchPhrase(QString phrase)
+void TopLevel::matchPhrase(TQString phrase)
{
kdDebug(5004) << "*DCOP call* TopLevel::matchPhrase()" << endl;
match(phrase);
@@ -171,35 +171,35 @@ void TopLevel::matchClipboardContent()
}
-QStringList TopLevel::getDatabases()
+TQStringList TopLevel::getDatabases()
{
kdDebug(5004) << "*DCOP call* TopLevel::getDatabases()" << endl;
return global->databases;
}
-QString TopLevel::currentDatabase()
+TQString TopLevel::currentDatabase()
{
kdDebug(5004) << "*DCOP call* TopLevel::currentDatabase()" << endl;
return global->databases[global->currentDatabase];
}
-QStringList TopLevel::getStrategies()
+TQStringList TopLevel::getStrategies()
{
kdDebug(5004) << "*DCOP call* TopLevel::getStrategies()" << endl;
return global->strategies;
}
-QString TopLevel::currentStrategy()
+TQString TopLevel::currentStrategy()
{
kdDebug(5004) << "*DCOP call* TopLevel::currentStrategy()" << endl;
return global->strategies[global->currentStrategy];
}
-bool TopLevel::setDatabase(QString db)
+bool TopLevel::setDatabase(TQString db)
{
kdDebug(5004) << "*DCOP call* TopLevel::setDatabase()" << endl;
@@ -214,7 +214,7 @@ bool TopLevel::setDatabase(QString db)
}
-bool TopLevel::setStrategy(QString strategy)
+bool TopLevel::setStrategy(TQString strategy)
{
kdDebug(5004) << "*DCOP call* TopLevel::setStrategy()" << endl;
@@ -249,7 +249,7 @@ bool TopLevel::historyGoForward()
// *******************************************************************************
-void TopLevel::define(const QString &query)
+void TopLevel::define(const TQString &query)
{
kdDebug(5004) << "TopLevel::define()" << endl;
actQueryCombo->setEditText(query);
@@ -261,7 +261,7 @@ void TopLevel::defineClipboard()
{
kdDebug(5004) << "TopLevel::defineClipboard()" << endl;
kapp->clipboard()->setSelectionMode(true);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(false);
text = kapp->clipboard()->text();
@@ -270,7 +270,7 @@ void TopLevel::defineClipboard()
}
-void TopLevel::match(const QString &query)
+void TopLevel::match(const TQString &query)
{
kdDebug(5004) << "TopLevel::match()" << endl;
actQueryCombo->setEditText(query);
@@ -282,7 +282,7 @@ void TopLevel::matchClipboard()
{
kdDebug(5004) << "TopLevel::matchClipboard()" << endl;
kapp->clipboard()->setSelectionMode(true);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(false);
text = kapp->clipboard()->text();
@@ -308,80 +308,80 @@ bool TopLevel::queryClose()
void TopLevel::setupActions()
{
// file menu...
- actSave = KStdAction::save(queryView, SLOT(saveQuery()), actionCollection());
+ actSave = KStdAction::save(queryView, TQT_SLOT(saveQuery()), actionCollection());
actSave->setText(i18n("&Save As..."));
actSave->setEnabled(false);
- actPrint = KStdAction::print(queryView, SLOT(printQuery()), actionCollection());
+ actPrint = KStdAction::print(queryView, TQT_SLOT(printQuery()), actionCollection());
actPrint->setEnabled(false);
actStartQuery = new KAction(i18n("St&art Query"),"reload", 0 , this,
- SLOT(doDefine()), actionCollection(), "start_query");
+ TQT_SLOT(doDefine()), actionCollection(), "start_query");
actStopQuery = new KAction(i18n("St&op Query"),"stop", 0 , this,
- SLOT(stopClients()), actionCollection(), "stop_query");
+ TQT_SLOT(stopClients()), actionCollection(), "stop_query");
actStopQuery->setEnabled(false);
- KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
// edit menu...
- actCopy = KStdAction::copy(queryView, SLOT(copySelection()), actionCollection());
+ actCopy = KStdAction::copy(queryView, TQT_SLOT(copySelection()), actionCollection());
actCopy->setEnabled(false);
- KStdAction::selectAll(queryView, SLOT(selectAll()), actionCollection());
+ KStdAction::selectAll(queryView, TQT_SLOT(selectAll()), actionCollection());
new KAction(i18n("&Define Clipboard Content"), "define_clip", 0 , this,
- SLOT(defineClipboard()), actionCollection(), "define_clipboard");
+ TQT_SLOT(defineClipboard()), actionCollection(), "define_clipboard");
new KAction(i18n("&Match Clipboard Content"), 0 , this,
- SLOT(matchClipboard()), actionCollection(), "match_clipboard");
- KStdAction::find(queryView, SLOT(showFindDialog()), actionCollection());
+ TQT_SLOT(matchClipboard()), actionCollection(), "match_clipboard");
+ KStdAction::find(queryView, TQT_SLOT(showFindDialog()), actionCollection());
// history menu...
actBack = new KToolBarPopupAction(i18n("&Back"), "back", KStdAccel::shortcut(KStdAccel::Back),
- queryView, SLOT(browseBack()), actionCollection(),"browse_back");
+ queryView, TQT_SLOT(browseBack()), actionCollection(),"browse_back");
actBack->setDelayed(true);
actBack->setStickyMenu(false);
actBack->setEnabled(false);
actForward = new KToolBarPopupAction(i18n("&Forward"), "forward", KStdAccel::shortcut(KStdAccel::Forward),
- queryView, SLOT(browseForward()), actionCollection(),"browse_forward");
+ queryView, TQT_SLOT(browseForward()), actionCollection(),"browse_forward");
actForward->setDelayed(true);
actForward->setStickyMenu(false);
actForward->setEnabled(false);
new KAction(i18n("&Clear History"), 0 , this,
- SLOT(clearQueryHistory()), actionCollection(), "clear_history");
+ TQT_SLOT(clearQueryHistory()), actionCollection(), "clear_history");
// server menu...
new KAction(i18n("&Get Capabilities"), 0 , interface,
- SLOT(updateServer()), actionCollection(), "get_capabilities");
+ TQT_SLOT(updateServer()), actionCollection(), "get_capabilities");
new KAction(i18n("Edit &Database Sets..."), "edit", 0 , this,
- SLOT(showSetsDialog()), actionCollection(), "edit_sets");
+ TQT_SLOT(showSetsDialog()), actionCollection(), "edit_sets");
new KAction(i18n("&Summary"), 0 , interface,
- SLOT(showDatabases()), actionCollection(), "db_summary");
+ TQT_SLOT(showDatabases()), actionCollection(), "db_summary");
new KAction(i18n("S&trategy Information"), 0 , interface,
- SLOT(showStrategies()), actionCollection(), "strategy_info");
+ TQT_SLOT(showStrategies()), actionCollection(), "strategy_info");
new KAction(i18n("&Server Information"), 0 , interface,
- SLOT(showInfo()), actionCollection(), "server_info");
+ TQT_SLOT(showInfo()), actionCollection(), "server_info");
// settings menu...
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
actShowMatchList = new KToggleAction(i18n("Show &Match List"), 0 , this,
- SLOT(toggleMatchListShow()), actionCollection(), "show_match");
+ TQT_SLOT(toggleMatchListShow()), actionCollection(), "show_match");
actShowMatchList->setCheckedState(i18n("Hide &Match List"));
actShowMatchList->setChecked(global->showMatchList);
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection());
- KStdAction::preferences(this, SLOT(showOptionsDialog()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(showOptionsDialog()), actionCollection());
// toolbar...
new KAction(i18n("Clear Input Field"), "query_erase", 0 , this,
- SLOT(clearInput()), actionCollection(), "clear_query");
+ TQT_SLOT(clearInput()), actionCollection(), "clear_query");
actQueryLabel = new DictLabelAction(i18n("&Look for:"), actionCollection(), "look_label");
actQueryCombo = new DictComboAction(i18n("Query"), actionCollection(), "query_combo",true,true);
- connect(actQueryCombo,SIGNAL(activated(const QString &)), SLOT(define(const QString&)));
+ connect(actQueryCombo,TQT_SIGNAL(activated(const TQString &)), TQT_SLOT(define(const TQString&)));
actQueryCombo->setCompletionMode(global->queryComboCompletionMode);
actDbLabel = new DictLabelAction(i18n("&in"), actionCollection(), "in_label");
actDbCombo = new DictComboAction(i18n("Databases"), actionCollection(), "db_combo",false,false);
- connect(actDbCombo,SIGNAL(activated(int)),SLOT(databaseSelected(int)));
- actDefineBtn = new DictButtonAction(i18n("&Define"), this, SLOT(doDefine()), actionCollection(), "define_btn");
- actMatchBtn = new DictButtonAction(i18n("&Match"), this, SLOT(doMatch()), actionCollection(), "match_btn");
+ connect(actDbCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(databaseSelected(int)));
+ actDefineBtn = new DictButtonAction(i18n("&Define"), this, TQT_SLOT(doDefine()), actionCollection(), "define_btn");
+ actMatchBtn = new DictButtonAction(i18n("&Match"), this, TQT_SLOT(doMatch()), actionCollection(), "match_btn");
queryView->setActions(actBack,actForward,actQueryCombo);
}
@@ -392,13 +392,13 @@ void TopLevel::setupStatusBar()
statusBar()->insertItem(i18n(" Ready "),0,2);
statusBar()->setItemAlignment(0,AlignLeft | AlignVCenter);
- QString serverInfo;
+ TQString serverInfo;
if (global->authEnabled)
- serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50))
+ serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
.arg(getShortString(global->server,50))
.arg(global->port);
else
- serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50))
+ serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
.arg(global->port);
statusBar()->insertItem(serverInfo, 1,3);
statusBar()->setItemAlignment(1,AlignLeft | AlignVCenter);
@@ -429,7 +429,7 @@ void TopLevel::recreateGUI()
// add text in the query-combobox to the history
void TopLevel::addCurrentInputToHistory()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
// maintain queryHistory
global->queryHistory.remove(text); // no double entrys
@@ -455,7 +455,7 @@ void TopLevel::clearInput()
// define text in the combobox
void TopLevel::doDefine()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
if (!text.isEmpty())
{
@@ -468,7 +468,7 @@ void TopLevel::doDefine()
void TopLevel::doMatch()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
if (!text.isEmpty())
{
@@ -503,8 +503,8 @@ void TopLevel::buildHistMenu()
unsigned int i = 0;
while ((i<10)&&(i<global->queryHistory.count())) {
- historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, SLOT(queryHistMenu()),
- (QObject*)0, global->queryHistory[i].utf8().data()) );
+ historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, TQT_SLOT(queryHistMenu()),
+ (TQObject*)0, global->queryHistory[i].utf8().data()) );
i++;
}
@@ -515,9 +515,9 @@ void TopLevel::buildHistMenu()
// process a query via the history menu
void TopLevel::queryHistMenu()
{
- QCString name = sender()->name();
+ TQCString name = sender()->name();
if (!name.isEmpty())
- define(QString::fromUtf8(name));
+ define(TQString::fromUtf8(name));
}
@@ -542,8 +542,8 @@ void TopLevel::stratDbChanged()
dbActionList.clear();
for (unsigned int i=0;i<global->serverDatabases.count();i++)
- dbActionList.append( new KAction(global->serverDatabases[i], 0, this, SLOT(dbInfoMenuClicked()),
- (QObject*)0, global->serverDatabases[i].utf8().data()) );
+ dbActionList.append( new KAction(global->serverDatabases[i], 0, this, TQT_SLOT(dbInfoMenuClicked()),
+ (TQObject*)0, global->serverDatabases[i].utf8().data()) );
plugActionList("db_detail", dbActionList);
}
@@ -551,7 +551,7 @@ void TopLevel::stratDbChanged()
void TopLevel::dbInfoMenuClicked()
{
- QCString name = sender()->name();
+ TQCString name = sender()->name();
if (!name.isEmpty())
interface->showDbInfo(name);
}
@@ -576,7 +576,7 @@ void TopLevel::enablePrintSave()
}
-void TopLevel::clientStarted(const QString &message)
+void TopLevel::clientStarted(const TQString &message)
{
statusBar()->changeItem(message,0);
resetStatusbarTimer.stop();
@@ -586,7 +586,7 @@ void TopLevel::clientStarted(const QString &message)
}
-void TopLevel::clientStopped(const QString &message)
+void TopLevel::clientStopped(const TQString &message)
{
statusBar()->changeItem(message,0);
resetStatusbarTimer.start(4000);
@@ -621,7 +621,7 @@ void TopLevel::renderingStopped()
}
-void TopLevel::newCaption(const QString &s)
+void TopLevel::newCaption(const TQString &s)
{
setCaption(s);
}
@@ -641,13 +641,13 @@ void TopLevel::toggleMatchListShow()
else // list is not visible -> show it
{
global->showMatchList = true;
- splitter = new QSplitter(QSplitter::Horizontal,this);
+ splitter = new TQSplitter(TQSplitter::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
setCentralWidget(splitter);
splitter->show();
queryView->reparent(splitter,0,queryView->pos(),true);
matchView->reparent(splitter,0,matchView->pos(),true);
- splitter->setResizeMode(matchView,QSplitter::KeepSize);
+ splitter->setResizeMode(matchView,TQSplitter::KeepSize);
adjustMatchViewSize();
}
@@ -677,7 +677,7 @@ void TopLevel::slotConfToolbar()
{
saveMainWindowSettings(KGlobal::config(),"toplevel_options");
KEditToolbar dlg(actionCollection(), "kdictui.rc");
- connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -695,8 +695,8 @@ void TopLevel::showSetsDialog()
{
if (!setsDlg) {
setsDlg = new DbSetsDialog(this);
- connect(setsDlg,SIGNAL(setsChanged()),this,SLOT(setsChanged()));
- connect(setsDlg,SIGNAL(dialogClosed()),this,SLOT(hideSetsDialog()));
+ connect(setsDlg,TQT_SIGNAL(setsChanged()),this,TQT_SLOT(setsChanged()));
+ connect(setsDlg,TQT_SIGNAL(dialogClosed()),this,TQT_SLOT(hideSetsDialog()));
setsDlg->show();
} else {
KWin::activateWindow(setsDlg->winId());
@@ -724,8 +724,8 @@ void TopLevel::showOptionsDialog()
{
if (!optDlg) {
optDlg = new OptionsDialog(this);
- connect(optDlg,SIGNAL(optionsChanged()),this,SLOT(optionsChanged()));
- connect(optDlg,SIGNAL(finished()),this,SLOT(hideOptionsDialog()));
+ connect(optDlg,TQT_SIGNAL(optionsChanged()),this,TQT_SLOT(optionsChanged()));
+ connect(optDlg,TQT_SIGNAL(finished()),this,TQT_SLOT(hideOptionsDialog()));
optDlg->show();
} else {
KWin::activateWindow(optDlg->winId());
@@ -744,13 +744,13 @@ void TopLevel::hideOptionsDialog()
void TopLevel::optionsChanged()
{
- QString serverInfo;
+ TQString serverInfo;
if (global->authEnabled)
- serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50))
+ serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
.arg(getShortString(global->server,50))
.arg(global->port);
else
- serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50))
+ serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
.arg(global->port);
statusBar()->changeItem(serverInfo,1);
interface->serverChanged(); // inform client
diff --git a/kdict/toplevel.h b/kdict/toplevel.h
index cd8fa25d..bc803f75 100644
--- a/kdict/toplevel.h
+++ b/kdict/toplevel.h
@@ -17,7 +17,7 @@
#ifndef _TOPLEVEL_H_
#define _TOPLEVEL_H_
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kmainwindow.h>
#include "dcopinterface.h"
@@ -43,7 +43,7 @@ class TopLevel : public KMainWindow, virtual public KDictIface
public:
- TopLevel(QWidget* parent = 0, const char* name = 0);
+ TopLevel(TQWidget* parent = 0, const char* name = 0);
~TopLevel();
void normalStartup(); // called when started without commandline parameters
@@ -51,25 +51,25 @@ public:
// DCOP-Interface...
void quit();
void makeActiveWindow();
- void definePhrase(QString phrase);
- void matchPhrase(QString phrase);
+ void definePhrase(TQString phrase);
+ void matchPhrase(TQString phrase);
void defineClipboardContent();
void matchClipboardContent();
- QStringList getDatabases();
- QString currentDatabase();
- QStringList getStrategies();
- QString currentStrategy();
- bool setDatabase(QString db);
- bool setStrategy(QString strategy);
+ TQStringList getDatabases();
+ TQString currentDatabase();
+ TQStringList getStrategies();
+ TQString currentStrategy();
+ bool setDatabase(TQString db);
+ bool setStrategy(TQString strategy);
bool historyGoBack();
bool historyGoForward();
public slots:
- void define(const QString &query);
+ void define(const TQString &query);
void defineClipboard();
- void match(const QString &query);
+ void match(const TQString &query);
void matchClipboard();
protected:
@@ -103,13 +103,13 @@ private slots:
void enableCopy(bool selected);
void enablePrintSave();
- void clientStarted(const QString &message);
- void clientStopped(const QString &message);
+ void clientStarted(const TQString &message);
+ void clientStopped(const TQString &message);
void resetStatusbar();
void renderingStarted();
void renderingStopped();
- void newCaption(const QString&);
+ void newCaption(const TQString&);
void toggleMatchListShow();
void saveMatchViewSize();
@@ -133,16 +133,16 @@ private:
DictLabelAction *actQueryLabel, *actDbLabel;
DictComboAction *actQueryCombo, *actDbCombo;
DictButtonAction *actDefineBtn, *actMatchBtn;
- QPtrList<KAction> historyActionList, dbActionList;
+ TQPtrList<KAction> historyActionList, dbActionList;
KToolBarPopupAction *actBack, *actForward;
- QSplitter *splitter; // widgets....
+ TQSplitter *splitter; // widgets....
QueryView *queryView;
MatchView *matchView;
OptionsDialog *optDlg;
DbSetsDialog *setsDlg;
- QTimer resetStatusbarTimer;
+ TQTimer resetStatusbarTimer;
int stopRef; // remember how many "clients" are running
};
diff --git a/kdnssd/ioslave/dnssd.cpp b/kdnssd/ioslave/dnssd.cpp
index b039298a..6508a13a 100644
--- a/kdnssd/ioslave/dnssd.cpp
+++ b/kdnssd/ioslave/dnssd.cpp
@@ -18,10 +18,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qcstring.h>
-#include <qsocket.h>
-#include <qdatetime.h>
-#include <qbitarray.h>
+#include <tqcstring.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
+#include <tqbitarray.h>
#include <stdlib.h>
#include <math.h>
@@ -43,9 +43,9 @@
#include <klocale.h>
#include <kurl.h>
#include <ksock.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kapplication.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <dnssd/domainbrowser.h>
#include <krun.h>
@@ -60,7 +60,7 @@ static const KCmdLineOptions options[] =
KCmdLineLastOption
};
-ZeroConfProtocol::ZeroConfProtocol(const QCString& protocol, const QCString &pool_socket, const QCString &app_socket)
+ZeroConfProtocol::ZeroConfProtocol(const TQCString& protocol, const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase(protocol, pool_socket, app_socket), browser(0),toResolve(0),
configData(0)
{}
@@ -79,11 +79,11 @@ void ZeroConfProtocol::get(const KURL& url )
{
resolveAndRedirect(url,true);
mimeType("text/html");
- QString reply= "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
+ TQString reply= "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
reply+="</head>\n<body>\n<h2>"+i18n("Requested service has been launched in separate window.");
reply+="</h2>\n</body></html>";
data(reply.utf8());
- data(QByteArray());
+ data(TQByteArray());
finished();
break;
}
@@ -102,9 +102,9 @@ void ZeroConfProtocol::mimetype(const KURL& url )
UrlType ZeroConfProtocol::checkURL(const KURL& url)
{
if (url.path()=="/") return RootDir;
- QString service, type, domain;
+ TQString service, type, domain;
dissect(url,service,type,domain);
- const QString& proto = type.section('.',1,-1);
+ const TQString& proto = type.section('.',1,-1);
if (type[0]!='_' || (proto!="_udp" && proto!="_tcp")) return Invalid;
if (service.isEmpty()) return ServiceDir;
if (!domain.isEmpty()) {
@@ -118,7 +118,7 @@ UrlType ZeroConfProtocol::checkURL(const KURL& url)
// URL zeroconf://domain/_http._tcp/some%20service
// URL invitation://host:port/_http._tcp/some%20service?u=username&root=directory
-void ZeroConfProtocol::dissect(const KURL& url,QString& name,QString& type,QString& domain)
+void ZeroConfProtocol::dissect(const KURL& url,TQString& name,TQString& type,TQString& domain)
{
type = url.path().section("/",1,1);
domain = url.host();
@@ -159,7 +159,7 @@ void ZeroConfProtocol::stat(const KURL& url)
break;
case HelperProtocol:
{
- QString name,type,domain;
+ TQString name,type,domain;
dissect(url,name,type,domain);
buildServiceEntry(entry,name,type,domain);
statEntry(entry);
@@ -170,15 +170,15 @@ void ZeroConfProtocol::stat(const KURL& url)
error(ERR_MALFORMED_URL,i18n("invalid URL"));
}
}
-QString ZeroConfProtocol::getAttribute(const QString& name)
+TQString ZeroConfProtocol::getAttribute(const TQString& name)
{
- QString entry = configData->readEntry(name);
- return (entry.isNull()) ? QString::null : toResolve->textData()[entry];
+ TQString entry = configData->readEntry(name);
+ return (entry.isNull()) ? TQString::null : toResolve->textData()[entry];
}
void ZeroConfProtocol::resolveAndRedirect(const KURL& url, bool useKRun)
{
- QString name,type,domain;
+ TQString name,type,domain;
dissect(url,name,type,domain);
if (url.protocol()=="invitation") {
delete toResolve;
@@ -216,7 +216,7 @@ void ZeroConfProtocol::resolveAndRedirect(const KURL& url, bool useKRun)
}
}
-bool ZeroConfProtocol::setConfig(const QString& type)
+bool ZeroConfProtocol::setConfig(const TQString& type)
{
kdDebug() << "Setting config for " << type << endl;
if (configData)
@@ -233,7 +233,7 @@ bool ZeroConfProtocol::setConfig(const QString& type)
return (configData->readEntry("Type")==type);
}
-inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, const QString& data)
+inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, const TQString& data)
{
UDSAtom atom;
atom.m_uds=type;
@@ -249,7 +249,7 @@ inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, long data)
}
-void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const QString& name,const QString& type, const QString& host)
+void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const TQString& name,const TQString& type, const TQString& host)
{
entry.clear();
buildAtom(entry,UDS_NAME,name);
@@ -259,23 +259,23 @@ void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const QString& name,const Q
buildAtom(entry,UDS_MIME_TYPE,"inode/directory");
if (!type.isNull()) buildAtom(entry,UDS_URL,"zeroconf:/"+((!host.isNull()) ? "/"+host+"/" : "" )+type+"/");
}
-QString ZeroConfProtocol::getProtocol(const QString& type)
+TQString ZeroConfProtocol::getProtocol(const TQString& type)
{
setConfig(type);
return configData->readEntry("Protocol",type.section(".",0,0).mid(1));
}
-void ZeroConfProtocol::buildServiceEntry(UDSEntry& entry,const QString& name,const QString& type,const QString& domain)
+void ZeroConfProtocol::buildServiceEntry(UDSEntry& entry,const TQString& name,const TQString& type,const TQString& domain)
{
setConfig(type);
entry.clear();
buildAtom(entry,UDS_NAME,name);
buildAtom(entry,UDS_ACCESS,0666);
- QString icon=configData->readEntry("Icon",KProtocolInfo::icon(getProtocol(type)));
+ TQString icon=configData->readEntry("Icon",KProtocolInfo::icon(getProtocol(type)));
if (!icon.isNull()) buildAtom(entry,UDS_ICON_NAME,icon);
KURL protourl;
protourl.setProtocol(getProtocol(type));
- QString encname = "zeroconf://" + domain +"/" +type+ "/" + name;
+ TQString encname = "zeroconf://" + domain +"/" +type+ "/" + name;
if (KProtocolInfo::supportsListing(protourl)) {
buildAtom(entry,UDS_FILE_TYPE,S_IFDIR);
encname+="/";
@@ -294,15 +294,15 @@ void ZeroConfProtocol::listDir(const KURL& url )
if (allDomains=url.host().isEmpty())
browser = new ServiceBrowser(ServiceBrowser::AllServices);
else browser = new ServiceBrowser(ServiceBrowser::AllServices,url.host());
- connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
- this,SLOT(newType(DNSSD::RemoteService::Ptr)));
+ connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
+ this,TQT_SLOT(newType(DNSSD::RemoteService::Ptr)));
break;
case ServiceDir:
if (url.host().isEmpty())
browser = new ServiceBrowser(url.path(-1).section("/",1,-1));
else browser = new ServiceBrowser(url.path(-1).section("/",1,-1),url.host());
- connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
- this,SLOT(newService(DNSSD::RemoteService::Ptr)));
+ connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
+ this,TQT_SLOT(newService(DNSSD::RemoteService::Ptr)));
break;
case Service:
resolveAndRedirect(url);
@@ -311,7 +311,7 @@ void ZeroConfProtocol::listDir(const KURL& url )
error(ERR_MALFORMED_URL,i18n("invalid URL"));
return;
}
- connect(browser,SIGNAL(finished()),this,SLOT(allReported()));
+ connect(browser,TQT_SIGNAL(finished()),this,TQT_SLOT(allReported()));
browser->startBrowse();
kapp->eventLoop()->enterLoop();
}
@@ -332,9 +332,9 @@ void ZeroConfProtocol::newType(DNSSD::RemoteService::Ptr srv)
UDSEntry entry;
kdDebug() << "Got new entry " << srv->type() << endl;
if (!setConfig(srv->type())) return;
- QString name = configData->readEntry("Name");
+ TQString name = configData->readEntry("Name");
if (!name.isNull()) {
- buildDirEntry(entry,name,srv->type(), (allDomains) ? QString::null :
+ buildDirEntry(entry,name,srv->type(), (allDomains) ? TQString::null :
browser->browsedDomains()->domains()[0]);
listEntry(entry,false);
}
diff --git a/kdnssd/ioslave/dnssd.h b/kdnssd/ioslave/dnssd.h
index 1dc1dc05..8aaa90a8 100644
--- a/kdnssd/ioslave/dnssd.h
+++ b/kdnssd/ioslave/dnssd.h
@@ -21,16 +21,16 @@
#ifndef _dnssd_H_
#define _dnssd_H_
-#include <qstring.h>
-#include <qcstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kio/global.h>
#include <kio/slavebase.h>
#include <dnssd/servicebrowser.h>
#include <dnssd/remoteservice.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QCString;
@@ -39,11 +39,11 @@ using namespace DNSSD;
enum UrlType { RootDir, ServiceDir, Service, HelperProtocol, Invalid };
-class ZeroConfProtocol : public QObject, public KIO::SlaveBase
+class ZeroConfProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- ZeroConfProtocol(const QCString& protocol, const QCString &pool_socket, const QCString &app_socket);
+ ZeroConfProtocol(const TQCString& protocol, const TQCString &pool_socket, const TQCString &app_socket);
~ZeroConfProtocol();
virtual void get(const KURL& url);
virtual void mimetype(const KURL& url);
@@ -51,26 +51,26 @@ public:
virtual void listDir(const KURL& url );
private:
// Create UDSEntry for zeroconf:/ or zeroconf:/type/ paths
- void buildDirEntry(UDSEntry& entry,const QString& name,const QString& type=QString::null,
- const QString& host=QString::null);
+ void buildDirEntry(UDSEntry& entry,const TQString& name,const TQString& type=TQString::null,
+ const TQString& host=TQString::null);
// Create UDSEntry for single services: dnssd:/type/service
- void buildServiceEntry(UDSEntry& entry,const QString& name,const QString& type,
- const QString& domain);
+ void buildServiceEntry(UDSEntry& entry,const TQString& name,const TQString& type,
+ const TQString& domain);
// Returns root dir, service dir, service or invalid
UrlType checkURL(const KURL& url);
// extract name, type and domain from URL
- void dissect(const KURL& url,QString& name,QString& type,QString& domain);
+ void dissect(const KURL& url,TQString& name,TQString& type,TQString& domain);
// resolve given service and redirect() to it or use KRun on it (used for helper protocols)
void resolveAndRedirect(const KURL& url, bool useKRun = false);
bool dnssdOK();
- QString getAttribute(const QString& name);
- QString getProtocol(const QString& type);
+ TQString getAttribute(const TQString& name);
+ TQString getProtocol(const TQString& type);
// try to load config file for given service type (or just return if already loaded)
- bool setConfig(const QString& type);
+ bool setConfig(const TQString& type);
ServiceBrowser* browser;
// service types merged from all domains - to avoid duplicates
- QStringList mergedtypes;
+ TQStringList mergedtypes;
// last resolved or still being resolved services - acts as one-entry cache
RemoteService *toResolve;
// Config file for service - also acts as one-entry cache
diff --git a/kdnssd/kdedmodule/dnssdwatcher.cpp b/kdnssd/kdedmodule/dnssdwatcher.cpp
index a7eb256f..7e1ef6d2 100644
--- a/kdnssd/kdedmodule/dnssdwatcher.cpp
+++ b/kdnssd/kdedmodule/dnssdwatcher.cpp
@@ -26,7 +26,7 @@
#include "watcher.h"
-DNSSDWatcher::DNSSDWatcher(const QCString& obj)
+DNSSDWatcher::DNSSDWatcher(const TQCString& obj)
: KDEDModule(obj)
{
connectDCOPSignal("","KDirNotify","enteredDirectory(KURL)","enteredDirectory(KURL)",false);
@@ -34,12 +34,12 @@ DNSSDWatcher::DNSSDWatcher(const QCString& obj)
watchers.setAutoDelete(true);
}
-QStringList DNSSDWatcher::watchedDirectories()
+TQStringList DNSSDWatcher::watchedDirectories()
{
//TODO
// return watchers.keys();
- QStringList keys;
- for (QDictIterator<Watcher> it(watchers) ; it.current(); ++it ) {
+ TQStringList keys;
+ for (TQDictIterator<Watcher> it(watchers) ; it.current(); ++it ) {
keys << it.currentKey();
kdDebug() << it.currentKey() << " " << (*it)->refcount << "\n";
}
@@ -48,7 +48,7 @@ return keys;
// from ioslave
-void DNSSDWatcher::dissect(const KURL& url,QString& name,QString& type,QString& domain)
+void DNSSDWatcher::dissect(const KURL& url,TQString& name,TQString& type,TQString& domain)
{
type = url.path().section("/",1,1);
domain = url.host();
@@ -76,7 +76,7 @@ void DNSSDWatcher::leftDirectory(const KURL& dir)
void DNSSDWatcher::createNotifier(const KURL& url)
{
- QString domain,type,name;
+ TQString domain,type,name;
dissect(url,name,type,domain);
if (type.isEmpty()) type = DNSSD::ServiceBrowser::AllServices;
Watcher *w = new Watcher(type,domain);
@@ -84,7 +84,7 @@ void DNSSDWatcher::createNotifier(const KURL& url)
}
extern "C" {
- KDE_EXPORT KDEDModule *create_dnssdwatcher(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_dnssdwatcher(const TQCString &obj)
{
KGlobal::locale()->insertCatalogue("dnssdwatcher");
return new DNSSDWatcher(obj);
diff --git a/kdnssd/kdedmodule/dnssdwatcher.h b/kdnssd/kdedmodule/dnssdwatcher.h
index eb2d7092..2baea9fe 100644
--- a/kdnssd/kdedmodule/dnssdwatcher.h
+++ b/kdnssd/kdedmodule/dnssdwatcher.h
@@ -19,10 +19,10 @@
#ifndef _DNSSDWATCHER_H_
#define _DNSSDWATCHER_H_
-#include <qdict.h>
+#include <tqdict.h>
#include <kdedmodule.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
class Watcher;
@@ -31,18 +31,18 @@ class DNSSDWatcher : public KDEDModule
Q_OBJECT
K_DCOP
public:
- DNSSDWatcher(const QCString& obj);
+ DNSSDWatcher(const TQCString& obj);
k_dcop:
- QStringList watchedDirectories();
+ TQStringList watchedDirectories();
void enteredDirectory(const KURL& dir);
void leftDirectory(const KURL& dir);
private:
- QDict<Watcher> watchers;
+ TQDict<Watcher> watchers;
void createNotifier(const KURL& url);
- void dissect(const KURL& url,QString& name,QString& type,QString& domain);
+ void dissect(const KURL& url,TQString& name,TQString& type,TQString& domain);
};
diff --git a/kdnssd/kdedmodule/watcher.cpp b/kdnssd/kdedmodule/watcher.cpp
index d4dcc95a..f6b7a973 100644
--- a/kdnssd/kdedmodule/watcher.cpp
+++ b/kdnssd/kdedmodule/watcher.cpp
@@ -21,20 +21,20 @@
#include <kdebug.h>
#include <kdirnotify_stub.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-Watcher::Watcher(const QString& type, const QString& domain)
+Watcher::Watcher(const TQString& type, const TQString& domain)
: refcount(1), updateNeeded(false), m_type(type), m_domain(domain)
{
if (domain.isEmpty()) browser = new ServiceBrowser(type);
else browser = new ServiceBrowser(type,domain);
- connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
- SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
- connect(browser,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
- SLOT(serviceRemoved(DNSSD::RemoteService::Ptr)));
- connect(browser,SIGNAL(finished()),SLOT(finished()));
+ connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
+ connect(browser,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(serviceRemoved(DNSSD::RemoteService::Ptr)));
+ connect(browser,TQT_SIGNAL(finished()),TQT_SLOT(finished()));
browser->startBrowse();
}
@@ -59,7 +59,7 @@ void Watcher::finished()
KDirNotify_stub st("*","*");
kdDebug() << "Finished for " << m_type << "@" << m_domain << "\n";
if (updateNeeded || removed.count()) {
- QString url = "zeroconf:/";
+ TQString url = "zeroconf:/";
if (!m_domain.isEmpty()) url+="/"+m_domain+"/";
if (m_type!=ServiceBrowser::AllServices) url+=m_type;
kdDebug() << "Sending update: " << url << "\n";
diff --git a/kdnssd/kdedmodule/watcher.h b/kdnssd/kdedmodule/watcher.h
index 84e9104e..64c5635c 100644
--- a/kdnssd/kdedmodule/watcher.h
+++ b/kdnssd/kdedmodule/watcher.h
@@ -19,7 +19,7 @@
#ifndef _WATCHER_H_
#define _WATCHER_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <dnssd/servicebrowser.h>
#include <dnssd/remoteservice.h>
@@ -29,16 +29,16 @@ class Watcher : public QObject
{
Q_OBJECT
public:
- Watcher(const QString& type, const QString& domain);
+ Watcher(const TQString& type, const TQString& domain);
~Watcher();
unsigned int refcount;
private:
ServiceBrowser* browser;
bool updateNeeded;
- QString m_type;
- QString m_domain;
- QValueList<DNSSD::RemoteService::Ptr> removed;
+ TQString m_type;
+ TQString m_domain;
+ TQValueList<DNSSD::RemoteService::Ptr> removed;
private slots:
void serviceRemoved(DNSSD::RemoteService::Ptr srv);
diff --git a/kfile-plugins/torrent/bbase.h b/kfile-plugins/torrent/bbase.h
index 046bd545..36eccd39 100644
--- a/kfile-plugins/torrent/bbase.h
+++ b/kfile-plugins/torrent/bbase.h
@@ -79,11 +79,11 @@ class BBase : public KShared
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device) = 0;
+ virtual bool writeToDevice (TQIODevice &device) = 0;
};
#endif /* _BBASE_H */
diff --git a/kfile-plugins/torrent/bdict.cpp b/kfile-plugins/torrent/bdict.cpp
index 2dd7457e..4819165c 100644
--- a/kfile-plugins/torrent/bdict.cpp
+++ b/kfile-plugins/torrent/bdict.cpp
@@ -16,8 +16,8 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qiodevice.h>
+#include <tqstringlist.h>
+#include <tqiodevice.h>
#include <kdebug.h>
@@ -27,7 +27,7 @@
#include "bint.h"
#include "blist.h"
-BDict::BDict (QByteArray &dict, int start)
+BDict::BDict (TQByteArray &dict, int start)
: m_map(), m_valid(false)
{
ByteTape tape(dict, start);
@@ -108,7 +108,7 @@ void BDict::init (ByteTape &tape)
BDict::~BDict ()
{
- // QDict will take care of deleting each entry that
+ // TQDict will take care of deleting each entry that
// it holds.
}
@@ -152,7 +152,7 @@ BString *BDict::findStr (const char *key)
return 0;
}
-bool BDict::writeToDevice(QIODevice &device)
+bool BDict::writeToDevice(TQIODevice &device)
{
if (!isValid())
return false;
@@ -172,25 +172,25 @@ bool BDict::writeToDevice(QIODevice &device)
}
// Strings are supposed to be written in the dictionary such that
- // the keys are in sorted order. QDictIterator doesn't support an
+ // the keys are in sorted order. TQDictIterator doesn't support an
// ordering, so we have to get a list of all the keys, sort it, and
// then go by the list.
BBaseHashIterator iter (m_map);
- QStringList key_list;
+ TQStringList key_list;
for ( ; iter.current(); ++iter)
key_list.append(iter.currentKey());
key_list.sort();
- QStringList::Iterator key_iter;
+ TQStringList::Iterator key_iter;
for (key_iter = key_list.begin(); key_iter != key_list.end(); ++key_iter)
{
- QCString utfString = (*key_iter).utf8();
- QString str = QString("%1:").arg(utfString.size() - 1);
+ TQCString utfString = (*key_iter).utf8();
+ TQString str = TQString("%1:").arg(utfString.size() - 1);
- QCString lenString = str.utf8();
+ TQCString lenString = str.utf8();
// Write out length of key
device.writeBlock(lenString.data(), lenString.size() - 1);
diff --git a/kfile-plugins/torrent/bdict.h b/kfile-plugins/torrent/bdict.h
index 4722b9ec..77516c7f 100644
--- a/kfile-plugins/torrent/bdict.h
+++ b/kfile-plugins/torrent/bdict.h
@@ -19,14 +19,14 @@
#ifndef _BDICT_H
#define _BDICT_H
-#include <qdict.h>
-#include <qcstring.h> // QByteArray
+#include <tqdict.h>
+#include <tqcstring.h> // QByteArray
#include "bytetape.h"
#include "bbase.h"
// Some useful typedefs
-typedef QDict<BBase> BBaseHash;
-typedef QDictIterator<BBase> BBaseHashIterator;
+typedef TQDict<BBase> BBaseHash;
+typedef TQDictIterator<BBase> BBaseHashIterator;
// Forward declarations
class BInt;
@@ -53,7 +53,7 @@ class BDict : public BBase
* @param dict the buffer containing the b-encoded dictionary
* @param start the position of the data within the buffer
*/
- BDict (QByteArray &dict, int start = 0);
+ BDict (TQByteArray &dict, int start = 0);
/**
* Construct a dictionary from a ByteTape. The data and current
@@ -166,17 +166,17 @@ class BDict : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
/**
- * Returns a QDictIterator<BBase> that you can use to iterate through
+ * Returns a TQDictIterator<BBase> that you can use to iterate through
* the items in the dictionary.
*
- * @return QDictIterator<BBase>, which can be used to iterate through
+ * @return TQDictIterator<BBase>, which can be used to iterate through
* the items in the dictionary.
*/
BBaseHashIterator iterator() const
@@ -194,7 +194,7 @@ class BDict : public BBase
*/
void init (ByteTape &tape);
- BBaseHash m_map; /// The QDict that actually store the data
+ BBaseHash m_map; /// The TQDict that actually store the data
bool m_valid; /// Store initialization status
};
diff --git a/kfile-plugins/torrent/bint.cpp b/kfile-plugins/torrent/bint.cpp
index eb96fcba..567edece 100644
--- a/kfile-plugins/torrent/bint.cpp
+++ b/kfile-plugins/torrent/bint.cpp
@@ -16,16 +16,16 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qcstring.h>
-#include <qiodevice.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqiodevice.h>
#include "bytetape.h"
#include "bint.h"
// A bencoded int is (approximately) as follows:
// i(\d)+e
-BInt::BInt (QByteArray &dict, int start)
+BInt::BInt (TQByteArray &dict, int start)
: m_value (0), m_valid(false)
{
ByteTape tape (dict, start);
@@ -45,7 +45,7 @@ void BInt::init (ByteTape &tape)
tape ++; // Move to start of digits
- QByteArray &dict (tape.data());
+ TQByteArray &dict (tape.data());
if (dict.find('e', tape.pos()) == -1)
return;
@@ -56,12 +56,12 @@ void BInt::init (ByteTape &tape)
ptr += tape.pos(); // Advance to current position in tape
// Allocate temporary data buffer
- QByteArray buffer(length + 1);
+ TQByteArray buffer(length + 1);
qmemmove (buffer.data(), ptr, length);
buffer[length] = 0; // Null-terminate
- QString numberString (buffer);
+ TQString numberString (buffer);
bool a_isValid; // We want to make sure the string is a valid number
m_value = numberString.toLongLong(&a_isValid);
@@ -77,13 +77,13 @@ BInt::~BInt()
/* Nothing yet */
}
-bool BInt::writeToDevice (QIODevice &device)
+bool BInt::writeToDevice (TQIODevice &device)
{
if (!m_valid)
return false;
/* Write out i234e, and such */
- QString str = QString("i%1e").
+ TQString str = TQString("i%1e").
arg (m_value);
Q_LONG written = 0, result = 0;
diff --git a/kfile-plugins/torrent/bint.h b/kfile-plugins/torrent/bint.h
index 02875bad..7e1fc582 100644
--- a/kfile-plugins/torrent/bint.h
+++ b/kfile-plugins/torrent/bint.h
@@ -19,7 +19,7 @@
#ifndef _BINT_H
#define _BINT_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include "bbase.h"
#include "bytetape.h"
@@ -42,7 +42,7 @@ class BInt : public BBase
* @param start the position within the buffer of the beginning
* of the b-encoded integer.
*/
- BInt (QByteArray &dict, int start = 0);
+ BInt (TQByteArray &dict, int start = 0);
/**
* Constructs a BInt by reading a b-encoded integer from @p tape.
@@ -86,11 +86,11 @@ class BInt : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
private:
diff --git a/kfile-plugins/torrent/blist.cpp b/kfile-plugins/torrent/blist.cpp
index d9d10021..8b11fbc6 100644
--- a/kfile-plugins/torrent/blist.cpp
+++ b/kfile-plugins/torrent/blist.cpp
@@ -16,7 +16,7 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include "bytetape.h"
#include "blist.h"
@@ -30,7 +30,7 @@ BList::BList (ByteTape &tape)
init (tape);
}
-BList::BList (QByteArray &dict, unsigned int start)
+BList::BList (TQByteArray &dict, unsigned int start)
: m_valid(false), m_array()
{
ByteTape tape (dict, start);
@@ -136,7 +136,7 @@ BString * BList::indexStr (unsigned int i)
return 0;
}
-bool BList::writeToDevice(QIODevice &device)
+bool BList::writeToDevice(TQIODevice &device)
{
if (!m_valid)
return false;
diff --git a/kfile-plugins/torrent/blist.h b/kfile-plugins/torrent/blist.h
index a00cca87..4085ec39 100644
--- a/kfile-plugins/torrent/blist.h
+++ b/kfile-plugins/torrent/blist.h
@@ -19,13 +19,13 @@
#ifndef _BLIST_H
#define _BLIST_H
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
#include "bbase.h"
#include "bytetape.h"
-typedef QValueList<BBase *> BBaseVector;
-typedef QValueList<BBase *>::iterator BBaseVectorIterator;
+typedef TQValueList<BBase *> BBaseVector;
+typedef TQValueList<BBase *>::iterator BBaseVectorIterator;
// Predeclare the following classes
class BDict;
@@ -50,7 +50,7 @@ class BList : public BBase
* @param start the position in the buffer to start
* reading from
*/
- BList (QByteArray &dict, unsigned int start = 0);
+ BList (TQByteArray &dict, unsigned int start = 0);
/**
* Construct a BList from @p tape. Any changes made to
@@ -175,11 +175,11 @@ class BList : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
private:
diff --git a/kfile-plugins/torrent/bstring.cpp b/kfile-plugins/torrent/bstring.cpp
index 30be9704..924acdbc 100644
--- a/kfile-plugins/torrent/bstring.cpp
+++ b/kfile-plugins/torrent/bstring.cpp
@@ -16,15 +16,15 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qiodevice.h>
+#include <tqcstring.h>
+#include <tqiodevice.h>
#include <kdebug.h>
#include "bstring.h"
#include "bytetape.h"
-BString::BString (QByteArray &dict, int start) :
+BString::BString (TQByteArray &dict, int start) :
m_data(), m_valid(false)
{
ByteTape tape (dict, start);
@@ -37,12 +37,12 @@ BString::BString (ByteTape &tape)
init (tape);
}
-// The reason we don't store stuff in a QString is because BitTorrent
+// The reason we don't store stuff in a TQString is because BitTorrent
// b-encoded strings may contain zeroes within the string, which makes
// a BString more of a buffer than a true string.
void BString::init (ByteTape &tape)
{
- QByteArray &dict(tape.data());
+ TQByteArray &dict(tape.data());
if (dict.find(':', tape.pos()) == -1)
{
@@ -57,11 +57,11 @@ void BString::init (ByteTape &tape)
ptr += tape.pos();
- QByteArray buffer (length + 1);
+ TQByteArray buffer (length + 1);
qmemmove (buffer.data(), ptr, length);
buffer[length] = 0;
- QString numberString (buffer);
+ TQString numberString (buffer);
bool a_isValid;
ulong len = numberString.toULong (&a_isValid);
@@ -99,15 +99,15 @@ BString::~BString ()
{
}
-bool BString::writeToDevice(QIODevice &device)
+bool BString::writeToDevice(TQIODevice &device)
{
if (!m_valid)
return false;
- QString str = QString("%1:").
+ TQString str = TQString("%1:").
arg(get_len());
- QCString utfString = str.utf8();
+ TQCString utfString = str.utf8();
/* Don't write null terminator */
device.writeBlock (utfString.data(), utfString.size() - 1);
@@ -119,7 +119,7 @@ bool BString::writeToDevice(QIODevice &device)
return true;
}
-bool BString::setValue (const QString &str)
+bool BString::setValue (const TQString &str)
{
m_data = str.utf8();
return true;
diff --git a/kfile-plugins/torrent/bstring.h b/kfile-plugins/torrent/bstring.h
index 81b1b0b0..c51311fc 100644
--- a/kfile-plugins/torrent/bstring.h
+++ b/kfile-plugins/torrent/bstring.h
@@ -19,8 +19,8 @@
#ifndef _BSTRING_H
#define _BSTRING_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include "bytetape.h"
#include "bbase.h"
@@ -45,7 +45,7 @@ class BString : public BBase
* @param start the position in the buffer to start
* reading from
*/
- BString (QByteArray &dict, int start = 0);
+ BString (TQByteArray &dict, int start = 0);
/**
* Construct a BString from @p tape. Any changes made to
@@ -67,14 +67,14 @@ class BString : public BBase
virtual ~BString ();
/**
- * Returns a QString representation of the data in the
+ * Returns a TQString representation of the data in the
* BString. It is the responsibility of the caller to ensure
- * that the data is convertible to a QString. More specifically,
+ * that the data is convertible to a TQString. More specifically,
* the data should not contain any embedded NULLs.
*
- * @return QString containing the data from this BString.
+ * @return TQString containing the data from this BString.
*/
- QString get_string() const { return QString::fromUtf8(m_data.data()); }
+ TQString get_string() const { return TQString::fromUtf8(m_data.data()); }
/**
* Returns the amount of data held by the string. It would be
@@ -104,20 +104,20 @@ class BString : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
/**
- * Changes the value of the string to the given QString.
+ * Changes the value of the string to the given TQString.
*
- * @param str the QString containing the new value
+ * @param str the TQString containing the new value
* @return true if the value was successfully changed,
* false otherwise.
*/
- bool setValue (const QString &str);
+ bool setValue (const TQString &str);
private:
@@ -129,7 +129,7 @@ class BString : public BBase
*/
void init (ByteTape &tape);
- QByteArray m_data;
+ TQByteArray m_data;
bool m_valid;
};
diff --git a/kfile-plugins/torrent/bytetape.cpp b/kfile-plugins/torrent/bytetape.cpp
index 19c9d3d8..5d6b8099 100644
--- a/kfile-plugins/torrent/bytetape.cpp
+++ b/kfile-plugins/torrent/bytetape.cpp
@@ -21,7 +21,7 @@
#include "bytetape.h"
-ByteTape::ByteTape (QByteArray &array, int pos)
+ByteTape::ByteTape (TQByteArray &array, int pos)
: m_array(array), m_shared(new ByteTapeShared)
{
m_shared->pos = pos;
diff --git a/kfile-plugins/torrent/bytetape.h b/kfile-plugins/torrent/bytetape.h
index 55fef4b5..4c803122 100644
--- a/kfile-plugins/torrent/bytetape.h
+++ b/kfile-plugins/torrent/bytetape.h
@@ -21,7 +21,7 @@
#include <ksharedptr.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class ByteTapeShared : public KShared
{
@@ -31,7 +31,7 @@ class ByteTapeShared : public KShared
};
/**
- * Class to simulate a seekable byte stream. Very similar to QByteArray,
+ * Class to simulate a seekable byte stream. Very similar to TQByteArray,
* but the difference is that this class "knows" what a current position
* is. Also, the copy constructor will share the byte stream of the
* ByteTape being copied. This means that any copies made of an object of
@@ -54,7 +54,7 @@ class ByteTape
* @param pos the initial position of the tape head. It must be
* a position within the buffer contained in @p array.
*/
- ByteTape (QByteArray &array, int pos = 0);
+ ByteTape (TQByteArray &array, int pos = 0);
/**
* Creates a ByteTape as a copy of @p tape. The newly created
@@ -177,15 +177,15 @@ class ByteTape
bool setPos(unsigned int pos);
/**
- * Returns a reference to the QByteArray used to hold all the data.
+ * Returns a reference to the TQByteArray used to hold all the data.
*
- * @return the QByteArray used to hold the data
+ * @return the TQByteArray used to hold the data
* @see QByteArray
*/
- QByteArray &data() { return m_array; }
+ TQByteArray &data() { return m_array; }
private:
- QByteArray &m_array;
+ TQByteArray &m_array;
KSharedPtr<ByteTapeShared> m_shared;
};
diff --git a/kfile-plugins/torrent/kfile_torrent.cpp b/kfile-plugins/torrent/kfile_torrent.cpp
index 2d97915e..4aca75bc 100644
--- a/kfile-plugins/torrent/kfile_torrent.cpp
+++ b/kfile-plugins/torrent/kfile_torrent.cpp
@@ -16,11 +16,11 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <kgenericfactory.h>
@@ -34,11 +34,11 @@
typedef KGenericFactory<KTorrentPlugin> TorrentFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_torrent, TorrentFactory("kfile_torrent"))
-QStringList filesList (BList *list);
+TQStringList filesList (BList *list);
Q_ULLONG filesLength (BList *list);
-KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
- const QStringList &args)
+KTorrentPlugin::KTorrentPlugin (TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin (parent, name, args), m_failed(true), m_dict(0)
{
KFileMimeTypeInfo *info = addMimeTypeInfo ("application/x-bittorrent");
@@ -59,7 +59,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo *item = 0;
- item = addItemInfo(group, "name", i18n("Name"), QVariant::String);
+ item = addItemInfo(group, "name", i18n("Name"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Name to group!\n";
@@ -68,7 +68,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
setHint (item, KFileMimeTypeInfo::Name);
setAttributes (item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "length", i18n("Torrent Length"), QVariant::ULongLong);
+ item = addItemInfo(group, "length", i18n("Torrent Length"), TQVariant::ULongLong);
if (!item)
{
kdError() << "Error adding Length to group!\n";
@@ -77,28 +77,28 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
setHint (item, KFileMimeTypeInfo::Length);
setUnit (item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "announce", i18n("Tracker URL"), QVariant::String);
+ item = addItemInfo(group, "announce", i18n("Tracker URL"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Announce to group!\n";
return;
}
- item = addItemInfo(group, "creation date", i18n("Date Created"), QVariant::DateTime);
+ item = addItemInfo(group, "creation date", i18n("Date Created"), TQVariant::DateTime);
if (!item)
{
kdError() << "Error adding DateCreated to group!\n";
return;
}
- item = addItemInfo(group, "NumFiles", i18n("Number of Files"), QVariant::Int);
+ item = addItemInfo(group, "NumFiles", i18n("Number of Files"), TQVariant::Int);
if (!item)
{
kdError() << "Error adding NumFiles to group!\n";
return;
}
- item = addItemInfo(group, "piece length", i18n("File Piece Length"), QVariant::Int);
+ item = addItemInfo(group, "piece length", i18n("File Piece Length"), TQVariant::Int);
if (!item)
{
kdError() << "Error adding PieceLength to group!\n";
@@ -106,7 +106,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
}
setUnit (item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "comment", i18n("Comment"), QVariant::String);
+ item = addItemInfo(group, "comment", i18n("Comment"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Comment to group!\n";
@@ -129,7 +129,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
return false;
}
- QFile file (info.path());
+ TQFile file (info.path());
if (!file.open(IO_ReadOnly))
{
kdError() << "Unable to open given file!\n";
@@ -137,7 +137,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
}
// We need to read in the entire file to parse the dictionary structure.
- QByteArray buf = file.readAll();
+ TQByteArray buf = file.readAll();
file.close();
if (!buf)
@@ -171,20 +171,20 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
BString *str = m_dict->findStr ("announce");
if (!str)
return false;
- appendItem (group, "announce", QString(str->get_string()));
+ appendItem (group, "announce", TQString(str->get_string()));
}
if (m_dict->contains("creation date"))
{
BInt *the_data = m_dict->findInt ("creation date");
- QDateTime my_date;
+ TQDateTime my_date;
if (!the_data)
return false;
unsigned int the_time = the_data->get_value();
- /* Hopefully the_time is UTC, because that's what QDateTime does. */
+ /* Hopefully the_time is UTC, because that's what TQDateTime does. */
my_date.setTime_t (the_time);
appendItem (group, "creation date", my_date);
}
@@ -229,7 +229,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
if (!str)
return false;
- QString real_str (str->get_string());
+ TQString real_str (str->get_string());
if (num_files > 1 && !real_str.endsWith("/"))
real_str.append('/');
@@ -253,18 +253,18 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
appendItem (group, "comment", comment->get_string());
}
else
- appendItem (group, "comment", QString());
+ appendItem (group, "comment", TQString());
return true;
}
-/* Returns a QStringList containing file names within the list. The list
+/* Returns a TQStringList containing file names within the list. The list
* should be the one contained within the info dictionary of the torrent,
* keyed by 'files'
*/
-QStringList filesList (BList *list)
+TQStringList filesList (BList *list)
{
- QStringList str_list, failList;
+ TQStringList str_list, failList;
for (unsigned int i = 0; i < list->count(); ++i)
{
@@ -283,7 +283,7 @@ QStringList filesList (BList *list)
if (!list_path)
return failList;
- QString str;
+ TQString str;
BString *temp_str;
if (list_path->count() > 0)
@@ -295,10 +295,10 @@ QStringList filesList (BList *list)
str.append (temp_str->get_string());
}
- /* Construct QString consisting of path and file name */
+ /* Construct TQString consisting of path and file name */
for (unsigned int j = 1; j < list_path->count(); ++j)
{
- str.append (QDir::separator());
+ str.append (TQDir::separator());
temp_str = list_path->indexStr (j);
if (!temp_str)
return failList;
@@ -347,17 +347,17 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
// The m_dict is ready, all we have to do is open a file, and
// let 'er go.
- QStringList list = info.groups();
- QStringList::Iterator it = list.begin();
+ TQStringList list = info.groups();
+ TQStringList::Iterator it = list.begin();
for (; it != list.end(); ++it)
{
- QStringList list2 = info[*it].keys();
- QStringList::Iterator it2 = list2.begin();
+ TQStringList list2 = info[*it].keys();
+ TQStringList::Iterator it2 = list2.begin();
for (; it2 != list2.end(); ++it2)
{
- QString key = *it2;
+ TQString key = *it2;
if (info[*it][key].isModified())
{
@@ -380,10 +380,10 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
if (!name_str)
return false;
- QString the_name = info[*it][key].value().toString();
+ TQString the_name = info[*it][key].value().toString();
// Remove trailing slashes
- the_name.replace (QRegExp("/*$"), "");
+ the_name.replace (TQRegExp("/*$"), "");
name_str->setValue (the_name);
}
@@ -391,7 +391,7 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
}
}
- QFile output (info.path());
+ TQFile output (info.path());
if (!output.open(IO_WriteOnly | IO_Truncate))
return false;
diff --git a/kfile-plugins/torrent/kfile_torrent.h b/kfile-plugins/torrent/kfile_torrent.h
index 282fda23..3c7fc83a 100644
--- a/kfile-plugins/torrent/kfile_torrent.h
+++ b/kfile-plugins/torrent/kfile_torrent.h
@@ -47,7 +47,7 @@ class KTorrentPlugin : public KFilePlugin
* @param name the name of this object (not user-readable)
* @param args unused by this class
*/
- KTorrentPlugin (QObject *parent, const char *name, const QStringList &args);
+ KTorrentPlugin (TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor that closes the dictionary holding the torrent information.
diff --git a/kget/dlgAdvanced.cpp b/kget/dlgAdvanced.cpp
index 43b0265c..e4dee980 100644
--- a/kget/dlgAdvanced.cpp
+++ b/kget/dlgAdvanced.cpp
@@ -24,8 +24,8 @@
*
***************************************************************************/
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include <kprotocolmanager.h>
@@ -38,7 +38,7 @@
-DlgAdvanced::DlgAdvanced(QWidget * parent)
+DlgAdvanced::DlgAdvanced(TQWidget * parent)
: DlgAdvancedBase(parent)
{
cb_partial->hide();
@@ -84,7 +84,7 @@ void DlgAdvanced::applyData()
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
KConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
- cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":""));
+ cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
}
}
diff --git a/kget/dlgAdvanced.h b/kget/dlgAdvanced.h
index 5af58c2a..19c2e3f5 100644
--- a/kget/dlgAdvanced.h
+++ b/kget/dlgAdvanced.h
@@ -35,7 +35,7 @@ Q_OBJECT
public:
- DlgAdvanced(QWidget * parent);
+ DlgAdvanced(TQWidget * parent);
~DlgAdvanced() {}
void applyData();
diff --git a/kget/dlgAutomation.cpp b/kget/dlgAutomation.cpp
index 98ed4f3e..779cacf3 100644
--- a/kget/dlgAutomation.cpp
+++ b/kget/dlgAutomation.cpp
@@ -24,10 +24,10 @@
*
***************************************************************************/
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdatetimewidget.h>
@@ -42,7 +42,7 @@
#include "dlgAutomation.h"
-DlgAutomation::DlgAutomation(QWidget * parent)
+DlgAutomation::DlgAutomation(TQWidget * parent)
: DlgAutomationBase(parent)
{
}
diff --git a/kget/dlgAutomation.h b/kget/dlgAutomation.h
index e9f629bc..2a236094 100644
--- a/kget/dlgAutomation.h
+++ b/kget/dlgAutomation.h
@@ -28,8 +28,8 @@
#ifndef _DLGAUTOMATION_H
#define _DLGAUTOMATION_H
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include "dlgautomationbase.h"
@@ -38,14 +38,14 @@ class DlgAutomation:public DlgAutomationBase
Q_OBJECT public:
- DlgAutomation(QWidget * parent);
+ DlgAutomation(TQWidget * parent);
~DlgAutomation() {}
void applyData();
void setData();
private:
- QDateTime disconnectDateTime;
+ TQDateTime disconnectDateTime;
signals:
void configChanged();
diff --git a/kget/dlgConnection.cpp b/kget/dlgConnection.cpp
index c5ffae56..5530953b 100644
--- a/kget/dlgConnection.cpp
+++ b/kget/dlgConnection.cpp
@@ -25,10 +25,10 @@
***************************************************************************/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kprotocolmanager.h>
@@ -42,7 +42,7 @@
#include "dlgConnection.h"
-DlgConnection::DlgConnection(QWidget * parent)
+DlgConnection::DlgConnection(TQWidget * parent)
:DlgConnectionBase(parent, "", 0)
{
// TODO: these are not supported yet, so hide them
diff --git a/kget/dlgConnection.h b/kget/dlgConnection.h
index 0420b4f0..d4fa58a1 100644
--- a/kget/dlgConnection.h
+++ b/kget/dlgConnection.h
@@ -28,7 +28,7 @@
#ifndef _DLGCONNECTION_H
#define _DLGCONNECTION_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "dlgconnectionbase.h"
@@ -37,7 +37,7 @@ class DlgConnection : public DlgConnectionBase
Q_OBJECT public:
- DlgConnection(QWidget * parent);
+ DlgConnection(TQWidget * parent);
~DlgConnection() {}
void applyData();
void setData();
diff --git a/kget/dlgDirectories.cpp b/kget/dlgDirectories.cpp
index 6c4c42e3..a373cc67 100644
--- a/kget/dlgDirectories.cpp
+++ b/kget/dlgDirectories.cpp
@@ -25,11 +25,11 @@
***************************************************************************/
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qlistview.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqlistview.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kfiledialog.h>
#include <klineedit.h>
@@ -42,11 +42,11 @@
#include "dlgDirectories.h"
#include <kapplication.h>
-DlgDirectories::DlgDirectories(QWidget * parent)
+DlgDirectories::DlgDirectories(TQWidget * parent)
: DlgDirectoriesBase(parent)
{
- connect( le_ext, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) );
- connect( le_dir, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) );
+ connect( le_ext, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) );
+ connect( le_dir, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) );
le_dir->setMode( KFile::Directory );
lv_entries->setSortColumn( -1 );
@@ -59,7 +59,7 @@ void DlgDirectories::slotDirectoryChanged( )
pb_add->setEnabled(!le_ext->text().isEmpty() &&!le_dir->url().isEmpty() );
}
-void DlgDirectories::selectEntry(QListViewItem * item)
+void DlgDirectories::selectEntry(TQListViewItem * item)
{
if (item) {
le_ext->setText(item->text(0));
@@ -75,7 +75,7 @@ void DlgDirectories::selectEntry(QListViewItem * item)
void DlgDirectories::updateUpDown()
{
- QListViewItem *item = lv_entries->selectedItem();
+ TQListViewItem *item = lv_entries->selectedItem();
pb_up->setEnabled( item && item->itemAbove() );
pb_down->setEnabled( item && item->itemBelow() );
@@ -83,22 +83,22 @@ void DlgDirectories::updateUpDown()
void DlgDirectories::addEntry()
{
- QString ext = le_ext->text();
- QString dir = le_dir->url();
+ TQString ext = le_ext->text();
+ TQString dir = le_dir->url();
if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) {
KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error"));
return;
}
- QDir f(dir);
+ TQDir f(dir);
if (!f.exists()) {
KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error"));
return;
}
- new QListViewItem(lv_entries, ext, dir);
+ new TQListViewItem(lv_entries, ext, dir);
updateUpDown();
emit configChanged();
@@ -107,7 +107,7 @@ void DlgDirectories::addEntry()
void DlgDirectories::deleteEntry()
{
- QListViewItem *item = lv_entries->selectedItem();
+ TQListViewItem *item = lv_entries->selectedItem();
delete item;
updateUpDown();
emit configChanged();
@@ -116,25 +116,25 @@ void DlgDirectories::deleteEntry()
void DlgDirectories::changeEntry()
{
- QListViewItem *old_item = lv_entries->selectedItem();
+ TQListViewItem *old_item = lv_entries->selectedItem();
if (old_item) {
- QString ext = le_ext->text();
- QString dir = le_dir->url();
+ TQString ext = le_ext->text();
+ TQString dir = le_dir->url();
if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) {
KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error"));
return;
}
- QDir f(dir);
+ TQDir f(dir);
if (!f.exists()) {
KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error"));
return;
}
- new QListViewItem(lv_entries, old_item, ext, dir);
+ new TQListViewItem(lv_entries, old_item, ext, dir);
delete old_item;
emit configChanged();
}
@@ -143,7 +143,7 @@ void DlgDirectories::changeEntry()
void DlgDirectories::downEntry()
{
- QListViewItem *item = lv_entries->selectedItem();
+ TQListViewItem *item = lv_entries->selectedItem();
if ( !item )
return;
@@ -157,7 +157,7 @@ void DlgDirectories::downEntry()
void DlgDirectories::upEntry()
{
- QListViewItem *item = lv_entries->selectedItem();
+ TQListViewItem *item = lv_entries->selectedItem();
if ( !item || !item->itemAbove() )
return;
@@ -175,11 +175,11 @@ void DlgDirectories::setData()
if (ksettings.defaultDirList.count() > 0) {
// we need to insert items in the reverse order
- // because "new QListViewItem" puts itself at the beginning
+ // because "new TQListViewItem" puts itself at the beginning
for (it = ksettings.defaultDirList.fromLast(); it != ksettings.defaultDirList.begin(); it--) {
- new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir);
+ new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir);
}
- new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir);
+ new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir);
}
}
@@ -187,10 +187,10 @@ void DlgDirectories::setData()
void DlgDirectories::applyData()
{
ksettings.defaultDirList.clear();
- QListViewItemIterator it(lv_entries);
+ TQListViewItemIterator it(lv_entries);
for (; it.current(); ++it) {
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
DirItem ditem;
diff --git a/kget/dlgDirectories.h b/kget/dlgDirectories.h
index deb403e3..8d3c1cf5 100644
--- a/kget/dlgDirectories.h
+++ b/kget/dlgDirectories.h
@@ -37,7 +37,7 @@ Q_OBJECT
public:
- DlgDirectories(QWidget * parent);
+ DlgDirectories(TQWidget * parent);
~DlgDirectories() {}
void applyData();
void setData();
@@ -46,7 +46,7 @@ signals:
void configChanged();
protected slots:
- void selectEntry(QListViewItem * item);
+ void selectEntry(TQListViewItem * item);
void addEntry();
void deleteEntry();
void changeEntry();
diff --git a/kget/dlgIndividual.cpp b/kget/dlgIndividual.cpp
index 72fc6c7d..9cb9690c 100644
--- a/kget/dlgIndividual.cpp
+++ b/kget/dlgIndividual.cpp
@@ -25,15 +25,15 @@
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include "dockindividual.h"
-#include <qlabel.h>
-#include <qtabwidget.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
#include <kprogress.h>
-#include <qtextedit.h>
-#include <qcheckbox.h>
+#include <tqtextedit.h>
+#include <tqcheckbox.h>
#include <kpushbutton.h>
#include <ksqueezedtextlabel.h>
#include <kdatetimewidget.h>
@@ -53,7 +53,7 @@
DlgIndividual::DlgIndividual(Transfer * _item)
- : QWidget(0, "dialog", WDestructiveClose)
+ : TQWidget(0, "dialog", WDestructiveClose)
{
item = _item;
@@ -63,22 +63,22 @@ DlgIndividual::DlgIndividual(Transfer * _item)
// Actions
- m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, SLOT(slotToggleDock()), this, "dockIndividual");
+ m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, TQT_SLOT(slotToggleDock()), this, "dockIndividual");
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() );
topLayout->addStrut( 360 ); // makes dlg at least that wide
- QGridLayout *grid = new QGridLayout( 2, 3 );
+ TQGridLayout *grid = new TQGridLayout( 2, 3 );
topLayout->addLayout(grid);
grid->addColSpacing(1, KDialog::spacingHint());
- grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0);
+ grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0);
sourceLabel = new KSqueezedTextLabel(this);
grid->addWidget(sourceLabel, 0, 2);
sourceLabel->setText(i18n("Source Label"));
- grid->addWidget(new QLabel(i18n("Destination:"), this), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Destination:"), this), 1, 0);
destLabel = new KSqueezedTextLabel(this);
grid->addWidget(destLabel, 1, 2);
@@ -88,15 +88,15 @@ DlgIndividual::DlgIndividual(Transfer * _item)
topLayout->addWidget( m_pProgressBar );
// processed info
- QHBoxLayout *hBox = new QHBoxLayout();
+ TQHBoxLayout *hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- sizeLabel = new QLabel(this);
+ sizeLabel = new TQLabel(this);
hBox->addWidget(sizeLabel);
- resumeLabel = new QLabel(this);
+ resumeLabel = new TQLabel(this);
hBox->addWidget(resumeLabel);
- speedLabel = new QLabel(this);
+ speedLabel = new TQLabel(this);
speedLabel->setText(i18n("0 B/s"));
topLayout->addWidget(speedLabel);
@@ -125,46 +125,46 @@ DlgIndividual::DlgIndividual(Transfer * _item)
- QCheckBox * keepOpen = new QCheckBox( i18n("&Keep this window open after the operation is complete."), this);
- connect( keepOpen, SIGNAL( toggled(bool) ), SLOT( slotKeepOpenToggled(bool) ) );
+ TQCheckBox * keepOpen = new TQCheckBox( i18n("&Keep this window open after the operation is complete."), this);
+ connect( keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) );
topLayout->addWidget(keepOpen);
- QFrame *line3 = new QFrame( this );
- line3->setFrameShape( QFrame::HLine );
- line3->setFrameShadow( QFrame::Sunken );
+ TQFrame *line3 = new TQFrame( this );
+ line3->setFrameShape( TQFrame::HLine );
+ line3->setFrameShadow( TQFrame::Sunken );
topLayout->addWidget( line3 );
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
openFile = new KPushButton( i18n("Open &File"), this );
- connect( openFile, SIGNAL( clicked() ), SLOT( slotOpenFile() ) );
+ connect( openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) );
hBox->addWidget( openFile );
openFile->setEnabled(false);
openLocation = new KPushButton( i18n("Open &Destination"), this );
- connect( openLocation, SIGNAL( clicked() ), SLOT( slotOpenLocation() ) );
+ connect( openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) );
hBox->addWidget( openLocation );
hBox->addStretch(1);
pbAdvanced = new KPushButton( i18n("Advanced"), this );
- connect(pbAdvanced, SIGNAL(clicked()), SLOT(slotToggleAdvanced()));
+ connect(pbAdvanced, TQT_SIGNAL(clicked()), TQT_SLOT(slotToggleAdvanced()));
hBox->addWidget( pbAdvanced );
// setup tab dialog
- panelAdvanced = new QTabWidget(this);
+ panelAdvanced = new TQTabWidget(this);
// if the time was already set somewhere in the future, keep it
// otherwise set it to the current time
- QDateTime dt;
+ TQDateTime dt;
- if (item->getStartTime() < QDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED)
+ if (item->getStartTime() < TQDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED)
{
- dt = QDateTime::currentDateTime();
+ dt = TQDateTime::currentDateTime();
}
else
{
@@ -176,15 +176,15 @@ DlgIndividual::DlgIndividual(Transfer * _item)
panelAdvanced->addTab(spins, i18n("Timer"));
panelAdvanced->hide();
- connect(spins, SIGNAL(valueChanged(const QDateTime &)), item, SLOT(slotStartTime(const QDateTime &)));
+ connect(spins, TQT_SIGNAL(valueChanged(const TQDateTime &)), item, TQT_SLOT(slotStartTime(const TQDateTime &)));
// adding item log
- ml_log = new QTextEdit(panelAdvanced);
+ ml_log = new TQTextEdit(panelAdvanced);
ml_log->setTextFormat(LogText);
ml_log->setReadOnly(true);
// ml_log->setFixedSize(sizeHint());
- ml_log->setVScrollBarMode(QScrollView::Auto);
- ml_log->setWordWrap(QTextEdit::NoWrap);
+ ml_log->setVScrollBarMode(TQScrollView::Auto);
+ ml_log->setWordWrap(TQTextEdit::NoWrap);
// ml_log->setSizePolicy(policy);
@@ -228,7 +228,7 @@ void DlgIndividual::setProcessedSize(KIO::filesize_t bytes)
}
-void DlgIndividual::setSpeed(QString speed)
+void DlgIndividual::setSpeed(TQString speed)
{
speedLabel->setText(speed);
m_pDockIndividual->setTip(speed);
@@ -295,12 +295,12 @@ void DlgIndividual::slotToggleDock()
/** Sets the whole log */
-void DlgIndividual::setLog(const QString & _msg)
+void DlgIndividual::setLog(const TQString & _msg)
{
ml_log->setText(_msg);
}
-void DlgIndividual::appendLog(const QString & _msg)
+void DlgIndividual::appendLog(const TQString & _msg)
{
ml_log->append(_msg);
}
diff --git a/kget/dlgIndividual.h b/kget/dlgIndividual.h
index 73a233aa..e275608d 100644
--- a/kget/dlgIndividual.h
+++ b/kget/dlgIndividual.h
@@ -27,9 +27,9 @@
#ifndef __dlgprogress_h__
#define __dlgprogress_h__
-#include <qdatetime.h>
+#include <tqdatetime.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kio/global.h>
@@ -54,8 +54,8 @@ public:
DlgIndividual(Transfer * _item);
~DlgIndividual()
{}
- void setLog(const QString & _msg);
- void appendLog(const QString & _msg);
+ void setLog(const TQString & _msg);
+ void appendLog(const TQString & _msg);
void enableOpenFile();
public slots:
@@ -63,7 +63,7 @@ public slots:
void setProcessedSize(KIO::filesize_t bytes);
- void setSpeed(QString speed);
+ void setSpeed(TQString speed);
void setPercent(unsigned long percent);
void setCopying(const KURL & src, const KURL & dest);
@@ -79,12 +79,12 @@ protected slots:
void slotToggleDock();
protected:
- QLabel *sourceLabel;
- QLabel *destLabel;
- QLabel *speedLabel;
- QLabel *sizeLabel;
- QLabel *resumeLabel;
- QTextEdit *ml_log;
+ TQLabel *sourceLabel;
+ TQLabel *destLabel;
+ TQLabel *speedLabel;
+ TQLabel *sizeLabel;
+ TQLabel *resumeLabel;
+ TQTextEdit *ml_log;
KProgress *m_pProgressBar;
DockIndividual * m_pDockIndividual;
@@ -93,10 +93,10 @@ protected:
KPushButton * openLocation;
KPushButton * pbAdvanced ;
- QTabWidget * panelAdvanced;
+ TQTabWidget * panelAdvanced;
KToggleAction * m_paDock;
- QDateTime qdt;
+ TQDateTime qdt;
KDateTimeWidget *spins;
Transfer *item;
diff --git a/kget/dlgLimits.cpp b/kget/dlgLimits.cpp
index e31326c7..8c6ded6d 100644
--- a/kget/dlgLimits.cpp
+++ b/kget/dlgLimits.cpp
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <knuminput.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
#include "dlgLimits.h"
-DlgLimits::DlgLimits(QWidget * parent)
+DlgLimits::DlgLimits(TQWidget * parent)
: DlgLimitsBase(parent)
{
// TODO: these are not supported yet, so hide them
diff --git a/kget/dlgLimits.h b/kget/dlgLimits.h
index a020f221..0c4aaa6f 100644
--- a/kget/dlgLimits.h
+++ b/kget/dlgLimits.h
@@ -35,7 +35,7 @@ class DlgLimits : public DlgLimitsBase
Q_OBJECT public:
- DlgLimits(QWidget * parent);
+ DlgLimits(TQWidget * parent);
~DlgLimits() {}
void applyData();
void setData();
diff --git a/kget/dlgPreferences.cpp b/kget/dlgPreferences.cpp
index f35b8add..cc5ebb43 100644
--- a/kget/dlgPreferences.cpp
+++ b/kget/dlgPreferences.cpp
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <klocale.h>
@@ -49,62 +49,62 @@
#include "dlgPreferences.h"
-DlgPreferences::DlgPreferences(QWidget * parent):
+DlgPreferences::DlgPreferences(TQWidget * parent):
KDialogBase(Tabbed, i18n("Configure"), Ok|Apply|Help|Cancel, Ok, parent, "DlgPreferences", true)
{
// add pages
- QFrame *page = addPage(i18n("Connection"));
- QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint());
+ TQFrame *page = addPage(i18n("Connection"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint());
conDlg = new DlgConnection(page);
topLayout->addWidget(conDlg);
page = addPage(i18n("Automation"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
autDlg = new DlgAutomation(page);
topLayout->addWidget(autDlg);
topLayout->addStretch();
page = addPage(i18n("Limits"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
limDlg = new DlgLimits(page);
topLayout->addWidget(limDlg);
topLayout->addStretch();
page = addPage(i18n("Advanced"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
advDlg = new DlgAdvanced(page);
topLayout->addWidget(advDlg);
topLayout->addStretch();
// page = addPage(i18n("Search"));
- // topLayout = new QVBoxLayout(page, 0, spacingHint());
+ // topLayout = new TQVBoxLayout(page, 0, spacingHint());
// seaDlg = new DlgSearch(page);
// topLayout->addWidget(seaDlg);
page = addPage(i18n("Folders"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
dirDlg = new DlgDirectories(page);
topLayout->addWidget(dirDlg);
topLayout->addStretch();
page = addPage(i18n("System"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
sysDlg = new DlgSystem(page);
topLayout->addWidget(sysDlg);
topLayout->addStretch();
// type of connection influences autoDisconnect & timedDisconnect features
- connect(conDlg, SIGNAL(typeChanged(int)), autDlg, SLOT(slotTypeChanged(int)));
+ connect(conDlg, TQT_SIGNAL(typeChanged(int)), autDlg, TQT_SLOT(slotTypeChanged(int)));
loadAllData();
- connect( conDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
- connect( autDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
- connect( limDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
- connect( advDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
- connect( dirDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
- connect( sysDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
+ connect( conDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
+ connect( autDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
+ connect( limDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
+ connect( advDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
+ connect( dirDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
+ connect( sysDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
}
diff --git a/kget/dlgPreferences.h b/kget/dlgPreferences.h
index 8e2e1307..b7881079 100644
--- a/kget/dlgPreferences.h
+++ b/kget/dlgPreferences.h
@@ -27,8 +27,8 @@
#ifndef _DLGPREFERENCES_H
#define _DLGPREFERENCES_H
-#include <qdialog.h>
-#include <qstringlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
@@ -46,7 +46,7 @@ class DlgPreferences:public KDialogBase
Q_OBJECT public:
- DlgPreferences(QWidget * parent);
+ DlgPreferences(TQWidget * parent);
~DlgPreferences()
{}
diff --git a/kget/dlgSystem.cpp b/kget/dlgSystem.cpp
index d908724a..af33f966 100644
--- a/kget/dlgSystem.cpp
+++ b/kget/dlgSystem.cpp
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#ifdef index
#undef index
@@ -38,11 +38,11 @@
#include "kmainwidget.h"
#include "dlgSystem.h"
-#include <qbuttongroup.h>
-#include <qlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
-DlgSystem::DlgSystem(QWidget * parent)
+DlgSystem::DlgSystem(TQWidget * parent)
: DlgSystemBase(parent)
{
bg_window->hide();
diff --git a/kget/dlgSystem.h b/kget/dlgSystem.h
index 677481b3..db740596 100644
--- a/kget/dlgSystem.h
+++ b/kget/dlgSystem.h
@@ -35,7 +35,7 @@
class DlgSystem : public DlgSystemBase
{
Q_OBJECT public:
- DlgSystem(QWidget * parent);
+ DlgSystem(TQWidget * parent);
~DlgSystem() {}
void applyData();
diff --git a/kget/dockindividual.cpp b/kget/dockindividual.cpp
index 1ecf61fa..e8f02645 100644
--- a/kget/dockindividual.cpp
+++ b/kget/dockindividual.cpp
@@ -24,12 +24,12 @@
*
***************************************************************************/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
#include "dockindividual.h"
-DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray(parent,name)
+DockIndividual::DockIndividual(TQWidget *parent, const char *name ) : KSystemTray(parent,name)
{
nPic=0;
setPixmap( loadIcon("bar0") );
@@ -37,7 +37,7 @@ DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray
DockIndividual::~DockIndividual()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
}
@@ -66,7 +66,7 @@ void DockIndividual::setValue(int value){
if (tmpPic!=nPic)
{
nPic=tmpPic;
- QString str = "bar" + QString::number( nPic );
+ TQString str = "bar" + TQString::number( nPic );
setPixmap( loadIcon( str ) );
}
@@ -77,14 +77,14 @@ void DockIndividual::setValue(int value){
-void DockIndividual::setTip(const QString & _tip)
+void DockIndividual::setTip(const TQString & _tip)
{
#ifdef _DEBUG
//sDebugIn<<"_tip="<<_tip<<endl;
#endif
- QToolTip::add( this, _tip );
+ TQToolTip::add( this, _tip );
#ifdef _DEBUG
//sDebugOut<<endl;
diff --git a/kget/dockindividual.h b/kget/dockindividual.h
index 39203272..32dd26cf 100644
--- a/kget/dockindividual.h
+++ b/kget/dockindividual.h
@@ -36,10 +36,10 @@ class KPopupMenu;
class DockIndividual : public KSystemTray {
Q_OBJECT
public:
- DockIndividual(QWidget *parent=0, const char *name=0);
+ DockIndividual(TQWidget *parent=0, const char *name=0);
~DockIndividual();
int nPic;
- void setTip(const QString &);
+ void setTip(const TQString &);
void setValue(int value);
/** No descriptions */
virtual void contextMenuAboutToShow ( KPopupMenu* menu );
diff --git a/kget/docking.cpp b/kget/docking.cpp
index cd3309c3..eba2e8ad 100644
--- a/kget/docking.cpp
+++ b/kget/docking.cpp
@@ -24,7 +24,7 @@
*
***************************************************************************/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -68,27 +68,27 @@ DockWidget::~DockWidget()
}
-void DockWidget::dragEnterEvent(QDragEnterEvent * event)
+void DockWidget::dragEnterEvent(TQDragEnterEvent * event)
{
event->accept(KURLDrag::canDecode(event)
- || QTextDrag::canDecode(event));
+ || TQTextDrag::canDecode(event));
}
-void DockWidget::dropEvent(QDropEvent * event)
+void DockWidget::dropEvent(TQDropEvent * event)
{
KURL::List list;
- QString str;
+ TQString str;
if (KURLDrag::decode(event, list)) {
parent->addTransfers(list);
- } else if (QTextDrag::decode(event, str)) {
+ } else if (TQTextDrag::decode(event, str)) {
parent->addTransfer(str);
}
}
-void DockWidget::mousePressEvent(QMouseEvent * e)
+void DockWidget::mousePressEvent(TQMouseEvent * e)
{
if (e->button() == MidButton) {
parent->slotPasteTransfer();
@@ -98,33 +98,33 @@ void DockWidget::mousePressEvent(QMouseEvent * e)
}
-void DockWidget::updateToolTip( const QString& _status )
+void DockWidget::updateToolTip( const TQString& _status )
{
dtip->setStatus( _status );
}
-void DockWidget::changeIcon( const QString& icon )
+void DockWidget::changeIcon( const TQString& icon )
{
setPixmap( loadIcon( icon ));
}
-DynamicTip::DynamicTip( QWidget * parent )
- : QToolTip( parent )
+DynamicTip::DynamicTip( TQWidget * parent )
+ : TQToolTip( parent )
{
// no explicit initialization needed
}
-void DynamicTip::setStatus( const QString & _status )
+void DynamicTip::setStatus( const TQString & _status )
{
status = _status;
}
-void DynamicTip::maybeTip( const QPoint & _pos )
+void DynamicTip::maybeTip( const TQPoint & _pos )
{
- QRect r( parentWidget()->rect() );
+ TQRect r( parentWidget()->rect() );
tip( r, status );
}
diff --git a/kget/docking.h b/kget/docking.h
index df4c75ec..ba9a88c1 100644
--- a/kget/docking.h
+++ b/kget/docking.h
@@ -31,7 +31,7 @@
#include <stdio.h>
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <ksystemtray.h>
@@ -41,15 +41,15 @@ class KMainWidget;
class DynamicTip : public QToolTip
{
public:
- DynamicTip( QWidget * parent );
+ DynamicTip( TQWidget * parent );
virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0
- void setStatus( const QString & _status );
+ void setStatus( const TQString & _status );
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
private:
- QString status;
+ TQString status;
};
class DockWidget:public KSystemTray
@@ -59,18 +59,18 @@ Q_OBJECT public:
DockWidget(KMainWidget * parent);
~DockWidget();
/** No descriptions */
- void updateToolTip( const QString& );
- void changeIcon( const QString& );
+ void updateToolTip( const TQString& );
+ void changeIcon( const TQString& );
private slots:
- void mousePressEvent(QMouseEvent * e);
+ void mousePressEvent(TQMouseEvent * e);
protected:
// drag and drop
- void dragEnterEvent(QDragEnterEvent *);
- void dropEvent(QDropEvent *);
+ void dragEnterEvent(TQDragEnterEvent *);
+ void dropEvent(TQDropEvent *);
private:
KMainWidget *parent;
diff --git a/kget/droptarget.cpp b/kget/droptarget.cpp
index 97bb01e2..eeea1486 100644
--- a/kget/droptarget.cpp
+++ b/kget/droptarget.cpp
@@ -24,7 +24,7 @@
*
***************************************************************************/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kaction.h>
#include <kapplication.h>
@@ -38,7 +38,7 @@
#include <kurldrag.h>
#include "kmainwidget.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -50,13 +50,13 @@
#include "settings.h"
#include "droptarget.h"
-DropTarget::DropTarget(KMainWindow * mainWin):QWidget()
+DropTarget::DropTarget(KMainWindow * mainWin):TQWidget()
{
int x = ksettings.dropPosition.x();
int y = ksettings.dropPosition.y();
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QPixmap bgnd = UserIcon( "target" );
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
+ TQPixmap bgnd = UserIcon( "target" );
if (x != -1 &&
x >= desk.left() && y >= desk.top() &&
@@ -89,10 +89,10 @@ DropTarget::DropTarget(KMainWindow * mainWin):QWidget()
popupMenu->insertTitle(kapp->caption());
popupMenu->setCheckable(true);
- pop_Max = popupMenu->insertItem(i18n("Maximize"), this, SLOT(toggleMinimizeRestore()));
- pop_Min = popupMenu->insertItem(i18n("Minimize"), this, SLOT(toggleMinimizeRestore()));
+ pop_Max = popupMenu->insertItem(i18n("Maximize"), this, TQT_SLOT(toggleMinimizeRestore()));
+ pop_Min = popupMenu->insertItem(i18n("Minimize"), this, TQT_SLOT(toggleMinimizeRestore()));
- pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, SLOT(toggleSticky()));
+ pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, TQT_SLOT(toggleSticky()));
popupMenu->insertSeparator();
mainWin->action("drop_target")->plug(popupMenu);
popupMenu->insertSeparator();
@@ -116,7 +116,7 @@ DropTarget::~DropTarget()
void
-DropTarget::mousePressEvent(QMouseEvent * e)
+DropTarget::mousePressEvent(TQMouseEvent * e)
{
if (e->button() == LeftButton)
{
@@ -124,15 +124,15 @@ DropTarget::mousePressEvent(QMouseEvent * e)
// oldX = 0;
// oldY = 0;
isdragging = true;
- dx = QCursor::pos().x() - pos().x();
- dy = QCursor::pos().y() - pos().y();
+ dx = TQCursor::pos().x() - pos().x();
+ dy = TQCursor::pos().y() - pos().y();
}
else if (e->button() == RightButton)
{
popupMenu->setItemEnabled(pop_Min, kmain->isVisible());
popupMenu->setItemEnabled(pop_Max, kmain->isHidden());
- popupMenu->popup(QCursor::pos());
+ popupMenu->popup(TQCursor::pos());
}
else if (e->button() == MidButton)
{
@@ -141,7 +141,7 @@ DropTarget::mousePressEvent(QMouseEvent * e)
}
-void DropTarget::resizeEvent(QResizeEvent *)
+void DropTarget::resizeEvent(TQResizeEvent *)
{
#ifdef Q_WS_X11
XShapeCombineMask(x11Display(), winId(), ShapeBounding, 0, 0, mask.handle(), ShapeSet);
@@ -149,23 +149,23 @@ void DropTarget::resizeEvent(QResizeEvent *)
}
-void DropTarget::dragEnterEvent(QDragEnterEvent * event)
+void DropTarget::dragEnterEvent(TQDragEnterEvent * event)
{
event->accept(KURLDrag::canDecode(event)
- || QTextDrag::canDecode(event));
+ || TQTextDrag::canDecode(event));
}
-void DropTarget::dropEvent(QDropEvent * event)
+void DropTarget::dropEvent(TQDropEvent * event)
{
KURL::List list;
- QString str;
+ TQString str;
if (KURLDrag::decode(event, list))
{
kmain->addTransfers(list);
}
- else if (QTextDrag::decode(event, str))
+ else if (TQTextDrag::decode(event, str))
{
kmain->addTransfer(str);
}
@@ -200,7 +200,7 @@ void DropTarget::toggleMinimizeRestore()
}
/** No descriptions */
-void DropTarget::mouseMoveEvent(QMouseEvent * e)
+void DropTarget::mouseMoveEvent(TQMouseEvent * e)
{
/*
if (oldX == 0)
@@ -211,18 +211,18 @@ void DropTarget::mouseMoveEvent(QMouseEvent * e)
}
+*/
if (isdragging)
- move( QCursor::pos().x() - dx, QCursor::pos().y() - dy );
+ move( TQCursor::pos().x() - dx, TQCursor::pos().y() - dy );
// move(x() + (e->x() - oldX), y() + (e->y() - oldY)); // <<--
}
-void DropTarget::mouseReleaseEvent(QMouseEvent *)
+void DropTarget::mouseReleaseEvent(TQMouseEvent *)
{
isdragging = false;
}
/** No descriptions */
-void DropTarget::mouseDoubleClickEvent(QMouseEvent * e)
+void DropTarget::mouseDoubleClickEvent(TQMouseEvent * e)
{
if (e->button() == LeftButton)
toggleMinimizeRestore();
diff --git a/kget/droptarget.h b/kget/droptarget.h
index debce208..a6276278 100644
--- a/kget/droptarget.h
+++ b/kget/droptarget.h
@@ -27,9 +27,9 @@
#ifndef _DROPTARGET_H
#define _DROPTARGET_H
-#include <qwidget.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
+#include <tqwidget.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
class KPopupMenu;
class KMainWidget;
@@ -46,17 +46,17 @@ public:
void updateStickyState();
protected:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
// drag and drop
- virtual void dragEnterEvent(QDragEnterEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
/** No descriptions */
- virtual void mouseDoubleClickEvent(QMouseEvent * e);
- virtual void dropEvent(QDropEvent *);
+ virtual void mouseDoubleClickEvent(TQMouseEvent * e);
+ virtual void dropEvent(TQDropEvent *);
/** No descriptions */
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void mousePressEvent(QMouseEvent * e);
- virtual void mouseReleaseEvent(QMouseEvent *);
+ virtual void mouseMoveEvent(TQMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent * e);
+ virtual void mouseReleaseEvent(TQMouseEvent *);
private slots:
void toggleSticky();
@@ -74,7 +74,7 @@ private:
int size[4];
- QBitmap mask;
+ TQBitmap mask;
public: // Public attributes
/** */
// int oldX;
diff --git a/kget/kfileio.cpp b/kget/kfileio.cpp
index bfd03864..63f230bc 100644
--- a/kget/kfileio.cpp
+++ b/kget/kfileio.cpp
@@ -12,13 +12,13 @@
// Author: Stefan Taferner <taferner@kde.org>
-#include <qapplication.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqstring.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <klocale.h>
@@ -27,14 +27,14 @@
#include "kfileio.h"
//-----------------------------------------------------------------------------
-QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose)
+TQString kFileToString(const TQString & aFileName, bool aEnsureNL, bool aVerbose)
{
- QCString result;
+ TQCString result;
- QFileInfo info(aFileName);
+ TQFileInfo info(aFileName);
unsigned int readLen;
unsigned int len = info.size();
- QFile file(aFileName);
+ TQFile file(aFileName);
// assert(aFileName!=NULL);
if (aFileName == NULL)
@@ -43,20 +43,20 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose)
if (!info.exists()) {
if (aVerbose)
KMessageBox::error(qApp->mainWidget(), i18n("The specified file does not exist:\n%1").arg(aFileName));
- return QString::null;
+ return TQString::null;
}
if (info.isDir()) {
if (aVerbose)
KMessageBox::error(qApp->mainWidget(), i18n("This is a folder and not a file:\n%1").arg(aFileName));
- return QString::null;
+ return TQString::null;
}
if (!info.isReadable()) {
if (aVerbose)
KMessageBox::error(qApp->mainWidget(), i18n("You do not have read permission for the file:\n%1").arg(aFileName));
- return QString::null;
+ return TQString::null;
}
if (len <= 0)
- return QString::null;
+ return TQString::null;
if (!file.open(IO_Raw | IO_ReadOnly)) {
if (aVerbose)
@@ -70,7 +70,7 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose)
default:
KMessageBox::error(qApp->mainWidget(), i18n("Error while reading file:\n%1").arg(aFileName));
}
- return QString::null;
+ return TQString::null;
}
result.resize(len + (int) aEnsureNL + 1);
@@ -82,11 +82,11 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose)
result[len] = '\0';
if (readLen < len) {
- QString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen,
+ TQString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen,
0)).arg(KGlobal::locale()->formatNumber(len, 0));
KMessageBox::error(qApp->mainWidget(), msg);
- return QString::null;
+ return TQString::null;
}
kdDebug() << "kFileToString: " << readLen << " bytes read" << endl;
@@ -95,10 +95,10 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose)
//-----------------------------------------------------------------------------
-static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
+static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
{
- QFile file(aFileName);
- QFileInfo info(aFileName);
+ TQFile file(aFileName);
+ TQFileInfo info(aFileName);
int writeLen, rc;
// assert(aFileName!=NULL);
@@ -107,19 +107,19 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName
if (info.exists()) {
if (aAskIfExists) {
- QString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName);
+ TQString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName);
- rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, QString::null, i18n("Replace"),KStdGuiItem::cancel());
+ rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, TQString::null, i18n("Replace"),KStdGuiItem::cancel());
if (rc != KMessageBox::Yes)
return FALSE;
}
if (aBackup) {
// make a backup copy
- QString bakName = aFileName;
+ TQString bakName = aFileName;
bakName += '~';
- QFile::remove(bakName);
- rc = rename(QFile::encodeName(aFileName), QFile::encodeName(bakName));
+ TQFile::remove(bakName);
+ rc = rename(TQFile::encodeName(aFileName), TQFile::encodeName(bakName));
if (rc) {
// failed to rename file
if (!aVerbose)
@@ -152,7 +152,7 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName
KMessageBox::error(qApp->mainWidget(), i18n("Could not write to file:\n%1").arg(aFileName));
return FALSE;
} else if (writeLen < len) {
- QString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen,
+ TQString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen,
0)).arg(KGlobal::locale()->formatNumber(len,
0));
@@ -163,12 +163,12 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName
return TRUE;
}
-bool kCStringToFile(const QCString & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
+bool kCStringToFile(const TQCString & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.length(), aFileName, aAskIfExists, aBackup, aVerbose);
}
-bool kByteArrayToFile(const QByteArray & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
+bool kByteArrayToFile(const TQByteArray & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.size(), aFileName, aAskIfExists, aBackup, aVerbose);
}
diff --git a/kget/kfileio.h b/kget/kfileio.h
index 9b2780ad..84a50cd2 100644
--- a/kget/kfileio.h
+++ b/kget/kfileio.h
@@ -28,17 +28,17 @@
* byte longer than the file itself.
* If ensureNewline is TRUE the string will always have a trailing newline.
*/
-QString kFileToString(const QString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE);
+TQString kFileToString(const TQString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE);
/** Save a file. If withDialogs is FALSE no warning dialogs are opened if
* there are problems. Returns TRUE on success and FALSE on failure.
* Replaces existing files without warning if askIfExists==FALSE.
* Makes a copy if the file exists to filename~ if createBackup==TRUE.
*/
-bool kCStringToFile(const QCString & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE);
+bool kCStringToFile(const TQCString & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE);
// Does not stop at NUL
-bool kByteArrayToFile(const QByteArray & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE);
+bool kByteArrayToFile(const TQByteArray & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE);
#endif /* kfileio_h */
diff --git a/kget/kget_iface.h b/kget/kget_iface.h
index 015bef2f..df01375c 100644
--- a/kget/kget_iface.h
+++ b/kget/kget_iface.h
@@ -16,14 +16,14 @@ class KGetIface : public DCOPObject
K_DCOP
protected:
- KGetIface( QCString objId ) : DCOPObject( objId ) {}
+ KGetIface( TQCString objId ) : DCOPObject( objId ) {}
k_dcop:
/**
* @param src The urls to download
- * @param destDir The destination direction or QString::null if unspecified
+ * @param destDir The destination direction or TQString::null if unspecified
*/
- virtual ASYNC addTransfers( const KURL::List& src, const QString& destDir = QString::null ) = 0;
+ virtual ASYNC addTransfers( const KURL::List& src, const TQString& destDir = TQString::null ) = 0;
virtual bool isDropTargetVisible() const = 0;
diff --git a/kget/kget_plug_in/kget_linkview.cpp b/kget/kget_plug_in/kget_linkview.cpp
index 179cc81b..a9bab704 100644
--- a/kget/kget_plug_in/kget_linkview.cpp
+++ b/kget/kget_plug_in/kget_linkview.cpp
@@ -1,6 +1,6 @@
#include "kget_linkview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <dcopclient.h>
#include <kaction.h>
@@ -18,11 +18,11 @@
#define COL_MIME 2
#define COL_URL 3
-LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk )
- : QListViewItem( parent ),
+LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk )
+ : TQListViewItem( parent ),
link( lnk )
{
- QString file = link->url.fileName();
+ TQString file = link->url.fileName();
if ( file.isEmpty() )
file = link->url.host();
@@ -37,17 +37,17 @@ LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KGetLinkView::KGetLinkView( QWidget *parent, const char *name )
+KGetLinkView::KGetLinkView( TQWidget *parent, const char *name )
: KMainWindow( parent, name )
{
setPlainCaption( i18n( "KGet" ) );
KAction* actionDownload = new KAction( i18n("Download Selected Files"),
"kget", CTRL+Key_D,
- this, SLOT( slotStartLeech() ),
+ this, TQT_SLOT( slotStartLeech() ),
actionCollection(), "startDownload" );
- KAction* actionSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ),
+ KAction* actionSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ),
actionCollection() );
m_links.setAutoDelete( true );
@@ -55,12 +55,12 @@ KGetLinkView::KGetLinkView( QWidget *parent, const char *name )
toolBar()->insertLineSeparator();
actionSelectAll->plug( toolBar() );
- QWidget *mainWidget = new QWidget( this );
- QVBoxLayout *layout = new QVBoxLayout( mainWidget );
+ TQWidget *mainWidget = new TQWidget( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( mainWidget );
setCentralWidget( mainWidget );
m_view = new KListView( mainWidget, "listview" );
- m_view->setSelectionMode( QListView::Extended );
+ m_view->setSelectionMode( TQListView::Extended );
m_view->addColumn( i18n("File Name") );
m_view->addColumn( i18n("Description") );
m_view->addColumn( i18n("File Type") );
@@ -81,17 +81,17 @@ KGetLinkView::~KGetLinkView()
{
}
-void KGetLinkView::setLinks( QPtrList<LinkItem>& links )
+void KGetLinkView::setLinks( TQPtrList<LinkItem>& links )
{
m_links = links; // now we 0wn them
showLinks( m_links );
}
-void KGetLinkView::showLinks( const QPtrList<LinkItem>& links )
+void KGetLinkView::showLinks( const TQPtrList<LinkItem>& links )
{
m_view->clear();
- QPtrListIterator<LinkItem> it( links );
+ TQPtrListIterator<LinkItem> it( links );
for ( ; it.current(); ++it )
(void) new LinkViewItem( m_view, *it );
@@ -101,7 +101,7 @@ void KGetLinkView::showLinks( const QPtrList<LinkItem>& links )
void KGetLinkView::slotStartLeech()
{
KURL::List urls;
- QListViewItemIterator it( m_view->firstChild() );
+ TQListViewItemIterator it( m_view->firstChild() );
for ( ; it.current(); ++it )
{
if ( it.current()->isSelected() )
@@ -123,11 +123,11 @@ void KGetLinkView::slotStartLeech()
}
kapp->updateRemoteUserTimestamp( "kget" );
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
- stream << urls << QString::null;
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
+ stream << urls << TQString::null;
bool ok = DCOPClient::mainClient()->send( "kget", "KGet-Interface",
- "addTransfers(KURL::List, QString)",
+ "addTransfers(KURL::List, TQString)",
data );
kdDebug() << "*** startDownload: " << ok << endl;
@@ -137,7 +137,7 @@ void KGetLinkView::slotStartLeech()
}
}
-void KGetLinkView::setPageURL( const QString& url )
+void KGetLinkView::setPageURL( const TQString& url )
{
setPlainCaption( i18n( "Links in: %1 - KGet" ).arg( url ) );
}
diff --git a/kget/kget_plug_in/kget_linkview.h b/kget/kget_plug_in/kget_linkview.h
index a6d7961c..26ce28fc 100644
--- a/kget/kget_plug_in/kget_linkview.h
+++ b/kget/kget_plug_in/kget_linkview.h
@@ -8,7 +8,7 @@
#ifndef KGET_LINKVIEW_H
#define KGET_LINKVIEW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kmainwindow.h>
@@ -19,7 +19,7 @@
class LinkViewItem : public QListViewItem
{
public:
- LinkViewItem( QListView *parent, const LinkItem * lnk );
+ LinkViewItem( TQListView *parent, const LinkItem * lnk );
const LinkItem *link;
};
@@ -29,11 +29,11 @@ class KGetLinkView : public KMainWindow
Q_OBJECT
public:
- KGetLinkView( QWidget *parent = 0L, const char *name = 0L );
+ KGetLinkView( TQWidget *parent = 0L, const char *name = 0L );
~KGetLinkView();
- void setLinks( QPtrList<LinkItem>& links );
- void setPageURL( const QString& url );
+ void setLinks( TQPtrList<LinkItem>& links );
+ void setPageURL( const TQString& url );
signals:
void leechURLs( const KURL::List& urls );
@@ -43,9 +43,9 @@ private slots:
void slotSelectAll();
private:
- void showLinks( const QPtrList<LinkItem>& links );
+ void showLinks( const TQPtrList<LinkItem>& links );
- QPtrList<LinkItem> m_links;
+ TQPtrList<LinkItem> m_links;
KListView *m_view;
diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp
index dc5f5b9f..c73406a2 100644
--- a/kget/kget_plug_in/kget_plug_in.cpp
+++ b/kget/kget_plug_in/kget_plug_in.cpp
@@ -44,25 +44,25 @@
#include "links.h"
#include "kget_linkview.h"
-KGet_plug_in::KGet_plug_in( QObject* parent, const char* name )
+KGet_plug_in::KGet_plug_in( TQObject* parent, const char* name )
: Plugin( parent, name )
{
- QPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
KIcon::MainToolbar);
KActionMenu *menu = new KActionMenu( i18n("Download Manager"), pix,
actionCollection(), "kget_menu" );
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() ));
m_paToggleDropTarget=new KToggleAction(i18n("Show Drop Target"),
KShortcut(),
- this, SLOT(slotShowDrop()),
+ this, TQT_SLOT(slotShowDrop()),
actionCollection(), "show_drop" );
menu->insert( m_paToggleDropTarget );
KAction *action = new KAction(i18n("List All Links"), KShortcut(),
- this, SLOT( slotShowLinks() ),
+ this, TQT_SLOT( slotShowLinks() ),
actionCollection(), "show_links");
menu->insert( action );
@@ -122,8 +122,8 @@ void KGet_plug_in::slotShowLinks()
DOM::HTMLCollection links = doc.links();
- QPtrList<LinkItem> linkList;
- std::set<QString> dupeCheck;
+ TQPtrList<LinkItem> linkList;
+ std::set<TQString> dupeCheck;
for ( uint i = 0; i < links.length(); i++ )
{
DOM::Node link = links.item( i );
@@ -150,22 +150,22 @@ void KGet_plug_in::slotShowLinks()
}
KGetLinkView *view = new KGetLinkView();
- QString url = doc.URL().string();
+ TQString url = doc.URL().string();
view->setPageURL( url );
view->setLinks( linkList );
view->show();
}
-KPluginFactory::KPluginFactory( QObject* parent, const char* name )
+KPluginFactory::KPluginFactory( TQObject* parent, const char* name )
: KLibFactory( parent, name )
{
s_instance = new KInstance("KPluginFactory");
}
-QObject* KPluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & )
+TQObject* KPluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & )
{
- QObject *obj = new KGet_plug_in( parent, name );
+ TQObject *obj = new KGet_plug_in( parent, name );
return obj;
}
diff --git a/kget/kget_plug_in/kget_plug_in.h b/kget/kget_plug_in/kget_plug_in.h
index 75888b10..b5cfea29 100644
--- a/kget/kget_plug_in/kget_plug_in.h
+++ b/kget/kget_plug_in/kget_plug_in.h
@@ -28,7 +28,7 @@ class KGet_plug_in : public KParts::Plugin
{
Q_OBJECT
public:
- KGet_plug_in( QObject* parent = 0, const char* name = 0 );
+ KGet_plug_in( TQObject* parent = 0, const char* name = 0 );
KToggleAction *m_paToggleDropTarget ;
DCOPClient* p_dcopServer;
virtual ~KGet_plug_in();
@@ -44,12 +44,12 @@ class KPluginFactory : public KLibFactory
{
Q_OBJECT
public:
- KPluginFactory( QObject *parent = 0, const char *name = 0 );
+ KPluginFactory( TQObject *parent = 0, const char *name = 0 );
~KPluginFactory() ;
- virtual QObject* createObject( QObject* parent = 0, const char* pname = 0,
- const char* name = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
+ const char* name = "TQObject",
+ const TQStringList &args = TQStringList() );
private:
static KInstance* s_instance;
diff --git a/kget/kget_plug_in/links.cpp b/kget/kget_plug_in/links.cpp
index a597257d..12600353 100644
--- a/kget/kget_plug_in/links.cpp
+++ b/kget/kget_plug_in/links.cpp
@@ -14,7 +14,7 @@ LinkItem::LinkItem( DOM::Element link )
// qDebug("*** href: %s", href.nodeValue().string().latin1() );
- QString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string();
+ TQString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string();
if ( urlString.isEmpty() )
return;
@@ -34,7 +34,7 @@ LinkItem::LinkItem( DOM::Element link )
// force "local file" mimetype determination
KMimeType::Ptr mt = KMimeType::findByURL( url, 0, true, true);
- icon = mt->icon( QString::null, false ); // dummy parameters
+ icon = mt->icon( TQString::null, false ); // dummy parameters
mimeType = mt->comment();
m_valid = true;
diff --git a/kget/kget_plug_in/links.h b/kget/kget_plug_in/links.h
index 89ba9ab5..9430dcc0 100644
--- a/kget/kget_plug_in/links.h
+++ b/kget/kget_plug_in/links.h
@@ -18,9 +18,9 @@ public:
LinkItem( DOM::Element link );
KURL url;
- QString icon;
- QString text;
- QString mimeType;
+ TQString icon;
+ TQString text;
+ TQString mimeType;
bool isValid() const { return m_valid; }
diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp
index 420d44a1..01fc48c4 100644
--- a/kget/kmainwidget.cpp
+++ b/kget/kmainwidget.cpp
@@ -38,15 +38,15 @@
#include <net/if.h>
#endif
-#include <qclipboard.h>
-#include <qregexp.h>
-#include <qdragobject.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qdropsite.h>
-#include <qpopupmenu.h>
-#include <qfileinfo.h>
+#include <tqclipboard.h>
+#include <tqregexp.h>
+#include <tqdragobject.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqdropsite.h>
+#include <tqpopupmenu.h>
+#include <tqfileinfo.h>
#include <kinputdialog.h>
#include <kprotocolinfo.h>
@@ -87,7 +87,7 @@
#include <kio/authinfo.h>
#include <kio/global.h>
-#include <qiconset.h>
+#include <tqiconset.h>
#include "version.h"
#include "slave.h"
@@ -129,7 +129,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
{
KConfig cfg( "kioslaverc", false, false);
- cfg.setGroup(QString::null);
+ cfg.setGroup(TQString::null);
cfg.writeEntry("AutoResume", true);
cfg.sync();
}
@@ -142,16 +142,16 @@ KMainWidget::KMainWidget(bool bStartDocked)
kmain = this;
// Set log time, needed for the name of log file
- QDate date = QDateTime::currentDateTime().date();
- QTime time = QDateTime::currentDateTime().time();
- QString tmp;
+ TQDate date = TQDateTime::currentDateTime().date();
+ TQTime time = TQDateTime::currentDateTime().time();
+ TQString tmp;
tmp.sprintf("log%d:%d:%d-%d:%d:%d", date.day(), date.month(), date.year(), time.hour(), time.minute(), time.second());
logFileName = locateLocal("appdata", "logs/");
logFileName += tmp;
- lastClipboard = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
+ lastClipboard = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
// Load all settings from KConfig
ksettings.load();
@@ -169,14 +169,14 @@ KMainWidget::KMainWidget(bool bStartDocked)
setCentralWidget(myTransferList);
- connect(kapp, SIGNAL(saveYourself()), SLOT(slotSaveYourself()));
+ connect(kapp, TQT_SIGNAL(saveYourself()), TQT_SLOT(slotSaveYourself()));
// Enable dropping
setAcceptDrops(true);
// Setup connection timer
- connectionTimer = new QTimer(this);
- connect(connectionTimer, SIGNAL(timeout()), SLOT(slotCheckConnection()));
+ connectionTimer = new TQTimer(this);
+ connect(connectionTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckConnection()));
// setup socket for checking connection
if ((_sock = sockets_open()) < 0) {
@@ -189,9 +189,9 @@ KMainWidget::KMainWidget(bool bStartDocked)
ksettings.b_offline=( !b_connected || ksettings.b_offlineMode );
// Setup animation timer
- animTimer = new QTimer(this);
+ animTimer = new TQTimer(this);
animCounter = 0;
- connect(animTimer, SIGNAL(timeout()), SLOT(slotAnimTimeout()));
+ connect(animTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAnimTimeout()));
if (ksettings.b_useAnimation) {
animTimer->start(400);
@@ -200,18 +200,18 @@ KMainWidget::KMainWidget(bool bStartDocked)
}
// Setup transfer timer for scheduled downloads and checkQueue()
- transferTimer = new QTimer(this);
- connect(transferTimer, SIGNAL(timeout()), SLOT(slotTransferTimeout()));
+ transferTimer = new TQTimer(this);
+ connect(transferTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTransferTimeout()));
transferTimer->start(10000); // 10 secs time interval
// Setup autosave timer
- autosaveTimer = new QTimer(this);
- connect(autosaveTimer, SIGNAL(timeout()), SLOT(slotAutosaveTimeout()));
+ autosaveTimer = new TQTimer(this);
+ connect(autosaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAutosaveTimeout()));
setAutoSave();
// Setup clipboard timer
- clipboardTimer = new QTimer(this);
- connect(clipboardTimer, SIGNAL(timeout()), SLOT(slotCheckClipboard()));
+ clipboardTimer = new TQTimer(this);
+ connect(clipboardTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckClipboard()));
if (ksettings.b_autoPaste) {
clipboardTimer->start(1000);
}
@@ -221,7 +221,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
// Setup special windows
kdrop = new DropTarget(this);
kdock = new DockWidget(this);
- connect(kdock, SIGNAL(quitSelected()), SLOT(slotQuit()));
+ connect(kdock, TQT_SIGNAL(quitSelected()), TQT_SLOT(slotQuit()));
// Set geometry
if (ksettings.mainPosition.x() != -1) {
@@ -253,7 +253,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
setCaption(i18n("Offline"), false);
log(i18n("Starting offline"));
} else
- setCaption(QString::null, false);
+ setCaption(TQString::null, false);
m_paAutoPaste->setChecked(ksettings.b_autoPaste);
m_paShowLog->setChecked(b_viewLogWindow);
@@ -291,7 +291,7 @@ KMainWidget::~KMainWidget()
}
-void KMainWidget::log(const QString & message, bool statusbar)
+void KMainWidget::log(const TQString & message, bool statusbar)
{
#ifdef _DEBUG
sDebugIn <<" message= "<< message << endl;
@@ -337,76 +337,76 @@ void KMainWidget::setupGUI()
KActionCollection *coll = actionCollection();
- connect(myTransferList, SIGNAL(selectionChanged()), this, SLOT(slotUpdateActions()));
- connect(myTransferList, SIGNAL(transferSelected(Transfer *)), this, SLOT(slotOpenIndividual()));
- connect(myTransferList, SIGNAL(popupMenu(Transfer *)), this, SLOT(slotPopupMenu(Transfer *)));
+ connect(myTransferList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateActions()));
+ connect(myTransferList, TQT_SIGNAL(transferSelected(Transfer *)), this, TQT_SLOT(slotOpenIndividual()));
+ connect(myTransferList, TQT_SIGNAL(popupMenu(Transfer *)), this, TQT_SLOT(slotPopupMenu(Transfer *)));
// file actions
- m_paOpenTransfer = KStdAction::open(this, SLOT(slotOpenTransfer()), coll, "open_transfer");
- m_paPasteTransfer = KStdAction::paste(this, SLOT(slotPasteTransfer()), coll, "paste_transfer");
+ m_paOpenTransfer = KStdAction::open(this, TQT_SLOT(slotOpenTransfer()), coll, "open_transfer");
+ m_paPasteTransfer = KStdAction::paste(this, TQT_SLOT(slotPasteTransfer()), coll, "paste_transfer");
- m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, SLOT(slotExportTransfers()), coll, "export_transfers");
- m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, SLOT(slotImportTransfers()), coll, "import_transfers");
+ m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, TQT_SLOT(slotExportTransfers()), coll, "export_transfers");
+ m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, TQT_SLOT(slotImportTransfers()), coll, "import_transfers");
- m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, SLOT(slotImportTextFile()), coll, "import_text");
+ m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, TQT_SLOT(slotImportTextFile()), coll, "import_text");
- m_paQuit = KStdAction::quit(this, SLOT(slotQuit()), coll, "quit");
+ m_paQuit = KStdAction::quit(this, TQT_SLOT(slotQuit()), coll, "quit");
// transfer actions
- m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, SLOT(slotCopyToClipboard()), coll, "copy_url");
- m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, SLOT(slotOpenIndividual()), coll, "open_individual");
+ m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, TQT_SLOT(slotCopyToClipboard()), coll, "copy_url");
+ m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, TQT_SLOT(slotOpenIndividual()), coll, "open_individual");
- m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, SLOT(slotMoveToBegin()), coll, "move_begin");
+ m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, TQT_SLOT(slotMoveToBegin()), coll, "move_begin");
- m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, SLOT(slotMoveToEnd()), coll, "move_end");
+ m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, TQT_SLOT(slotMoveToEnd()), coll, "move_end");
#ifdef _DEBUG
sDebug << "Loading pics" << endl;
#endif
- m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, SLOT(slotResumeCurrent()), coll, "resume");
- m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, SLOT(slotPauseCurrent()), coll, "pause");
- m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, SLOT(slotDeleteCurrent()), coll, "delete");
- m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, SLOT(slotRestartCurrent()), coll, "restart");
+ m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, TQT_SLOT(slotResumeCurrent()), coll, "resume");
+ m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, TQT_SLOT(slotPauseCurrent()), coll, "pause");
+ m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDeleteCurrent()), coll, "delete");
+ m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, TQT_SLOT(slotRestartCurrent()), coll, "restart");
- m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, SLOT(slotQueueCurrent()), coll, "queue");
- m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, SLOT(slotTimerCurrent()), coll, "timer");
- m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, SLOT(slotDelayCurrent()), coll, "delay");
+ m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, TQT_SLOT(slotQueueCurrent()), coll, "queue");
+ m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, TQT_SLOT(slotTimerCurrent()), coll, "timer");
+ m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, TQT_SLOT(slotDelayCurrent()), coll, "delay");
m_paQueue->setExclusiveGroup("TransferMode");
m_paTimer->setExclusiveGroup("TransferMode");
m_paDelay->setExclusiveGroup("TransferMode");
// options actions
- m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, SLOT(slotToggleAnimation()), coll, "toggle_animation");
- m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, SLOT(slotToggleExpertMode()), coll, "expert_mode");
- m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, SLOT(slotToggleUseLastDir()), coll, "use_last_dir");
- m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect");
- m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown");
- m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, SLOT(slotToggleOfflineMode()), coll, "offline_mode");
- m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, SLOT(slotToggleAutoPaste()), coll, "auto_paste");
+ m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, TQT_SLOT(slotToggleAnimation()), coll, "toggle_animation");
+ m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, TQT_SLOT(slotToggleExpertMode()), coll, "expert_mode");
+ m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, TQT_SLOT(slotToggleUseLastDir()), coll, "use_last_dir");
+ m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, TQT_SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect");
+ m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, TQT_SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown");
+ m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, TQT_SLOT(slotToggleOfflineMode()), coll, "offline_mode");
+ m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, TQT_SLOT(slotToggleAutoPaste()), coll, "auto_paste");
- m_paPreferences = KStdAction::preferences(this, SLOT(slotPreferences()), coll);
+ m_paPreferences = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), coll);
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), coll);
- KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), coll);
- KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), coll);
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), coll);
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), coll);
+ KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), coll);
- m_menubarAction = KStdAction::showMenubar(this, SLOT(slotShowMenubar()), coll, "settings_showmenubar" );
+ m_menubarAction = KStdAction::showMenubar(this, TQT_SLOT(slotShowMenubar()), coll, "settings_showmenubar" );
m_menubarAction->setChecked( !menuBar()->isHidden() );
// view actions
createStandardStatusBarAction();
- m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, SLOT(slotToggleLogWindow()), coll, "toggle_log");
+ m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, TQT_SLOT(slotToggleLogWindow()), coll, "toggle_log");
m_paShowLog->setCheckedState(i18n("Hide &Log Window"));
- m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, SLOT(slotToggleDropTarget()), coll, "drop_target");
- m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, SLOT(slotKonquerorIntegration()), coll, "konqueror_integration");
+ m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, TQT_SLOT(slotToggleDropTarget()), coll, "drop_target");
+ m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, TQT_SLOT(slotKonquerorIntegration()), coll, "konqueror_integration");
if (ksettings.b_KonquerorIntegration) {
m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager"));
}
menuHelp = new KHelpMenu(this, KGlobal::instance()->aboutData());
- KStdAction::whatsThis(menuHelp, SLOT(contextHelpActivated()), coll, "whats_this");
+ KStdAction::whatsThis(menuHelp, TQT_SLOT(contextHelpActivated()), coll, "whats_this");
createGUI("kgetui.rc");
@@ -435,7 +435,7 @@ void KMainWidget::setupWhatsThis()
sDebugIn << endl;
#endif
- QString tmp;
+ TQString tmp;
tmp = i18n("<b>Resume</b> button starts selected transfers\n" "and sets their mode to <i>queued</i>.");
m_paResume->setWhatsThis(tmp);
@@ -510,7 +510,7 @@ void KMainWidget::slotConfigureToolbars()
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar edit(factory());
- connect(&edit, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&edit, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
edit.exec();
#ifdef _DEBUG
@@ -540,8 +540,8 @@ void KMainWidget::slotImportTextFile()
sDebugIn << endl;
#endif
- QString tmpFile;
- QString list;
+ TQString tmpFile;
+ TQString list;
int i, j;
KURL filename = KFileDialog::getOpenURL(ksettings.lastDirectory);
@@ -556,7 +556,7 @@ void KMainWidget::slotImportTextFile()
i = 0;
while ((j = list.find('\n', i)) != -1) {
- QString newtransfer = list.mid(i, j - i);
+ TQString newtransfer = list.mid(i, j - i);
addTransfer(newtransfer);
i = j + 1;
}
@@ -648,8 +648,8 @@ void KMainWidget::writeTransfers(bool ask_for_name)
sDebugIn << endl;
#endif
- QString str;
- QString txt;
+ TQString str;
+ TQString txt;
if (ask_for_name)
txt = KFileDialog::getSaveFileName(ksettings.lastDirectory, i18n("*.kgt|*.kgt\n*|All Files"));
@@ -805,12 +805,12 @@ void KMainWidget::slotDeleteCurrent()
m_paPause->setEnabled(false);
update();
TransferIterator it(myTransferList);
- QValueList<QGuardedPtr<Transfer> > selectedItems;
- QStringList itemNames;
+ TQValueList<TQGuardedPtr<Transfer> > selectedItems;
+ TQStringList itemNames;
while (it.current()) {
if (it.current()->isSelected()) {
- selectedItems.append( QGuardedPtr<Transfer>( it.current() ));
+ selectedItems.append( TQGuardedPtr<Transfer>( it.current() ));
itemNames.append( it.current()->getSrc().prettyURL() );
}
++it;
@@ -823,7 +823,7 @@ void KMainWidget::slotDeleteCurrent()
if (KMessageBox::warningContinueCancelList(this, i18n("Are you sure you want to delete these transfers?"),
itemNames, i18n("Question"),
KStdGuiItem::del(),
- QString("multiple_delete_transfer"))
+ TQString("multiple_delete_transfer"))
!= KMessageBox::Continue)
return; // keep 'em
}
@@ -831,7 +831,7 @@ void KMainWidget::slotDeleteCurrent()
{
if (KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete this transfer?"),
i18n("Question"), KStdGuiItem::del(),
- QString("delete_transfer"))
+ TQString("delete_transfer"))
!= KMessageBox::Continue)
return;
}
@@ -839,10 +839,10 @@ void KMainWidget::slotDeleteCurrent()
// If we reach this, we want to delete all selected transfers
// Some of them might have finished in the meantime tho. Good that
- // we used a QGuardedPtr :)
+ // we used a TQGuardedPtr :)
int transferFinishedMeanwhile = 0;
- QValueListConstIterator<QGuardedPtr<Transfer> > lit = selectedItems.begin();;
+ TQValueListConstIterator<TQGuardedPtr<Transfer> > lit = selectedItems.begin();;
while ( lit != selectedItems.end() )
{
if ( *lit )
@@ -859,7 +859,7 @@ void KMainWidget::slotDeleteCurrent()
KMessageBox::information(this, i18n("The transfer you wanted to delete completed before it could be deleted.",
"%n transfers you wanted to delete completed before they could be deleted.",
transferFinishedMeanwhile ),
- QString::null, "completedBeforeDeletion" );
+ TQString::null, "completedBeforeDeletion" );
#ifdef _DEBUG
sDebugOut << endl;
@@ -957,7 +957,7 @@ void KMainWidget::slotOpenTransfer()
sDebugIn << endl;
#endif
- QString newtransfer;
+ TQString newtransfer;
bool ok = false;
#ifdef _DEBUG
@@ -997,7 +997,7 @@ void KMainWidget::slotCheckClipboard()
//sDebugIn << endl;
#endif
- QString clipData = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
+ TQString clipData = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
if (clipData != lastClipboard) {
sDebug << "New clipboard event" << endl;
@@ -1024,9 +1024,9 @@ void KMainWidget::slotPasteTransfer()
sDebugIn << endl;
#endif
- QString newtransfer;
+ TQString newtransfer;
- newtransfer = QApplication::clipboard()->text();
+ newtransfer = TQApplication::clipboard()->text();
newtransfer = newtransfer.stripWhiteSpace();
if (!ksettings.b_expertMode) {
@@ -1071,7 +1071,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
if ( !destURL.isValid() )
{
// Setup destination
- QString destDir = getSaveDirectoryFor( url.fileName() );
+ TQString destDir = getSaveDirectoryFor( url.fileName() );
bool b_expertMode = ksettings.b_expertMode;
bool bDestisMalformed = true;
@@ -1079,7 +1079,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
{
if (!b_expertMode) {
// open the filedialog for confirmation
- KFileDialog dlg( destDir, QString::null,
+ KFileDialog dlg( destDir, TQString::null,
0L, "save_as", true);
dlg.setCaption(i18n("Save As"));
dlg.setOperationMode(KFileDialog::Saving);
@@ -1090,7 +1090,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
else
dlg.setSelection(destURL.url());
- if ( dlg.exec() == QDialog::Rejected )
+ if ( dlg.exec() == TQDialog::Rejected )
{
#ifdef _DEBUG
sDebugOut << endl;
@@ -1114,7 +1114,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
//check if destination already exists
if(KIO::NetAccess::exists(destURL, false, this))
{
- if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
+ if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
{
bDestisMalformed=false;
@@ -1156,9 +1156,9 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
}
-void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
+void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
{
- QValueList<KURLPair> urls_orig;
+ TQValueList<KURLPair> urls_orig;
for ( KURL::List::ConstIterator it = src.begin(); it != src.end(); ++it )
{
@@ -1181,7 +1181,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
{
// create a proper destination file from destDir
KURL destURL = KURL::fromPathOrURL( destDir );
- QString fileName = urls_orig.first().src.fileName();
+ TQString fileName = urls_orig.first().src.fileName();
// in case the fileName is empty, we simply ask for a filename in
// addTransferEx. Do NOT attempt to use an empty filename, that
@@ -1192,7 +1192,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
destURL.setFileName( fileName );
if(KIO::NetAccess::exists(destURL, false, this))
{
- if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
+ if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
{
SafeDelete::deleteFile( destURL );
@@ -1213,8 +1213,8 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
// multiple files -> ask for directory, not for every single filename
bool dir_accepted = false;
- QValueList<KURLPair>::Iterator it;
- QValueList<KURLPair> urls;
+ TQValueList<KURLPair>::Iterator it;
+ TQValueList<KURLPair> urls;
KURL::List urlsToDelete;
while ( !dir_accepted )
{
@@ -1223,7 +1223,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
// we want to start again with the original list
dir_accepted = true; //Set to false later when Cancel is pressed
KURL dest;
- if ( destDir.isEmpty() || !QFileInfo( destDir ).isDir() )
+ if ( destDir.isEmpty() || !TQFileInfo( destDir ).isDir() )
{
if ( !destDir.isEmpty() )
dest.setPath( destDir );
@@ -1231,9 +1231,9 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
dest.setPath( getSaveDirectoryFor( src.first().fileName() ) );
// ask in any case, when destDir is empty
- if ( destDir.isEmpty() || !QFileInfo( dest.path() ).isDir() )
+ if ( destDir.isEmpty() || !TQFileInfo( dest.path() ).isDir() )
{
- QString dir = KFileDialog::getExistingDirectory( dest.path() );
+ TQString dir = KFileDialog::getExistingDirectory( dest.path() );
if ( dir.isEmpty() ) // aborted
return;
@@ -1260,7 +1260,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
}
(*it).dest = dest;
- QString fileName = (*it).src.fileName();
+ TQString fileName = (*it).src.fileName();
if ( fileName.isEmpty() ) // simply use the full url as filename
fileName = KURL::encode_string_no_slash( (*it).src.prettyURL() );
@@ -1268,15 +1268,15 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
if( KIO::NetAccess::exists((*it).dest, false, this))
{
- QString newdest;
+ TQString newdest;
if (skip_all)
result = KIO::R_SKIP;
else if( overwrite_all )
result = KIO::R_OVERWRITE;
else
{
- QFileInfo finfo( (*it).dest.path() );
- QString caption = i18n( "File Already exists" ) + " - KGet";
+ TQFileInfo finfo( (*it).dest.path() );
+ TQString caption = i18n( "File Already exists" ) + " - KGet";
result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
}
switch (result)
@@ -1327,7 +1327,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
checkQueue();
}
-void KMainWidget::addTransfer(const QString& src)
+void KMainWidget::addTransfer(const TQString& src)
{
#ifdef _DEBUG
sDebugIn << endl;
@@ -1445,7 +1445,7 @@ void KMainWidget::slotTransferTimeout()
for (; it.current(); ++it) {
item = it.current();
- if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= QDateTime::currentDateTime()) {
+ if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::currentDateTime()) {
item->setMode(Transfer::MD_QUEUED);
flag = true;
}
@@ -1455,7 +1455,7 @@ void KMainWidget::slotTransferTimeout()
checkQueue();
}
- if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= QTime::currentTime() && ksettings.disconnectDate == QDate::currentDate()) {
+ if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::currentDate()) {
onlineDisconnect();
}
@@ -1489,7 +1489,7 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation)
case Transfer::OP_FINISHED:
{
- QString srcurl = item->getSrc().prettyURL();
+ TQString srcurl = item->getSrc().prettyURL();
if (ksettings.b_removeOnSuccess && !item->keepDialogOpen() )
{
delete item;
@@ -1551,13 +1551,13 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation)
}
-void KMainWidget::dragEnterEvent(QDragEnterEvent * event)
+void KMainWidget::dragEnterEvent(TQDragEnterEvent * event)
{
#ifdef _DEBUG
//sDebugIn << endl;
#endif
- event->accept(KURLDrag::canDecode(event) || QTextDrag::canDecode(event));
+ event->accept(KURLDrag::canDecode(event) || TQTextDrag::canDecode(event));
#ifdef _DEBUG
sDebugOut << endl;
@@ -1565,18 +1565,18 @@ void KMainWidget::dragEnterEvent(QDragEnterEvent * event)
}
-void KMainWidget::dropEvent(QDropEvent * event)
+void KMainWidget::dropEvent(TQDropEvent * event)
{
#ifdef _DEBUG
//sDebugIn << endl;
#endif
KURL::List list;
- QString str;
+ TQString str;
if (KURLDrag::decode(event, list)) {
addTransfers(list);
- } else if (QTextDrag::decode(event, str)) {
+ } else if (TQTextDrag::decode(event, str)) {
addTransfer(str);
}
sDebugOut << endl;
@@ -1592,8 +1592,8 @@ void KMainWidget::slotCopyToClipboard()
Transfer *item = (Transfer *) myTransferList->currentItem();
if (item) {
- QString url = item->getSrc().url();
- QClipboard *cb = QApplication::clipboard();
+ TQString url = item->getSrc().url();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( url, QClipboard::Selection );
cb->setText( url, QClipboard::Clipboard);
myTransferList->clearSelection();
@@ -1766,7 +1766,7 @@ void KMainWidget::slotToggleOfflineMode()
m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_off"));
} else {
log(i18n("Offline mode off."));
- setCaption(QString::null, false);
+ setCaption(TQString::null, false);
m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_on"));
}
@@ -1923,7 +1923,7 @@ void KMainWidget::slotKonquerorIntegration()
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
KConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
- cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":""));
+ cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
if (bIsKonquiEnable)
{
@@ -1953,8 +1953,8 @@ void KMainWidget::slotPopupMenu(Transfer * item)
slotUpdateActions();
// popup transfer menu at the position
- QWidget *menu = guiFactory()->container("transfer",this);
- ((QPopupMenu *) menu)->popup(QCursor::pos());
+ TQWidget *menu = guiFactory()->container("transfer",this);
+ ((TQPopupMenu *) menu)->popup(TQCursor::pos());
#ifdef _DEBUG
@@ -2144,7 +2144,7 @@ void KMainWidget::updateStatusBar()
#endif
Transfer *item;
- QString tmpstr;
+ TQString tmpstr;
int totalFiles = 0;
KIO::filesize_t totalSize = 0;
@@ -2221,7 +2221,7 @@ void KMainWidget::onlineDisconnect()
}
}
log(i18n("Disconnecting..."));
- system(QFile::encodeName(ksettings.disconnectCommand));
+ system(TQFile::encodeName(ksettings.disconnectCommand));
#ifdef _DEBUG
sDebugOut << endl;
@@ -2239,7 +2239,7 @@ void KMainWidget::slotCheckConnection()
if (b_connected != old) {
if (b_connected) {
log(i18n("We are online."));
- setCaption(QString::null, false);
+ setCaption(TQString::null, false);
ksettings.b_offline=ksettings.b_offlineMode;
checkQueue();
} else {
@@ -2351,7 +2351,7 @@ static int sockets_open()
/** No descriptions */
-void KMainWidget::customEvent(QCustomEvent * _e)
+void KMainWidget::customEvent(TQCustomEvent * _e)
{
#ifdef _DEBUG
//sDebugIn << endl;
@@ -2433,16 +2433,16 @@ void KMainWidget::customEvent(QCustomEvent * _e)
#endif
}
-QString KMainWidget::getSaveDirectoryFor( const QString& filename ) const
+TQString KMainWidget::getSaveDirectoryFor( const TQString& filename ) const
{
// first set destination directory to current directory ( which is also last used )
- QString destDir = ksettings.lastDirectory;
+ TQString destDir = ksettings.lastDirectory;
if (!ksettings.b_useLastDir) {
// check wildcards for default directory
DirList::Iterator it;
for (it = ksettings.defaultDirList.begin(); it != ksettings.defaultDirList.end(); ++it) {
- QRegExp rexp((*it).extRegexp);
+ TQRegExp rexp((*it).extRegexp);
rexp.setWildcard(true);
diff --git a/kget/kmainwidget.h b/kget/kmainwidget.h
index ce7c9ea8..363ca2f0 100644
--- a/kget/kmainwidget.h
+++ b/kget/kmainwidget.h
@@ -61,12 +61,12 @@ public:
KMainWidget(bool bShowMain = false);
~KMainWidget();
- void addTransfer( const QString& src );
+ void addTransfer( const TQString& src );
void addTransferEx( const KURL& url,
const KURL& destFile = KURL());
// dcop interface
- virtual void addTransfers( const KURL::List& src, const QString& destDir = QString::null );
+ virtual void addTransfers( const KURL::List& src, const TQString& destDir = TQString::null );
virtual bool isDropTargetVisible() const;
virtual void setDropTargetVisible( bool setVisible );
@@ -155,8 +155,8 @@ protected:
void writeLog();
// drag and drop
- virtual void dragEnterEvent(QDragEnterEvent *);
- virtual void dropEvent(QDropEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
void readTransfers(bool ask_for_name = false);
void writeTransfers(bool ask_for_name = false);
@@ -175,24 +175,24 @@ protected:
void onlineDisconnect();
void checkOnline();
void stopAll();
- void log(const QString & message, bool statusbar = true);
+ void log(const TQString & message, bool statusbar = true);
/** No descriptions */
- virtual void customEvent(QCustomEvent * e);
+ virtual void customEvent(TQCustomEvent * e);
// various timers
- QTimer *animTimer; // animation timer
- QTimer *connectionTimer; // timer that checks whether we are online
- QTimer *transferTimer; // timer for scheduled transfers
- QTimer *autosaveTimer; // timer for autosaving transfer list
- QTimer *clipboardTimer; // timer for checking clipboard - autopaste function
+ TQTimer *animTimer; // animation timer
+ TQTimer *connectionTimer; // timer that checks whether we are online
+ TQTimer *transferTimer; // timer for scheduled transfers
+ TQTimer *autosaveTimer; // timer for autosaving transfer list
+ TQTimer *clipboardTimer; // timer for checking clipboard - autopaste function
- QString logFileName;
+ TQString logFileName;
private:
- QString getSaveDirectoryFor( const QString& filename ) const;
+ TQString getSaveDirectoryFor( const TQString& filename ) const;
bool sanityChecksSuccessful( const KURL& url );
TransferList * myTransferList;
@@ -202,7 +202,7 @@ private:
DlgPreferences *prefDlg;
DockWidget *kdock;
- QString lastClipboard;
+ TQString lastClipboard;
uint animCounter;
diff --git a/kget/logwindow.cpp b/kget/logwindow.cpp
index 5d6f77ad..09490134 100644
--- a/kget/logwindow.cpp
+++ b/kget/logwindow.cpp
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <qlayout.h>
-#include <qlistview.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
#include <klocale.h>
#include <kdialog.h>
@@ -37,25 +37,25 @@
#include "logwindow.h"
#include <kapplication.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
// // Replace regular space with nbsp
-// QString replaceSpaces(const QString &str) {
-// QString res = str;
+// TQString replaceSpaces(const TQString &str) {
+// TQString res = str;
// res.simplifyWhiteSpace();
// int pos;
// while ( (pos = res.find(' ')) != -1) {
-// res.replace(pos, 1, new QChar( 0x00a0 ), 1);
+// res.replace(pos, 1, new TQChar( 0x00a0 ), 1);
// }
// return res;
// }
-static QString removeHTML(const QString & str)
+static TQString removeHTML(const TQString & str)
{
- QString res = str;
+ TQString res = str;
int pos;
// replace <br/> with a newline
@@ -77,18 +77,18 @@ static QString removeHTML(const QString & str)
}
-SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent)
+SeparatedLog::SeparatedLog(TQWidget * parent):TQWidget(parent)
{
idSelected = 0;
- QGridLayout *topGridLayout = new QGridLayout(this, 1, 2, 0, KDialog::spacingHint());
+ TQGridLayout *topGridLayout = new TQGridLayout(this, 1, 2, 0, KDialog::spacingHint());
topGridLayout->setRowStretch(0, 5);
topGridLayout->setColStretch(0, 3);
topGridLayout->setColStretch(1, 10);
- lv_log = new QListView(this);
+ lv_log = new TQListView(this);
lv_log->setMultiSelection(false);
lv_log->setAllColumnsShowFocus(true);
lv_log->setSorting(-1);
@@ -98,26 +98,26 @@ SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent)
topGridLayout->addWidget(lv_log, 0, 0);
- connect(lv_log, SIGNAL(selectionChanged(QListViewItem *)), SLOT(transferSelected(QListViewItem *)));
+ connect(lv_log, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(transferSelected(TQListViewItem *)));
- ml_log = new QTextEdit(this);
+ ml_log = new TQTextEdit(this);
ml_log->setTextFormat(LogText);
ml_log->setMinimumSize(300, 200);
- ml_log->setVScrollBarMode(QScrollView::Auto);
- ml_log->setWordWrap(QTextEdit::NoWrap);
+ ml_log->setVScrollBarMode(TQScrollView::Auto);
+ ml_log->setWordWrap(TQTextEdit::NoWrap);
topGridLayout->addWidget(ml_log, 0, 1);
}
-void SeparatedLog::addLog(uint id, const QString & filename, const QString & message)
+void SeparatedLog::addLog(uint id, const TQString & filename, const TQString & message)
{
if (!trMap.contains(id)) {
trMap.insert(id, message);
- QListViewItem *last=lv_log->lastItem();
- new QListViewItem(lv_log, last);
+ TQListViewItem *last=lv_log->lastItem();
+ new TQListViewItem(lv_log, last);
last=lv_log->lastItem();
- last->setText(0, QString::number(id));
+ last->setText(0, TQString::number(id));
last->setText(1, filename);
// if I don't do this, ID#10 gets sorted between ID#1 and ID#2, ugly.
} else {
@@ -130,7 +130,7 @@ void SeparatedLog::addLog(uint id, const QString & filename, const QString & mes
}
-void SeparatedLog::transferSelected(QListViewItem * item)
+void SeparatedLog::transferSelected(TQListViewItem * item)
{
if (item) {
idSelected = item->text(0).toUInt();
@@ -160,27 +160,27 @@ LogWindow::LogWindow():KDialogBase(Tabbed, i18n("Log Window"), Close, Close, 0,
{
// add pages
- QFrame *page = addPage(i18n("Mixed"));
- QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint());
+ TQFrame *page = addPage(i18n("Mixed"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint());
- mixed_log = new QTextEdit(page);
+ mixed_log = new TQTextEdit(page);
mixed_log->setTextFormat(LogText);
- mixed_log->setVScrollBarMode(QScrollView::Auto);
- mixed_log->setWordWrap(QTextEdit::NoWrap);
+ mixed_log->setVScrollBarMode(TQScrollView::Auto);
+ mixed_log->setWordWrap(TQTextEdit::NoWrap);
topLayout->addWidget(mixed_log);
page = addPage(i18n("Separated"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
sep_log = new SeparatedLog(page);
topLayout->addWidget(sep_log);
- connect(this, SIGNAL(closeClicked()), this, SLOT(close()));
+ connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(close()));
// resize( 500, 300 );
}
-void LogWindow::closeEvent(QCloseEvent *e)
+void LogWindow::closeEvent(TQCloseEvent *e)
{
kmain->m_paShowLog->setChecked(false);
kmain->b_viewLogWindow = false;
@@ -188,29 +188,29 @@ void LogWindow::closeEvent(QCloseEvent *e)
}
-void LogWindow::logGeneral(const QString & message)
+void LogWindow::logGeneral(const TQString & message)
{
- QString tmps = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : <b>" + message + "</b>";
+ TQString tmps = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : <b>" + message + "</b>";
mixed_log->append(tmps);
}
-void LogWindow::logTransfer(uint id, const QString & filename, const QString & message)
+void LogWindow::logTransfer(uint id, const TQString & filename, const TQString & message)
{
- QString mixed_msg, single_msg, job_id;
+ TQString mixed_msg, single_msg, job_id;
- job_id = QString("Job[<font color=\"red\">%1</font>] : ").arg(id);
- mixed_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + job_id + message;
+ job_id = TQString("Job[<font color=\"red\">%1</font>] : ").arg(id);
+ mixed_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + job_id + message;
- single_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + message;
+ single_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + message;
mixed_log->append(mixed_msg);
sep_log->addLog(id, filename, single_msg);
}
-QString LogWindow::getText() const
+TQString LogWindow::getText() const
{
return removeHTML(mixed_log->text());
}
diff --git a/kget/logwindow.h b/kget/logwindow.h
index a2aa13d5..2ac17941 100644
--- a/kget/logwindow.h
+++ b/kget/logwindow.h
@@ -28,7 +28,7 @@
#ifndef _LOGWINDOW_H
#define _LOGWINDOW_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
@@ -40,20 +40,20 @@ class SeparatedLog:public QWidget
{
Q_OBJECT public:
- SeparatedLog(QWidget * parent);
+ SeparatedLog(TQWidget * parent);
~SeparatedLog()
{}
- void addLog(uint id, const QString & filename, const QString & message);
+ void addLog(uint id, const TQString & filename, const TQString & message);
void refresh();
protected slots:
- void transferSelected(QListViewItem * item);
+ void transferSelected(TQListViewItem * item);
private:
- QListView * lv_log;
- QTextEdit *ml_log;
+ TQListView * lv_log;
+ TQTextEdit *ml_log;
- typedef QMap < uint, QString > TransferMap;
+ typedef TQMap < uint, TQString > TransferMap;
TransferMap trMap;
uint idSelected;
@@ -67,17 +67,17 @@ Q_OBJECT public:
LogWindow();
~LogWindow()
{}
- void logGeneral(const QString & message);
- QString getText() const;
+ void logGeneral(const TQString & message);
+ TQString getText() const;
public slots:
- void logTransfer(uint id, const QString & filename, const QString & message);
+ void logTransfer(uint id, const TQString & filename, const TQString & message);
protected:
- void closeEvent(QCloseEvent *);
+ void closeEvent(TQCloseEvent *);
private:
- QTextEdit * mixed_log;
+ TQTextEdit * mixed_log;
SeparatedLog *sep_log;
};
diff --git a/kget/main.cpp b/kget/main.cpp
index cd3341b5..f6ca1cb0 100644
--- a/kget/main.cpp
+++ b/kget/main.cpp
@@ -94,7 +94,7 @@ static void setSignalHandler(void (*handler) (int))
static void cleanup(void)
{
qInstallMsgHandler(0L /*oldMsgHandler*/);
-// QString cmd;
+// TQString cmd;
}
@@ -158,7 +158,7 @@ public:
#ifdef _DEBUG
sDebug <<"args(0)= "<<args->arg(0) << endl;
#endif
- QString txt(args->arg(0));
+ TQString txt(args->arg(0));
if ( txt.endsWith( ".kgt" ) )
kmain->readTransfersEx(KURL::fromPathOrURL( txt ));
else
@@ -179,7 +179,7 @@ public:
}
else
{
- kmain->addTransfers( urls, QString() );
+ kmain->addTransfers( urls, TQString() );
}
}
args->clear();
diff --git a/kget/safedelete.cpp b/kget/safedelete.cpp
index c4cb6915..16deb1dd 100644
--- a/kget/safedelete.cpp
+++ b/kget/safedelete.cpp
@@ -3,7 +3,7 @@
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "safedelete.h"
@@ -11,7 +11,7 @@ bool SafeDelete::deleteFile( const KURL& url )
{
if ( url.isLocalFile() )
{
- QFileInfo info( url.path() );
+ TQFileInfo info( url.path() );
if ( info.isDir() )
{
KMessageBox::information(0L,
diff --git a/kget/settings.cpp b/kget/settings.cpp
index da066a6a..942acb09 100644
--- a/kget/settings.cpp
+++ b/kget/settings.cpp
@@ -33,7 +33,7 @@
#include <kglobalsettings.h>
#include <netwm_def.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "kmainwidget.h"
#include "transferlist.h"
@@ -44,7 +44,7 @@
static const unsigned long DEFAULT_DOCK_STATE = (NET::SkipTaskbar | NET::StaysOnTop);
-QString ConnectionDevices[6] = {
+TQString ConnectionDevices[6] = {
"",
"eth",
"plip",
@@ -91,7 +91,7 @@ Settings::load()
b_timedDisconnect = config->readBoolEntry("TimedDisconnect", DEF_TimedDisconnect);
disconnectTime.setHMS(config->readNumEntry("DisconnectTimeHour"), config->readNumEntry("DisconnectTimeMinute"), 0);
- disconnectDate = QDate::currentDate(); // doesn't make sense to save it
+ disconnectDate = TQDate::currentDate(); // doesn't make sense to save it
b_autoShutdown = config->readBoolEntry("AutoShutdown", DEF_AutoShutdown);
b_autoPaste = config->readBoolEntry("AutoPaste", DEF_AutoPaste);
@@ -120,7 +120,7 @@ Settings::load()
KConfig *cfg = new KConfig("konquerorrc", false, false);
cfg->setGroup("HTML Settings");
- QString downloadManager=cfg->readPathEntry("DownloadManager");
+ TQString downloadManager=cfg->readPathEntry("DownloadManager");
b_KonquerorIntegration=(downloadManager==KGET_APP_NAME)?true:false;
@@ -131,7 +131,7 @@ Settings::load()
bool bAnswerYes = KMessageBox::questionYesNo(0L,i18n("This is the first time that you have run KGet.\nDo you want to use KGet as Download Manager for Konqueror?"), i18n("Konqueror Integration"), i18n("Enable"), i18n("Do Not Enable")) == KMessageBox::Yes;
if (bAnswerYes)
{
- cfg->writePathEntry("DownloadManager", QString(KGET_APP_NAME));
+ cfg->writePathEntry("DownloadManager", TQString(KGET_APP_NAME));
cfg->sync();
b_KonquerorIntegration=true;
}
@@ -151,14 +151,14 @@ Settings::load()
b_useLastDir = config->readBoolEntry("UseLastDirectory", DEF_UseLastDir);
lastDirectory = config->readPathEntry("LastDirectory",
- QString("file:") + QDir::currentDirPath() );
+ TQString("file:") + TQDir::currentDirPath() );
- QStringList strList;
+ TQStringList strList;
strList = config->readPathListEntry("Items");
defaultDirList.clear();
- QStringList::Iterator it = strList.begin();
+ TQStringList::Iterator it = strList.begin();
for (; it != strList.end(); ++it) {
DirItem item;
@@ -171,13 +171,13 @@ Settings::load()
// read misc settings
config->setGroup("Misc");
- QFont font = KGlobalSettings::generalFont();
+ TQFont font = KGlobalSettings::generalFont();
listViewFont = config->readFontEntry("Font", &font);
// read main window geometry settings
config->setGroup("MainGeometry");
- const QPoint point(-1,-1);
+ const TQPoint point(-1,-1);
mainPosition = config->readPointEntry("Position", &point);
mainSize = config->readSizeEntry("Size");
mainState = config->readUnsignedLongNumEntry("State", 0);
@@ -253,7 +253,7 @@ void Settings::save()
config->writeEntry("UseLastDirectory", b_useLastDir);
config->writePathEntry("LastDirectory", lastDirectory );
DirList::Iterator it;
- QStringList lst;
+ TQStringList lst;
for (it = defaultDirList.begin(); it != defaultDirList.end(); ++it) {
lst.append((*it).extRegexp);
diff --git a/kget/settings.h b/kget/settings.h
index c66b00e6..7c02b166 100644
--- a/kget/settings.h
+++ b/kget/settings.h
@@ -31,7 +31,7 @@
// common connection types
enum ConnectionType { PERMANENT = 0, ETHERNET, PLIP, SLIP, PPP, ISDN };
-extern QString ConnectionDevices[];
+extern TQString ConnectionDevices[];
// Connection settings
@@ -86,17 +86,17 @@ extern QString ConnectionDevices[];
#define DEF_WindowStyle NORMAL
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kwin.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
struct DirItem
{
- QString extRegexp;
- QString defaultDir;
+ TQString extRegexp;
+ TQString defaultDir;
};
-typedef QValueList < DirItem > DirList;
+typedef TQValueList < DirItem > DirList;
class Settings
{
@@ -133,10 +133,10 @@ public:
bool b_autoSave;
uint autoSaveInterval;
bool b_autoDisconnect;
- QString disconnectCommand;
+ TQString disconnectCommand;
bool b_timedDisconnect;
- QDate disconnectDate;
- QTime disconnectTime;
+ TQDate disconnectDate;
+ TQTime disconnectTime;
bool b_autoShutdown;
bool b_autoPaste;
@@ -163,21 +163,21 @@ public:
// directories options
bool b_useLastDir;
- QString lastDirectory;
+ TQString lastDirectory;
DirList defaultDirList;
// system options
bool b_useAnimation;
- QFont listViewFont;
+ TQFont listViewFont;
// geometry settings
- QPoint mainPosition;
- QSize mainSize;
+ TQPoint mainPosition;
+ TQSize mainSize;
unsigned long int mainState;
- QPoint dropPosition;
+ TQPoint dropPosition;
unsigned long int dropState;
};
diff --git a/kget/slave.cpp b/kget/slave.cpp
index 944a7f37..f8569e79 100644
--- a/kget/slave.cpp
+++ b/kget/slave.cpp
@@ -36,8 +36,8 @@
#include <assert.h>
Slave::Slave(Transfer * _parent, const KURL & _src, const KURL & _dest)
- : QObject(),
- QThread()
+ : TQObject(),
+ TQThread()
{
mDebug << ">>>>Entering" << endl;
copyjob = NULL;
@@ -74,22 +74,22 @@ void Slave::PostMessage(SlaveResult _event, Q_ULLONG _data)
{
SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _data);
- QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1);
+ TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1);
}
-void Slave::PostMessage(SlaveResult _event, const QString & _msg)
+void Slave::PostMessage(SlaveResult _event, const TQString & _msg)
{
SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _msg);
- QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1);
+ TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1);
mDebug << "Msg:" << "_msg = " << _msg << endl;
}
-void Slave::InfoMessage(const QString & _msg)
+void Slave::InfoMessage(const TQString & _msg)
{
SlaveEvent *e1 = new SlaveEvent(m_parent, SLV_INFO, _msg);
- QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1);
+ TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1);
mDebug << "Infor Msg:" << "_msg = " << _msg << endl;
}
@@ -218,17 +218,17 @@ void Slave::Connect()
mDebugIn << endl;
- connect(copyjob, SIGNAL(canceled(KIO::Job *)), SLOT(slotCanceled(KIO::Job *)));
- connect(copyjob, SIGNAL(connected(KIO::Job *)), SLOT(slotConnected(KIO::Job *)));
- connect(copyjob, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(canceled(KIO::Job *)), TQT_SLOT(slotCanceled(KIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(connected(KIO::Job *)), TQT_SLOT(slotConnected(KIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
- connect(copyjob, SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
+ connect(copyjob, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
- connect(copyjob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
+ connect(copyjob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
- connect(copyjob, SIGNAL(speed(KIO::Job *, unsigned long)), SLOT(slotSpeed(KIO::Job *, unsigned long)));
+ connect(copyjob, TQT_SIGNAL(speed(KIO::Job *, unsigned long)), TQT_SLOT(slotSpeed(KIO::Job *, unsigned long)));
- connect(copyjob, SIGNAL(infoMessage(KIO::Job *, const QString &)), SLOT(slotInfoMessage(KIO::Job *, const QString &)));
+ connect(copyjob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &)));
mDebugOut << endl;
}
@@ -266,7 +266,7 @@ void Slave::slotResult(KIO::Job * job)
PostMessage(SLV_NOTINCACHE);
return;
}
- QString tmsg="<font color=\"red\"> <b>" + job->errorString() + \
+ TQString tmsg="<font color=\"red\"> <b>" + job->errorString() + \
"</b></font>";
InfoMessage(tmsg);
if (m_parent->retryOnError() && \
@@ -321,7 +321,7 @@ void Slave::slotProcessedSize(KIO::Job *, KIO::filesize_t _processed_size)
// mDebugOut<<endl;
}
-void Slave::slotInfoMessage(KIO::Job *, const QString & _msg)
+void Slave::slotInfoMessage(KIO::Job *, const TQString & _msg)
{
mDebugIn << "MSG=" << _msg << endl;
InfoMessage(_msg);
diff --git a/kget/slave.h b/kget/slave.h
index 670b418b..1bb2635c 100644
--- a/kget/slave.h
+++ b/kget/slave.h
@@ -27,12 +27,12 @@
#ifndef SLAVE_H
#define SLAVE_H
-#include <qthread.h>
+#include <tqthread.h>
#include <kurl.h>
-#include <qvaluestack.h>
-#include <qwaitcondition.h>
-#include <qmutex.h>
-#include <qobject.h>
+#include <tqvaluestack.h>
+#include <tqwaitcondition.h>
+#include <tqmutex.h>
+#include <tqobject.h>
#include "common.h"
@@ -43,7 +43,7 @@ namespace KIO
class Transfer;
-class Slave:public QObject, public QThread
+class Slave:public TQObject, public QThread
{
Q_OBJECT
@@ -77,14 +77,14 @@ private slots:
void slotTotalSize(KIO::Job *, KIO::filesize_t);
void slotProcessedSize(KIO::Job *, KIO::filesize_t);
void slotSpeed(KIO::Job *, unsigned long);
- void slotInfoMessage(KIO::Job *, const QString &);
+ void slotInfoMessage(KIO::Job *, const TQString &);
private:
void Connect();
void PostMessage(SlaveResult _event, Q_ULLONG _data = 0L);
- void PostMessage(SlaveResult _event, const QString & _msg);
- void InfoMessage(const QString & _msg);
+ void PostMessage(SlaveResult _event, const TQString & _msg);
+ void InfoMessage(const TQString & _msg);
Transfer * m_parent;
@@ -94,9 +94,9 @@ private:
Slave::SlaveCommand fetch_cmd();
int nPendingCommand;
- QValueStack < SlaveCommand > stack;
- QWaitCondition worker;
- QMutex mutex;
+ TQValueStack < SlaveCommand > stack;
+ TQWaitCondition worker;
+ TQMutex mutex;
KIO::GetFileJob * copyjob;
};
diff --git a/kget/slaveevent.cpp b/kget/slaveevent.cpp
index e0d41661..87d4c07a 100644
--- a/kget/slaveevent.cpp
+++ b/kget/slaveevent.cpp
@@ -26,18 +26,18 @@
#include "slaveevent.h"
-#define EVENT_TYPE (QEvent::User + 252)
+#define EVENT_TYPE (TQEvent::User + 252)
-SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):QCustomEvent(EVENT_TYPE)
+SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):TQCustomEvent(EVENT_TYPE)
{
m_event = _event;
m_item = _item;
m_ldata = _ldata;
- m_msg = QString("");
+ m_msg = TQString("");
}
-SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg):QCustomEvent(EVENT_TYPE)
+SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg):TQCustomEvent(EVENT_TYPE)
{
m_event = _event;
m_item = _item;
@@ -66,7 +66,7 @@ Q_ULLONG SlaveEvent::getData() const
return m_ldata;
}
-const QString & SlaveEvent::getMsg() const
+const TQString & SlaveEvent::getMsg() const
{
return m_msg;
}
diff --git a/kget/slaveevent.h b/kget/slaveevent.h
index 6fb5f96b..6f87bbbe 100644
--- a/kget/slaveevent.h
+++ b/kget/slaveevent.h
@@ -27,7 +27,7 @@
#ifndef SLAVEEVENT_H
#define SLAVEEVENT_H
-#include <qevent.h>
+#include <tqevent.h>
class Transfer;
@@ -39,20 +39,20 @@ class SlaveEvent:public QCustomEvent
{
public:
SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata = 0L);
- SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg);
+ SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg);
~SlaveEvent();
unsigned int getEvent() const;
Transfer *getItem() const;
Q_ULLONG getData() const;
- const QString & getMsg() const;
+ const TQString & getMsg() const;
private:
unsigned int m_event;
Transfer *m_item;
Q_ULLONG m_ldata;
- QString m_msg;
+ TQString m_msg;
};
diff --git a/kget/transfer.cpp b/kget/transfer.cpp
index 44e76fae..7569e52b 100644
--- a/kget/transfer.cpp
+++ b/kget/transfer.cpp
@@ -23,7 +23,7 @@
*
***************************************************************************/
-#include <qheader.h>
+#include <tqheader.h>
#include <kurl.h>
#include <kmessagebox.h>
@@ -54,7 +54,7 @@ extern Settings ksettings;
Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest, const uint _id)
- : QObject( _view ),
+ : TQObject( _view ),
KListViewItem(_view),
dlgIndividual( 0 )
{
@@ -71,8 +71,8 @@ Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest,
Transfer::Transfer(TransferList * _view, Transfer * after, const KURL & _src, const KURL & _dest, const uint _id)
- : QObject( _view ),
- KListViewItem(_view, (QListViewItem *) after),
+ : TQObject( _view ),
+ KListViewItem(_view, (TQListViewItem *) after),
src(_src), dest(_dest), view(_view),
dlgIndividual( 0 )
{
@@ -109,7 +109,7 @@ Transfer::init(const uint _id)
id = _id;
m_pSlave = new Slave(this, src, dest);
canResume = false;
- startTime = QDateTime::currentDateTime();
+ startTime = TQDateTime::currentDateTime();
speed = 0;
// retryCount = ksettings.reconnectRetries-1;
retryCount = 0;
@@ -118,25 +118,25 @@ Transfer::init(const uint _id)
status = ST_STOPPED;
- connect(this, SIGNAL(statusChanged(Transfer *, int)), kmain, SLOT(slotStatusChanged(Transfer *, int)));
- connect(this, SIGNAL(statusChanged(Transfer *, int)), this, SLOT(slotUpdateActions()));
+ connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), kmain, TQT_SLOT(slotStatusChanged(Transfer *, int)));
+ connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), this, TQT_SLOT(slotUpdateActions()));
- connect(this, SIGNAL(log(uint, const QString &, const QString &)), kmain->logwin(), SLOT(logTransfer(uint, const QString &, const QString &)));
+ connect(this, TQT_SIGNAL(log(uint, const TQString &, const TQString &)), kmain->logwin(), TQT_SLOT(logTransfer(uint, const TQString &, const TQString &)));
// setup actions
- m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, SLOT(slotResume()), this, "resume");
+ m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, TQT_SLOT(slotResume()), this, "resume");
- m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, SLOT(slotRequestPause()), this, "pause");
+ m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, TQT_SLOT(slotRequestPause()), this, "pause");
- m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, SLOT(slotRequestRemove()), this, "delete");
+ m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRequestRemove()), this, "delete");
- m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, SLOT(slotRequestRestart()), this, "restart");
+ m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, TQT_SLOT(slotRequestRestart()), this, "restart");
- m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, SLOT(slotQueue()), this, "queue");
+ m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, TQT_SLOT(slotQueue()), this, "queue");
- m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, SLOT(slotRequestSchedule()), this, "timer");
+ m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, TQT_SLOT(slotRequestSchedule()), this, "timer");
- m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, SLOT(slotRequestDelay()), this, "delay");
+ m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, TQT_SLOT(slotRequestDelay()), this, "delay");
m_paQueue->setExclusiveGroup("TransferMode");
m_paTimer->setExclusiveGroup("TransferMode");
@@ -144,7 +144,7 @@ Transfer::init(const uint _id)
// Actions
- // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,SLOT(slotRequestDelay()), this, "dockIndividual");
+ // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,TQT_SLOT(slotRequestDelay()), this, "dockIndividual");
// setup individual transfer dialog
@@ -307,7 +307,7 @@ bool Transfer::updateStatus(int counter)
{
//sDebug<< ">>>>Entering"<<endl;
- QPixmap *pix = 0L;
+ TQPixmap *pix = 0L;
bool isTransfer = false;
view->setUpdatesEnabled(false);
@@ -339,14 +339,14 @@ bool Transfer::updateStatus(int counter)
if(prevStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING)
{
- QRect rect = view->header()->sectionRect(view->lv_pixmap);
+ TQRect rect = view->header()->sectionRect(view->lv_pixmap);
int x = rect.x();
int y = view->itemRect(this).y();
int w = rect.width();
int h = rect.height();
- view->QScrollView::updateContents(x,y,w,h);
+ view->TQScrollView::updateContents(x,y,w,h);
prevStatus = status;
prevMode = mode;
@@ -358,8 +358,8 @@ bool Transfer::updateStatus(int counter)
void Transfer::UpdateRetry()
{
- QString retry;
- QString MaxRetry;
+ TQString retry;
+ TQString MaxRetry;
retry.setNum(retryCount);
MaxRetry.setNum(ksettings.reconnectRetries);
@@ -455,8 +455,8 @@ void Transfer::slotRequestRemove()
if (dlgIndividual && !ksettings.b_expertMode)
{
if (KMessageBox::warningContinueCancel(0, i18n("Are you sure you want to delete this transfer?"),
- QString::null, KStdGuiItem::del(),
- QString("delete_transfer"))
+ TQString::null, KStdGuiItem::del(),
+ TQString("delete_transfer"))
!= KMessageBox::Continue)
return;
}
@@ -510,8 +510,8 @@ void Transfer::slotRequestSchedule()
// if the time was already set somewhere in the future, keep it
// otherwise set it to the current time + 60 seconds
- if (startTime < QDateTime::currentDateTime()) {
- QDateTime dt = QDateTime::currentDateTime();
+ if (startTime < TQDateTime::currentDateTime()) {
+ TQDateTime dt = TQDateTime::currentDateTime();
startTime = dt.addSecs(60);
}
if (status == ST_RUNNING) {
@@ -623,7 +623,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second)
dlgIndividual->setSpeed(i18n("Stopped"));
} else {
- QString tmps = i18n("%1/s").arg(KIO::convertSize(speed));
+ TQString tmps = i18n("%1/s").arg(KIO::convertSize(speed));
setText(view->lv_speed, tmps);
setText(view->lv_remaining, remainingTime);
if(dlgIndividual)
@@ -699,7 +699,7 @@ void Transfer::slotProcessedSize(KIO::filesize_t bytes)
dlgIndividual->setProcessedSize(processedSize);
if (percent != old) {
- QString tmps;
+ TQString tmps;
if (percent == 100) {
tmps = i18n("OK as in 'finished'","OK");
} else {
@@ -750,13 +750,13 @@ void Transfer::showIndividual()
}
-void Transfer::logMessage(const QString & message)
+void Transfer::logMessage(const TQString & message)
{
sDebugIn << message << endl;
emit log(id, src.fileName(), message);
- QString tmps = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + message;
+ TQString tmps = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + message;
transferLog.append(tmps + '\n');
@@ -773,7 +773,7 @@ bool Transfer::read(KSimpleConfig * config, int id)
sDebugIn << endl;
- QString str;
+ TQString str;
str.sprintf("Item%d", id);
config->setGroup(str);
@@ -808,7 +808,7 @@ void Transfer::write(KSimpleConfig * config, int id)
{
sDebugIn << endl;
- QString str;
+ TQString str;
str.sprintf("Item%d", id);
config->setGroup(str);
@@ -851,7 +851,7 @@ void Transfer::slotExecError()
status = ST_STOPPED;
mode = MD_SCHEDULED;
- startTime=QDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60);
+ startTime=TQDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60);
emit statusChanged(this, OP_SCHEDULED);
sDebugOut << endl;
@@ -961,7 +961,7 @@ void Transfer::slotExecSchedule()
}
/** No descriptions */
-void Transfer::slotStartTime(const QDateTime & _startTime)
+void Transfer::slotStartTime(const TQDateTime & _startTime)
{
sDebugIn << endl;
diff --git a/kget/transfer.h b/kget/transfer.h
index 845995d8..0dacd315 100644
--- a/kget/transfer.h
+++ b/kget/transfer.h
@@ -29,9 +29,9 @@
#define _Transfer_h
#include <klistview.h>
-#include <qdatetime.h>
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
#include <kurl.h>
#include <kio/jobclasses.h>
@@ -50,7 +50,7 @@ class DlgIndividual;
class TransferList;
-class Transfer:public QObject, public KListViewItem
+class Transfer:public TQObject, public KListViewItem
{
Q_OBJECT
public:
@@ -73,12 +73,12 @@ public:
bool read(KSimpleConfig * config, int id);
void write(KSimpleConfig * config, int id);
- void logMessage(const QString & message);
+ void logMessage(const TQString & message);
bool keepDialogOpen() const;
- QDateTime getStartTime()const
+ TQDateTime getStartTime()const
{
return startTime;
}
@@ -130,7 +130,7 @@ public:
{
status = _status;
};
- void setStartTime(QDateTime _startTime)
+ void setStartTime(TQDateTime _startTime)
{
startTime = _startTime;
};
@@ -185,12 +185,12 @@ public slots:
void slotTotalSize(KIO::filesize_t bytes);
void slotProcessedSize(KIO::filesize_t);
- void slotStartTime(const QDateTime &);
+ void slotStartTime(const TQDateTime &);
void slotStop(); // stop all transfers when going offline
signals:
void statusChanged(Transfer *, int _operation);
- void log(uint, const QString &, const QString &);
+ void log(uint, const TQString &, const TQString &);
private:
void init(const uint _id);
@@ -206,10 +206,10 @@ private:
static uint idcount;
// log
- QString transferLog;
+ TQString transferLog;
// schedule time
- QDateTime startTime;
+ TQDateTime startTime;
KIO::filesize_t totalSize;
KIO::filesize_t processedSize;
@@ -217,7 +217,7 @@ private:
int speed;
unsigned int remainingTimeSec;
- QString remainingTime;
+ TQString remainingTime;
TransferStatus status;
TransferMode mode;
@@ -233,7 +233,7 @@ private:
TransferList *view;
// individual download window
- QGuardedPtr<DlgIndividual> dlgIndividual;
+ TQGuardedPtr<DlgIndividual> dlgIndividual;
};
diff --git a/kget/transferlist.cpp b/kget/transferlist.cpp
index 1d9ed902..bf54cb87 100644
--- a/kget/transferlist.cpp
+++ b/kget/transferlist.cpp
@@ -52,11 +52,11 @@ static int defaultColumnWidth[] = {
};
-TransferList::TransferList(QWidget * parent, const char *name)
+TransferList::TransferList(TQWidget * parent, const char *name)
: KListView(parent, name)
{
// enable selection of more than one item
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
// // disable sorting and clicking on headers
// setSorting( -1 );
@@ -86,20 +86,20 @@ TransferList::TransferList(QWidget * parent, const char *name)
else
restoreLayout( KGlobal::config(), "ListView" );
- QString connectPath = "pics/connect%2.png";
- QString tryPath = "pics/try%2.png";
+ TQString connectPath = "pics/connect%2.png";
+ TQString tryPath = "pics/try%2.png";
// Load animations
- QPixmap* curPix;
+ TQPixmap* curPix;
if (animConn.count() == 0) {
animConn.setAutoDelete(true);
animTry.setAutoDelete(true);
for (int i = 0; i < 8; i++) {
- curPix = new QPixmap();
+ curPix = new TQPixmap();
curPix->load(locate("appdata", connectPath.arg(i)));
animConn.append(curPix);
- curPix = new QPixmap();
+ curPix = new TQPixmap();
curPix->load(locate("appdata", tryPath.arg(i)));
animTry.append(curPix);
}
@@ -113,8 +113,8 @@ TransferList::TransferList(QWidget * parent, const char *name)
phasesNum = animConn.count();
- connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotTransferSelected(QListViewItem *)));
- connect(this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), SLOT(slotPopupMenu(QListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotTransferSelected(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(slotPopupMenu(TQListViewItem *)));
}
@@ -137,13 +137,13 @@ Transfer *TransferList::addTransfer(const KURL & _source, const KURL & _dest,
}
-void TransferList::slotTransferSelected(QListViewItem * item)
+void TransferList::slotTransferSelected(TQListViewItem * item)
{
emit transferSelected((Transfer *) item);
}
-void TransferList::slotPopupMenu(QListViewItem * item)
+void TransferList::slotPopupMenu(TQListViewItem * item)
{
if (!item)
return;
@@ -151,7 +151,7 @@ void TransferList::slotPopupMenu(QListViewItem * item)
}
-void TransferList::setSelected(QListViewItem * item, bool selected)
+void TransferList::setSelected(TQListViewItem * item, bool selected)
{
bool tmpb = selected;
@@ -159,7 +159,7 @@ void TransferList::setSelected(QListViewItem * item, bool selected)
tmpb = false;
}
- QListView::setSelected(item, tmpb);
+ TQListView::setSelected(item, tmpb);
}
@@ -227,9 +227,9 @@ Transfer * TransferList::find(const KURL& _src)
void TransferList::readTransfers(const KURL& file)
{
- QString tmpFile;
+ TQString tmpFile;
- if (KIO::NetAccess::download(file, tmpFile, (QWidget*)parent())) {
+ if (KIO::NetAccess::download(file, tmpFile, (TQWidget*)parent())) {
KSimpleConfig config(tmpFile);
config.setGroup("Common");
@@ -240,7 +240,7 @@ void TransferList::readTransfers(const KURL& file)
for ( int i = 0; i < num; i++ )
{
- QString str;
+ TQString str;
str.sprintf("Item%d", i);
config.setGroup(str);
@@ -261,7 +261,7 @@ void TransferList::readTransfers(const KURL& file)
}
}
-void TransferList::writeTransfers(const QString& file)
+void TransferList::writeTransfers(const TQString& file)
{
sDebug << ">>>>Entering with file =" << file << endl;
diff --git a/kget/transferlist.h b/kget/transferlist.h
index 0d5929d0..89f50e6a 100644
--- a/kget/transferlist.h
+++ b/kget/transferlist.h
@@ -28,7 +28,7 @@
#define _TransferList_h
#include <klistview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
@@ -39,12 +39,12 @@ class TransferIterator:public QListViewItemIterator
public:
- TransferIterator(QListView * view):QListViewItemIterator(view)
+ TransferIterator(TQListView * view):TQListViewItemIterator(view)
{
}
Transfer *current() const
{
- return (Transfer *) QListViewItemIterator::current();
+ return (Transfer *) TQListViewItemIterator::current();
}
void reset()
{
@@ -59,13 +59,13 @@ class TransferList:public KListView
Q_OBJECT public:
- TransferList(QWidget * parent = 0, const char *name = 0);
+ TransferList(TQWidget * parent = 0, const char *name = 0);
virtual ~ TransferList();
Transfer *addTransfer(const KURL & _source, const KURL & _dest,
bool canShow = true );
- virtual void setSelected(QListViewItem * item, bool selected);
+ virtual void setSelected(TQListViewItem * item, bool selected);
void moveToBegin(Transfer * item);
void moveToEnd(Transfer * item);
@@ -79,7 +79,7 @@ Q_OBJECT public:
bool areTransfersQueuedOrScheduled();
void readTransfers(const KURL& file);
- void writeTransfers(const QString& file);
+ void writeTransfers(const TQString& file);
friend class Transfer;
@@ -88,8 +88,8 @@ signals:
void popupMenu(Transfer * item);
protected slots:
- void slotTransferSelected(QListViewItem * item);
- void slotPopupMenu(QListViewItem * item);
+ void slotTransferSelected(TQListViewItem * item);
+ void slotPopupMenu(TQListViewItem * item);
protected:
@@ -100,13 +100,13 @@ protected:
int lv_pixmap, lv_filename, lv_resume, lv_count, lv_progress;
int lv_total, lv_speed, lv_remaining, lv_url;
- QPtrList < QPixmap > animConn;
- QPtrList < QPixmap > animTry;
- QPixmap pixQueued;
- QPixmap pixScheduled;
- QPixmap pixDelayed;
- QPixmap pixFinished;
- QPixmap pixRetrying;
+ TQPtrList < TQPixmap > animConn;
+ TQPtrList < TQPixmap > animTry;
+ TQPixmap pixQueued;
+ TQPixmap pixScheduled;
+ TQPixmap pixDelayed;
+ TQPixmap pixFinished;
+ TQPixmap pixRetrying;
uint phasesNum;
uint jobid;
diff --git a/knewsticker/common/configaccess.cpp b/knewsticker/common/configaccess.cpp
index 942b3f70..68b37f57 100644
--- a/knewsticker/common/configaccess.cpp
+++ b/knewsticker/common/configaccess.cpp
@@ -11,7 +11,7 @@
#include "configaccess.h"
#include "newsengine.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -20,347 +20,347 @@
static NewsSourceBase::Data NewsSourceDefault[DEFAULT_NEWSSOURCES] = {
// Arts ---------------
NewsSourceBase::Data(
- QString::fromLatin1("Bureau 42"),
- QString::fromLatin1("http://www.bureau42.com/rdf/"),
- QString::fromLatin1("http://www.bureau42.com/favicon.ico"),
+ TQString::fromLatin1("Bureau 42"),
+ TQString::fromLatin1("http://www.bureau42.com/rdf/"),
+ TQString::fromLatin1("http://www.bureau42.com/favicon.ico"),
NewsSourceBase::Arts, 5, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("eFilmCritic"),
- QString::fromLatin1("http://efilmcritic.com/fo.rdf"),
- QString::fromLatin1("http://efilmcritic.com/favicon.ico"),
+ TQString::fromLatin1("eFilmCritic"),
+ TQString::fromLatin1("http://efilmcritic.com/fo.rdf"),
+ TQString::fromLatin1("http://efilmcritic.com/favicon.ico"),
NewsSourceBase::Arts, 3, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("superhits.ch"),
- QString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"),
- QString::fromLatin1("http://www.superhits.ch/favicon.ico"),
- NewsSourceBase::Arts, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("superhits.ch"),
+ TQString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"),
+ TQString::fromLatin1("http://www.superhits.ch/favicon.ico"),
+ NewsSourceBase::Arts, 10, false, false, TQString::fromLatin1("de")),
// Business -----------
NewsSourceBase::Data(
- QString::fromLatin1("Internet.com Business"),
- QString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
- QString::null,
+ TQString::fromLatin1("Internet.com Business"),
+ TQString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
+ TQString::null,
NewsSourceBase::Business, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("TradeSims"),
- QString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
- QString::null,
+ TQString::fromLatin1("TradeSims"),
+ TQString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
+ TQString::null,
NewsSourceBase::Business, 10, false, false),
// Computers ----------
NewsSourceBase::Data(
- QString::fromLatin1( "linuxartist.org" ),
- QString::fromLatin1( "http://www.linuxartist.org/backend.php"),
- QString::fromLatin1( "http://www.linuxartist.org/favicon.ico"),
+ TQString::fromLatin1( "linuxartist.org" ),
+ TQString::fromLatin1( "http://www.linuxartist.org/backend.php"),
+ TQString::fromLatin1( "http://www.linuxartist.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false ),
NewsSourceBase::Data(
- QString::fromLatin1("KDE Deutschland"),
- QString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
- QString::fromLatin1("http://www.kde.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("KDE Deutschland"),
+ TQString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
+ TQString::fromLatin1("http://www.kde.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("KDE France"),
- QString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
- QString::null,
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("fr")),
+ TQString::fromLatin1("KDE France"),
+ TQString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
+ TQString::null,
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("fr")),
NewsSourceBase::Data(
- QString::fromLatin1("FreeBSD Project News"),
- QString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
- QString::fromLatin1("http://www.freebsd.org/favicon.ico"),
+ TQString::fromLatin1("FreeBSD Project News"),
+ TQString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
+ TQString::fromLatin1("http://www.freebsd.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("dot.kde.org"),
- QString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
- QString::fromLatin1("http://www.kde.org/favicon.ico"),
+ TQString::fromLatin1("dot.kde.org"),
+ TQString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
+ TQString::fromLatin1("http://www.kde.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("GNOME News"),
- QString::fromLatin1("http://www.gnomedesktop.org/backend.php"),
- QString::null,
+ TQString::fromLatin1("GNOME News"),
+ TQString::fromLatin1("http://www.gnomedesktop.org/backend.php"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot"),
- QString::fromLatin1("http://slashdot.org/slashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/slashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("Ask Slashdot"),
- QString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Ask Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Features"),
- QString::fromLatin1("http://slashdot.org/features.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Features"),
+ TQString::fromLatin1("http://slashdot.org/features.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Apache"),
- QString::fromLatin1("http://slashdot.org/apache.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Apache"),
+ TQString::fromLatin1("http://slashdot.org/apache.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Books"),
- QString::fromLatin1("http://slashdot.org/books.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Books"),
+ TQString::fromLatin1("http://slashdot.org/books.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Jabber News"),
- QString::fromLatin1("http://www.jabber.org/news/rss.xml"),
- QString::null,
+ TQString::fromLatin1("Jabber News"),
+ TQString::fromLatin1("http://www.jabber.org/news/rss.xml"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Freshmeat"),
- QString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
- QString::fromLatin1("http://freshmeat.net/favicon.ico"),
+ TQString::fromLatin1("Freshmeat"),
+ TQString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
+ TQString::fromLatin1("http://freshmeat.net/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Linux Weekly News"),
- QString::fromLatin1("http://www.lwn.net/headlines/rss"),
- QString::fromLatin1("http://www.lwn.net/favicon.ico"),
+ TQString::fromLatin1("Linux Weekly News"),
+ TQString::fromLatin1("http://www.lwn.net/headlines/rss"),
+ TQString::fromLatin1("http://www.lwn.net/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("heise online news"),
- QString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
- QString::fromLatin1("http://www.heise.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("heise online news"),
+ TQString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
+ TQString::fromLatin1("http://www.heise.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("RUS-CERT Ticker"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RUS-CERT Ticker"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("RUS-CERT Elsewhere"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RUS-CERT Elsewhere"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("Kuro5hin"),
- QString::fromLatin1("http://kuro5hin.org/backend.rdf"),
- QString::fromLatin1("http://kuro5hin.org/favicon.ico"),
+ TQString::fromLatin1("Kuro5hin"),
+ TQString::fromLatin1("http://kuro5hin.org/backend.rdf"),
+ TQString::fromLatin1("http://kuro5hin.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("Prolinux"),
- QString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
- QString::fromLatin1("http://www.prolinux.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Prolinux"),
+ TQString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
+ TQString::fromLatin1("http://www.prolinux.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("Linuxde.org"),
- QString::fromLatin1("http://www.linuxde.org/backends/news.rdf"),
- QString::fromLatin1("http://www.linuxde.org/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Linuxde.org"),
+ TQString::fromLatin1("http://www.linuxde.org/backends/news.rdf"),
+ TQString::fromLatin1("http://www.linuxde.org/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("LinuxSecurity.com"),
- QString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
- QString::null,
+ TQString::fromLatin1("LinuxSecurity.com"),
+ TQString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Linux Game Tome"),
- QString::fromLatin1("http://happypenguin.org/html/news.rdf"),
- QString::null,
+ TQString::fromLatin1("Linux Game Tome"),
+ TQString::fromLatin1("http://happypenguin.org/html/news.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Telefragged"),
- QString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"),
- QString::null,
+ TQString::fromLatin1("Telefragged"),
+ TQString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
/* NewsSourceBase::Data(
- QString::fromLatin1("Gimp News"),
- QString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"),
- QString::null,
+ TQString::fromLatin1("Gimp News"),
+ TQString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),*/
NewsSourceBase::Data(
- QString::fromLatin1("Mozilla"),
- QString::fromLatin1("http://www.mozilla.org/news.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("Mozilla"),
+ TQString::fromLatin1("http://www.mozilla.org/news.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("MozillaZine"),
- QString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("MozillaZine"),
+ TQString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Daemon News"),
- QString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
- QString::null,
+ TQString::fromLatin1("Daemon News"),
+ TQString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("use Perl;"),
- QString::fromLatin1("http://use.perl.org/useperl.rdf"),
- QString::null,
+ TQString::fromLatin1("use Perl;"),
+ TQString::fromLatin1("http://use.perl.org/useperl.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("desktopian.org"),
- QString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"),
- QString::fromLatin1("http://www.desktopian.org/favicon.ico"),
+ TQString::fromLatin1("desktopian.org"),
+ TQString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"),
+ TQString::fromLatin1("http://www.desktopian.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Root prompt"),
- QString::fromLatin1("http://www.rootprompt.org/rss/"),
- QString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
+ TQString::fromLatin1("Root prompt"),
+ TQString::fromLatin1("http://www.rootprompt.org/rss/"),
+ TQString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("SecurityFocus"),
- QString::fromLatin1("http://www.securityfocus.com/rss/news.xml"),
- QString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
+ TQString::fromLatin1("SecurityFocus"),
+ TQString::fromLatin1("http://www.securityfocus.com/rss/news.xml"),
+ TQString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("LinuxNewbie"),
- QString::fromLatin1("http://www.linuxnewbie.org/news.cdf"),
- QString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"),
+ TQString::fromLatin1("LinuxNewbie"),
+ TQString::fromLatin1("http://www.linuxnewbie.org/news.cdf"),
+ TQString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"),
NewsSourceBase::Computers, 5, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Arstechnica"),
- QString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
- QString::fromLatin1("http://arstechnica.com/favicon.ico"),
+ TQString::fromLatin1("Arstechnica"),
+ TQString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
+ TQString::fromLatin1("http://arstechnica.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
- QString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
+ TQString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("amiga-news.de - english Amiga news"),
- QString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ TQString::fromLatin1("amiga-news.de - english Amiga news"),
+ TQString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("RadioTux)"),
- QString::fromLatin1("http://blog.radiotux.de/feed/"),
- QString::null,
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RadioTux)"),
+ TQString::fromLatin1("http://blog.radiotux.de/feed/"),
+ TQString::null,
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("kdenews.unixcode.org"),
- QString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"),
- QString::null,
+ TQString::fromLatin1("kdenews.unixcode.org"),
+ TQString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("FreshPorts - the place for ports"),
- QString::fromLatin1("http://www.freshports.org/news.php"),
- QString::fromLatin1("http://www.freshports.org/favicon.ico"),
+ TQString::fromLatin1("FreshPorts - the place for ports"),
+ TQString::fromLatin1("http://www.freshports.org/news.php"),
+ TQString::fromLatin1("http://www.freshports.org/favicon.ico"),
NewsSourceBase::Computers, 20, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("NetPhoenix"),
- QString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"),
- QString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("NetPhoenix"),
+ TQString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"),
+ TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("ShortNews - by www.netphoenix.at"),
- QString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"),
- QString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("ShortNews - by www.netphoenix.at"),
+ TQString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"),
+ TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("zez.org - about code "),
- QString::fromLatin1("http://zez.org/article/rssheadlines"),
- QString::null,
+ TQString::fromLatin1("zez.org - about code "),
+ TQString::fromLatin1("http://zez.org/article/rssheadlines"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("BSDatwork.com"),
- QString::fromLatin1("http://BSDatwork.com/backend.php"),
- QString::fromLatin1("http://BSDatwork.com/favicon.ico"),
+ TQString::fromLatin1("BSDatwork.com"),
+ TQString::fromLatin1("http://BSDatwork.com/backend.php"),
+ TQString::fromLatin1("http://BSDatwork.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("FreshSource - the place for source"),
- QString::fromLatin1("http://www.freshsource.org/news.php"),
- QString::fromLatin1("http://www.freshsource.org/favicon.ico"),
+ TQString::fromLatin1("FreshSource - the place for source"),
+ TQString::fromLatin1("http://www.freshsource.org/news.php"),
+ TQString::fromLatin1("http://www.freshsource.org/favicon.ico"),
NewsSourceBase::Computers, 20, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("The FreeBSD Diary"),
- QString::fromLatin1("http://www.freebsddiary.org/news.php"),
- QString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
+ TQString::fromLatin1("The FreeBSD Diary"),
+ TQString::fromLatin1("http://www.freebsddiary.org/news.php"),
+ TQString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("MaximumBSD"),
- QString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"),
- QString::fromLatin1("http://www.maximumbsd.com/favicon.ico"),
+ TQString::fromLatin1("MaximumBSD"),
+ TQString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"),
+ TQString::fromLatin1("http://www.maximumbsd.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("BR-Linux.org"),
- QString::fromLatin1("http://br-linux.org/noticias/index.rdf"),
- QString::fromLatin1("http://br-linux.org/noticias/favicon.ico"),
+ TQString::fromLatin1("BR-Linux.org"),
+ TQString::fromLatin1("http://br-linux.org/noticias/index.rdf"),
+ TQString::fromLatin1("http://br-linux.org/noticias/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("OSNews.com"),
- QString::fromLatin1("http://www.osnews.com/files/recent.rdf"),
- QString::fromLatin1("http://www.osnews.com/favicon.ico"),
+ TQString::fromLatin1("OSNews.com"),
+ TQString::fromLatin1("http://www.osnews.com/files/recent.rdf"),
+ TQString::fromLatin1("http://www.osnews.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
// Miscellaneous ------
NewsSourceBase::Data(
- QString::fromLatin1("tagesschau.de"),
- QString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
- QString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
- NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("tagesschau.de"),
+ TQString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
+ TQString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
+ NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("N24.de"),
- QString::fromLatin1("http://www.n24.de/rss/?rubrik=home"),
- QString::fromLatin1("http://www.n24.de/favicon.ico"),
- NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("N24.de"),
+ TQString::fromLatin1("http://www.n24.de/rss/?rubrik=home"),
+ TQString::fromLatin1("http://www.n24.de/favicon.ico"),
+ NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")),
/*
NewsSourceBase::Data(
- QString::fromLatin1("CNN"),
- QString::fromLatin1("http://www.cnn.com/cnn.rss"),
- QString::fromLatin1("http://www.cnn.com/favicon.ico"),
+ TQString::fromLatin1("CNN"),
+ TQString::fromLatin1("http://www.cnn.com/cnn.rss"),
+ TQString::fromLatin1("http://www.cnn.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("CNN Europe"),
- QString::fromLatin1("http://europe.cnn.com/cnn.rss"),
- QString::fromLatin1("http://europe.cnn.com/favicon.ico"),
+ TQString::fromLatin1("CNN Europe"),
+ TQString::fromLatin1("http://europe.cnn.com/cnn.rss"),
+ TQString::fromLatin1("http://europe.cnn.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
*/
NewsSourceBase::Data(
- QString::fromLatin1("HotWired"),
- QString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"),
- QString::fromLatin1("http://www.hotwired.com/favicon.ico"),
+ TQString::fromLatin1("HotWired"),
+ TQString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"),
+ TQString::fromLatin1("http://www.hotwired.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("The Register"),
- QString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"),
- QString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
+ TQString::fromLatin1("The Register"),
+ TQString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"),
+ TQString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1( "Christian Science Monitor" ),
- QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
- QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
+ TQString::fromLatin1( "Christian Science Monitor" ),
+ TQString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
+ TQString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false ),
// Magazines ------
NewsSourceBase::Data(
- QString::fromLatin1("Revista do Linux"),
- QString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"),
- QString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"),
- NewsSourceBase::Magazines, 10, false, false /*, QString::fromLatin1("br")*/ ),
+ TQString::fromLatin1("Revista do Linux"),
+ TQString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"),
+ TQString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"),
+ NewsSourceBase::Magazines, 10, false, false /*, TQString::fromLatin1("br")*/ ),
NewsSourceBase::Data(
- QString::fromLatin1("Spiegel.de"),
- QString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"),
- QString::fromLatin1("http://www.spiegel.de/favicon.ico"),
- NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Spiegel.de"),
+ TQString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"),
+ TQString::fromLatin1("http://www.spiegel.de/favicon.ico"),
+ NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("FAZ.de"),
- QString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"),
- QString::fromLatin1("http://www.faz.net/favicon.ico"),
- NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("FAZ.de"),
+ TQString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"),
+ TQString::fromLatin1("http://www.faz.net/favicon.ico"),
+ NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")),
// Recreation
NewsSourceBase::Data(
- QString::fromLatin1("Segfault"),
- QString::fromLatin1("http://segfault.org/stories.xml"),
- QString::fromLatin1("http://segfault.org/favicon.ico"),
+ TQString::fromLatin1("Segfault"),
+ TQString::fromLatin1("http://segfault.org/stories.xml"),
+ TQString::fromLatin1("http://segfault.org/favicon.ico"),
NewsSourceBase::Recreation, 10, false, false),
// Society
NewsSourceBase::Data(
- QString::fromLatin1("nippon.it"),
- QString::fromLatin1("http://www.nippon.it/backend.it.php"),
- QString::fromLatin1("http://www.nippon.it/favicon.ico"),
- NewsSourceBase::Society, 10, false, false, QString::fromLatin1("it")),
+ TQString::fromLatin1("nippon.it"),
+ TQString::fromLatin1("http://www.nippon.it/backend.it.php"),
+ TQString::fromLatin1("http://www.nippon.it/favicon.ico"),
+ NewsSourceBase::Society, 10, false, false, TQString::fromLatin1("it")),
NewsSourceBase::Data(
- QString::fromLatin1( "gflash" ),
- QString::fromLatin1( "http://www.gflash.de/backend.php"),
- QString::fromLatin1( "http://www.gflash.de/favicon.ico"),
- NewsSourceBase::Society, 10, false, false, QString::fromLatin1( "de" ) ),
+ TQString::fromLatin1( "gflash" ),
+ TQString::fromLatin1( "http://www.gflash.de/backend.php"),
+ TQString::fromLatin1( "http://www.gflash.de/favicon.ico"),
+ NewsSourceBase::Society, 10, false, false, TQString::fromLatin1( "de" ) ),
NewsSourceBase::Data(
- QString::fromLatin1( "Quintessenz" ),
- QString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
- QString::fromLatin1( "http://quintessenz.at/favicon.ico"),
- NewsSourceBase::Society, 9, false, false, QString::fromLatin1( "de" ) )
+ TQString::fromLatin1( "Quintessenz" ),
+ TQString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
+ TQString::fromLatin1( "http://quintessenz.at/favicon.ico"),
+ NewsSourceBase::Society, 9, false, false, TQString::fromLatin1( "de" ) )
};
-ArticleFilter::ArticleFilter(const QString &action, const QString &newsSource,
- const QString &condition, const QString &expression, bool enabled)
+ArticleFilter::ArticleFilter(const TQString &action, const TQString &newsSource,
+ const TQString &condition, const TQString &expression, bool enabled)
: m_action(action),
m_newsSource(newsSource),
m_condition(condition),
@@ -387,7 +387,7 @@ bool ArticleFilter::matches(Article::Ptr a) const
else if (condition() == i18n("do not equal"))
matches = (a->headline() != expression());
else { // condition() == i18n("match")
- QRegExp regexp = QRegExp(expression());
+ TQRegExp regexp = TQRegExp(expression());
matches = regexp.exactMatch(a->headline());
}
@@ -398,7 +398,7 @@ bool ArticleFilter::matches(Article::Ptr a) const
}
ConfigAccess::ConfigAccess()
- : m_defaultCfg(new KConfig(QString::null, true, false))
+ : m_defaultCfg(new KConfig(TQString::null, true, false))
{
m_cfg = m_defaultCfg;
}
@@ -436,13 +436,13 @@ void ConfigAccess::setMouseWheelSpeed(const unsigned int mouseWheelSpeed)
m_cfg->sync();
}
-QFont ConfigAccess::font() const
+TQFont ConfigAccess::font() const
{
- QFont font = KGlobalSettings::fixedFont();
+ TQFont font = KGlobalSettings::fixedFont();
return m_cfg->readFontEntry("Font", &font);
}
-void ConfigAccess::setFont(const QFont &font)
+void ConfigAccess::setFont(const TQFont &font)
{
m_cfg->writeEntry("Font", font);
m_cfg->sync();
@@ -481,9 +481,9 @@ void ConfigAccess::setOfflineMode(bool offlineMode)
m_cfg->sync();
}
-QStringList ConfigAccess::newsSources() const
+TQStringList ConfigAccess::newsSources() const
{
- QStringList tempList = m_cfg->readListEntry("News sources");
+ TQStringList tempList = m_cfg->readListEntry("News sources");
if (tempList.isEmpty())
for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++)
tempList << NewsSourceDefault[i].name;
@@ -495,7 +495,7 @@ ArticleFilter::List ConfigAccess::filters() const
return m_cfg->readIntListEntry("Filters");
}
-void ConfigAccess::setNewsSources(const QStringList &newsSources)
+void ConfigAccess::setNewsSources(const TQStringList &newsSources)
{
m_cfg->writeEntry("News sources", newsSources);
m_cfg->sync();
@@ -529,34 +529,34 @@ void ConfigAccess::setScrollingDirection(const unsigned int scrollingDirection)
m_cfg->sync();
}
-QColor ConfigAccess::foregroundColor() const
+TQColor ConfigAccess::foregroundColor() const
{
return m_cfg->readColorEntry("Foreground color", &Qt::black);
}
-void ConfigAccess::setForegroundColor(const QColor &foregroundColor)
+void ConfigAccess::setForegroundColor(const TQColor &foregroundColor)
{
m_cfg->writeEntry("Foreground color", foregroundColor);
m_cfg->sync();
}
-QColor ConfigAccess::backgroundColor() const
+TQColor ConfigAccess::backgroundColor() const
{
return m_cfg->readColorEntry("Background color", &Qt::white);
}
-void ConfigAccess::setBackgroundColor(const QColor &backgroundColor)
+void ConfigAccess::setBackgroundColor(const TQColor &backgroundColor)
{
m_cfg->writeEntry("Background color", backgroundColor);
m_cfg->sync();
}
-QColor ConfigAccess::highlightedColor() const
+TQColor ConfigAccess::highlightedColor() const
{
return m_cfg->readColorEntry("Highlighted color", &Qt::red);
}
-void ConfigAccess::setHighlightedColor(const QColor &highlightedColor)
+void ConfigAccess::setHighlightedColor(const TQColor &highlightedColor)
{
m_cfg->writeEntry("Highlighted color", highlightedColor);
m_cfg->sync();
@@ -573,7 +573,7 @@ void ConfigAccess::setUnderlineHighlighted(bool underlineHighlighted)
m_cfg->sync();
}
-NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource)
+NewsSourceBase *ConfigAccess::newsSource(const TQString &newsSource)
{
NewsSourceBase::Data nsd;
@@ -587,13 +587,13 @@ NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource)
nsd.icon = m_cfg->readEntry("Icon");
nsd.maxArticles = m_cfg->readNumEntry("Max articles", 10);
nsd.enabled = m_cfg->readBoolEntry("Enabled", true);
- nsd.language = m_cfg->readEntry("Language", QString::fromLatin1("C"));
+ nsd.language = m_cfg->readEntry("Language", TQString::fromLatin1("C"));
m_cfg->setGroup("KNewsTicker");
} else for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++)
if (NewsSourceDefault[i].name == newsSource) {
nsd = NewsSourceDefault[i];
if (nsd.enabled)
- nsd.enabled = (nsd.language == QString::fromLatin1("C") ||
+ nsd.enabled = (nsd.language == TQString::fromLatin1("C") ||
KGlobal::locale()->languageList().contains(nsd.language));
break;
}
@@ -611,8 +611,8 @@ ArticleFilter ConfigAccess::filter(const unsigned int filterNo) const
ArticleFilter f;
f.setId(filterNo);
- if (m_cfg->hasGroup(QString::fromLatin1("Filter #%1").arg(filterNo))) {
- m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(filterNo));
+ if (m_cfg->hasGroup(TQString::fromLatin1("Filter #%1").arg(filterNo))) {
+ m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(filterNo));
f.setAction(m_cfg->readEntry("Action", i18n("Show")));
f.setNewsSource(m_cfg->readEntry("News source", i18n("all news sources")));
f.setCondition(m_cfg->readEntry("Condition", i18n("contain")));
@@ -640,7 +640,7 @@ void ConfigAccess::setNewsSource(const NewsSourceBase::Data &ns)
void ConfigAccess::setFilter(const ArticleFilter &f)
{
- m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(f.id()));
+ m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(f.id()));
m_cfg->writeEntry("Action", f.action());
m_cfg->writeEntry("News source", f.newsSource());
m_cfg->writeEntry("Condition", f.condition());
diff --git a/knewsticker/common/configaccess.h b/knewsticker/common/configaccess.h
index 3cdf80e5..8d2c8a50 100644
--- a/knewsticker/common/configaccess.h
+++ b/knewsticker/common/configaccess.h
@@ -18,8 +18,8 @@
#include <kio/job.h>
#include <klocale.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#define DEFAULT_NEWSSOURCES 63
#define DEFAULT_SUBJECTS 13
@@ -30,25 +30,25 @@ class KURL;
class ArticleFilter {
public:
- typedef QValueList<int> List;
+ typedef TQValueList<int> List;
- ArticleFilter(const QString & = I18N_NOOP(QString::fromLatin1("Show")),
- const QString & = I18N_NOOP(QString::fromLatin1("all newssources")),
- const QString & = I18N_NOOP(QString::fromLatin1("contain")),
- const QString & = QString::null,
+ ArticleFilter(const TQString & = I18N_NOOP(TQString::fromLatin1("Show")),
+ const TQString & = I18N_NOOP(TQString::fromLatin1("all newssources")),
+ const TQString & = I18N_NOOP(TQString::fromLatin1("contain")),
+ const TQString & = TQString::null,
bool = true);
- QString action() const { return m_action; }
- void setAction(const QString &action) { m_action = action; }
+ TQString action() const { return m_action; }
+ void setAction(const TQString &action) { m_action = action; }
- QString newsSource() const { return m_newsSource; }
- void setNewsSource(const QString &newsSource) { m_newsSource = newsSource; }
+ TQString newsSource() const { return m_newsSource; }
+ void setNewsSource(const TQString &newsSource) { m_newsSource = newsSource; }
- QString condition() const { return m_condition; }
- void setCondition(const QString &condition) { m_condition = condition; }
+ TQString condition() const { return m_condition; }
+ void setCondition(const TQString &condition) { m_condition = condition; }
- QString expression() const { return m_expression; }
- void setExpression(const QString &expression) { m_expression = expression; }
+ TQString expression() const { return m_expression; }
+ void setExpression(const TQString &expression) { m_expression = expression; }
bool enabled() const { return m_enabled; }
void setEnabled(bool enabled) { m_enabled = enabled; }
@@ -59,10 +59,10 @@ class ArticleFilter {
bool matches(Article::Ptr) const;
private:
- QString m_action;
- QString m_newsSource;
- QString m_condition;
- QString m_expression;
+ TQString m_action;
+ TQString m_newsSource;
+ TQString m_condition;
+ TQString m_expression;
bool m_enabled;
unsigned int m_id;
};
@@ -84,12 +84,12 @@ class ConfigAccess : public ConfigIface
virtual bool underlineHighlighted() const;
virtual bool showIcons() const;
virtual bool slowedScrolling() const;
- virtual QColor foregroundColor() const;
- virtual QColor backgroundColor() const;
- virtual QColor highlightedColor() const;
- QFont font() const;
- virtual QStringList newsSources() const;
- NewsSourceBase *newsSource(const QString &);
+ virtual TQColor foregroundColor() const;
+ virtual TQColor backgroundColor() const;
+ virtual TQColor highlightedColor() const;
+ TQFont font() const;
+ virtual TQStringList newsSources() const;
+ NewsSourceBase *newsSource(const TQString &);
ArticleFilter::List filters() const;
ArticleFilter filter(const unsigned int) const;
@@ -117,11 +117,11 @@ class ConfigAccess : public ConfigIface
virtual void setUnderlineHighlighted(bool);
virtual void setShowIcons(bool);
virtual void setSlowedScrolling(bool);
- virtual void setForegroundColor(const QColor &);
- virtual void setBackgroundColor(const QColor &);
- virtual void setHighlightedColor(const QColor &);
- void setFont(const QFont &);
- virtual void setNewsSources(const QStringList &);
+ virtual void setForegroundColor(const TQColor &);
+ virtual void setBackgroundColor(const TQColor &);
+ virtual void setHighlightedColor(const TQColor &);
+ void setFont(const TQFont &);
+ virtual void setNewsSources(const TQStringList &);
void setNewsSource(const NewsSourceBase::Data &);
void setFilters(const ArticleFilter::List &);
void setFilter(const ArticleFilter &);
diff --git a/knewsticker/common/configiface.h b/knewsticker/common/configiface.h
index 64bc312d..e5f425c9 100644
--- a/knewsticker/common/configiface.h
+++ b/knewsticker/common/configiface.h
@@ -32,10 +32,10 @@ class ConfigIface
virtual bool underlineHighlighted() const = 0;
virtual bool showIcons() const = 0;
virtual bool slowedScrolling() const = 0;
- virtual QColor foregroundColor() const = 0;
- virtual QColor backgroundColor() const = 0;
- virtual QColor highlightedColor() const = 0;
- virtual QStringList newsSources() const = 0;
+ virtual TQColor foregroundColor() const = 0;
+ virtual TQColor backgroundColor() const = 0;
+ virtual TQColor highlightedColor() const = 0;
+ virtual TQStringList newsSources() const = 0;
virtual void setInterval(const unsigned int) = 0;
virtual void setScrollingSpeed(const unsigned int) = 0;
@@ -47,10 +47,10 @@ class ConfigIface
virtual void setUnderlineHighlighted(bool) = 0;
virtual void setShowIcons(bool) = 0;
virtual void setSlowedScrolling(bool) = 0;
- virtual void setForegroundColor(const QColor &) = 0;
- virtual void setBackgroundColor(const QColor &) = 0;
- virtual void setHighlightedColor(const QColor &) = 0;
- virtual void setNewsSources(const QStringList &) = 0;
+ virtual void setForegroundColor(const TQColor &) = 0;
+ virtual void setBackgroundColor(const TQColor &) = 0;
+ virtual void setHighlightedColor(const TQColor &) = 0;
+ virtual void setNewsSources(const TQStringList &) = 0;
};
#endif // CONFIGIFACE_H
diff --git a/knewsticker/common/newsengine.cpp b/knewsticker/common/newsengine.cpp
index cce7895c..a283a68b 100644
--- a/knewsticker/common/newsengine.cpp
+++ b/knewsticker/common/newsengine.cpp
@@ -21,9 +21,9 @@
#include <krun.h>
#include <kstandarddirs.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
-Article::Article(NewsSourceBase *parent, const QString &headline,
+Article::Article(NewsSourceBase *parent, const TQString &headline,
const KURL &address)
: XMLNewsArticle(headline, address),
m_parent(parent),
@@ -45,22 +45,22 @@ void Article::open()
NewsSourceBase::NewsSourceBase(const Data &nsd, ConfigIface *config)
: XMLNewsSource(),
m_data(nsd),
- m_icon(QPixmap()),
+ m_icon(TQPixmap()),
m_cfg(dynamic_cast<ConfigAccess *>(config)),
m_newsIconMgr(NewsIconMgr::self())
{
- connect(this, SIGNAL(loadComplete(XMLNewsSource *, bool)),
- SLOT(slotProcessArticles(XMLNewsSource *, bool)));
+ connect(this, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)),
+ TQT_SLOT(slotProcessArticles(XMLNewsSource *, bool)));
}
void NewsSourceBase::getIcon()
{
- connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
m_newsIconMgr->getIcon( KURL( m_data.icon ) );
}
-QString NewsSourceBase::newsSourceName() const
+TQString NewsSourceBase::newsSourceName() const
{
if (m_cfg->customNames() || m_name.isEmpty())
return m_data.name;
@@ -68,7 +68,7 @@ QString NewsSourceBase::newsSourceName() const
return m_name;
}
-QString NewsSourceBase::subjectText(const Subject subject)
+TQString NewsSourceBase::subjectText(const Subject subject)
{
switch (subject) {
case Arts: return i18n("Arts");
@@ -144,7 +144,7 @@ void NewsSourceBase::slotProcessArticles(XMLNewsSource *, bool gotEm)
emit newNewsAvailable(this, oldArticles != m_articles);
}
-Article::Ptr NewsSourceBase::article(const QString &headline)
+Article::Ptr NewsSourceBase::article(const TQString &headline)
{
Article::List::ConstIterator it = m_articles.begin();
Article::List::ConstIterator end = m_articles.end();
@@ -155,13 +155,13 @@ Article::Ptr NewsSourceBase::article(const QString &headline)
return 0L;
}
-void NewsSourceBase::slotGotIcon(const KURL &url, const QPixmap &pixmap)
+void NewsSourceBase::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
{
if (url.url() == m_data.icon) {
m_icon = pixmap;
- disconnect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ disconnect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
}
}
@@ -181,10 +181,10 @@ ProgramNewsSource::ProgramNewsSource(const NewsSourceBase::Data &nsd,
m_program(new KProcess()),
m_programOutput(0)
{
- connect(m_program, SIGNAL(processExited(KProcess *)),
- SLOT(slotProgramExited(KProcess *)));
- connect(m_program, SIGNAL(receivedStdout(KProcess *, char *, int)),
- SLOT(slotGotProgramOutput(KProcess *, char *, int)));
+ connect(m_program, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotProgramExited(KProcess *)));
+ connect(m_program, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(slotGotProgramOutput(KProcess *, char *, int)));
m_data.sourceFile = KURL(m_data.sourceFile).encodedPathAndQuery();
}
@@ -213,7 +213,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
{
bool okSoFar = true;
- QString errorMsg;
+ TQString errorMsg;
if (!proc->normalExit()) {
errorMsg = i18n("<p>The program '%1' was terminated abnormally.<br>This can"
@@ -228,9 +228,9 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
}
if (!okSoFar) {
- QString output = QString(m_programOutput->buffer());
+ TQString output = TQString(m_programOutput->buffer());
if (!output.isEmpty()) {
- output = QString::fromLatin1("\"") + output + QString::fromLatin1("\"");
+ output = TQString::fromLatin1("\"") + output + TQString::fromLatin1("\"");
errorMsg += i18n("<p>Program output:<br>%1<br>").arg(output);
}
KMessageBox::detailedError(0, i18n("An error occurred while updating the"
@@ -244,7 +244,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
m_programOutput = 0;
}
-QString ProgramNewsSource::errorMessage(const ErrorCode errorCode)
+TQString ProgramNewsSource::errorMessage(const ErrorCode errorCode)
{
switch (errorCode) {
case EPERM: return i18n("The program '%1' could not be started at all.");
diff --git a/knewsticker/common/newsengine.h b/knewsticker/common/newsengine.h
index 342dd7fe..430efff7 100644
--- a/knewsticker/common/newsengine.h
+++ b/knewsticker/common/newsengine.h
@@ -18,9 +18,9 @@
#include "configiface.h"
#include "xmlnewsaccess.h"
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
#include <kio/job.h>
#include <klocale.h>
@@ -40,9 +40,9 @@ class KDE_EXPORT Article : public XMLNewsArticle, public KShared
{
public:
typedef KSharedPtr<Article> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
- Article(NewsSourceBase *, const QString & = QString::null,
+ Article(NewsSourceBase *, const TQString & = TQString::null,
const KURL & = KURL());
bool operator==(const Article &other) const;
@@ -68,13 +68,13 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
Reference, Science, Shopping, Society, Sports, Misc, Magazines
};
struct Data {
- Data(const QString &_name = I18N_NOOP("Unknown"),
- const QString &_sourceFile = QString::null,
- const QString &_icon = QString::null,
+ Data(const TQString &_name = I18N_NOOP("Unknown"),
+ const TQString &_sourceFile = TQString::null,
+ const TQString &_icon = TQString::null,
const Subject _subject = Computers,
unsigned int _maxArticles = 10,
bool _enabled = true, bool _isProgram = false,
- const QString &_language = QString::fromLatin1("C"))
+ const TQString &_language = TQString::fromLatin1("C"))
{
name = _name;
sourceFile = _sourceFile;
@@ -86,32 +86,32 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
language = _language;
}
- QString name;
- QString sourceFile;
- QString icon;
+ TQString name;
+ TQString sourceFile;
+ TQString icon;
Subject subject;
unsigned int maxArticles;
bool enabled;
bool isProgram;
- QString language;
+ TQString language;
};
typedef KSharedPtr<NewsSourceBase> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
NewsSourceBase(const Data &, ConfigIface *);
- virtual QString newsSourceName() const;
- QString sourceFile() const { return m_data.sourceFile; }
+ virtual TQString newsSourceName() const;
+ TQString sourceFile() const { return m_data.sourceFile; }
unsigned int maxArticles() const { return m_data.maxArticles; }
- QPixmap icon() const { return m_icon; }
+ TQPixmap icon() const { return m_icon; }
void getIcon();
Data data() const { return m_data; }
Article::List articles() const { return m_articles; }
- Article::Ptr article(const QString &);
+ Article::Ptr article(const TQString &);
- static QString subjectText(const Subject);
+ static TQString subjectText(const Subject);
signals:
void newNewsAvailable(const NewsSourceBase::Ptr &, bool);
@@ -122,11 +122,11 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
protected slots:
void slotProcessArticles(XMLNewsSource *, bool);
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
protected:
Data m_data;
- QPixmap m_icon;
+ TQPixmap m_icon;
ConfigAccess *m_cfg;
NewsIconMgr *m_newsIconMgr;
Article::List m_articles;
@@ -194,10 +194,10 @@ class KDE_EXPORT ProgramNewsSource : public NewsSourceBase
void slotProgramExited(KProcess *);
private:
- static QString errorMessage(const ErrorCode);
+ static TQString errorMessage(const ErrorCode);
KProcess *m_program;
- QBuffer *m_programOutput;
+ TQBuffer *m_programOutput;
};
#endif // NEWSENGINE_H
diff --git a/knewsticker/common/newsiconmgr.cpp b/knewsticker/common/newsiconmgr.cpp
index 69617490..b6787dff 100644
--- a/knewsticker/common/newsiconmgr.cpp
+++ b/knewsticker/common/newsiconmgr.cpp
@@ -16,15 +16,15 @@
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qbuffer.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqimage.h>
struct KIODownload
{
KURL url;
- QByteArray data;
- QIODevice::Offset dataOffset;
+ TQByteArray data;
+ TQIODevice::Offset dataOffset;
};
NewsIconMgr *NewsIconMgr::m_instance = 0;
@@ -37,13 +37,13 @@ NewsIconMgr *NewsIconMgr::self()
return m_instance;
}
-NewsIconMgr::NewsIconMgr(QObject *parent, const char *name)
- : QObject(parent, name), DCOPObject("NewsIconMgr"),
- m_stdIcon(SmallIcon(QString::fromLatin1("news")))
+NewsIconMgr::NewsIconMgr(TQObject *parent, const char *name)
+ : TQObject(parent, name), DCOPObject("NewsIconMgr"),
+ m_stdIcon(SmallIcon(TQString::fromLatin1("news")))
{
connectDCOPSignal("kded",
- "favicons", "iconChanged(bool, QString, QString)",
- "slotGotIcon(bool, QString, QString)",
+ "favicons", "iconChanged(bool, TQString, TQString)",
+ "slotGotIcon(bool, TQString, TQString)",
false);
}
@@ -60,11 +60,11 @@ void NewsIconMgr::getIcon(const KURL &url)
}
if (url.isLocalFile()) {
- if (QFile::exists(url.encodedPathAndQuery())) {
- QPixmap icon(url.encodedPathAndQuery());
+ if (TQFile::exists(url.encodedPathAndQuery())) {
+ TQPixmap icon(url.encodedPathAndQuery());
if (!icon.isNull()) {
- if (icon.size() != QSize(16, 16)) {
- if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, QImage::ScaleMin))) {
+ if (icon.size() != TQSize(16, 16)) {
+ if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, TQImage::ScaleMin))) {
emit gotIcon(url, m_stdIcon);
return;
}
@@ -79,19 +79,19 @@ void NewsIconMgr::getIcon(const KURL &url)
if (url.encodedPathAndQuery() == "/favicon.ico") {
if (favicon(url).isNull()) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << url;
kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data);
} else {
- emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache",
- QString::fromLatin1("favicons/%1.png").arg(url.host()))));
+ emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache",
+ TQString::fromLatin1("favicons/%1.png").arg(url.host()))));
}
} else {
KIO::Job *job = KIO::get(url, true, false);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
KIODownload download;
download.url = url;
@@ -100,7 +100,7 @@ void NewsIconMgr::getIcon(const KURL &url)
}
}
-bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const
+bool NewsIconMgr::isStdIcon(const TQPixmap &pixmap) const
{
if (!pixmap.isNull())
return pixmap.convertToImage() == m_stdIcon.convertToImage();
@@ -108,9 +108,9 @@ bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const
return false;
}
-void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data)
+void NewsIconMgr::slotData(KIO::Job *job, const TQByteArray &data)
{
- QBuffer buf(m_kioDownload[job].data);
+ TQBuffer buf(m_kioDownload[job].data);
buf.open(IO_WriteOnly);
buf.at(m_kioDownload[job].dataOffset);
buf.writeBlock(data);
@@ -119,41 +119,41 @@ void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data)
void NewsIconMgr::slotResult(KIO::Job *job)
{
- emit gotIcon(m_kioDownload[job].url, QPixmap(m_kioDownload[job].data));
+ emit gotIcon(m_kioDownload[job].url, TQPixmap(m_kioDownload[job].data));
m_kioDownload.remove(job);
}
-void NewsIconMgr::slotGotIcon(bool isHost, QString hostOrURL, QString iconName)
+void NewsIconMgr::slotGotIcon(bool isHost, TQString hostOrURL, TQString iconName)
{
KURL url = KURL(hostOrURL);
if (!isHost)
- url.setProtocol(QString::fromLatin1("http"));
+ url.setProtocol(TQString::fromLatin1("http"));
if (iconName.isNull())
emit gotIcon(url, m_stdIcon);
else
- emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache",
- QString::fromLatin1("favicons/%1.png").arg(url.host()))));
+ emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache",
+ TQString::fromLatin1("favicons/%1.png").arg(url.host()))));
}
-QString NewsIconMgr::favicon(const KURL &url) const
+TQString NewsIconMgr::favicon(const KURL &url) const
{
- QByteArray data, reply;
- QCString replyType;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data, reply;
+ TQCString replyType;
+ TQDataStream ds(data, IO_WriteOnly);
ds << url;
kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data, replyType, reply);
- if (replyType == "QString") {
- QDataStream replyStream(reply, IO_ReadOnly);
- QString result;
+ if (replyType == "TQString") {
+ TQDataStream replyStream(reply, IO_ReadOnly);
+ TQString result;
replyStream >> result;
return result;
}
- return QString::null;
+ return TQString::null;
}
#include "newsiconmgr.moc"
diff --git a/knewsticker/common/newsiconmgr.h b/knewsticker/common/newsiconmgr.h
index e4c6b657..30071155 100644
--- a/knewsticker/common/newsiconmgr.h
+++ b/knewsticker/common/newsiconmgr.h
@@ -11,8 +11,8 @@
#ifndef NEWSICONMGR_H
#define NEWSICONMGR_H
-#include <qobject.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
#include <kio/job.h>
@@ -21,9 +21,9 @@
class DCOPClient;
struct KIODownload;
-typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
-class NewsIconMgr : public QObject, public DCOPObject
+class NewsIconMgr : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -32,26 +32,26 @@ class NewsIconMgr : public QObject, public DCOPObject
static NewsIconMgr *self();
void getIcon(const KURL &);
- bool isStdIcon(const QPixmap &) const;
+ bool isStdIcon(const TQPixmap &) const;
k_dcop:
- void slotGotIcon(bool, QString, QString);
+ void slotGotIcon(bool, TQString, TQString);
signals:
- void gotIcon(const KURL &, const QPixmap &);
+ void gotIcon(const KURL &, const TQPixmap &);
protected:
- NewsIconMgr(QObject * = 0L, const char * = 0L);
+ NewsIconMgr(TQObject * = 0L, const char * = 0L);
~NewsIconMgr();
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
- QString favicon(const KURL &) const;
+ TQString favicon(const KURL &) const;
- QPixmap m_stdIcon;
+ TQPixmap m_stdIcon;
KIODownloadMap m_kioDownload;
static NewsIconMgr *m_instance;
diff --git a/knewsticker/common/xmlnewsaccess.cpp b/knewsticker/common/xmlnewsaccess.cpp
index 1c892e8e..b8998e0c 100644
--- a/knewsticker/common/xmlnewsaccess.cpp
+++ b/knewsticker/common/xmlnewsaccess.cpp
@@ -14,11 +14,11 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqregexp.h>
-XMLNewsArticle::XMLNewsArticle(const QString &headline, const KURL &address)
+XMLNewsArticle::XMLNewsArticle(const TQString &headline, const KURL &address)
: m_headline(headline),
m_address(address)
{
@@ -36,10 +36,10 @@ bool XMLNewsArticle::operator==(const XMLNewsArticle &a)
return m_headline == a.headline() && m_address == a.address();
}
-XMLNewsSource::XMLNewsSource() : QObject(),
- m_name(QString::null),
- m_link(QString::null),
- m_description(QString::null),
+XMLNewsSource::XMLNewsSource() : TQObject(),
+ m_name(TQString::null),
+ m_link(TQString::null),
+ m_description(TQString::null),
m_downloadData(0)
{
}
@@ -60,14 +60,14 @@ void XMLNewsSource::loadFrom(const KURL &url)
m_downloadData->open(IO_WriteOnly);
KIO::Job *job = KIO::get(url, false, false);
- job->addMetaData(QString::fromLatin1("UserAgent"),
- QString::fromLatin1("KNewsTicker v0.2"));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ job->addMetaData(TQString::fromLatin1("UserAgent"),
+ TQString::fromLatin1("KNewsTicker v0.2"));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
}
-void XMLNewsSource::slotData(KIO::Job *, const QByteArray &data)
+void XMLNewsSource::slotData(KIO::Job *, const TQByteArray &data)
{
m_downloadData->writeBlock(data.data(), data.size());
}
@@ -80,7 +80,7 @@ void XMLNewsSource::slotResult(KIO::Job *job)
m_downloadData = 0;
}
-void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
+void XMLNewsSource::processData(const TQByteArray &data, bool okSoFar)
{
bool validContent = okSoFar;
kdDebug(5005) << "XMLNewsSource::processData(): validContent = " << validContent << endl;
@@ -90,7 +90,7 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
* Some servers prepend whitespace before the <?xml...?> declaration.
* Since QDom doesn't like that we strip this first.
*/
- QDomDocument domDoc;
+ TQDomDocument domDoc;
const char *charData = data.data();
int len = data.count();
@@ -100,25 +100,25 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
charData++;
}
- QByteArray tmpData;
+ TQByteArray tmpData;
tmpData.setRawData(charData, len);
if (validContent = domDoc.setContent(tmpData)) {
- QDomNode channelNode = domDoc.documentElement().namedItem(QString::fromLatin1("channel"));
+ TQDomNode channelNode = domDoc.documentElement().namedItem(TQString::fromLatin1("channel"));
- m_name = channelNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace();
+ m_name = channelNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace();
kdDebug(5005) << "XMLNewsSource::processData(): Successfully updated " << m_name << endl;
- m_link = channelNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace();
- m_description = channelNode.namedItem(QString::fromLatin1("description")).toElement().text().simplifyWhiteSpace();
+ m_link = channelNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace();
+ m_description = channelNode.namedItem(TQString::fromLatin1("description")).toElement().text().simplifyWhiteSpace();
- QDomNodeList items = domDoc.elementsByTagName(QString::fromLatin1("item"));
+ TQDomNodeList items = domDoc.elementsByTagName(TQString::fromLatin1("item"));
m_articles.clear();
- QDomNode itemNode;
- QString headline, address;
+ TQDomNode itemNode;
+ TQString headline, address;
for (unsigned int i = 0; i < items.count(); i++) {
itemNode = items.item(i);
- headline = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace());
- address = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace());
+ headline = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace());
+ address = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace());
m_articles.append(XMLNewsArticle(headline, KURL( address )));
}
}
diff --git a/knewsticker/common/xmlnewsaccess.h b/knewsticker/common/xmlnewsaccess.h
index 91cbf77f..46cbab59 100644
--- a/knewsticker/common/xmlnewsaccess.h
+++ b/knewsticker/common/xmlnewsaccess.h
@@ -15,8 +15,8 @@
#include <config.h>
#endif
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
#include <kio/job.h>
#include <kurl.h>
@@ -28,15 +28,15 @@ class XMLNewsSource;
class XMLNewsArticle
{
public:
- typedef QValueList<XMLNewsArticle> List;
+ typedef TQValueList<XMLNewsArticle> List;
XMLNewsArticle() {}
- XMLNewsArticle(const QString &headline, const KURL &addresss);
+ XMLNewsArticle(const TQString &headline, const KURL &addresss);
XMLNewsArticle(const XMLNewsArticle &other) { (*this) = other; }
XMLNewsArticle &operator=(const XMLNewsArticle &other);
- QString headline() const { return m_headline; }
- void setHeadline(const QString &headline) { m_headline = headline; }
+ TQString headline() const { return m_headline; }
+ void setHeadline(const TQString &headline) { m_headline = headline; }
KURL address() const { return m_address; }
void setAddress(const KURL &address) { m_address = address; }
@@ -45,7 +45,7 @@ class XMLNewsArticle
bool operator!= (const XMLNewsArticle &a) { return !operator==(a); }
private:
- QString m_headline;
+ TQString m_headline;
KURL m_address;
};
@@ -59,28 +59,28 @@ class XMLNewsSource : public QObject
void loadFrom(const KURL &);
- virtual QString newsSourceName() const { return m_name; }
- virtual QString link() const { return m_link; }
- virtual QString description() const { return m_description; }
+ virtual TQString newsSourceName() const { return m_name; }
+ virtual TQString link() const { return m_link; }
+ virtual TQString description() const { return m_description; }
const XMLNewsArticle::List &articles() const { return m_articles; }
signals:
void loadComplete(XMLNewsSource *, bool);
protected:
- void processData(const QByteArray &, bool = true);
+ void processData(const TQByteArray &, bool = true);
- QString m_name;
- QString m_link;
- QString m_description;
+ TQString m_name;
+ TQString m_link;
+ TQString m_description;
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
XMLNewsArticle::List m_articles;
- QBuffer *m_downloadData;
+ TQBuffer *m_downloadData;
};
#endif // XMLNEWSACCESS_H
diff --git a/knewsticker/knewsticker.cpp b/knewsticker/knewsticker.cpp
index 6d2f90cb..9b15f5da 100644
--- a/knewsticker/knewsticker.cpp
+++ b/knewsticker/knewsticker.cpp
@@ -27,36 +27,36 @@
#include <kstandarddirs.h>
#include <kstartupinfo.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
-KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *parent, const char *name)
+KNewsTicker::KNewsTicker(const TQString &cfgFile, Type t, int actions, TQWidget *parent, const char *name)
: ConfigIface(), DCOPObject("KNewsTicker"),
KPanelApplet(cfgFile, t, actions, parent, name),
m_instance(new KInstance("knewsticker")),
m_dcopClient(new DCOPClient()),
m_cfg(new ConfigAccess(config())),
- m_newsTimer(new QTimer(this)),
- m_updateTimer(new QTimer(this)),
+ m_newsTimer(new TQTimer(this)),
+ m_updateTimer(new TQTimer(this)),
m_newsIconMgr(NewsIconMgr::self()),
m_aboutData(new KAboutData("knewsticker", I18N_NOOP("KNewsTicker"), "v0.2",
I18N_NOOP("A news ticker applet."), KAboutData::License_BSD,
I18N_NOOP("(c) 2000, 2001 The KNewsTicker developers")))
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
m_contextMenu = new KNewsTickerMenu(this);
- connect(m_contextMenu, SIGNAL(aboutToHide()),
- SLOT(slotContextMenuAboutToHide()));
+ connect(m_contextMenu, TQT_SIGNAL(aboutToHide()),
+ TQT_SLOT(slotContextMenuAboutToHide()));
setCustomMenu(m_contextMenu);
m_arrowButton = new KArrowButton(this);
- QToolTip::add(m_arrowButton, i18n("Show menu"));
- connect(m_arrowButton, SIGNAL(clicked()), SLOT(slotArrowButtonPressed()));
+ TQToolTip::add(m_arrowButton, i18n("Show menu"));
+ connect(m_arrowButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotArrowButtonPressed()));
m_arrowButton->setFocusPolicy(NoFocus);
setupArrowButton();
layout->addWidget(m_arrowButton);
@@ -66,12 +66,12 @@ KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *p
m_dcopClient->registerAs("knewsticker", false);
- QToolTip::add(m_scroller, QString::null);
- connect(m_scroller, SIGNAL(contextMenu()), SLOT(slotOpenContextMenu()));
+ TQToolTip::add(m_scroller, TQString::null);
+ connect(m_scroller, TQT_SIGNAL(contextMenu()), TQT_SLOT(slotOpenContextMenu()));
- connect(m_newsTimer, SIGNAL(timeout()), SLOT(slotUpdateNews()));
+ connect(m_newsTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateNews()));
- connect(m_updateTimer, SIGNAL(timeout()), SLOT(slotNotifyOfFailures()));
+ connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNotifyOfFailures()));
m_aboutData->addAuthor("Frerich Raabe", I18N_NOOP("Original author"),
"raabe@kde.org");
@@ -106,7 +106,7 @@ int KNewsTicker::widthForHeight(int) const
void KNewsTicker::preferences()
{
KNewsTickerConfig dlg(m_cfg, this);
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
reparseConfig();
}
}
@@ -119,7 +119,7 @@ void KNewsTicker::about()
void KNewsTicker::help()
{
- kapp->invokeHelp(QString::null, QString::fromLatin1("knewsticker"));
+ kapp->invokeHelp(TQString::null, TQString::fromLatin1("knewsticker"));
}
void KNewsTicker::reportBug()
@@ -133,18 +133,18 @@ void KNewsTicker::reparseConfig()
m_cfg->reparseConfiguration();
m_newsSources.clear();
- QStringList newsSources = m_cfg->newsSources();
- QStringList::ConstIterator it = newsSources.begin();
- QStringList::ConstIterator end = newsSources.end();
+ TQStringList newsSources = m_cfg->newsSources();
+ TQStringList::ConstIterator it = newsSources.begin();
+ TQStringList::ConstIterator end = newsSources.end();
for (; it != end; ++it) {
NewsSourceBase::Ptr ns = m_cfg->newsSource((*it));
if (!ns->data().enabled)
continue;
- connect(ns, SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)),
- SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool)));
- connect(ns, SIGNAL(invalidInput(const NewsSourceBase::Ptr &)),
- SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &)));
+ connect(ns, TQT_SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)),
+ TQT_SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool)));
+ connect(ns, TQT_SIGNAL(invalidInput(const NewsSourceBase::Ptr &)),
+ TQT_SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &)));
m_newsSources.append(ns);
}
@@ -212,7 +212,7 @@ void KNewsTicker::slotNewsSourceUpdated(const NewsSourceBase::Ptr &ns,
if (m_newNews) {
KNotifyClient::Instance instance(m_instance);
- KNotifyClient::event(winId(), QString::fromLatin1("NewNews"));
+ KNotifyClient::event(winId(), TQString::fromLatin1("NewNews"));
}
}
@@ -222,22 +222,22 @@ void KNewsTicker::slotNewsSourceFailed(const NewsSourceBase::Ptr &ns)
slotNewsSourceUpdated(ns);
}
-void KNewsTicker::mousePressEvent(QMouseEvent *e)
+void KNewsTicker::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == QMouseEvent::RightButton)
+ if (e->button() == TQMouseEvent::RightButton)
slotOpenContextMenu();
}
void KNewsTicker::slotOpenContextMenu()
{
m_contextMenu->setFullMenu(true);
- m_contextMenu->exec(QCursor::pos());
+ m_contextMenu->exec(TQCursor::pos());
}
void KNewsTicker::slotArrowButtonPressed()
{
- QPoint pos(m_arrowButton->mapToGlobal(QPoint(0, 0)));
- QSize size(m_arrowButton->size());
+ TQPoint pos(m_arrowButton->mapToGlobal(TQPoint(0, 0)));
+ TQSize size(m_arrowButton->size());
if (position() == KPanelApplet::pTop) {
pos.setY(pos.y() + size.height() + 2);
@@ -259,12 +259,12 @@ void KNewsTicker::positionChange(Position)
{
delete layout();
- QBoxLayout *layout;
+ TQBoxLayout *layout;
if (orientation() == Horizontal)
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
else
- layout = new QVBoxLayout(this);
+ layout = new TQVBoxLayout(this);
if (m_arrowButton) {
layout->addWidget(m_arrowButton);
@@ -283,7 +283,7 @@ void KNewsTicker::slotContextMenuAboutToHide()
void KNewsTicker::slotNotifyOfFailures()
{
KNotifyClient::Instance instance(m_instance);
- QString notification = QString::null;
+ TQString notification = TQString::null;
if (m_failedNewsUpdates.count() == 1)
notification = i18n("<qt>Could not update news site '%1'.<br>"
@@ -292,16 +292,16 @@ void KNewsTicker::slotNotifyOfFailures()
else if (m_failedNewsUpdates.count() > 1 && m_failedNewsUpdates.count() < 8) {
notification = i18n("<qt>The following news sites had problems. Their"
" resource files are probably invalid or broken.<ul>");
- QStringList::ConstIterator it = m_failedNewsUpdates.begin();
- QStringList::ConstIterator end = m_failedNewsUpdates.end();
+ TQStringList::ConstIterator it = m_failedNewsUpdates.begin();
+ TQStringList::ConstIterator end = m_failedNewsUpdates.end();
for (; it != end; ++it)
- notification += QString::fromLatin1("<li>%1</li>").arg(*it);
- notification += QString::fromLatin1("</ul></qt>");
+ notification += TQString::fromLatin1("<li>%1</li>").arg(*it);
+ notification += TQString::fromLatin1("</ul></qt>");
} else
notification = i18n("Failed to update several news"
" sites. The Internet connection might be cut.");
- KNotifyClient::event(winId(), QString::fromLatin1("InvalidRDF"), notification);
+ KNotifyClient::event(winId(), TQString::fromLatin1("InvalidRDF"), notification);
}
void KNewsTicker::setInterval(const uint interval)
@@ -367,19 +367,19 @@ void KNewsTicker::setSlowedScrolling(bool slowedScrolling)
m_cfg->setSlowedScrolling(slowedScrolling);
}
-void KNewsTicker::setForegroundColor(const QColor &foregroundColor)
+void KNewsTicker::setForegroundColor(const TQColor &foregroundColor)
{
m_cfg->setForegroundColor(foregroundColor);
m_scroller->reset(false);
}
-void KNewsTicker::setBackgroundColor(const QColor &backgroundColor)
+void KNewsTicker::setBackgroundColor(const TQColor &backgroundColor)
{
m_cfg->setBackgroundColor(backgroundColor);
m_scroller->reset(false);
}
-void KNewsTicker::setHighlightedColor(const QColor &highlightedColor)
+void KNewsTicker::setHighlightedColor(const TQColor &highlightedColor)
{
m_cfg->setHighlightedColor(highlightedColor);
m_scroller->reset(false);
@@ -417,10 +417,10 @@ void KNewsTickerMenu::populateMenu()
* Perhaps this hardcoded stuff should be replaced by some kind of
* themeing functionality?
*/
- const QPixmap lookIcon = SmallIcon(QString::fromLatin1("viewmag"));
- const QPixmap newArticleIcon = SmallIcon(QString::fromLatin1("info"));
- const QPixmap oldArticleIcon = SmallIcon(QString::fromLatin1("mime_empty"));
- const QPixmap noArticlesIcon = SmallIcon(QString::fromLatin1("remove"));
+ const TQPixmap lookIcon = SmallIcon(TQString::fromLatin1("viewmag"));
+ const TQPixmap newArticleIcon = SmallIcon(TQString::fromLatin1("info"));
+ const TQPixmap oldArticleIcon = SmallIcon(TQString::fromLatin1("mime_empty"));
+ const TQPixmap noArticlesIcon = SmallIcon(TQString::fromLatin1("remove"));
unsigned int articleIdx = 0;
const NewsSourceBase::List sources = m_parent->m_newsSources;
@@ -429,7 +429,7 @@ void KNewsTickerMenu::populateMenu()
NewsSourceBase::Ptr ns = *nIt;
KPopupMenu *submenu = new KPopupMenu;
- int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000);
+ int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, TQT_SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000);
setItemParameter(checkNewsId, sources.findIndex(ns));
submenu->insertSeparator();
@@ -441,12 +441,12 @@ void KNewsTickerMenu::populateMenu()
Article::List::ConstIterator artIt = articles.begin();
for (; artIt != articles.end(); ++artIt) {
Article::Ptr a = *artIt;
- QString headline = a->headline().replace('&', "&&");
+ TQString headline = a->headline().replace('&', "&&");
int id;
if ( a->read() )
- id = submenu->insertItem(oldArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
+ id = submenu->insertItem(oldArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
else
- id = submenu->insertItem(newArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
+ id = submenu->insertItem(newArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
kdDebug( 5005 ) << "Setting articles index for " << a->headline() << " to " << articleIdx << endl;
setItemParameter( id, articleIdx++ );
}
@@ -460,23 +460,23 @@ void KNewsTickerMenu::populateMenu()
if (!m_parent->m_cfg->newsSources().isEmpty())
insertSeparator();
- insertItem(lookIcon, i18n("Check News"), m_parent, SLOT(slotUpdateNews()));
- int i = insertItem(i18n("Offline Mode"), this, SLOT(slotToggleOfflineMode()), 0, 4711 );
+ insertItem(lookIcon, i18n("Check News"), m_parent, TQT_SLOT(slotUpdateNews()));
+ int i = insertItem(i18n("Offline Mode"), this, TQT_SLOT(slotToggleOfflineMode()), 0, 4711 );
setItemChecked(i, m_parent->m_cfg->offlineMode());
if (m_fullMenu) {
insertSeparator();
- const QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker"));
- const QPixmap helpIcon = SmallIcon(QString::fromLatin1("help"));
- const QPixmap confIcon = SmallIcon(QString::fromLatin1("configure"));
+ const TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker"));
+ const TQPixmap helpIcon = SmallIcon(TQString::fromLatin1("help"));
+ const TQPixmap confIcon = SmallIcon(TQString::fromLatin1("configure"));
insertTitle(logoIcon, i18n("KNewsTicker"), 0, 0);
- insertItem(helpIcon, i18n("Help"), this, SLOT(slotShowHelp()));
- insertItem(logoIcon, i18n("About KNewsTicker"), this, SLOT(slotShowAbout()));
+ insertItem(helpIcon, i18n("Help"), this, TQT_SLOT(slotShowHelp()));
+ insertItem(logoIcon, i18n("About KNewsTicker"), this, TQT_SLOT(slotShowAbout()));
insertSeparator();
- insertItem(confIcon, i18n("Configure KNewsTicker..."), this, SLOT(slotConfigure()));
+ insertItem(confIcon, i18n("Configure KNewsTicker..."), this, TQT_SLOT(slotConfigure()));
}
}
@@ -533,9 +533,9 @@ void KNewsTickerMenu::slotOpenArticle(int idx)
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString &configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString &configFile)
{
- KGlobal::locale()->insertCatalogue(QString::fromLatin1("knewsticker"));
+ KGlobal::locale()->insertCatalogue(TQString::fromLatin1("knewsticker"));
return new KNewsTicker(configFile, KPanelApplet::Stretch,
KPanelApplet::Preferences | KPanelApplet::About |
KPanelApplet::Help | KPanelApplet::ReportBug,
diff --git a/knewsticker/knewsticker.h b/knewsticker/knewsticker.h
index bbb228f6..081918d7 100644
--- a/knewsticker/knewsticker.h
+++ b/knewsticker/knewsticker.h
@@ -17,7 +17,7 @@
#include <dcopobject.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kpanelapplet.h>
#include <kpopupmenu.h>
@@ -43,7 +43,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
friend class KNewsTickerMenu;
public:
- KNewsTicker(const QString &, Type, int, QWidget * = 0, const char * = 0);
+ KNewsTicker(const TQString &, Type, int, TQWidget * = 0, const char * = 0);
virtual ~KNewsTicker();
virtual int widthForHeight(int) const;
@@ -62,10 +62,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual bool underlineHighlighted() const { return m_cfg->underlineHighlighted(); }
virtual bool showIcons() const { return m_cfg->showIcons(); }
virtual bool slowedScrolling() const { return m_cfg->slowedScrolling(); }
- virtual QColor foregroundColor() const { return m_cfg->foregroundColor(); }
- virtual QColor backgroundColor() const { return m_cfg->backgroundColor(); }
- virtual QColor highlightedColor() const { return m_cfg->highlightedColor(); }
- virtual QStringList newsSources() const { return m_cfg->newsSources(); }
+ virtual TQColor foregroundColor() const { return m_cfg->foregroundColor(); }
+ virtual TQColor backgroundColor() const { return m_cfg->backgroundColor(); }
+ virtual TQColor highlightedColor() const { return m_cfg->highlightedColor(); }
+ virtual TQStringList newsSources() const { return m_cfg->newsSources(); }
virtual void setInterval(const uint);
virtual void setScrollingSpeed(const uint);
virtual void setMouseWheelSpeed(const uint);
@@ -76,10 +76,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual void setUnderlineHighlighted(bool);
virtual void setShowIcons(bool);
virtual void setSlowedScrolling(bool);
- virtual void setForegroundColor(const QColor &);
- virtual void setBackgroundColor(const QColor &);
- virtual void setHighlightedColor(const QColor &);
- virtual void setNewsSources(const QStringList &) {}
+ virtual void setForegroundColor(const TQColor &);
+ virtual void setBackgroundColor(const TQColor &);
+ virtual void setHighlightedColor(const TQColor &);
+ virtual void setNewsSources(const TQStringList &) {}
public slots:
void slotUpdateNews();
@@ -90,7 +90,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual void about();
virtual void help();
virtual void reportBug();
- virtual void mousePressEvent(QMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
virtual void positionChange(Position);
protected slots:
@@ -107,8 +107,8 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
DCOPClient *m_dcopClient;
ConfigAccess *m_cfg;
KArrowButton *m_arrowButton;
- QTimer *m_newsTimer;
- QTimer *m_updateTimer;
+ TQTimer *m_newsTimer;
+ TQTimer *m_updateTimer;
NewsIconMgr *m_newsIconMgr;
NewsScroller *m_scroller;
KAboutData *m_aboutData;
@@ -116,7 +116,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
bool m_newNews;
NewsSourceBase::List m_newsSources;
QStringList m_failedNewsUpdates;
- QStringList m_pendingNewsUpdates;
+ TQStringList m_pendingNewsUpdates;
};
class KNewsTickerMenu : public KPopupMenu
diff --git a/knewsticker/knewstickerconfig.cpp b/knewsticker/knewstickerconfig.cpp
index 528269a0..4aa04851 100644
--- a/knewsticker/knewstickerconfig.cpp
+++ b/knewsticker/knewstickerconfig.cpp
@@ -26,15 +26,15 @@
#include <knuminput.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qcheckbox.h>
-#include <qdragobject.h>
-#include <qlabel.h>
-#include <qslider.h>
-#include <qregexp.h>
+#include <tqcursor.h>
+#include <tqcheckbox.h>
+#include <tqdragobject.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqregexp.h>
-CategoryItem::CategoryItem(QListView *parent, const QString &text)
- : QListViewItem(parent, text)
+CategoryItem::CategoryItem(TQListView *parent, const TQString &text)
+ : TQListViewItem(parent, text)
{
setOpen(true);
}
@@ -42,16 +42,16 @@ CategoryItem::CategoryItem(QListView *parent, const QString &text)
void CategoryItem::setOpen(bool open)
{
if (open)
- setPixmap(0, SmallIcon(QString::fromLatin1("folder_open")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("folder_open")));
else
- setPixmap(0, SmallIcon(QString::fromLatin1("folder")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("folder")));
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
NewsSourceItem::NewsSourceItem(KNewsTickerConfig *kcm, CategoryItem *parent,
const NewsSourceBase::Data &nsd)
- : QCheckListItem(parent, QString::null, QCheckListItem::CheckBox),
+ : TQCheckListItem(parent, TQString::null, TQCheckListItem::CheckBox),
m_parent(parent),
m_kcm(kcm)
{
@@ -76,7 +76,7 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd)
setOn(nsd.enabled);
setText(0, nsd.name);
setText(1, nsd.sourceFile);
- setText(2, QString::number(nsd.maxArticles));
+ setText(2, TQString::number(nsd.maxArticles));
m_icon = nsd.icon;
m_isProgram = nsd.isProgram;
@@ -84,12 +84,12 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd)
m_kcm->getNewsIcon(this, KURL( m_icon ));
}
-void NewsSourceItem::setIcon(const QPixmap &pixmap)
+void NewsSourceItem::setIcon(const TQPixmap &pixmap)
{
setPixmap(0, pixmap);
}
-KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const char *name)
+KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Configuration"), Ok|Close),
m_cfg(cfg),
m_child(new KNewsTickerConfigWidget(this)),
@@ -109,31 +109,31 @@ KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const
m_child->lvNewsSources->viewport()->installEventFilter(this);
m_child->lvNewsSources->installEventFilter(this);
- connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), SLOT(slotGotNewsIcon(const KURL &, const QPixmap &)));
- connect(m_child->bChooseFont, SIGNAL(clicked()), SLOT(slotChooseFont()));
-
- connect(m_child->lvNewsSources, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)),
- SLOT(slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &)));
- connect(m_child->lvNewsSources, SIGNAL(selectionChanged()),
- SLOT(slotNewsSourceSelectionChanged()));
- connect(m_child->lvNewsSources, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- SLOT(slotModifyNewsSource(QListViewItem *, const QPoint &, int)));
- connect(m_child->bAddNewsSource, SIGNAL(clicked()), SLOT(slotAddNewsSource()));
- connect(m_child->bRemoveNewsSource, SIGNAL(clicked()), SLOT(slotRemoveNewsSource()));
- connect(m_child->bModifyNewsSource, SIGNAL(clicked()), SLOT(slotModifyNewsSource()));
-
- connect(m_child->lvFilters, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slotFilterSelectionChanged(QListViewItem *)));
- connect(m_child->comboFilterAction, SIGNAL(activated(const QString &)),
- SLOT(slotFilterActionChanged(const QString &)));
- connect(m_child->comboFilterNewsSource, SIGNAL(activated(const QString &)),
- SLOT(slotFilterNewsSourceChanged(const QString &)));
- connect(m_child->comboFilterCondition, SIGNAL(activated(const QString &)),
- SLOT(slotFilterConditionChanged(const QString &)));
- connect(m_child->leFilterExpression, SIGNAL(textChanged(const QString &)),
- SLOT(slotFilterExpressionChanged(const QString &)));
- connect(m_child->bAddFilter, SIGNAL(clicked()), SLOT(slotAddFilter()));
- connect(m_child->bRemoveFilter, SIGNAL(clicked()), SLOT(slotRemoveFilter()));
+ connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), TQT_SLOT(slotGotNewsIcon(const KURL &, const TQPixmap &)));
+ connect(m_child->bChooseFont, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseFont()));
+
+ connect(m_child->lvNewsSources, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)),
+ TQT_SLOT(slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &)));
+ connect(m_child->lvNewsSources, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotNewsSourceSelectionChanged()));
+ connect(m_child->lvNewsSources, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(slotModifyNewsSource(TQListViewItem *, const TQPoint &, int)));
+ connect(m_child->bAddNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddNewsSource()));
+ connect(m_child->bRemoveNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveNewsSource()));
+ connect(m_child->bModifyNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotModifyNewsSource()));
+
+ connect(m_child->lvFilters, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(slotFilterSelectionChanged(TQListViewItem *)));
+ connect(m_child->comboFilterAction, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterActionChanged(const TQString &)));
+ connect(m_child->comboFilterNewsSource, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterNewsSourceChanged(const TQString &)));
+ connect(m_child->comboFilterCondition, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterConditionChanged(const TQString &)));
+ connect(m_child->leFilterExpression, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(slotFilterExpressionChanged(const TQString &)));
+ connect(m_child->bAddFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddFilter()));
+ connect(m_child->bRemoveFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveFilter()));
load();
@@ -162,8 +162,8 @@ void KNewsTickerConfig::load()
m_child->cbShowIcons->setChecked(m_cfg->showIcons());
m_child->lvNewsSources->clear();
- QStringList nsList = m_cfg->newsSources();
- for (QStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it)
+ TQStringList nsList = m_cfg->newsSources();
+ for (TQStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it)
addNewsSource(m_cfg->newsSource((*it))->data());
ArticleFilter::List filterList = m_cfg->filters();
@@ -193,8 +193,8 @@ void KNewsTickerConfig::save()
m_cfg->setUnderlineHighlighted(m_child->cbUnderlineHighlighted->isChecked());
m_cfg->setShowIcons(m_child->cbShowIcons->isChecked());
- QStringList newsSources;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++)
+ TQStringList newsSources;
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++)
if (NewsSourceItem *item = dynamic_cast<NewsSourceItem *>(it.current())) {
newsSources += item->data().name;
m_cfg->setNewsSource(item->data());
@@ -204,8 +204,8 @@ void KNewsTickerConfig::save()
ArticleFilter::List filters;
ArticleFilter f;
unsigned int i = 0;
- for (QListViewItemIterator it(m_child->lvFilters); it.current(); it++)
- if (QCheckListItem *item = dynamic_cast<QCheckListItem *>(it.current())) {
+ for (TQListViewItemIterator it(m_child->lvFilters); it.current(); it++)
+ if (TQCheckListItem *item = dynamic_cast<TQCheckListItem *>(it.current())) {
filters.append(i);
f.setAction(item->text(0));
f.setNewsSource(item->text(2));
@@ -218,30 +218,30 @@ void KNewsTickerConfig::save()
m_cfg->setFilters(filters);
}
-bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
+bool KNewsTickerConfig::eventFilter(TQObject *o, TQEvent *e)
{
//<HACK>
- // "if ( e->type() == QEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView.
- if ( e->type() == QEvent::DragMove ) {
+ // "if ( e->type() == TQEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView.
+ if ( e->type() == TQEvent::DragMove ) {
//</HACK>
- QDragEnterEvent *d = (QDragEnterEvent*)e;
- d->accept(QTextDrag::canDecode(d));
+ TQDragEnterEvent *d = (TQDragEnterEvent*)e;
+ d->accept(TQTextDrag::canDecode(d));
return true; // eat event
}
- else if ( e->type() == QEvent::Drop) {
- QDropEvent *d = (QDropEvent*)e;
- QString newSourceUrl;
- if ( QTextDrag::decode(d, newSourceUrl) ) {
+ else if ( e->type() == TQEvent::Drop) {
+ TQDropEvent *d = (TQDropEvent*)e;
+ TQString newSourceUrl;
+ if ( TQTextDrag::decode(d, newSourceUrl) ) {
// <HACK>
// This is just for http://www.webreference.com/services/news/
- newSourceUrl = newSourceUrl.replace( QRegExp("^view-source:http%3A//"), "http://" );
+ newSourceUrl = newSourceUrl.replace( TQRegExp("^view-source:http%3A//"), "http://" );
// </HACK>
newSourceUrl = newSourceUrl.stripWhiteSpace();
//look for a new Name of Source:
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
bool validName = false;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == name) {
validName = false;
break;
@@ -252,7 +252,7 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
int i = 0;
while (validName == false) {
name = i18n("Unknown %1").arg(i);
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == name) {
i++;
validName = false;
@@ -265,17 +265,17 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
NewsSourceBase::Data nsd(name, newSourceUrl, "" , NewsSourceBase::Computers , 10, true, false);
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
nsDlg.setup(nsd, false);
nsDlg.exec();
}
return true; // eat event
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
-void KNewsTickerConfig::resizeEvent(QResizeEvent *)
+void KNewsTickerConfig::resizeEvent(TQResizeEvent *)
{
m_child->resize(width(), height());
}
@@ -285,7 +285,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd,
{
CategoryItem *catItem = 0L;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) {
catItem = static_cast<CategoryItem *>(it.current());
break;
@@ -305,7 +305,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd,
void KNewsTickerConfig::addFilter(const ArticleFilter &fd)
{
- QCheckListItem *item = new QCheckListItem(m_child->lvFilters, fd.action(), QCheckListItem::CheckBox);
+ TQCheckListItem *item = new TQCheckListItem(m_child->lvFilters, fd.action(), TQCheckListItem::CheckBox);
item->setOn(fd.enabled());
item->setText(1, m_child->lArticles->text());
item->setText(2, fd.newsSource());
@@ -320,11 +320,11 @@ void KNewsTickerConfig::removeNewsSource()
" source?</p>",
"<p>Do you really want to remove these %n news"
" sources?</p>",
- m_child->lvNewsSources->selectedItems().count()), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
+ m_child->lvNewsSources->selectedItems().count()), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
int itemCount = m_child->lvNewsSources->selectedItems().count();
for (int j = 0; j < itemCount; j++) {
if (m_child->lvNewsSources->selectedItems().isEmpty()) { break; }
- QListViewItem *item = m_child->lvNewsSources->selectedItems().take(0);
+ TQListViewItem *item = m_child->lvNewsSources->selectedItems().take(0);
for (int i = 0; i < m_child->comboFilterNewsSource->count(); i++)
if (m_child->comboFilterNewsSource->text(i) == item->text(0)) {
m_child->comboFilterNewsSource->removeItem(i);
@@ -340,26 +340,26 @@ void KNewsTickerConfig::removeNewsSource()
}
}
-void KNewsTickerConfig::removeFilter(QListViewItem *item)
+void KNewsTickerConfig::removeFilter(TQListViewItem *item)
{
if (KMessageBox::warningContinueCancel(this, i18n("<p>Do you really want to remove the selected"
- " filter?</p>"), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
+ " filter?</p>"), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
delete item;
m_child->bRemoveFilter->setEnabled(false);
}
}
-void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *item, const QPoint &)
+void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, TQListViewItem *item, const TQPoint &)
{
if (!dynamic_cast<NewsSourceItem *>(item))
return;
KPopupMenu *menu = new KPopupMenu();
- QPixmap addIcon = SmallIcon(QString::fromLatin1("news_subscribe"));
- QPixmap modifyIcon = SmallIcon(QString::fromLatin1("edit"));
- QPixmap removeIcon = SmallIcon(QString::fromLatin1("news_unsubscribe"));
- QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker"));
+ TQPixmap addIcon = SmallIcon(TQString::fromLatin1("news_subscribe"));
+ TQPixmap modifyIcon = SmallIcon(TQString::fromLatin1("edit"));
+ TQPixmap removeIcon = SmallIcon(TQString::fromLatin1("news_unsubscribe"));
+ TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker"));
menu->insertTitle(logoIcon, i18n("Edit News Source"));
menu->insertItem(addIcon, i18n("&Add News Source"), 0);
@@ -377,7 +377,7 @@ void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *it
menu->setItemEnabled(2, false);
}
- switch (menu->exec(QCursor::pos())) {
+ switch (menu->exec(TQCursor::pos())) {
case 0: slotAddNewsSource(); break;
case 1: modifyNewsSource(item); break;
case 2: removeNewsSource(); break;
@@ -402,8 +402,8 @@ void KNewsTickerConfig::slotChooseFont()
void KNewsTickerConfig::slotAddNewsSource()
{
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
nsDlg.exec();
}
@@ -421,14 +421,14 @@ void KNewsTickerConfig::slotModifyNewsSource()
void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd)
{
if (m_modifyItem->data().subject != nsd.subject) {
- QListViewItem *parentItem = m_modifyItem->parentItem();
+ TQListViewItem *parentItem = m_modifyItem->parentItem();
parentItem->takeItem(m_modifyItem);
if (parentItem->childCount() == 0)
delete parentItem;
CategoryItem *catItem = 0L;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) {
catItem = static_cast<CategoryItem *>(it.current());
break;
@@ -445,13 +445,13 @@ void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd)
m_modifyItem->setData(nsd);
}
-void KNewsTickerConfig::slotModifyNewsSource(QListViewItem *item, const QPoint &, int)
+void KNewsTickerConfig::slotModifyNewsSource(TQListViewItem *item, const TQPoint &, int)
{
if (dynamic_cast<NewsSourceItem *>(item))
modifyNewsSource(item);
}
-void KNewsTickerConfig::modifyNewsSource(QListViewItem *item)
+void KNewsTickerConfig::modifyNewsSource(TQListViewItem *item)
{
if ((m_modifyItem = dynamic_cast<NewsSourceItem *>(item)))
openModifyDialog();
@@ -460,8 +460,8 @@ void KNewsTickerConfig::modifyNewsSource(QListViewItem *item)
void KNewsTickerConfig::openModifyDialog()
{
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotModifyNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotModifyNewsSource(const NewsSourceBase::Data &)));
nsDlg.setup(m_modifyItem->data(), true);
nsDlg.exec();
}
@@ -484,7 +484,7 @@ void KNewsTickerConfig::slotRemoveNewsSource()
void KNewsTickerConfig::slotRemoveFilter()
{
- QListViewItem *item=m_child->lvFilters->selectedItem();
+ TQListViewItem *item=m_child->lvFilters->selectedItem();
if(!item)
return;
removeFilter(item);
@@ -496,7 +496,7 @@ void KNewsTickerConfig::slotNewsSourceSelectionChanged()
m_child->bModifyNewsSource->setEnabled(m_child->lvNewsSources->selectedItems().count() == 1);
}
-void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item)
+void KNewsTickerConfig::slotFilterSelectionChanged(TQListViewItem *item)
{
for (int i = 0; i < m_child->comboFilterAction->count(); i++)
if (m_child->comboFilterAction->text(i) == item->text(0)) {
@@ -521,36 +521,36 @@ void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item)
m_child->bRemoveFilter->setEnabled(item);
}
-void KNewsTickerConfig::slotFilterActionChanged(const QString &action)
+void KNewsTickerConfig::slotFilterActionChanged(const TQString &action)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(0, action);
}
}
-void KNewsTickerConfig::slotFilterNewsSourceChanged(const QString &newsSource)
+void KNewsTickerConfig::slotFilterNewsSourceChanged(const TQString &newsSource)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(2, newsSource);
}
}
-void KNewsTickerConfig::slotFilterConditionChanged(const QString &condition)
+void KNewsTickerConfig::slotFilterConditionChanged(const TQString &condition)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(4, condition);
}
}
-void KNewsTickerConfig::slotFilterExpressionChanged(const QString &expression)
+void KNewsTickerConfig::slotFilterExpressionChanged(const TQString &expression)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(5, expression);
@@ -563,7 +563,7 @@ void KNewsTickerConfig::getNewsIcon(NewsSourceItem *item, const KURL &url)
m_newsIconMgr->getIcon(url);
}
-void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const QPixmap &pixmap)
+void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const TQPixmap &pixmap)
{
if (m_itemIconMap.find(url.url()) == m_itemIconMap.end()) {
kdDebug(5005) << "Got unknown icon for URL " << url << endl;
diff --git a/knewsticker/knewstickerconfig.h b/knewsticker/knewstickerconfig.h
index ec475236..1280413d 100644
--- a/knewsticker/knewstickerconfig.h
+++ b/knewsticker/knewstickerconfig.h
@@ -17,9 +17,9 @@
#include <kdialogbase.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qlistview.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqlistview.h>
class KNewsTickerConfig;
class KNewsTickerConfigWidget;
@@ -30,7 +30,7 @@ class ConfigAccess;
class CategoryItem : public QListViewItem
{
public:
- CategoryItem(QListView *, const QString &);
+ CategoryItem(TQListView *, const TQString &);
void setOpen(bool);
};
@@ -42,12 +42,12 @@ class NewsSourceItem : public QCheckListItem
NewsSourceBase::Data data() const;
void setData(const NewsSourceBase::Data &);
- void setIcon(const QPixmap &);
+ void setIcon(const TQPixmap &);
- QListViewItem *parentItem() { return QCheckListItem::parent(); }
+ TQListViewItem *parentItem() { return TQCheckListItem::parent(); }
private:
- QString m_icon;
+ TQString m_icon;
bool m_isProgram;
NewsSourceBase::Subject m_subject;
CategoryItem *m_parent;
@@ -59,7 +59,7 @@ class KNewsTickerConfig : public KDialogBase
Q_OBJECT
friend class NewsSourceItem;
public:
- KNewsTickerConfig(ConfigAccess *, QWidget * = 0, const char * = 0);
+ KNewsTickerConfig(ConfigAccess *, TQWidget * = 0, const char * = 0);
void load();
void save();
@@ -67,17 +67,17 @@ class KNewsTickerConfig : public KDialogBase
protected:
void addNewsSource(const NewsSourceBase::Data &, bool = false);
- void modifyNewsSource(QListViewItem *);
+ void modifyNewsSource(TQListViewItem *);
void removeNewsSource();
void addFilter(const ArticleFilter &);
- void removeFilter(QListViewItem *);
- void resizeEvent(QResizeEvent *);
+ void removeFilter(TQListViewItem *);
+ void resizeEvent(TQResizeEvent *);
void openModifyDialog();
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
void getNewsIcon(NewsSourceItem *, const KURL &);
protected slots:
- void slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &);
+ void slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &);
void slotChooseFont();
void slotAddNewsSource();
void slotAddFilter();
@@ -86,25 +86,25 @@ class KNewsTickerConfig : public KDialogBase
void slotRemoveFilter();
void slotModifyNewsSource();
void slotModifyNewsSource(const NewsSourceBase::Data &);
- void slotModifyNewsSource(QListViewItem *, const QPoint &, int);
+ void slotModifyNewsSource(TQListViewItem *, const TQPoint &, int);
void slotNewsSourceSelectionChanged();
- void slotFilterSelectionChanged(QListViewItem *);
- void slotFilterActionChanged(const QString &);
- void slotFilterNewsSourceChanged(const QString &);
- void slotFilterConditionChanged(const QString &);
- void slotFilterExpressionChanged(const QString &);
+ void slotFilterSelectionChanged(TQListViewItem *);
+ void slotFilterActionChanged(const TQString &);
+ void slotFilterNewsSourceChanged(const TQString &);
+ void slotFilterConditionChanged(const TQString &);
+ void slotFilterExpressionChanged(const TQString &);
virtual void slotOk();
private slots:
- void slotGotNewsIcon(const KURL &, const QPixmap &);
+ void slotGotNewsIcon(const KURL &, const TQPixmap &);
private:
ConfigAccess *m_cfg;
KNewsTickerConfigWidget *m_child;
- QFont m_font;
+ TQFont m_font;
NewsSourceItem *m_modifyItem;
NewsIconMgr *m_newsIconMgr;
- QMap<QString, NewsSourceItem *> m_itemIconMap;
+ TQMap<TQString, NewsSourceItem *> m_itemIconMap;
};
#endif // KCMNEWSTICKER_H
diff --git a/knewsticker/knewstickerstub/knewstickerstub.cpp b/knewsticker/knewstickerstub/knewstickerstub.cpp
index 7f5960a4..ac4ddeeb 100644
--- a/knewsticker/knewstickerstub/knewstickerstub.cpp
+++ b/knewsticker/knewstickerstub/knewstickerstub.cpp
@@ -49,14 +49,14 @@ int main(int argc, char **argv)
DCOPClient *dcopClient = app.dcopClient();
dcopClient->attach();
- KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false);
+ KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false);
ConfigAccess configFrontend(&cfg);
if (args->isSet("addrdf")) {
- QStringList newsSources = configFrontend.newsSources();
+ TQStringList newsSources = configFrontend.newsSources();
// TODO: Use the "Suggest" functionality from addnewssourcedlgimpl.cpp here.
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
if (newsSources.contains(name))
for (unsigned int i = 0; ; i++)
if (!newsSources.contains(i18n("Unknown %1").arg(i))) {
@@ -66,11 +66,11 @@ int main(int argc, char **argv)
newsSources += name;
- QString sourceFile = QString(args->getOption("addrdf"));
+ TQString sourceFile = TQString(args->getOption("addrdf"));
configFrontend.setNewsSource(NewsSourceBase::Data(name, sourceFile));
configFrontend.setNewsSources(newsSources);
- QByteArray data;
+ TQByteArray data;
dcopClient->send("knewsticker", "KNewsTicker", "reparseConfig()", data);
}
diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
index 93bc71cc..14ca80d0 100644
--- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
+++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
@@ -25,15 +25,15 @@
#include <kstandarddirs.h>
#include <kglobal.h>
-#include <qmultilineedit.h>
-#include <qvbox.h>
+#include <tqmultilineedit.h>
+#include <tqvbox.h>
using namespace RSS;
class ArticleListBoxItem : public QListBoxText
{
public:
- ArticleListBoxItem( QListBox *listbox, const Article &article );
+ ArticleListBoxItem( TQListBox *listbox, const Article &article );
const Article &article() const { return m_article; }
@@ -41,8 +41,8 @@ class ArticleListBoxItem : public QListBoxText
Article m_article;
};
-ArticleListBoxItem::ArticleListBoxItem( QListBox *listbox, const Article &article )
- : QListBoxText( listbox ),
+ArticleListBoxItem::ArticleListBoxItem( TQListBox *listbox, const Article &article )
+ : TQListBoxText( listbox ),
m_article( article )
{
setText( article.title() );
@@ -52,18 +52,18 @@ KntSrcFilePropsDlg::KntSrcFilePropsDlg(KPropertiesDialog *props)
: KPropsDlgPlugin(props)
{
m_child = new KntSrcFilePropsDlgWidget(properties->addVBoxPage(i18n("News Resource")));
- connect(m_child->urlName, SIGNAL(leftClickedURL(const QString &)),
- SLOT(slotOpenURL(const QString &)));
- connect(m_child->lbArticles, SIGNAL(executed(QListBoxItem *)),
- SLOT(slotClickedArticle(QListBoxItem *)));
+ connect(m_child->urlName, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(slotOpenURL(const TQString &)));
+ connect(m_child->lbArticles, TQT_SIGNAL(executed(TQListBoxItem *)),
+ TQT_SLOT(slotClickedArticle(TQListBoxItem *)));
Loader *loader = Loader::create();
- connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
- SLOT(slotConstructUI(Loader *, Document, Status)));
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
+ TQT_SLOT(slotConstructUI(Loader *, Document, Status)));
loader->loadFrom(props->item()->url(), new FileRetriever);
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
m_child->show();
}
@@ -74,7 +74,7 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status)
return;
KURL iconURL = doc.link();
- iconURL.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico"));
+ iconURL.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(iconURL);
m_child->urlName->setText(doc.title());
@@ -88,31 +88,31 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status)
new ArticleListBoxItem(m_child->lbArticles, *it);
}
-void KntSrcFilePropsDlg::slotOpenURL(const QString &url)
+void KntSrcFilePropsDlg::slotOpenURL(const TQString &url)
{
kapp->invokeBrowser(url);
}
-void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const QPixmap &pixmap)
+void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const TQPixmap &pixmap)
{
m_child->pixmapIcon->setPixmap(pixmap);
}
-void KntSrcFilePropsDlg::slotClickedArticle(QListBoxItem *item)
+void KntSrcFilePropsDlg::slotClickedArticle(TQListBoxItem *item)
{
ArticleListBoxItem *articleItem = static_cast<ArticleListBoxItem *>(item);
slotOpenURL(articleItem->article().link().url());
}
-QObject *KntSrcFilePropsFactory::createObject(QObject *parent, const char *,
- const char *classname, const QStringList &)
+TQObject *KntSrcFilePropsFactory::createObject(TQObject *parent, const char *,
+ const char *classname, const TQStringList &)
{
- if (QString::fromLatin1(classname) == "KPropsDlgPlugin")
+ if (TQString::fromLatin1(classname) == "KPropsDlgPlugin")
{
if (!parent->inherits("KPropertiesDialog"))
return 0L;
- QObject *obj = new KntSrcFilePropsDlg(static_cast<KPropertiesDialog *>(parent));
+ TQObject *obj = new KntSrcFilePropsDlg(static_cast<KPropertiesDialog *>(parent));
return obj;
}
return 0L;
diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
index 8fe1be58..0d41682e 100644
--- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
+++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
@@ -33,8 +33,8 @@ class KntSrcFilePropsFactory : public KLibFactory
Q_OBJECT
public:
- virtual QObject *createObject(QObject * = 0, const char * = 0,
- const char * = "QObject", const QStringList & = QStringList());
+ virtual TQObject *createObject(TQObject * = 0, const char * = 0,
+ const char * = "TQObject", const TQStringList & = TQStringList());
};
class KntSrcFilePropsDlg : public KPropsDlgPlugin
@@ -45,10 +45,10 @@ class KntSrcFilePropsDlg : public KPropsDlgPlugin
KntSrcFilePropsDlg(KPropertiesDialog *);
protected slots:
- void slotOpenURL(const QString &);
+ void slotOpenURL(const TQString &);
void slotConstructUI(Loader *loader, Document doc, Status status);
- void slotGotIcon(const KURL &, const QPixmap &);
- void slotClickedArticle(QListBoxItem *);
+ void slotGotIcon(const KURL &, const TQPixmap &);
+ void slotClickedArticle(TQListBoxItem *);
private:
KntSrcFilePropsDlgWidget *m_child;
diff --git a/knewsticker/newsscroller.cpp b/knewsticker/newsscroller.cpp
index 9d11f19e..060b7cd9 100644
--- a/knewsticker/newsscroller.cpp
+++ b/knewsticker/newsscroller.cpp
@@ -11,9 +11,9 @@
*/
#include <dcopclient.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kcursor.h>
#include <kstandarddirs.h>
@@ -46,11 +46,11 @@ public:
int width() { return pixmap()->width(); }
int height() { return pixmap()->height(); }
- QPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true)
+ TQPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true)
{
- QPixmap *result = highlighted ? m_highlighted : m_normal;
+ TQPixmap *result = highlighted ? m_highlighted : m_normal;
if (!result) {
- const QFontMetrics &metrics = m_scroller->fontMetrics();
+ const TQFontMetrics &metrics = m_scroller->fontMetrics();
int w, h;
if (m_scroller->m_cfg->showIcons()) {
@@ -62,13 +62,13 @@ public:
}
if (ConfigAccess::rotated(static_cast<ConfigAccess::Direction>(m_scroller->m_cfg->scrollingDirection())))
- result = new QPixmap(h, w);
+ result = new TQPixmap(h, w);
else
- result = new QPixmap(w, h);
+ result = new TQPixmap(w, h);
result->fill(m_scroller->m_cfg->backgroundColor());
- QPainter p(result);
- QFont f = m_scroller->font();
+ TQPainter p(result);
+ TQFont f = m_scroller->font();
if (highlighted)
f.setUnderline(underlineHighlighted);
@@ -124,14 +124,14 @@ public:
private:
NewsScroller *m_scroller;
Article::Ptr m_article;
- QPixmap *m_normal;
- QPixmap *m_highlighted;
+ TQPixmap *m_normal;
+ TQPixmap *m_highlighted;
};
-NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name)
- : QFrame(parent, name, WNoAutoErase),
+NewsScroller::NewsScroller(TQWidget *parent, ConfigAccess *cfg, const char *name)
+ : TQFrame(parent, name, WNoAutoErase),
m_cfg(cfg),
- m_scrollTimer(new QTimer(this)),
+ m_scrollTimer(new TQTimer(this)),
m_activeHeadline(0),
m_mouseDrag(false),
m_totalStepping(0.0)
@@ -143,21 +143,21 @@ NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name)
m_headlines.setAutoDelete(true);
- connect(m_scrollTimer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
setAcceptDrops(true);
reset();
}
-QSize NewsScroller::sizeHint() const
+TQSize NewsScroller::sizeHint() const
{
- return QSize(fontMetrics().width(QString::fromLatin1("X")) * 20, fontMetrics().height() * 2);
+ return TQSize(fontMetrics().width(TQString::fromLatin1("X")) * 20, fontMetrics().height() * 2);
}
-QSizePolicy NewsScroller::sizePolicy() const
+TQSizePolicy NewsScroller::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
void NewsScroller::clear()
@@ -166,30 +166,30 @@ void NewsScroller::clear()
reset();
}
-void NewsScroller::dragEnterEvent(QDragEnterEvent* event)
+void NewsScroller::dragEnterEvent(TQDragEnterEvent* event)
{
- event->accept(QTextDrag::canDecode(event));
+ event->accept(TQTextDrag::canDecode(event));
}
-void NewsScroller::dropEvent(QDropEvent* event)
+void NewsScroller::dropEvent(TQDropEvent* event)
{
- QString newSourceUrl;
- if ( QTextDrag::decode(event, newSourceUrl) ) {
+ TQString newSourceUrl;
+ if ( TQTextDrag::decode(event, newSourceUrl) ) {
// <HACK>
// This is just for http://www.webreference.com/services/news/
- newSourceUrl = newSourceUrl.replace(QRegExp(
- QString::fromLatin1("^view-source:http%3A//")),
- QString::fromLatin1("http://"));
+ newSourceUrl = newSourceUrl.replace(TQRegExp(
+ TQString::fromLatin1("^view-source:http%3A//")),
+ TQString::fromLatin1("http://"));
// </HACK>
newSourceUrl = newSourceUrl.stripWhiteSpace();
if (!isHeadline(newSourceUrl) && KMessageBox::questionYesNo(this, i18n("<p>Do you really want to add '%1' to"
" the list of news sources?</p>")
- .arg(newSourceUrl), QString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) {
- KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false);
+ .arg(newSourceUrl), TQString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) {
+ KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false);
ConfigAccess configFrontend(&cfg);
- QStringList newsSources = configFrontend.newsSources();
+ TQStringList newsSources = configFrontend.newsSources();
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
if (newsSources.contains(name))
for (unsigned int i = 0; ; i++)
if (!newsSources.contains(i18n("Unknown %1").arg(i))) {
@@ -201,13 +201,13 @@ void NewsScroller::dropEvent(QDropEvent* event)
configFrontend.setNewsSource(NewsSourceBase::Data(name, newSourceUrl));
configFrontend.setNewsSources(newsSources);
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send("knewsticker", "KNewsTicker", "reparseConfig()", data);
}
}
}
-bool NewsScroller::isHeadline(const QString &location) const
+bool NewsScroller::isHeadline(const TQString &location) const
{
for (Headline *h = m_headlines.first(); h; h = m_headlines.next())
if (h->article()->address() == location)
@@ -254,7 +254,7 @@ void NewsScroller::scroll(int distance, bool interpret_directions)
m_offset = m_offset + m_separator.height() - scrollHeight();
}
- QPoint pt = mapFromGlobal(QCursor::pos());
+ TQPoint pt = mapFromGlobal(TQCursor::pos());
if (contentsRect().contains(pt))
updateActive(pt);
@@ -262,15 +262,15 @@ void NewsScroller::scroll(int distance, bool interpret_directions)
update();
}
-void NewsScroller::enterEvent(QEvent *)
+void NewsScroller::enterEvent(TQEvent *)
{
if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1)
m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed() / 2));
}
-void NewsScroller::mousePressEvent(QMouseEvent *e)
+void NewsScroller::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton) {
+ if (e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton) {
m_dragPos = e->pos();
if (m_activeHeadline)
@@ -278,16 +278,16 @@ void NewsScroller::mousePressEvent(QMouseEvent *e)
}
}
-void NewsScroller::mouseReleaseEvent(QMouseEvent *e)
+void NewsScroller::mouseReleaseEvent(TQMouseEvent *e)
{
- if ((e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton)
+ if ((e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton)
&& m_activeHeadline && m_activeHeadline->article()->headline() == m_tempHeadline
&& !m_mouseDrag) {
m_activeHeadline->article()->open();
- m_tempHeadline = QString::null;
+ m_tempHeadline = TQString::null;
}
- if (e->button() == QMouseEvent::RightButton)
+ if (e->button() == TQMouseEvent::RightButton)
emit(contextMenu());
if (m_mouseDrag) {
@@ -297,7 +297,7 @@ void NewsScroller::mouseReleaseEvent(QMouseEvent *e)
}
}
-void NewsScroller::mouseMoveEvent(QMouseEvent *e)
+void NewsScroller::mouseMoveEvent(TQMouseEvent *e)
{
// Are we in a drag phase?
if (!m_mouseDrag) {
@@ -307,7 +307,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
dragDistance = QABS(e->x() - m_dragPos.x());
else
dragDistance = QABS(e->y() - m_dragPos.y());
- m_mouseDrag = (e->state() & QMouseEvent::LeftButton != 0) &&
+ m_mouseDrag = (e->state() & TQMouseEvent::LeftButton != 0) &&
dragDistance >= KGlobal::config()->readNumEntry("StartDragDist", KApplication::startDragDistance());
if (m_mouseDrag) // Stop the scroller if we just started a drag.
m_scrollTimer->stop();
@@ -327,7 +327,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
if (createDrag && m_activeHeadline) {
KURL::List url;
url.append(m_activeHeadline->article()->address());
- QDragObject *drag = new KURLDrag(url, this);
+ TQDragObject *drag = new KURLDrag(url, this);
drag->setPixmap(m_activeHeadline->article()->newsSource()->icon());
drag->drag();
m_mouseDrag = false;
@@ -340,20 +340,20 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
update();
}
-void NewsScroller::wheelEvent(QWheelEvent *e)
+void NewsScroller::wheelEvent(TQWheelEvent *e)
{
// ### This 11 - m_cfg->mouseWheelSpeed() could be eliminated by swapping
- // the labels of the QSlider. :]
+ // the labels of the TQSlider. :]
int distance = qRound(QABS(e->delta()) / (11 - m_cfg->mouseWheelSpeed()));
int direction = e->delta() > 0 ? -1 : 1;
for (int i = 0; i < distance; i++)
scroll(direction);
- QFrame::wheelEvent(e);
+ TQFrame::wheelEvent(e);
}
-void NewsScroller::leaveEvent(QEvent *)
+void NewsScroller::leaveEvent(TQEvent *)
{
if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1)
m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed()));
@@ -364,13 +364,13 @@ void NewsScroller::leaveEvent(QEvent *)
}
}
-void NewsScroller::drawContents(QPainter *p)
+void NewsScroller::drawContents(TQPainter *p)
{
if (!scrollWidth() || // No news and no "No News Available": uninitialized
m_headlines.isEmpty()) // Happens when we're currently fetching new news
return;
- QPixmap buffer(contentsRect().width(), contentsRect().height());
+ TQPixmap buffer(contentsRect().width(), contentsRect().height());
buffer.fill(m_cfg->backgroundColor());
int pos = m_offset;
@@ -393,7 +393,7 @@ void NewsScroller::drawContents(QPainter *p)
// Now do the headlines themselves
do {
- QPtrListIterator<Headline> it(m_headlines);
+ TQPtrListIterator<Headline> it(m_headlines);
for(; *it; ++it) {
if (horizontal()) {
if (pos + (*it)->width() >= 0)
@@ -440,7 +440,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
if (m_cfg->scrollingSpeed())
m_scrollTimer->start(speedAsInterval(m_cfg->scrollingSpeed()));
- QString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : QString::fromLatin1(" +++ ");
+ TQString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : TQString::fromLatin1(" +++ ");
int w = fontMetrics().width(sep);
int h = fontMetrics().height();
@@ -452,7 +452,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
m_separator.fill(m_cfg->backgroundColor());
- QPainter p(&m_separator);
+ TQPainter p(&m_separator);
p.setFont(font());
p.setPen(m_cfg->foregroundColor());
@@ -469,7 +469,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
p.end();
if (!bSeparatorOnly)
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
(*it)->reset();
switch (m_cfg->scrollingDirection()) {
@@ -495,7 +495,7 @@ int NewsScroller::scrollWidth() const
{
int result = (m_headlines.count() + 1) * m_separator.width();
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
result += (*it)->width();
return result;
@@ -505,13 +505,13 @@ int NewsScroller::scrollHeight() const
{
int result = (m_headlines.count() + 1) * m_separator.height();
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
result += (*it)->height();
return result;
}
-bool NewsScroller::updateActive(const QPoint &pt)
+bool NewsScroller::updateActive(const TQPoint &pt)
{
int pos = m_offset;
@@ -525,19 +525,19 @@ bool NewsScroller::updateActive(const QPoint &pt)
pos -= scrollHeight() - m_separator.height();
do {
- QPtrListIterator<Headline> it(m_headlines);
+ TQPtrListIterator<Headline> it(m_headlines);
for (; (headline = *it); ++it) {
- QRect rect;
+ TQRect rect;
if (horizontal()) {
pos += m_separator.width();
- rect.moveTopLeft(QPoint(pos, (contentsRect().height() - (*it)->height()) / 2));
+ rect.moveTopLeft(TQPoint(pos, (contentsRect().height() - (*it)->height()) / 2));
pos += (*it)->width();
} else {
pos += m_separator.height();
- rect.moveTopLeft(QPoint((contentsRect().width() - (*it)->width()) / 2, pos));
+ rect.moveTopLeft(TQPoint((contentsRect().width() - (*it)->width()) / 2, pos));
pos += (*it)->height();
}
- rect.setSize(QSize((*it)->width(), (*it)->height()));
+ rect.setSize(TQSize((*it)->width(), (*it)->height()));
if (m_mouseDrag)
if (horizontal()) {
diff --git a/knewsticker/newsscroller.h b/knewsticker/newsscroller.h
index efe0c3c2..3d37dc8d 100644
--- a/knewsticker/newsscroller.h
+++ b/knewsticker/newsscroller.h
@@ -19,24 +19,24 @@
#include "configaccess.h"
#include "newsengine.h"
-#include <qframe.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
class QTimer;
class Headline;
template <class> class QPtrList;
-typedef QPtrList<Headline> HeadlineList;
+typedef TQPtrList<Headline> HeadlineList;
class NewsScroller : public QFrame
{
Q_OBJECT
public:
- NewsScroller(QWidget *, ConfigAccess *, const char * = 0);
+ NewsScroller(TQWidget *, ConfigAccess *, const char * = 0);
- virtual QSize sizeHint() const;
- virtual QSizePolicy sizePolicy() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
// Convenience stuff. Somehow ugly, no?
inline bool horizontal() const
@@ -63,15 +63,15 @@ class NewsScroller : public QFrame
void contextMenu();
protected:
- virtual void enterEvent(QEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void wheelEvent(QWheelEvent *);
- virtual void leaveEvent(QEvent *);
- virtual void drawContents(QPainter *);
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent(QDropEvent *);
+ virtual void enterEvent(TQEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void mouseReleaseEvent(TQMouseEvent *);
+ virtual void mouseMoveEvent(TQMouseEvent *);
+ virtual void wheelEvent(TQWheelEvent *);
+ virtual void leaveEvent(TQEvent *);
+ virtual void drawContents(TQPainter *);
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
protected slots:
void scroll(int = 1, bool = true);
@@ -80,21 +80,21 @@ class NewsScroller : public QFrame
private:
int scrollWidth() const;
int scrollHeight() const;
- bool updateActive(const QPoint &);
- bool isHeadline(const QString &) const;
+ bool updateActive(const TQPoint &);
+ bool isHeadline(const TQString &) const;
int speedAsInterval( int speed );
private:
friend class Headline;
ConfigAccess *m_cfg;
- QTimer *m_scrollTimer;
+ TQTimer *m_scrollTimer;
mutable HeadlineList m_headlines;
Headline *m_activeHeadline;
- QPixmap m_separator;
+ TQPixmap m_separator;
int m_offset;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
bool m_mouseDrag;
- QString m_tempHeadline;
+ TQString m_tempHeadline;
float m_totalStepping;
float m_stepping;
};
diff --git a/knewsticker/newssourcedlgimpl.cpp b/knewsticker/newssourcedlgimpl.cpp
index 2cf39511..03704155 100644
--- a/knewsticker/newssourcedlgimpl.cpp
+++ b/knewsticker/newssourcedlgimpl.cpp
@@ -19,44 +19,44 @@
#include <knuminput.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
-SuggestProgressDlg::SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name)
+SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Downloading Data"), Cancel, Cancel),
m_gotSourceFile(false),
m_gotIcon(false)
{
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
- new QLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
+ new TQLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
"data necessary to suggest reasonable values.<br/>"
"<br/>"
"This will not take longer than one minute.</qt>" ),
mainWidget);
- m_progressBar = new QProgressBar(60, mainWidget);
+ m_progressBar = new TQProgressBar(60, mainWidget);
m_progressBar->setPercentageVisible(false);
- m_timeoutTimer = new QTimer(this);
- connect(m_timeoutTimer, SIGNAL(timeout()), this, SLOT(slotTimeoutTick()));
+ m_timeoutTimer = new TQTimer(this);
+ connect(m_timeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutTick()));
m_timeoutTimer->start(1000);
m_xmlSrc = new XMLNewsSource;
- connect(m_xmlSrc, SIGNAL(loadComplete(XMLNewsSource *, bool)),
- this, SLOT(slotLoadComplete(XMLNewsSource *, bool)));
+ connect(m_xmlSrc, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)),
+ this, TQT_SLOT(slotLoadComplete(XMLNewsSource *, bool)));
m_xmlSrc->loadFrom(url);
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
KURL u = url;
if (url.isLocalFile())
- u = QString::null;
+ u = TQString::null;
else
- u.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico"));
+ u.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(u);
}
@@ -82,25 +82,25 @@ void SuggestProgressDlg::slotLoadComplete(XMLNewsSource *, bool succeeded)
m_succeeded = succeeded;
if (m_gotIcon)
- done(succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-void SuggestProgressDlg::slotGotIcon(const KURL &url, const QPixmap &pixmap)
+void SuggestProgressDlg::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
{
m_gotIcon = true;
m_icon = pixmap;
m_iconURL = url;
if (m_gotIcon)
- done(m_succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(m_succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-NewsSourceDlgImpl::NewsSourceDlgImpl(QWidget *parent, const char *name, bool modal, WFlags fl)
+NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *parent, const char *name, bool modal, WFlags fl)
: NewsSourceDlg(parent, name, modal, fl),
m_modified(false)
{
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
for (unsigned int i = 0; i < DEFAULT_SUBJECTS; i++)
comboCategory->insertItem(
@@ -138,12 +138,12 @@ void NewsSourceDlgImpl::slotOkClicked()
KURL iconURL ( leIcon->text() );
if (iconURL.protocol().isEmpty())
- if (iconURL.host().startsWith(QString::fromLatin1("ftp.")))
- iconURL.setProtocol(QString::fromLatin1("ftp"));
- else if (iconURL.host().startsWith(QString::fromLatin1("www.")))
- iconURL.setProtocol(QString::fromLatin1("http"));
+ if (iconURL.host().startsWith(TQString::fromLatin1("ftp.")))
+ iconURL.setProtocol(TQString::fromLatin1("ftp"));
+ else if (iconURL.host().startsWith(TQString::fromLatin1("www.")))
+ iconURL.setProtocol(TQString::fromLatin1("http"));
else
- iconURL.setProtocol(QString::fromLatin1("file"));
+ iconURL.setProtocol(TQString::fromLatin1("file"));
NewsSourceBase::Data nsd(leName->text(), url.url(), iconURL.url(), subject,
sbMaxArticles->value(), true, cbProgram->isChecked());
@@ -166,7 +166,7 @@ void NewsSourceDlgImpl::slotSuggestClicked()
return;
SuggestProgressDlg dlg(url, this);
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
pixmapIcon->setPixmap(dlg.icon());
if (NewsIconMgr::self()->isStdIcon(dlg.icon()))
leIcon->clear();
@@ -191,8 +191,8 @@ void NewsSourceDlgImpl::setup(const NewsSourceBase::Data &nsd, bool modify)
comboCategory->setCurrentItem(nsd.subject);
sbMaxArticles->setValue(nsd.maxArticles);
KURL iconURL ( nsd.icon );
- if (iconURL.protocol() == QString::fromLatin1("file"))
- iconURL.setProtocol(QString::null);
+ if (iconURL.protocol() == TQString::fromLatin1("file"))
+ iconURL.setProtocol(TQString::null);
leIcon->setText(iconURL.url());
NewsIconMgr::self()->getIcon(iconURL);
if (modify == true) {
@@ -205,10 +205,10 @@ KURL NewsSourceDlgImpl::polishedURL(const KURL &url) const
KURL newURL = url;
if (url.protocol().isEmpty())
- if (url.url().startsWith(QString::fromLatin1("ftp")))
- newURL = QString::fromLatin1("ftp://") + url.url();
+ if (url.url().startsWith(TQString::fromLatin1("ftp")))
+ newURL = TQString::fromLatin1("ftp://") + url.url();
else
- newURL = QString::fromLatin1("http://") + url.url();
+ newURL = TQString::fromLatin1("http://") + url.url();
return newURL;
}
@@ -222,7 +222,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return false;
}
- if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == QString::fromLatin1("/")) {
+ if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::fromLatin1("/")) {
KMessageBox::error(this, i18n("KNewsTicker needs a valid RDF or RSS file to"
" suggest sensible values. The specified source file is invalid."),
i18n("Invalid Source File"));
@@ -232,7 +232,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return true;
}
-void NewsSourceDlgImpl::slotGotIcon(const KURL &, const QPixmap &pixmap)
+void NewsSourceDlgImpl::slotGotIcon(const KURL &, const TQPixmap &pixmap)
{
pixmapIcon->setPixmap(pixmap);
}
diff --git a/knewsticker/newssourcedlgimpl.h b/knewsticker/newssourcedlgimpl.h
index 71bb6964..86ed7c24 100644
--- a/knewsticker/newssourcedlgimpl.h
+++ b/knewsticker/newssourcedlgimpl.h
@@ -16,7 +16,7 @@
#include <kdialogbase.h>
#include <kurl.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
class XMLNewsSource;
class NewsIconMgr;
@@ -28,27 +28,27 @@ class SuggestProgressDlg : public KDialogBase
Q_OBJECT
public:
- SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name = 0);
+ SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name = 0);
virtual ~SuggestProgressDlg();
XMLNewsSource *xmlSrc() { return m_xmlSrc; }
- QPixmap icon() const { return m_icon; }
+ TQPixmap icon() const { return m_icon; }
const KURL &iconURL() const { return m_iconURL; }
private slots:
void slotTimeoutTick();
void slotLoadComplete(XMLNewsSource *, bool);
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
private:
bool m_gotSourceFile;
bool m_gotIcon;
XMLNewsSource *m_xmlSrc;
bool m_succeeded;
- QPixmap m_icon;
+ TQPixmap m_icon;
KURL m_iconURL;
- QProgressBar *m_progressBar;
- QTimer *m_timeoutTimer;
+ TQProgressBar *m_progressBar;
+ TQTimer *m_timeoutTimer;
};
class NewsSourceDlgImpl : public NewsSourceDlg
@@ -56,7 +56,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg
Q_OBJECT
public:
- NewsSourceDlgImpl(QWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0);
+ NewsSourceDlgImpl(TQWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0);
void setup(const NewsSourceBase::Data &, bool);
@@ -73,7 +73,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg
bool validateURL(const KURL &);
private slots:
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
private:
bool m_modified;
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 <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -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<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins("Protocols");
- for (QValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it)
+ TQValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins("Protocols");
+ for (TQValueList<KPluginInfo *>::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<QWidget *>(m_accountPage))
+ if (currentPage() == dynamic_cast<TQWidget *>(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::Protocol *>(Kopete::PluginManager::self()->loadPlugin(m_protocolItems[lvi]->pluginName()));
if (!m_proto)
@@ -142,10 +142,10 @@ void AddAccountWizard::next()
return;
}
- insertPage(dynamic_cast<QWidget *>(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish));
+ insertPage(dynamic_cast<TQWidget *>(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish));
KWizard::next();
}
- else if (currentPage() == dynamic_cast<QWidget *>(m_accountPage))
+ else if (currentPage() == dynamic_cast<TQWidget *>(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 <qmap.h>
+#include <tqmap.h>
#include <kwizard.h>
@@ -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<QListViewItem *, KPluginInfo *> m_protocolItems;
+ TQMap<TQListViewItem *, KPluginInfo *> 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 <qcheckbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <klocale.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQCheckListItem* accountLVI = 0;
+ TQPtrList<Kopete::Account> 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<QCheckListItem *>(it.current());
+ TQCheckListItem *check = dynamic_cast<TQCheckListItem *>(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<QCheckListItem *>( it.current() );
+ TQCheckListItem *check = dynamic_cast<TQCheckListItem *>( 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 <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::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<QCheckListItem *>(it.current());
+ TQCheckListItem *item = dynamic_cast<TQCheckListItem *>(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 <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::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 <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <kabc/addressbook.h>
@@ -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 <Kopete::Account*,AddContactPage*> protocolPages;
- QMap <QCheckListItem*,Kopete::Account*> m_accountItems;
- QMap <QCheckListItem*,Kopete::Group*> m_groupItems;
+ TQMap <Kopete::Account*,AddContactPage*> protocolPages;
+ TQMap <TQCheckListItem*,Kopete::Account*> m_accountItems;
+ TQMap <TQCheckListItem*,Kopete::Group*> 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 <qptrlist.h>
+#include <tqptrlist.h>
#include <addcontactpage.h>
#include <kiconloader.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQListViewItem* accountLVI = 0L;
+ TQPtrList<Kopete::Account> 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 <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::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 <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::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 <kdebug.h>
#include <klistview.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <klistview.h>
@@ -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 <Kopete::Account*,AddContactPage*> protocolPages;
- QMap <QListViewItem*,Kopete::Account*> m_accountItems;
+ TQMap <Kopete::Account*,AddContactPage*> protocolPages;
+ TQMap <TQListViewItem*,Kopete::Account*> 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 <kmultipledrag.h>
#include <kpopupmenu.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
//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<ContactItem*>( 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<ChatMembersListWidget*>( 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<ChatMembersListWidget::ContactItem*>(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<Kopete::Contact> it( session->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> 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<ContactItem*>(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<ContactItem*>(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 <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
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<const Kopete::Contact*, ContactItem*> m_members;
+ TQMap<const Kopete::Contact*, ContactItem*> 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 <ctime>
// Qt includes
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qrect.h>
-#include <qcursor.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqrect.h>
+#include <tqcursor.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
// KHTML::DOM includes
#include <dom/dom_doc.h>
@@ -43,7 +43,7 @@
#include <dom/html_base.h>
#include <dom/html_document.h>
#include <dom/html_inline.h>
-#include <qurloperator.h>
+#include <tqurloperator.h>
// 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<Kopete::Message> allMessages;
+ TQValueList<Kopete::Message> 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("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").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<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
+ TQValueList<Kopete::Message>::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<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
+ TQString contactId = element.getAttribute( "contactid" ).string();
+ for ( TQPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
if ( (*it)->contactId() == contactId )
return *it;
}
else
{
- QString nick = element.innerText().string().stripWhiteSpace();
- for ( QPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
+ TQString nick = element.innerText().string().stripWhiteSpace();
+ for ( TQPtrListIterator<Kopete::Contact> 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("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
- .arg( QStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
- QStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"&quot;"),
- QStyleSheet::escape(message.from()->account()->accountId() ).replace('"',"&quot;"));
+ nickLink=TQString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
+ .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',"&quot;"));
}
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+"</a>" );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
// 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)+"</a>" );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" );
// 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('"',"&quot;") );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',"&quot;") );
// 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<b>%2</b></a> ").arg(nickLink,nick);
- QString newBody = boldNick + message.parsedBody();
+ TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").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("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").arg( formatName(d->manager->displayName()) ) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").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("<span ");
+ TQString formattedBody("<span ");
formattedBody += message.getHtmlStyleAttribute();
// Affect the parsed body.
- formattedBody += QString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").arg(message.parsedBody());
+ formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").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<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
+ TQValueList<Kopete::Message>::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("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ TQString xhtmlBase;
+ xhtmlBase += TQString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n"
"\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\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 <khtml_part.h>
#include <dom/html_element.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
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 <ktextedit.h>
#include <ksyntaxhighlighter.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
-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<Kopete::Contact> it( session->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> 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<KDictSpellingHighlighter*>( 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( &para, &parIdx);
// FIXME: strips out all formatting
- QString txt = static_cast<EvilTextEdit*>(edit())->plainText( para );
+ TQString txt = static_cast<EvilTextEdit*>(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<Kopete::Contact> it ( members );
+ TQPtrListIterator<Kopete::Contact> 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 <qstringlist.h>
+#include <tqstringlist.h>
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 <kgenericfactory.h>
#include <khtmlview.h>
#include <ksyntaxhighlighter.h>
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
typedef KGenericFactory<ChatWindowPlugin> 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<Kopete::Contact> it( mgr->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> 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("<qt>You are about to leave the group chat session <b>%1</b>.<br>"
"You will not receive future messages from this conversation.</qt>").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("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to close this chat?</qt>").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<MembersListPolicy>
(
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<QTimer> it( m_remoteTypingMap );
+ TQStringList typingList;
+ TQPtrDictIterator<TQTimer> it( m_remoteTypingMap );
for( ; it.current(); ++it )
{
Kopete::Contact *c = static_cast<Kopete::Contact*>( 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<Kopete::Contact *>( 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("<qt>%1</qt>").arg( d->captionText ) );
+ emit updateChatTooltip( this, TQString::fromLatin1("<qt>%1</qt>").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<KDockWidget::DockPosition>(
- 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<const Kopete::Contact *>( QPtrDictIterator<QTimer>(m_remoteTypingMap).currentKey() ), false );
+ remoteTyping( reinterpret_cast<const Kopete::Contact *>( TQPtrDictIterator<TQTimer>(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<Kopete::Contact> cts=m_manager->members();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m_manager->members();
+ for ( TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> cts=m->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> cts=m_manager->members();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m_manager->members();
+ for ( TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> cts=m->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> 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 <kdockwidget.h>
#include <ktextedit.h> // for covariant return type of editWidget
-#include <qptrdict.h>
+#include <tqptrdict.h>
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<QTimer> m_remoteTypingMap;
- QString unreadMessageFrom;
- QString m_status;
+ TQPtrDict<TQTimer> 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 <math.h>
-#include <qmovie.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qtooltip.h>
-#include <qobjectlist.h>
+#include <tqmovie.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqtooltip.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-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<QString, QStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
+ TQMap<TQString, TQStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
int emoticonsPerRow = static_cast<int>(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<QString, QStringList>::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
+ for (TQMap<TQString, TQStringList>::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 <qlabel.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
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<QMovie*> MovieList;
+ typedef TQValueList<TQMovie*> 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 <qtimer.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfileinfo.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kcursor.h>
@@ -63,13 +63,13 @@
#include "kopetestdaction.h"
#include "kopeteviewmanager.h"
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kactionclasses.h>
-typedef QMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
-typedef QMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
-typedef QMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
-typedef QPtrList<KopeteChatWindow> WindowList;
+typedef TQMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
+typedef TQMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
+typedef TQMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
+typedef TQPtrList<KopeteChatWindow> 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<KopeteChatWindow> it( windows ); *it; ++it )
+ for ( TQPtrListIterator<KopeteChatWindow> 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<ChatView*>( 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*>( chatView )->closeView();
}
void KopeteChatWindow::addTab( ChatView *view )
{
- QPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> 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<ChatView*>(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<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> 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<ChatView> it( chatViewList ); it; ++it)
+// for( TQPtrListIterator<ChatView> it( chatViewList ); it; ++it)
// kdDebug( 14010 ) << " " << *it << " (" << (*it)->caption() << ")" << endl;
- for( QPtrListIterator<ChatView> it( chatViewList ); it; )
+ for( TQPtrListIterator<ChatView> 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<KXMLGUIClient> it( *m_activeView->msgManager()->childClients() );
+ TQPtrListIterator<KXMLGUIClient> 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("<qt>%1</qt>").arg( cv->caption() ) );
+ m_tabBar->setTabToolTip( cv, TQString::fromLatin1("<qt>%1</qt>").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<const QWidget *>(cv) )
+ if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast<const TQWidget *>(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 <kparts/mainwindow.h>
-#include <qmovie.h>
+#include <tqmovie.h>
#include "kopetecontact.h"
#include "kdeversion.h"
@@ -48,7 +48,7 @@ class Message;
class ChatSession;
class Contact;
class Protocol;
-typedef QPtrList<Contact> ContactPtrList;
+typedef TQPtrList<Contact> 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<ChatView> chatViewList;
+ TQPtrList<ChatView> 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 <qfile.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
// KDE includes
#include <kdebug.h>
@@ -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 <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
/**
@@ -35,7 +35,7 @@ public:
* value = Path to variant CSS file.
* Path is relative to Ressources directory.
*/
- typedef QMap<QString,QString> StyleVariants;
+ typedef TQMap<TQString,TQString> 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 <qvaluestack.h>
+#include <tqvaluestack.h>
// KDE includes
#include <kstandarddirs.h>
@@ -51,7 +51,7 @@ public:
styleDirLister->deleteLater();
}
- QMap<QString, ChatWindowStyle*>::Iterator styleIt, styleItEnd = stylePool.end();
+ TQMap<TQString, ChatWindowStyle*>::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<QString, ChatWindowStyle*> stylePool;
+ TQMap<TQString, ChatWindowStyle*> stylePool;
- QValueStack<KURL> styleDirs;
+ TQValueStack<KURL> styleDirs;
};
static KStaticDeleter<ChatWindowStyleManager> 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<<localStyleDir;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for(it = chatStyles.constBegin(); it != chatStyles.constEnd(); ++it)
{
kdDebug(14000) << k_funcinfo << *it << endl;
@@ -111,8 +111,8 @@ void ChatWindowStyleManager::loadStyles()
d->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<KArchiveEntry*>(rootDir->entry(*entriesIt));
@@ -179,52 +179,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
currentDir = dynamic_cast<KArchiveDirectory*>( 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<KFileItem> it( dirList );
+ TQPtrListIterator<KFileItem> 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 <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kfileitem.h>
#include <kopete_export.h>
@@ -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<QString, QString> StyleList;
+ typedef TQMap<TQString, TQString> 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 <kwin.h>
#include <kgenericfactory.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
typedef KGenericFactory<EmailWindowPlugin> 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<Kopete::Message> messageQueue;
+ TQValueList<Kopete::Message> 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("<qt>You are about to leave the group chat session <b>%1</b>.<br>"
"You will not receive future messages from this conversation.</qt>").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("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to close this chat?</qt>").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<int> splitPercent;
+ TQValueList<int> 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 <math.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -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<QString, QStringList> emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList();
- for( QMap<QString, QStringList>::const_iterator it = emoticonsMap.constBegin();
+ TQString icon;
+ TQMap<TQString, TQStringList> emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList();
+ for( TQMap<TQString, TQStringList>::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<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( 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<QMenuBar *>( widget );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( 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 <kdebug.h>
#include <kconfig.h>
#include <kdeversion.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qevent.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqevent.h>
#include <kparts/genericfactory.h>
#include <private/qrichtext_p.h>
@@ -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 <kparts/part.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqfont.h>
+#include <tqcolor.h>
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 <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kopetechatwindowstyle.h>
@@ -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(
"<div>%chatName%</div>\n"
"<div>%sourceName%</div>\n"
"<div>%destinationName%</div>\n"
@@ -61,8 +61,8 @@ void ChatWindowStyle_Test::testHtml()
"<div>%timeOpened%</div>\n"
"<div>%timeOpened{%H:%M}%</div>");
// 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"
"<div>%userIconPath%</div>\n"
"<div>%senderScreenName%</div>\n"
@@ -72,12 +72,12 @@ void ChatWindowStyle_Test::testHtml()
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>\n"
"<div id=\"insert\">");
- QString exceptedNextIncoming = QString::fromUtf8(
+ TQString exceptedNextIncoming = TQString::fromUtf8(
"Incoming:\n"
"<div>%message%</div>\n"
"<div id=\"insert\">"
);
- QString exceptedOutgoing = QString::fromUtf8(
+ TQString exceptedOutgoing = TQString::fromUtf8(
"Outgoing:\n"
"<div>%userIconPath%</div>\n"
"<div>%senderScreenName%</div>\n"
@@ -87,12 +87,12 @@ void ChatWindowStyle_Test::testHtml()
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>\n"
"<div id=\"insert\">");
- QString exceptedNextOutgoing = QString::fromUtf8(
+ TQString exceptedNextOutgoing = TQString::fromUtf8(
"Outgoing:\n"
"<div>%message%</div>\n"
"<div id=\"insert\">"
);
- QString exceptedStatus = QString::fromUtf8(
+ TQString exceptedStatus = TQString::fromUtf8(
"<div>%message%</div>\n"
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>");
@@ -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 <stdlib.h>
// Qt includes
-#include <qdir.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
// KDE includes
#include <kapplication.h>
@@ -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(
"<div><span id=\"KopeteHeaderChatNameInternal\">Test Session</span></div>\n"
"<div>Bob</div>\n"
"<div>Audrey</div>\n"
@@ -205,11 +205,11 @@ void ChatWindowStyleRendering_Test::testHeaderRendering()
"<div>Outgoing/buddy_icon.png</div>\n"
"<div>%1</div>\n"
"<div>%2</div>"
- ).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"
"<div>Incoming/buddy_icon.png</div>\n"
"<div><a href=\"kopetemessage://audrey@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" class=\"KopeteDisplayName\">audrey@localhost</a></div>\n"
@@ -230,9 +230,9 @@ void ChatWindowStyleRendering_Test::testMessageRendering()
"<div>%1</div>\n"
"<div>%2</div>\n"
"<div id=\"insert\">"
- ).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"
"<div>Outgoing/buddy_icon.png</div>\n"
"<div><a href=\"kopetemessage://bob@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" class=\"KopeteDisplayName\">bob@localhost</a></div>\n"
@@ -242,14 +242,14 @@ void ChatWindowStyleRendering_Test::testMessageRendering()
"<div>%1</div>\n"
"<div>%2</div>\n"
"<div id=\"insert\">"
- ).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(
"<div><span style=\"\"class=\"KopeteMessageBody\">A contact went offline.</span></div>\n"
"<div>%1</div>\n"
"<div>%2</div>"
- ).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 <qcheckbox.h>
-#include <qlayout.h>
-#include <qguardedptr.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqguardedptr.h>
#include <kcolorbutton.h>
#include <kpushbutton.h>
@@ -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<Kopete::Account> m_account;
+ TQGuardedPtr<Kopete::Account> m_account;
};
-typedef KGenericFactory<KopeteAccountConfig, QWidget> KopeteAccountConfigFactory;
+typedef KGenericFactory<KopeteAccountConfig, TQWidget> 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<KopeteAccountLVI*>( i->nextSibling() );
}
- QMap<Kopete::Account *, QColor>::Iterator it;
+ TQMap<Kopete::Account *, TQColor>::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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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<QWidget *>( m_accountWidget );
+ TQWidget *w = dynamic_cast<TQWidget *>( 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 <kcmodule.h>
-#include <qmap.h>
-#include <qcolor.h>
+#include <tqmap.h>
+#include <tqcolor.h>
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<Kopete::Account* , QColor> m_newColors;
+ TQMap<Kopete::Account* , TQColor> 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 <qcheckbox.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqlabel.h>
#include <kdeversion.h>
#include <kinputdialog.h>
@@ -84,9 +84,9 @@
#include "kopeteemoticons.h"
#include "kopeteglobal.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-typedef KGenericFactory<AppearanceConfig, QWidget> KopeteAppearanceConfigFactory;
+typedef KGenericFactory<AppearanceConfig, TQWidget> 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<QListBoxItem*,QString> styleItemMap;
+ TQMap<TQListBoxItem*,TQString> 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 = "<qt>";
+ TQStringList smileys = emoticons.emoticonAndPicList().keys();
+ TQString newContentText = "<qt>";
- for(QStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it )
- newContentText += QString::fromLatin1("<img src=\"%1\"> ").arg(*it);
+ for(TQStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it )
+ newContentText += TQString::fromLatin1("<img src=\"%1\"> ").arg(*it);
- newContentText += QString::fromLatin1("</qt>");
+ newContentText += TQString::fromLatin1("</qt>");
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("<qt>Are you sure you want to remove the "
+ TQString question=i18n("<qt>Are you sure you want to remove the "
"<strong>%1</strong> emoticon theme?<br>"
"<br>"
"This will delete the files installed by this theme.</qt>").
@@ -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 <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
/**
* @author Duncan Mac-Vicar P. <duncan@kde.org>
@@ -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 <kstandarddirs.h>
#include <kfiledialog.h>
#include <kio/job.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-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<QString, QStringList> smileys = emoticons.emoticonAndPicList();
+ TQMap<TQString, TQStringList> smileys = emoticons.emoticonAndPicList();
- for(QMap<QString, QStringList>::Iterator it = smileys.begin(); it != smileys.end(); ++it )
+ for(TQMap<TQString, TQStringList>::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 <kdebug.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kdialogbase.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qfile.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqdom.h>
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 <qapplication.h>
-#include <qtoolbutton.h>
-#include <qheader.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqtoolbutton.h>
+#include <tqheader.h>
+#include <tqstringlist.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -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 <kdebug.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kdialogbase.h>
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 <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qslider.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
#include <kplugininfo.h>
#include <klocale.h>
@@ -34,35 +34,35 @@
#include <ktrader.h>
#include <kconfig.h>
#include <kcombobox.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
//#include "videodevice.h"
-typedef KGenericFactory<AVDeviceConfig, QWidget> KopeteAVDeviceConfigFactory;
+typedef KGenericFactory<AVDeviceConfig, TQWidget> 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 <qimage.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#ifdef HAVE_GL
-# include <qgl.h>
+# include <tqgl.h>
#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 <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
#include <kplugininfo.h>
@@ -42,17 +42,17 @@
#include "kopetepluginmanager.h"
#include "kopeteaway.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-typedef KGenericFactory<BehaviorConfig, QWidget> KopeteBehaviorConfigFactory;
+typedef KGenericFactory<BehaviorConfig, TQWidget> 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<KPluginInfo*>::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it )
+ for( TQValueList<KPluginInfo*>::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<KPluginInfo*> viewPlugins;
+ TQValueList<KPluginInfo*> 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 <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE includes
#include <kdebug.h>
@@ -37,7 +37,7 @@
class GlobalIdentitiesManager::Private
{
public:
- QMap<QString, Kopete::MetaContact*> identitiesList;
+ TQMap<TQString, Kopete::MetaContact*> 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 &copyIdentityName, const QString &sourceIdentity)
+void GlobalIdentitiesManager::copyIdentity(const TQString &copyIdentityName, 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<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = d->identitiesList.end();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> 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<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = d->identitiesList.end();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> 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<Kopete::Contact> contactList = Kopete::ContactList::self()->myself()->contacts();
+ TQPtrList<Kopete::Contact> contactList = Kopete::ContactList::self()->myself()->contacts();
// Copy the contacts list to the new metacontact, so Kopete::Contact for SourceContact
// will not be null.
- QPtrListIterator<Kopete::Contact> it( contactList);
+ TQPtrListIterator<Kopete::Contact> 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<QString, Kopete::MetaContact*> GlobalIdentitiesManager::getGlobalIdentitiesList()
+TQMap<TQString, Kopete::MetaContact*> 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 <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
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 &copyIdentityName, const QString &sourceIdentity);
+ void copyIdentity(const TQString &copyIdentityName, 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<QString, Kopete::MetaContact*> getGlobalIdentitiesList();
+ TQMap<TQString, Kopete::MetaContact*> 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 <qlayout.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
// KDE includes
#include <kcombobox.h>
@@ -78,17 +78,17 @@ public:
Kopete::MetaContact *myself;
Kopete::MetaContact *currentIdentity;
- QMap<int, Kopete::Contact*> contactPhotoSourceList;
- QString selectedIdentity;
+ TQMap<int, Kopete::Contact*> contactPhotoSourceList;
+ TQString selectedIdentity;
};
-typedef KGenericFactory<KopeteIdentityConfig, QWidget> KopeteIdentityConfigFactory;
+typedef KGenericFactory<KopeteIdentityConfig, TQWidget> 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<QString, Kopete::MetaContact*> it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin();
+ TQMapIterator<TQString, Kopete::MetaContact*> 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<QString, Kopete::MetaContact*> identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList();
- QMapIterator<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = identitiesList.end();
+ TQMap<TQString, Kopete::MetaContact*> identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> 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<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
- QPtrListIterator<Kopete::Contact> it(contactList);
+ TQPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
- QPtrListIterator<Kopete::Contact> it(contactList);
+ TQPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
+ TQPtrListIterator<Kopete::Contact> 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 <qlayout.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -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<QString, QString> entries = eventsfile.entryMap( *it );
+ TQMap<TQString, TQString> 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 <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -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<KABC::Resource> kabcResources = m_addressBook->resources();
+ TQPtrList<KABC::Resource> kabcResources = m_addressBook->resources();
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrListIterator<KABC::Resource> 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<Kopete::MetaContact> contacts = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( contacts );
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> 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<ContactLVI *>( 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<ContactLVI *>( 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<ContactLVI *>( it.current() );
@@ -175,7 +175,7 @@ void KabcExportWizard::accept()
addr.setResource( selectedResource );
// set name
- QPtrList<Kopete::Contact> contacts = item->mc->contacts();
+ TQPtrList<Kopete::Contact> 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<Kopete::Contact> contacts = mc->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<int, KABC::Resource*> m_resourceMap;
- QMap<int, Kopete::MetaContact*> m_contactMap;
+ TQMap<int, KABC::Resource*> m_resourceMap;
+ TQMap<int, Kopete::MetaContact*> 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 <kabc/phonenumber.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include <kiconloader.h>
@@ -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("<Not Set>") );
// family name
- QString family = mAddressee.familyName();
+ TQString family = mAddressee.familyName();
if ( !family.isEmpty() )
mUI->mLastName->insertItem( mAddrBookIcon, family );
else
mUI->mLastName->insertItem( mAddrBookIcon, i18n("<Not Set>") );
// 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("<Not Set>") );
// 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<Kopete::Contact> contacts = mMetaContact->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = mMetaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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 <qcursor.h>
-#include <qdragobject.h>
-#include <qheader.h>
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qguardedptr.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqguardedptr.h>
#include <kaction.h>
#include <kapplication.h>
@@ -97,13 +97,13 @@ public:
void addCurrentItems()
{
// Add the already existing groups now
- QPtrList<Kopete::Group> grps = Kopete::ContactList::self()->groups();
- for ( QPtrListIterator<Kopete::Group> groupIt( grps ); groupIt.current(); ++groupIt )
+ TQPtrList<Kopete::Group> grps = Kopete::ContactList::self()->groups();
+ for ( TQPtrListIterator<Kopete::Group> groupIt( grps ); groupIt.current(); ++groupIt )
addGroup( groupIt.current() );
// Add the already existing meta contacts now
- QPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts();
- for ( QPtrListIterator<Kopete::MetaContact> it( metaContacts ); it.current(); ++it )
+ TQPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts();
+ for ( TQPtrListIterator<Kopete::MetaContact> 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<typename GroupViewItem>
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<KopeteMetaContactLVI*>(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<KopeteMetaContactLVI*>(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<KopeteGroupViewItem*>(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<KopeteMetaContactLVI*>( 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<KopeteMetaContactLVI*>( lvi ) )
{
@@ -354,7 +354,7 @@ private:
}
KopeteStatusGroupViewItem *m_onlineItem, *m_offlineItem;
- QGuardedPtr<KopeteGroupViewItem> m_temporaryItem;
+ TQGuardedPtr<KopeteGroupViewItem> 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<KopeteGroupViewItem *>( 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<KopeteGroupViewItem*>( 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<KopeteMetaContactLVI *>( 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<Kopete::MetaContact>() , QPtrList<Kopete::Group>() );
+ Kopete::ContactList::self()->setSelectedItems( TQPtrList<Kopete::MetaContact>() , TQPtrList<Kopete::Group>() );
}
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: '<nickname> (<online status>)'", "%1 (%2)" ).
+ TQString title = i18n( "Translators: format: '<nickname> (<online status>)'", "%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<Kopete::Contact> it = metaLVI->metaContact()->contacts();
+ TQPtrList<Kopete::Contact> 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: '<displayName> (<id>)'", "%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: '<displayName> (<id>)'", "%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<KopeteGroupViewItem*>( 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<KopeteMetaContactLVI *>( 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<KopeteMetaContactLVI*>(after);
KopeteGroupViewItem *dest_groupLVI=dynamic_cast<KopeteGroupViewItem*>(after);
- if( const_cast<const QWidget *>( e->source() ) == this )
+ if( const_cast<const TQWidget *>( e->source() ) == this )
{
- QPtrListIterator<KopeteMetaContactLVI> it( m_selectedContacts );
+ TQPtrListIterator<KopeteMetaContactLVI> 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<Kopete::Contact> contacts = account->contacts();
+ TQDict<Kopete::Contact> 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<KopeteMetaContactLVI*>(afterme);
- if( const_cast<const QWidget *>( e->source() ) == this )
+ if( const_cast<const TQWidget *>( e->source() ) == this )
{
KopeteMetaContactLVI *source_metaLVI=dynamic_cast<KopeteMetaContactLVI*>(source);
KopeteGroupViewItem *dest_groupLVI=dynamic_cast<KopeteGroupViewItem*>(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<KopeteMetaContactLVI*>(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<Kopete::MetaContact> contacts;
- QPtrList<Kopete::Group> groups;
+ TQPtrList<Kopete::MetaContact> contacts;
+ TQPtrList<Kopete::Group> 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<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
- QPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
+ TQPtrList<Kopete::Group> 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<Kopete::MetaContact> contacts, QPtrList<Kopete::Group> groups )
+ TQPtrList<Kopete::MetaContact> contacts, TQPtrList<Kopete::Group> 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<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
- QPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
+ TQPtrList<Kopete::Group> 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( "<qt>Are you sure you want to remove the contact <b>%1</b>" \
@@ -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<Kopete::MetaContact> list = it->members();
+ TQPtrList<Kopete::MetaContact> 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 <qpixmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
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<Kopete::MetaContact> contacts, QPtrList<Kopete::Group> groups );
+ void updateActionsForSelection( TQPtrList<Kopete::MetaContact> contacts, TQPtrList<Kopete::Group> 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<KopeteMetaContactLVI> m_selectedContacts;
- QPtrList<KopeteGroupViewItem> m_selectedGroups;
+ TQPtrList<KopeteMetaContactLVI> m_selectedContacts;
+ TQPtrList<KopeteGroupViewItem> 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<const Kopete::Account *, KAction *> m_accountAddContactMap;
+ TQMap<const Kopete::Account *, KAction *> m_accountAddContactMap;
};
struct KopeteContactListView::UndoItem
{
enum Type { MetaContactAdd, MetaContactRemove , MetaContactCopy , MetaContactRename, MetaContactChange, ContactAdd, GroupRename } type;
- QStringList args;
- QGuardedPtr<Kopete::MetaContact> metacontact;
- QGuardedPtr<Kopete::Group> group;
+ TQStringList args;
+ TQGuardedPtr<Kopete::MetaContact> metacontact;
+ TQGuardedPtr<Kopete::Group> 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<Kopete::Group> groups = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> 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 <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -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<KopeteMetaContactLVI*>( 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<KopeteMetaContactLVI *>( 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 <qpixmap.h>
+#include <tqpixmap.h>
#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 <kdebug.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
#include <kfiledialog.h>
@@ -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<QVBoxLayout*>( mNotificationProps->widget()->layout() );
+ TQBoxLayout * vb = static_cast<TQVBoxLayout*>( 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<Kopete::Contact> it( cList );
+ TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> itp( cList );
+ TQPtrListIterator<Kopete::Contact> 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<int, Kopete::Contact *> m_withPhotoContacts;
- QString mAddressBookUid; // the currently selected addressbook UID
+ TQMap<int, Kopete::Contact *> 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 <qpainter.h>
-#include <qtimer.h>
-#include <qvariant.h>
-#include <qmime.h>
-#include <qstylesheet.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqvariant.h>
+#include <tqmime.h>
+#include <tqstylesheet.h>
#include "knotification.h"
#include <kdebug.h>
@@ -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("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
+ TQString toolTip = TQString::fromLatin1("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
- toolTip += QString::fromLatin1("<tr><td>");
+ toolTip += TQString::fromLatin1("<tr><td>");
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("<img src=\"%1\">").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("<img src=\"%1\">").arg( photoName );
}
- toolTip += QString::fromLatin1("</td><td>");
+ toolTip += TQString::fromLatin1("</td><td>");
- QString displayName;
+ TQString displayName;
Kopete::Emoticons *e = Kopete::Emoticons::self();
- QValueList<Emoticons::Token> t = e->tokenize( metaContact->displayName());
- QValueList<Emoticons::Token>::iterator it;
+ TQValueList<Emoticons::Token> t = e->tokenize( metaContact->displayName());
+ TQValueList<Emoticons::Token>::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("<b><font size=\"+1\">%1</font></b><br><br>").arg( displayName );
+ toolTip += TQString::fromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").arg( displayName );
- QPtrList<Contact> contacts = metaContact->contacts();
+ TQPtrList<Contact> contacts = metaContact->contacts();
if ( contacts.count() == 1 )
{
- return toolTip + contacts.first()->toolTip() + QString::fromLatin1("</td></tr></table></qt>");
+ return toolTip + contacts.first()->toolTip() + TQString::fromLatin1("</td></tr></table></qt>");
}
- toolTip += QString::fromLatin1("<table>");
+ toolTip += TQString::fromLatin1("<table>");
// 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("</table></td></tr></table></qt>");
+ return toolTip + TQString::fromLatin1("</table></td></tr></table></qt>");
}
private:
MetaContact *metaContact;
@@ -163,12 +163,12 @@ public:
int currentMode;
int currentIconMode;
- QPtrList<Kopete::MessageEvent> events;
+ TQPtrList<Kopete::MessageEvent> 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<KopeteContactListView *>( listView() );
if ( lv )
{
@@ -380,9 +380,9 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
{
//int winId = KopeteSystemTray::systemTray() ? KopeteSystemTray::systemTray()->winId() : 0;
- QString text = i18n( "<qt><i>%1</i> is now %2.</qt>" )
- .arg( Kopete::Emoticons::parseEmoticons( QStyleSheet::escape(m_metaContact->displayName()) ) ,
- QStyleSheet::escape(c->onlineStatus().description()));
+ TQString text = i18n( "<qt><i>%1</i> is now %2.</qt>" )
+ .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<Kopete::MetaContact>() , QPtrList<Kopete::Group>() );
+ Kopete::ContactList::self()->setSelectedItems( TQPtrList<Kopete::MetaContact>() , TQPtrList<Kopete::Group>() );
}
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<Kopete::Contact> contacts = m_metaContact->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> 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<Kopete::Contact> contacts = m_metaContact->contacts();
+ TQPtrList<Kopete::Contact> 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<Kopete::Contact> contacts = m_metaContact->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> 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<ListView::ContactComponent*>( 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 <qobject.h>
-#include <qpixmap.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqptrdict.h>
#include <klistview.h>
@@ -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<Kopete::Account> m_addContactActions;
+ TQPtrDict<Kopete::Account> 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 <kdebug.h>
#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 <qmap.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
-static QTextStream qcin ( stdin, IO_ReadOnly );
-static QTextStream qcout( stdout, IO_WriteOnly );
-static QTextStream qcerr( stderr, IO_WriteOnly );
+static TQTextStream qcin ( stdin, IO_ReadOnly );
+static TQTextStream qcout( stdout, IO_WriteOnly );
+static TQTextStream qcerr( stderr, IO_WriteOnly );
// Group cache. Yes, I know global vars are ugly :)
bool needFlush = false;
-QString accountId;
-QString password;
-QString autoConnect;
-QString protocol;
-QMap<QString, QString> pluginData;
+TQString accountId;
+TQString password;
+TQString autoConnect;
+TQString protocol;
+TQMap<TQString, TQString> pluginData;
// Global vars to hold separate IRC vars until we have read all of them
-QString ircNick;
-QString ircServer;
-QString ircPort;
+TQString ircNick;
+TQString ircServer;
+TQString ircPort;
/*
* Function for (en/de)crypting strings for config file, taken from KMail
* Author: Stefan Taferner <taferner@alpin.or.at>
*/
-QString cryptStr(const QString &aStr)
+TQString cryptStr(const TQString &aStr)
{
- QString result;
+ TQString result;
for (unsigned int i = 0; i < aStr.length(); i++)
result += (aStr[i].unicode() < 0x20) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
-void parseGroup( const QString &group, const QString &rawLine )
+void parseGroup( const TQString &group, const TQString &rawLine )
{
// Groups that are converted can almost certainly be removed entirely
@@ -65,7 +65,7 @@ void parseGroup( const QString &group, const QString &rawLine )
else
protocol = group + "Protocol";
- password = QString::null;
+ password = TQString::null;
pluginData.clear();
needFlush = true;
@@ -79,7 +79,7 @@ void parseGroup( const QString &group, const QString &rawLine )
}
}
-void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine )
+void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine )
{
//qcerr << "*** group='" << group << "'" << endl;
if ( group == "MSN" )
@@ -154,9 +154,9 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
!ircPort.isEmpty() )
{
#if QT_VERSION < 0x030200
- accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort );
+ accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort );
#else
- accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort );
+ accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort );
#endif
}
}
@@ -165,7 +165,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
*/
else if ( key == "Modules" )
{
- QString newValue = value;
+ TQString newValue = value;
newValue.replace ( ".plugin", ".desktop" );
qcout << "Plugins=" << newValue;
}
@@ -176,7 +176,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
}
}
-void flushData( const QString &group )
+void flushData( const TQString &group )
{
qcout << "[Account_" << protocol << "_" << accountId << "]" << endl;
@@ -190,7 +190,7 @@ void flushData( const QString &group )
qcout << "Password=" << cryptStr( password ) << endl;
qcout << "AutoConnect=" << autoConnect << endl;
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = pluginData.begin(); it != pluginData.end(); ++it )
qcout << "PluginData_" << protocol << "_" << it.key() << "=" << it.data() << endl;
@@ -198,18 +198,18 @@ void flushData( const QString &group )
int main()
{
- qcin.setEncoding( QTextStream::UnicodeUTF8 );
- qcout.setEncoding( QTextStream::UnicodeUTF8 );
+ qcin.setEncoding( TQTextStream::UnicodeUTF8 );
+ qcout.setEncoding( TQTextStream::UnicodeUTF8 );
- QString curGroup;
+ TQString curGroup;
- QRegExp groupRegExp( "^\\[(.*)\\]" );
- QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
- QRegExp commentRegExp( "^(#.*)?$" );
+ TQRegExp groupRegExp( "^\\[(.*)\\]" );
+ TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
+ TQRegExp commentRegExp( "^(#.*)?$" );
while ( !qcin.atEnd() )
{
- QString line = qcin.readLine();
+ TQString line = qcin.readLine();
if ( commentRegExp.exactMatch( line ) )
{
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 <qdir.h>
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
#include <kstandarddirs.h>
-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 <qtextstream.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
-static QTextStream qcin ( stdin, IO_ReadOnly );
-static QTextStream qcout( stdout, IO_WriteOnly );
-static QTextStream qcerr( stderr, IO_WriteOnly );
+static TQTextStream qcin ( stdin, IO_ReadOnly );
+static TQTextStream qcout( stdout, IO_WriteOnly );
+static TQTextStream qcerr( stderr, IO_WriteOnly );
-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 <qpixmap.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
/**
@@ -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 <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -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<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::Contact> list = mc->contacts();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQPtrList<Kopete::Contact> list = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
- QDictIterator<Kopete::Account> it( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
+ TQDictIterator<Kopete::Account> 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<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" );
- QStringList protocolList;
- for ( QValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it )
+ TQValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" );
+ TQStringList protocolList;
+ for ( TQValueList<KPluginInfo *>::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::Protocol*>( Kopete::PluginManager::self()->plugin( protocolId ) );
@@ -318,8 +318,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol
if ( protocol )
{
// find its accounts
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
- QDictIterator<Kopete::Account> it( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
+ TQDictIterator<Kopete::Account> 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",
"<qt><p>The KDE Address Book has no instant messaging information for</p><p><b>%1</b>.</p><p>If he/she is already present in the Kopete contact list, indicate the correct addressbook entry in their properties.</p><p>Otherwise, add a new contact using the Add Contact wizard.</p></qt>" );
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 <qobject.h>
+#include <tqobject.h>
#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 <kdebug.h>
//#include <kdebug.h>
-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 <qevent.h>
-#include <qlabel.h>
-#include <qpoint.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqpoint.h>
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 <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -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<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> 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<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> 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 <config.h>
#endif
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kuniqueapplication.h>
@@ -79,10 +79,10 @@ private slots:
private:
// The main window might get deleted behind our back (W_DestructiveClose),
// so use a guarded pointer
- QGuardedPtr<KopeteWindow> m_mainWindow;
+ TQGuardedPtr<KopeteWindow> 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 <qpointarray.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqpointarray.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kdeversion.h>
#include <kglobalsettings.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include <kactivelabel.h>
/**
@@ -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 <qlayout.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
+#include <tqcursor.h>
// KDE include
#include <klineedit.h>
@@ -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, "<qt><img src=\""+ value.toString() +"\"></qt>");
+ d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin)));
+ TQToolTip::add(d->labelPicture, "<qt><img src=\""+ value.toString() +"\"></qt>");
}
}
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 <qwidget.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
/**
* 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<Kopete::Contact> list = Kopete::ContactList::self()->onlineContacts();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::Contact> list = Kopete::ContactList::self()->onlineContacts();
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Account> m_accounts=Kopete::AccountManager::self()->accounts();
- QPtrListIterator<Kopete::Account> it( m_accounts );
+ TQStringList list;
+ TQPtrList<Kopete::Account> m_accounts=Kopete::AccountManager::self()->accounts();
+ TQPtrListIterator<Kopete::Account> 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<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> 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<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> 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<Kopete::Contact> contacts = mc->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> 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 <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
#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 <qcursor.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qsignalmapper.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqsignalmapper.h>
#include <kaction.h>
#include <kactionclasses.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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<KToolBar*>( 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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<KopeteAccountStatusBarIcon *>( 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString statusMessageToUse;
+ TQPtrList<Kopete::Account> 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("<qt>");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString tt = TQString::fromLatin1("<qt>");
+ TQPtrList<Kopete::Account> 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("</qt>");
- QToolTip::add(m_tray, tt);
+ tt += TQString::fromLatin1("</qt>");
+ 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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<Kopete::Account> it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Account> 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<QObject *>( sender() );
+ TQObject * senderObj = const_cast<TQObject *>( sender() );
m_globalStatusMessageMenu = static_cast<KPopupMenu *>( 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<Kopete::Group> groupItems;
+ TQDict<Kopete::Group> 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 <qptrdict.h>
+#include <tqptrdict.h>
#include <kmainwindow.h>
-#include <qlabel.h>
+#include <tqlabel.h>
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<QObject> m_accountStatusBarIcons;
+ TQPtrDict<TQObject> 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 <qtimer.h>
-#include <qtooltip.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
#include <kwin.h>
#include <kaboutdata.h>
@@ -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<KopeteWindow *>( 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<QMovie &>( movie ).unpause();
+ const_cast<TQMovie &>( 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( "<qt><nobr><b>New Message from %1:</b></nobr><br><nobr>\"%2\"</nobr></qt>" )
- .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<Kopete::Account> it(Kopete::AccountManager::self()->accounts()); it.current(); ++it)
+ for (TQPtrListIterator<Kopete::Account> 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( "(<a.*>((http://)?(.+))</a>)" );
+ TQRegExp rx( "(<a.*>((http://)?(.+))</a>)" );
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 <a> 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 <qpixmap.h>
-#include <qmovie.h>
+#include <tqpixmap.h>
+#include <tqmovie.h>
#include <ksystemtray.h>
@@ -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<Kopete::MessageEvent> mEventList;
- QPtrList<Kopete::MessageEvent> mBalloonEventList;
+ TQPtrList<Kopete::MessageEvent> mEventList;
+ TQPtrList<Kopete::MessageEvent> 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 <assert.h>
-#include <qwindowdefs.h>
-#include <qwidget.h>
+#include <tqwindowdefs.h>
+#include <tqwidget.h>
#include <kdebug.h>
@@ -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 <X11/X.h>
#include <X11/Xlib.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
class QWidget;
class QImage;
@@ -35,7 +35,7 @@ class KXvPrivate;
class KXvDevice;
class KXvDevicePrivate;
-typedef QPtrList<KXvDevice> KXvDeviceList;
+typedef TQPtrList<KXvDevice> 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<KXvDeviceAttribute> KXvDeviceAttributes;
+typedef TQPtrList<KXvDeviceAttribute> 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 <kdebug.h>
-#include <qpaintdevice.h>
+#include <tqpaintdevice.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -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 <qevent.h>
-#include <qimage.h>
-#include <qtimer.h>
+#include <tqevent.h>
+#include <tqimage.h>
+#include <tqtimer.h>
#include <kdebug.h>
#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<QKeyEvent*>(e);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(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 <qgl.h>
+#include <tqgl.h>
#include <GL/gl.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#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 <qstring.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqvaluevector.h>
#include <kcombobox.h>
#include "videoinput.h"
@@ -191,7 +191,7 @@ struct imagebuffer
int height;
int width;
pixel_format pixelformat;
- QValueVector <uchar> data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy
+ TQValueVector <uchar> 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<Kopete::AV::VideoInput> m_input;
- QValueVector<Kopete::AV::VideoControl> m_control;
-// QFile file;
+ TQValueVector<Kopete::AV::VideoInput> m_input;
+ TQValueVector<Kopete::AV::VideoControl> m_control;
+// TQFile file;
protected:
int currentwidth, minwidth, maxwidth, currentheight, minheight, maxheight;
bool m_disablemmap;
bool m_workaroundbrokendriver;
- QValueVector<rawbuffer> m_rawbuffers;
+ TQValueVector<rawbuffer> 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 <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include "kopete_export.h"
@@ -34,16 +34,16 @@ class VideoDeviceModelPool{
struct VideoDeviceModel
{
- QString model;
+ TQString model;
size_t count;
};
- QValueVector<VideoDeviceModel> m_devicemodel;
+ TQValueVector<VideoDeviceModel> 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 <kdebug.h>
#include <klocale.h>
-#include <qdir.h>
+#include <tqdir.h>
#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 <qvaluevector.h>
+#include <tqvaluevector.h>
#include <iostream>
#include "videoinput.h"
#include "videodevicemodelpool.h"
-#include <qstring.h>
-#include <qimage.h>
-#include <qvaluevector.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqimage.h>
+#include <tqvaluevector.h>
+#include <tqmutex.h>
#include <kcombobox.h>
#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<Kopete::AV::VideoDevice> VideoDeviceVector;
+typedef TQValueVector<Kopete::AV::VideoDevice> 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#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<VideoControl> m_control;
+ TQValueVector<VideoControl> 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 <kdialogbase.h>
-#include <qdialog.h>
-#include <qdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqdesktopwidget.h>
#include <klocale.h>
#include <kdialog.h>
-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 <qimage.h>
+#include <tqimage.h>
#include <kdialogbase.h>
#include <kpixmapregionselectorwidget.h>
@@ -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 <qpainter.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqlayout.h>
#include <kimageeffect.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kaction.h>
#include <stdlib.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
-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 <qvbox.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqlabel.h>
#include <kimageeffect.h>
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 <qstring.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -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<KABC::Resource> KABCPersistence::s_pendingResources;
+TQPtrList<KABC::Resource> 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<QString, QStringList> addressMap;
- QPtrList<Contact> contacts = mc->contacts();
- QPtrListIterator<Contact> cIt( contacts );
+ TQMap<TQString, TQStringList> addressMap;
+ TQPtrList<Contact> contacts = mc->contacts();
+ TQPtrListIterator<Contact> 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<QString, QStringList>::ConstIterator it = addressMap.begin();
+ TQMap<TQString, TQStringList>::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<QString, QMap<QString, QString> >::ConstIterator appIt = d->addressBook.begin();
+ TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator appIt = d->addressBook.begin();
for( ; appIt != d->addressBook.end(); ++appIt )
{
- QMap<QString, QString>::ConstIterator addrIt = appIt.data().begin();
+ TQMap<TQString, TQString>::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<KABC::Resource> it( s_pendingResources );
+ TQPtrListIterator<KABC::Resource> 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<QString, QMap<QString, QString> >::ConstIterator appIt = d->addressBook.begin();
+ TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator appIt = d->addressBook.begin();
for( ; appIt != d->addressBook.end(); ++appIt )
{
- QMap<QString, QString>::ConstIterator addrIt = appIt.data().begin();
+ TQMap<TQString, TQString>::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<Protocol*>( PluginManager::self()->loadPlugin( QString::fromLatin1( "kopete_" ) + protocolName ) );
+ Protocol * proto = dynamic_cast<Protocol*>( 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( proto );
- QDictIterator<Kopete::Account> acs(accounts);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( proto );
+ TQDictIterator<Kopete::Account> 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( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), QString::fromLatin1( "ImportFromKABC" ) ) )
+ i18n( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).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<KABC::Resource> s_pendingResources;
+ static TQPtrList<KABC::Resource> 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 <kglobal.h>
-#include <qsqlpropertymap.h>
-#include <qobjectlist.h>
+#include <tqsqlpropertymap.h>
+#include <tqobjectlist.h>
#include <kconfig.h>
#include <kapplication.h>
#include <kdeversion.h>
@@ -63,12 +63,12 @@ public:
{ init(); }
// Widgets to parse
- QPtrList<QWidget> widgets;
+ TQPtrList<TQWidget> widgets;
// Name of the group that KConfig should be set to for each widget.
- QMap<QWidget*, QString> groups;
+ TQMap<TQWidget*, TQString> groups;
// Child widgets of widgets to ignore
- QPtrList<QWidget> ignore;
+ TQPtrList<TQWidget> ignore;
// Reset to false after saveSettings returns true.
bool changed;
@@ -79,18 +79,18 @@ public:
#endif
// Known widgets that can be configured
- QMap<QWidget*, QPtrList<QWidget> > autoWidgets;
+ TQMap<TQWidget*, TQPtrList<TQWidget> > autoWidgets;
// Default values for the widgets.
- QMap<QWidget*, QVariant> defaultValues;
- // Widgets to not get properties on (QLabel etc)
- QAsciiDict<int> ignoreTheseWidgets;
+ TQMap<TQWidget*, TQVariant> defaultValues;
+ // Widgets to not get properties on (TQLabel etc)
+ TQAsciiDict<int> 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<QWidget> newAutoConfigWidget;
+ TQPtrList<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->autoWidgets[widget] );
- QWidget *groupWidget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->autoWidgets[widget] );
- QWidget *groupWidget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->autoWidgets[widget] );
- QWidget *groupWidget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->autoWidgets[widget] );
- QWidget *groupWidget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->widgets );
- QWidget *pageWidget;
+ TQPtrListIterator<TQWidget> 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<QWidget> it( d->autoWidgets[pageWidget] );
- QWidget *widget;
+ TQPtrListIterator<TQWidget> 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<QWidget>& currentGroup, bool trackChanges){
+bool KAutoConfig::parseChildren(const TQWidget *widget,
+ TQPtrList<TQWidget>& currentGroup, bool trackChanges){
bool valueChanged = false;
- const QPtrList<QObject> *listOfChildren = widget->children();
+ const TQPtrList<TQObject> *listOfChildren = widget->children();
if(!listOfChildren)
return valueChanged;
- QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap();
- QPtrListIterator<QObject> it( *listOfChildren );
- QObject *object;
+ TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap();
+ TQPtrListIterator<TQObject> 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 <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#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 <ben+kdelibs at meyerhome dot net>
*/
-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<QString, QCString> changedMap;
+ TQMap<TQString, TQCString> 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<QWidget>&currentGroup, bool trackChanges );
+ bool parseChildren( const TQWidget *widget,
+ TQPtrList<TQWidget>&currentGroup, 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 <qlayout.h>
+#include <tqlayout.h>
#include <kautoconfig.h>
@@ -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<MyPageConfig, QWidget> MyPageConfigFactory;
+ * typedef KGenericFactory<MyPageConfig, TQWidget> 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 <kwin.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <dcopclient.h>
-#include <qcstring.h>
-#include <qguardedptr.h>
-#include <qstylesheet.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qtabwidget.h>
+#include <tqcstring.h>
+#include <tqguardedptr.h>
+#include <tqstylesheet.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqtabwidget.h>
//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<QChar,QString> subst;
+ TQMap<TQChar,TQString> 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<KNotification> _this=this; //this can be deleted
+ TQGuardedPtr<KNotification> _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("<p align=\"right\">");
+ TQString linkCode=TQString::fromLatin1("<p align=\"right\">");
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("&nbsp;<a href=\"%1\">%2</a> ").arg( QString::number(i) , QStyleSheet::escape(*it) );
+ linkCode+=TQString::fromLatin1("&nbsp;<a href=\"%1\">%2</a> ").arg( TQString::number(i) , TQStyleSheet::escape(*it) );
}
- linkCode+=QString::fromLatin1("</p>");
+ linkCode+=TQString::fromLatin1("</p>");
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<QTabWidget*>(pw))
+ if( TQTabWidget *tab_widget=dynamic_cast<TQTabWidget*>(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 <qimage.h>
+#include <tqimage.h>
-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 <qpixmap.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqpixmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#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 <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -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<Contact> contacts;
- QColor color;
+ TQDict<Contact> 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<Contact>( d->contacts );
+ delete *TQDictIterator<Contact>( 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<Contact>& Account::contacts()
+const TQDict<Contact>& 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<Contact> it( d->contacts ); it.current(); ++it )
+ for ( TQDictIterator<Contact> 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<QWidget *>( m_accountWidget );
+ TQWidget *w = dynamic_cast<TQWidget *>( 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 <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
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<Contact>& contacts();
+ const TQDict<Contact>& 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 <qapplication.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -44,7 +44,7 @@ class AccountManager::Private
{
public:
- class AccountPtrList : public QPtrList<Account>
+ class AccountPtrList : public TQPtrList<Account>
{
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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it )
{
if(it.current()->isConnected())
return true;
@@ -100,17 +100,17 @@ bool AccountManager::isAnyAccountConnected()
void AccountManager::connectAll()
{
- for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it )
{
if ( anyConnected )
{
@@ -125,16 +125,16 @@ void AccountManager::setAvailableAll( const QString &awayReason )
void AccountManager::disconnectAll()
{
- for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Account>& AccountManager::accounts() const
+const TQPtrList<Account>& AccountManager::accounts() const
{
return d->accounts;
}
-QDict<Account> AccountManager::accounts( const Protocol *protocol ) const
+TQDict<Account> AccountManager::accounts( const Protocol *protocol ) const
{
- QDict<Account> dict;
- for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it )
+ TQDict<Account> dict;
+ for ( TQPtrListIterator<Account> 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<Account> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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<Kopete::Contact> it( account->contacts() );
+ TQDictIterator<Kopete::Contact> 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<MetaContact> groupMembers = group->members();
+ TQPtrList<MetaContact> 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<Account> it( d->accounts ); it.current(); ++it )
+ for ( TQPtrListIterator<Account> 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 <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "kopete_export.h"
@@ -65,16 +65,16 @@ public:
* \brief Retrieve the list of accounts
* \return a list of all the accounts
*/
- const QPtrList<Account> & accounts() const;
+ const TQPtrList<Account> & 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<Account> accounts( const Protocol *p ) const;
+ TQDict<Account> 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 <kconfig.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <dcopref.h>
@@ -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<Kopete::Account> autoAwayAccounts;
+ TQPtrList<Kopete::Account> 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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 <qstring.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#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 <kconfig.h>
#include <kglobal.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
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 <qobject.h>
+#include <tqobject.h>
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 <qapplication.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -49,14 +49,14 @@ class KMMPrivate
public:
Kopete::ContactPtrList mContactList;
const Kopete::Contact *mUser;
- QMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus;
+ TQMap<const Kopete::Contact *, Kopete::OnlineStatus> 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 <qobject.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kxmlguiclient.h>
@@ -51,8 +51,8 @@ class ChatSessionManager;
class MessageHandlerChain;
class TemporaryKMMCallbackAppendMessageHandler;
-typedef QPtrList<Contact> ContactPtrList;
-typedef QValueList<Message> MessageList;
+typedef TQPtrList<Contact> ContactPtrList;
+typedef TQValueList<Message> MessageList;
/**
@@ -71,7 +71,7 @@ typedef QValueList<Message> 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 <ChatSession*> sessions;
+ TQValueList <ChatSession*> 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<ChatSession*> it;
+ TQValueListIterator<ChatSession*> 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<ChatSession*>::Iterator it;
+ TQValueList<ChatSession*>::Iterator it;
for ( it= d->sessions.begin(); it!=d->sessions.end() && !result ; ++it )
{
ChatSession* cs=(*it);
if ( cs->protocol() == protocol && user == cs->myself() )
{
- QPtrList<Contact> contactlist = cs->members();
+ TQPtrList<Contact> 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<ChatSession*> ChatSessionManager::sessions( )
+TQValueList<ChatSession*> 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<QObject *>(newView);
+ TQObject *viewObject = dynamic_cast<TQObject *>(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 <qobject.h>
-#include <qptrlist.h>
-#include <qintdict.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqintdict.h>
+#include <tqvaluelist.h>
#include "kopetechatsession.h"
#include "kopetemessage.h"
@@ -37,8 +37,8 @@ class Contact;
class Protocol;
class MessageEvent;
-typedef QPtrList<Contact> ContactPtrList;
-typedef QValueList<Message> MessageList;
+typedef TQPtrList<Contact> ContactPtrList;
+typedef TQValueList<Message> MessageList;
/**
* @author Duncan Mac-Vicar Prett <duncan@kde.org>
@@ -85,7 +85,7 @@ public:
/**
* Get a list of all open sessions.
*/
- QValueList<ChatSession*> sessions();
+ TQValueList<ChatSession*> 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 <kapplication.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
#include <kprocess.h>
#include <kdeversion.h>
#include <kxmlguiclient.h>
#include <kaction.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "kopetechatsessionmanager.h"
#include "kopeteprotocol.h"
@@ -36,36 +36,36 @@
using Kopete::CommandList;
-typedef QMap<QObject*, CommandList> PluginCommandMap;
-typedef QMap<QString,QString> CommandMap;
+typedef TQMap<TQObject*, CommandList> PluginCommandMap;
+typedef TQMap<TQString,TQString> CommandMap;
typedef QPair<Kopete::ChatSession*, Kopete::Message::MessageDirection> 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<Kopete::Command> it( mCommands ); it.current(); ++it )
+ for( TQDictIterator<Kopete::Command> it( mCommands ); it.current(); ++it )
{
KAction *a = static_cast<KAction*>( 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<KProcess*,ManagerPair> processMap;
+ TQMap<KProcess*,ManagerPair> processMap;
bool inCommand;
- QPtrList<KAction> m_commands;
+ TQPtrList<KAction> 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 [<command>] - 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 <text> - Formats message as in '<nickname> 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 [<reason>] - 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 [<reason>] - 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 <text> - 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] <command> - 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<Kopete::Command> it( mCommands );
+ TQDictIterator<Kopete::Command> 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<Kopete::Command> it ( commandList );
+ TQDictIterator<Kopete::Command> 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<Kopete::Command> itDict( from );
+ TQDictIterator<Kopete::Command> 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<Kopete::Plugin*>(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 <qdict.h>
+#include <tqdict.h>
#include <kshortcut.h>
#include "kopetemessage.h"
@@ -38,7 +38,7 @@ class Plugin;
class Protocol;
class Command;
-typedef QDict<Command> CommandList;
+typedef TQDict<Command> CommandList;
/**
* @author Jason Keirstead <jason@keirstead.org>
@@ -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 \<command\>
@@ -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 <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
@@ -47,14 +47,14 @@
#include "kopeteemoticons.h"
//For the moving to another metacontact dialog
-#include <qlabel.h>
-#include <qimage.h>
-#include <qmime.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqmime.h>
+#include <tqvbox.h>
#include <klistview.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qstylesheet.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqstylesheet.h>
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<KAction> *customActions = customContextMenuActions( manager );
+ TQPtrList<KAction> *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<QString, QString> &/*serializedData*/,
- QMap<QString, QString> & /* addressBookData */ )
+void Contact::serialize( TQMap<TQString, TQString> &/*serializedData*/,
+ TQMap<TQString, TQString> & /* addressBookData */ )
{
}
-void Contact::serializeProperties(QMap<QString, QString> &serializedData)
+void Contact::serializeProperties(TQMap<TQString, TQString> &serializedData)
{
Kopete::ContactProperty::Map::ConstIterator it;// = d->properties.ConstIterator;
@@ -367,8 +367,8 @@ void Contact::serializeProperties(QMap<QString, QString> &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<QString, QString> &serializedData)
} // end serializeProperties()
void Contact::deserializeProperties(
- QMap<QString, QString> &serializedData )
+ TQMap<TQString, TQString> &serializedData )
{
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::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<KAction> *Contact::customContextMenuActions()
+TQPtrList<KAction> *Contact::customContextMenuActions()
{
return 0L;
}
-QPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager */ )
+TQPtrList<KAction> *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( "<b>DISPLAY NAME</b><br><img src=\"%2\">&nbsp;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("<br><b>Full Name:</b>&nbsp;FORMATTED NAME",
- "<br><b>Full Name:</b>&nbsp;<nobr>%1</nobr>").arg(QStyleSheet::escape(name));
+ "<br><b>Full Name:</b>&nbsp;<nobr>%1</nobr>").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("<br><b>Idle:</b>&nbsp;FORMATTED IDLE TIME",
"<br><b>Idle:</b>&nbsp;<nobr>%1</nobr>").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("<br><b>Home Page:</b>&nbsp;FORMATTED URL",
"<br><b>Home Page:</b>&nbsp;<a href=\"%1\"><nobr>%2</nobr></a>").
- 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("<br><b>Away Message:</b>&nbsp;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("<br><b>PROPERTY LABEL:</b>&nbsp;PROPERTY VALUE",
"<br><nobr><b>%2:</b></nobr>&nbsp;%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 <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kdemacros.h>
#include "kopeteglobal.h"
@@ -41,7 +41,7 @@ class OnlineStatus;
class Plugin;
class Protocol;
class Account;
-typedef QPtrList<Group> GroupList;
+typedef TQPtrList<Group> GroupList;
/**
* @author Duncan Mac-Vicar P. <duncan@kde.org>
@@ -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<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &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<QString, QString> &serializedData);
+ void serializeProperties(TQMap<TQString, TQString> &serializedData);
/**
* @brief Deserialize the contacts persistent properties
*/
- void deserializeProperties(QMap<QString, QString> &serializedData);
+ void deserializeProperties(TQMap<TQString, TQString> &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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
/**
* @todo What is this function for ?
*/
- virtual QPtrList<KAction> *customContextMenuActions( ChatSession *manager );
+ virtual TQPtrList<KAction> *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.
* <b>Don't</b> 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 <qdir.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kabc/stdaddressbook.h>
@@ -51,12 +51,12 @@ class ContactList::Private
/** Flag: do not save the contactlist until she is completely loaded */
bool loaded ;
- QPtrList<MetaContact> contacts;
- QPtrList<Group> groups;
- QPtrList<MetaContact> selectedMetaContacts;
- QPtrList<Group> selectedGroups;
+ TQPtrList<MetaContact> contacts;
+ TQPtrList<Group> groups;
+ TQPtrList<MetaContact> selectedMetaContacts;
+ TQPtrList<Group> 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<MetaContact> ContactList::metaContacts() const
+TQPtrList<MetaContact> ContactList::metaContacts() const
{
return d->contacts;
}
-QPtrList<Group> ContactList::groups() const
+TQPtrList<Group> ContactList::groups() const
{
return d->groups;
}
-MetaContact *ContactList::metaContact( const QString &metaContactId ) const
+MetaContact *ContactList::metaContact( const TQString &metaContactId ) const
{
- QPtrListIterator<MetaContact> it( d->contacts );
+ TQPtrListIterator<MetaContact> 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<MetaContact> it( d->contacts );
+ TQPtrListIterator<MetaContact> 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<Account> acts=AccountManager::self()->accounts();
- QPtrListIterator<Account> it( acts );
+ TQPtrList<Account> acts=AccountManager::self()->accounts();
+ TQPtrListIterator<Account> 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<MetaContact> ContactList::selectedMetaContacts() const
+TQPtrList<MetaContact> ContactList::selectedMetaContacts() const
{
return d->selectedMetaContacts;
}
-QPtrList<Group> ContactList::selectedGroups() const
+TQPtrList<Group> 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<Contact> cts=m->contacts();
+ TQPtrList<Contact> 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<MetaContact> metaContacts , QPtrList<Group> groups)
+void ContactList::setSelectedItems(TQPtrList<MetaContact> metaContacts , TQPtrList<Group> 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<QString, QDomElement> pluginData;
- QStringList icqData;
- QStringList gaduData;
+ TQMap<TQString, TQDomElement> 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<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::MetaContact> it( d->contacts );
+ TQStringList meta_contacts;
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isReachable() )
@@ -952,16 +952,16 @@ QStringList ContactList::reachableContacts() const
return contacts;
}
-QPtrList<Contact> ContactList::onlineContacts() const
+TQPtrList<Contact> ContactList::onlineContacts() const
{
- QPtrList<Kopete::Contact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::Contact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if ( cit.current()->isOnline() )
@@ -972,10 +972,10 @@ QPtrList<Contact> ContactList::onlineContacts() const
return result;
}
-QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
+TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
{
- QPtrList<Kopete::MetaContact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::MetaContact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isOnline() )
@@ -984,17 +984,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
return result;
}
-QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QString &protocolId ) const
+TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const TQString &protocolId ) const
{
- QPtrList<Kopete::MetaContact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::MetaContact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
// FIXME: This loop is not very efficient :(
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId )
@@ -1005,17 +1005,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QSt
return result;
}
-QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &protocolId ) const
+TQPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const TQString &protocolId ) const
{
- QPtrList<Kopete::Contact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::Contact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
// FIXME: This loop is not very efficient :(
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId )
@@ -1026,10 +1026,10 @@ QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &pr
return result;
}
-QStringList Kopete::ContactList::fileTransferContacts() const
+TQStringList Kopete::ContactList::fileTransferContacts() const
{
- QStringList contacts;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> 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<Kopete::Contact> mContacts = c->contacts();
+ TQPtrList<Kopete::Contact> mContacts = c->contacts();
kdDebug(14010) << mContacts.count() << endl;
- QPtrListIterator<Kopete::Contact> jt( mContacts );
+ TQPtrListIterator<Kopete::Contact> 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 <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#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<MetaContact> metaContacts() const;
+ TQPtrList<MetaContact> metaContacts() const;
/**
* @return all groups
*/
- QPtrList<Group> groups() const;
+ TQPtrList<Group> 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<MetaContact> selectedMetaContacts() const;
+ TQPtrList<MetaContact> selectedMetaContacts() const;
/**
* return the list of groups actualy selected in the contactlist UI
*/
- QPtrList<Group> selectedGroups() const ;
+ TQPtrList<Group> 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<MetaContact> metaContacts , QPtrList<Group> groups);
+ void setSelectedItems(TQPtrList<MetaContact> metaContacts , TQPtrList<Group> 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<Contact> onlineContacts() const;
+ TQPtrList<Contact> onlineContacts() const;
/**
* Overloaded method of @ref onlineContacts() that only returns
* the online contacts for a single protocol
*/
- QPtrList<Contact> onlineContacts( const QString &protocolId ) const;
+ TQPtrList<Contact> onlineContacts( const TQString &protocolId ) const;
/**
* Return all meta contacts that are online
*/
- QPtrList<MetaContact> onlineMetaContacts() const;
+ TQPtrList<MetaContact> onlineMetaContacts() const;
/**
* Overloaded method of @ref onlineMetaContacts() that only returns
* the online meta contacts for a single protocol
*/
- QPtrList<MetaContact> onlineMetaContacts( const QString &protocolId ) const;
+ TQPtrList<MetaContact> 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<QString, QMap<QString, QString> > pluginData;
- QMap<ContactListElement::IconState, QString> icons;
+ TQMap<TQString, TQMap<TQString, TQString> > pluginData;
+ TQMap<ContactListElement::IconState, TQString> 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<QString, QString> &pluginData )
+void ContactListElement::setPluginData( Plugin *plugin, const TQMap<TQString, TQString> &pluginData )
{
if ( pluginData.isEmpty() )
{
@@ -63,48 +63,48 @@ void ContactListElement::setPluginData( Plugin *plugin, const QMap<QString, QStr
emit pluginDataChanged();
}
-void ContactListElement::setPluginData( Plugin *p, const QString &key, const QString &value )
+void ContactListElement::setPluginData( Plugin *p, const TQString &key, const TQString &value )
{
d->pluginData[ p->pluginId() ][ key ] = value;
emit pluginDataChanged();
}
-QMap<QString, QString> ContactListElement::pluginData( Plugin *plugin ) const
+TQMap<TQString, TQString> ContactListElement::pluginData( Plugin *plugin ) const
{
if ( !d->pluginData.contains( plugin->pluginId() ) )
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
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<QDomElement> ContactListElement::toXML()
+const TQValueList<TQDomElement> ContactListElement::toXML()
{
- QDomDocument pluginData;
- QValueList<QDomElement> pluginNodes;
- pluginData.appendChild( pluginData.createElement( QString::fromLatin1( "plugin-data" ) ) );
+ TQDomDocument pluginData;
+ TQValueList<TQDomElement> pluginNodes;
+ pluginData.appendChild( pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ) );
if ( !d->pluginData.isEmpty() )
{
- QMap<QString, QMap<QString, QString> >::ConstIterator pluginIt;
+ TQMap<TQString, TQMap<TQString, TQString> >::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<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::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<QDomElement> 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<IconState, QString >::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it )
+ for ( TQMap<IconState, TQString >::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<QDomElement> 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<QString, QString> pluginData;
- QString pluginId = element.attribute( QString::fromLatin1( "plugin-id" ), QString::null );
+ TQMap<TQString, TQString> 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 <qobject.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqdom.h>
#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<QString, QString> &value );
+ void setPluginData( Plugin *plugin, const TQMap<TQString, TQString> &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<QString, QString> pluginData( Plugin *plugin ) const;
+ TQMap<TQString, TQString> 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<QDomElement> toXML();
+ const TQValueList<TQDomElement> toXML();
/**
* Load plugin data from one Dom Element:
* It should be a <plugin-data> element or a <custom-icons> 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 <qvariant.h>
+#include <tqvariant.h>
#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<QString, ContactPropertyTmpl> Map;
+ typedef TQMap<TQString, ContactPropertyTmpl> 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<QString, ContactProperty> Map;
+ typedef TQMap<TQString, ContactProperty> 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 <qstring.h>
+#include <tqstring.h>
#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<KArchiveEntry*>(rootDir->entry(*it));
if (currentEntry->isDirectory())
{
currentDir = dynamic_cast<KArchiveDirectory*>( 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("<qt>Installing <strong>%1</strong> emoticon theme</qt>")
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<MetaContact> Group::members() const
+TQPtrList<MetaContact> Group::members() const
{
- QPtrList<MetaContact> members = ContactList::self()->metaContacts();
+ TQPtrList<MetaContact> 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<MetaContact> 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<QDomElement> pluginData = ContactListElement::toXML();
- for ( QValueList<QDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it )
+ TQValueList<TQDomElement> pluginData = ContactListElement::toXML();
+ for ( TQValueList<TQDomElement>::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<Kopete::MetaContact> list = onlineMembers();
+ TQPtrList<Kopete::MetaContact> 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<MetaContact> list = onlineMembers();
+ TQPtrList<MetaContact> 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<MetaContact> Group::onlineMembers() const
+TQPtrList<MetaContact> Group::onlineMembers() const
{
- QPtrList<MetaContact> list = members();
+ TQPtrList<MetaContact> 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 <qptrlist.h>
+#include <tqptrlist.h>
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<MetaContact> members() const;
+ TQPtrList<MetaContact> 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<MetaContact> onlineMembers() const;
+ TQPtrList<MetaContact> 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 <stdlib.h>
-#include <qcolor.h>
-#include <qbuffer.h>
-#include <qimage.h>
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqcolor.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kstringhandler.h>
#include <kmdcodec.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#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<const Contact> from;
+ TQGuardedPtr<const Contact> 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<Contact>(), QString::null, Internal,
- QString::null, TypeNormal ) )
+: d( new Private( TQDateTime::currentDateTime(), 0L, TQPtrList<Contact>(), TQString::null, Internal,
+ TQString::null, TypeNormal ) )
{
}
-Message::Message( const Contact *fromKC, const QPtrList<Contact> &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<Contact> &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<Contact> to;
+ TQPtrList<Contact> 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<Contact> &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<Contact> &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<Contact> &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<Contact> &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<Contact> &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<Contact> &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(".*<body[^>]*>(.*)</body>.*") ), QString::fromLatin1("\\1") );
+ body.replace( TQRegExp( TQString::fromLatin1(".*<body[^>]*>(.*)</body>.*") ), TQString::fromLatin1("\\1") );
//Strip <p> tags
- body.replace( QString::fromLatin1("<p>"), QString::null );
+ body.replace( TQString::fromLatin1("<p>"), TQString::null );
//Replace </p> with a <br/>
- body.replace( QString::fromLatin1("</p>"), QString::fromLatin1("<br/>") );
+ body.replace( TQString::fromLatin1("</p>"), TQString::fromLatin1("<br/>") );
//Remove trailing </br>
- if ( body.endsWith( QString::fromLatin1("<br/>") ) )
+ if ( body.endsWith( TQString::fromLatin1("<br/>") ) )
body.truncate( body.length() - 5 );
- body.remove( QString::fromLatin1("\n") );
- body.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " &nbsp;" ) );
+ body.remove( TQString::fromLatin1("\n") );
+ body.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " &nbsp;" ) );
}
/*
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( "&gt;" ), QString::fromLatin1( ">" ) );
- data.replace( QString::fromLatin1( "&lt;" ), QString::fromLatin1( "<" ) );
- data.replace( QString::fromLatin1( "&quot;" ), QString::fromLatin1( "\"" ) );
- data.replace( QString::fromLatin1( "&nbsp;" ), QString::fromLatin1( " " ) );
- data.replace( QString::fromLatin1( "&amp;" ), QString::fromLatin1( "&" ) );
- data.replace( QString::fromLatin1( "&#160;" ), QString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx;
+ data.replace( TQString::fromLatin1( "&gt;" ), TQString::fromLatin1( ">" ) );
+ data.replace( TQString::fromLatin1( "&lt;" ), TQString::fromLatin1( "<" ) );
+ data.replace( TQString::fromLatin1( "&quot;" ), TQString::fromLatin1( "\"" ) );
+ data.replace( TQString::fromLatin1( "&nbsp;" ), TQString::fromLatin1( " " ) );
+ data.replace( TQString::fromLatin1( "&amp;" ), TQString::fromLatin1( "&" ) );
+ data.replace( TQString::fromLatin1( "&#160;" ), 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( "<br />" ) );
+ html.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br />" ) );
//Replace a tab with 4 spaces
- html.replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) );
+ html.replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) );
//Replace multiple spaces with &nbsp;
//do not replace every space so we break the linebreak
- html.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "&nbsp; " ) );
+ html.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
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<a href=\"\\2\" title=\"\\2\">\\2</a>\\3" ) );
+ TQRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ),
+ TQString::fromLatin1("\\1<a href=\"\\2\" title=\"\\2\">\\2</a>\\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<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) );
+ TQRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ),
+ TQString::fromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) );
//Replace Email Links
// Replace user@domain with a mailto: link
result.replace(
- QRegExp( makeRegExp("%1@%2").arg( name, domain ) ),
- QString::fromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") );
+ TQRegExp( makeRegExp("%1@%2").arg( name, domain ) ),
+ TQString::fromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") );
//Workaround for Bug 85061: Highlighted URLs adds a ' ' after the URL itself
// the trailing &nbsp; is included in the url.
- result.replace( QRegExp( QString::fromLatin1("(<a href=\"[^\"]+)(&nbsp;)(\")") ) , QString::fromLatin1("\\1\\3") );
+ result.replace( TQRegExp( TQString::fromLatin1("(<a href=\"[^\"]+)(&nbsp;)(\")") ) , TQString::fromLatin1("\\1\\3") );
return result;
}
-QDateTime Message::timestamp() const
+TQDateTime Message::timestamp() const
{
return d->timeStamp;
}
@@ -459,7 +459,7 @@ const Contact *Message::from() const
return d->from;
}
-QPtrList<Contact> Message::to() const
+TQPtrList<Contact> 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 <ksharedptr.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdom.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#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<Contact> &toKC, const QString &body,
+ Message( const Contact *fromKC, const TQPtrList<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
@@ -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<Contact> &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<Contact> &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<Contact> &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<Contact> &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<Contact> &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<Contact> &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<Contact> to() const;
+ TQPtrList<Contact> 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 \<br /\>
* @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 &gt; &lt; add some &lt;br /&gt; or &amp;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<Private> 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 <qobject.h>
+#include <tqobject.h>
#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 <qobject.h>
+#include <tqobject.h>
//#include <kdemacros.h>
#include "kopete_export.h"
@@ -25,7 +25,7 @@
// to avoid this being included everywhere
#include "kopetemessage.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
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<MessageHandlerFactory*> FactoryList;
+ typedef TQValueList<MessageHandlerFactory*> 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 <kdebug.h>
-#include <qmap.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
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<MessageHandler*> HandlerList;
- typedef QMap<int,HandlerList> HandlerMap;
+ typedef TQValueList<MessageHandler*> HandlerList;
+ typedef TQMap<int,HandlerList> 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 <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
#include <ksharedptr.h>
#include "kopetemessage.h"
@@ -41,7 +41,7 @@ class ProcessMessageTask;
*
* @author Richard Smith <kde@metafoo.co.uk>
*/
-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<Contact> contacts;
+ TQPtrList<Contact> 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<Group> groups;
- QMap<QString, QMap<QString, QString> > addressBook;
+ TQPtrList<Group> groups;
+ TQMap<TQString, TQMap<TQString, TQString> > 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<Contact> it( d->contacts ); it.current(); ++it )
+ for ( TQPtrListIterator<Contact> 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<Contact> it( d->contacts );
+ TQPtrListIterator<Contact> 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<Contact> it( d->contacts ); it.current(); ++it )
+ for ( TQPtrListIterator<Contact> 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<Contact> it( d->contacts );
+ TQPtrListIterator<Contact> 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<Contact> it( d->contacts );
+ TQPtrListIterator<Contact> 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<Contact> it( d->contacts ); it.current(); ++it )
+ for ( TQPtrListIterator<Contact> 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<Contact> it( d->contacts );
+ TQPtrListIterator<Contact> 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<Contact> it( d->contacts ) ; it.current(); ++it )
+ for( TQPtrListIterator<Contact> 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<Kopete::Contact> it( d->contacts ) ; it.current(); ++it )
+ for( TQPtrListIterator<Kopete::Contact> 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<Group> MetaContact::groups() const
+TQPtrList<Group> 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<QDomElement> pluginData = Kopete::ContactListElement::toXML();
- for( QValueList<QDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it )
+ TQValueList<TQDomElement> pluginData = Kopete::ContactListElement::toXML();
+ for( TQValueList<TQDomElement>::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<QString, QString> map= pluginData( p );
+ TQMap<TQString, TQString> 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<Contact> MetaContact::contacts() const
+TQPtrList<Contact> 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 <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kdemacros.h>
#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<Contact> contacts() const;
+ TQPtrList<Contact> contacts() const;
/**
* @brief The groups the contact is stored in
*/
- QPtrList<Group> groups() const;
+ TQPtrList<Group> 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 <kdebug.h>
#include <kiconloader.h>
-#include <qdragobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdragobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
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 <qmime.h>
+#include <tqmime.h>
#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 <qwidget.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -36,8 +36,8 @@ namespace Kopete
namespace
{
- static QDict<Kopete::MimeTypeHandler> g_mimeHandlers;
- static QDict<Kopete::MimeTypeHandler> g_protocolHandlers;
+ static TQDict<Kopete::MimeTypeHandler> g_mimeHandlers;
+ static TQDict<Kopete::MimeTypeHandler> 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 <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "kopetenotifydataobject.h"
#include "kopetenotifyevent.h"
@@ -23,7 +23,7 @@
class Kopete::NotifyDataObject::Private
{
public:
- QDict<Kopete::NotifyEvent> events;
+ TQDict<Kopete::NotifyEvent> 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() )
{
//<custom-notifications>
- notifications = notify.createElement( QString::fromLatin1( "custom-notifications" ) );
- QDictIterator<Kopete::NotifyEvent> it( d->events );
+ notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) );
+ TQDictIterator<Kopete::NotifyEvent> it( d->events );
for ( ; it.current(); ++it )
{
//<event name="..." suppress-common="true|false">
- 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<QDomElement> 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<TQDomElement> presentations = it.current()->toXML();
//<sound-notification enabled="true|false" src="..." single-shot="">
- for ( QValueList<QDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it )
+ for ( TQValueList<TQDomElement>::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 <qdict.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#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 <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "kopetenotifyevent.h"
#include "kopeteeventpresentation.h"
@@ -138,39 +138,39 @@ void Kopete::NotifyEvent::setSuppressCommon( const bool suppress )
m_suppressCommon = suppress;
}
-const QValueList<QDomElement> Kopete::NotifyEvent::toXML() const
+const TQValueList<TQDomElement> Kopete::NotifyEvent::toXML() const
{
- QDomDocument eventData;
- QValueList<QDomElement> eventNodes;
+ TQDomDocument eventData;
+ TQValueList<TQDomElement> 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 <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kopeteeventpresentation.h"
#include "kopete_export.h"
@@ -45,10 +45,10 @@ public:
bool firePresentation( const EventPresentation::PresentationType type );
void setSuppressCommon( bool suppress );
- const QValueList<QDomElement> toXML() const;
- QString toString();
+ const TQValueList<TQDomElement> 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 <kdemacros.h>
#include <ksharedptr.h>
-#include <qobject.h>
+#include <tqobject.h>
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<Private> 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<Protocol* , ProtocolMap > registeredStatus;
- QDict< QPixmap > iconCache;
+ TQPixmap *nullPixmap;
+ TQMap<Protocol* , ProtocolMap > 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<KAction*>( 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 <qobject.h>
+#include <tqobject.h>
#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 <kwallet.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kactivelabel.h>
#include <kapplication.h>
@@ -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( "<qt>Kopete is unable to save your password securely in your wallet;<br>"
"do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ),
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 <qobject.h>
+#include <tqobject.h>
#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 <klocale.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
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( "<b>The password was wrong;</b> please re-enter your password for %1 account <b>%2</b>" ).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 <qbuffer.h>
+#include <tqbuffer.h>
#include <kabc/picture.h>
@@ -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 <ksharedptr.h>
#include "kopete_export.h"
-#include <qimage.h>
+#include <tqimage.h>
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 <michael.larouche@kdemail.net>
@@ -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<QString, QString> & /* stream */ )
+ const TQMap<TQString, TQString> & /* 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 <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
#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. <duncan@kde.org>
* @author Olivier Goffart <ogoffart @ tiscalinet.be>
*/
-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<QString, QString> &data );
+ virtual void deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &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 <valgrind/valgrind.h>
#endif
-#include <qapplication.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -56,11 +56,11 @@ public:
Private() : shutdownMode( StartingUp ), isAllPluginsLoaded(false) {}
// All available plugins, regardless of category, and loaded or not
- QValueList<KPluginInfo *> plugins;
+ TQValueList<KPluginInfo *> plugins;
// Dict of all currently loaded plugins, mapping the KPluginInfo to
// a plugin
- typedef QMap<KPluginInfo *, Plugin *> InfoToPluginMap;
+ typedef TQMap<KPluginInfo *, Plugin *> 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<QString> pluginsToLoad;
+ TQValueStack<TQString> pluginsToLoad;
static KStaticDeleter<PluginManager> 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<KPluginInfo *> PluginManager::availablePlugins( const QString &category ) const
+TQValueList<KPluginInfo *> PluginManager::availablePlugins( const TQString &category ) const
{
if ( category.isEmpty() )
return d->plugins;
- QValueList<KPluginInfo *> result;
- QValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *> result;
+ TQValueList<KPluginInfo *>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->category() == category )
@@ -135,7 +135,7 @@ QValueList<KPluginInfo *> 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<Plugin *>( const_cast<QObject *>( sender() ) );
+ Plugin *plugin = dynamic_cast<Plugin *>( const_cast<TQObject *>( 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<QString, bool> pluginsMap;
+ TQMap<TQString, bool> pluginsMap;
- QMap<QString, QString> entries = config->entryMap( QString::fromLatin1( "Plugins" ) );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString> entries = config->entryMap( TQString::fromLatin1( "Plugins" ) );
+ TQMap<TQString, TQString>::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<KPluginInfo *> plugins = availablePlugins( QString::null );
- QValueList<KPluginInfo *>::ConstIterator it2 = plugins.begin();
- QValueList<KPluginInfo *>::ConstIterator end = plugins.end();
+ TQValueList<KPluginInfo *> plugins = availablePlugins( TQString::null );
+ TQValueList<KPluginInfo *>::ConstIterator it2 = plugins.begin();
+ TQValueList<KPluginInfo *>::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<KPluginInfo *> plugins = availablePlugins( QString::null );
- QValueList<KPluginInfo *>::ConstIterator it = plugins.begin();
- QValueList<KPluginInfo *>::ConstIterator end = plugins.end();
+ TQValueList<KPluginInfo *> plugins = availablePlugins( TQString::null );
+ TQValueList<KPluginInfo *>::ConstIterator it = plugins.begin();
+ TQValueList<KPluginInfo *>::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<Plugin>( QString::fromLatin1( "Kopete/Plugin" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, QStringList(), &error );
+ Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Plugin>( 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<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *>::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 <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "kopete_export.h"
@@ -34,7 +34,7 @@ namespace Kopete
class Plugin;
-typedef QValueList<Plugin*> PluginList;
+typedef TQValueList<Plugin*> PluginList;
/**
* @author Duncan Mac-Vicar Prett <duncan@kde.org>
@@ -63,14 +63,14 @@ public:
* You can query all information on the plugins through the KPluginInfo
* interface.
*/
- QValueList<KPluginInfo *> availablePlugins( const QString &category = QString::null ) const;
+ TQValueList<KPluginInfo *> 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 <qfile.h>
-#include <qfont.h>
-#include <qmetaobject.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqmetaobject.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
#include <kdeversion.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#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 <kdebug.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <typeinfo>
namespace Kopete {
@@ -34,15 +34,15 @@ void customPropertyDataIncorrectType( const char *name, const std::type_info &fo
}
template<>
-int variantTo<int>(QVariant) { return 0; }
+int variantTo<int>(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 <qasciidict.h>
+#include <tqasciidict.h>
#include <typeinfo>
@@ -77,8 +77,8 @@ public:
*
* \code
* SomeParent *propertyContainer = ...
- * Property<SomeParent,QString> &myProperty = ...
- * QString value = propertyContainer->property(myProperty);
+ * Property<SomeParent,TQString> &myProperty = ...
+ * TQString value = propertyContainer->property(myProperty);
* propertyContainer->setProperty(myProperty, "hello");
* \endcode
*
@@ -121,7 +121,7 @@ struct PropertyData
*/
class PropertyStorage
{
- typedef QAsciiDict<PropertyData> PropertyDict;
+ typedef TQAsciiDict<PropertyData> 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<class Parent>
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<class Parent>
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<class Parent>
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<class T> T variantTo(QVariant);
+template<class T> 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<Contact,QString>
- * , XMLProperty<ContactNickNameProperty,Contact,QString>
+ * : public SimpleDataProperty<Contact,TQString>
+ * , XMLProperty<ContactNickNameProperty,Contact,TQString>
* {
* public:
* const char *name() const { return "nickName"; }
@@ -331,13 +331,13 @@ template<class Derived, class Parent, typename Type>
class XMLProperty : public XMLSerializable<Parent>
{
public:
- void fromXML( Parent *t, const QDomElement &e )
+ void fromXML( Parent *t, const TQDomElement &e )
{
static_cast<Derived*>(this)->set(t, variantTo<Type>(variantFromXML(e)));
}
- void toXML( const Parent *t, QDomElement &e )
+ void toXML( const Parent *t, TQDomElement &e )
{
- variantToXML(QVariant(static_cast<Derived*>(this)->get(t)),e);
+ variantToXML(TQVariant(static_cast<Derived*>(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 <kaction.h>
#include <klocale.h>
-#include <qdict.h>
+#include <tqdict.h>
#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<Account> accounts = AccountManager::self()->accounts( this );
+ TQDict<Account> 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<Account> it( accounts ); it.current() ; ++it )
+ for( TQDictIterator<Account> 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<Account> dict = AccountManager::self()->accounts( this );
+ TQDict<Account> 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<Account> accounts = AccountManager::self()->accounts( this );
+ TQDict<Account> accounts = AccountManager::self()->accounts( this );
if ( accounts.isEmpty() )
emit readyForUnload();
- else for ( QDictIterator<Account> it( accounts ); it.current() ; ++it )
+ else for ( TQDictIterator<Account> 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<QString, QString> serializedData, sd;
- QMap<QString, QString> addressBookData, ad;
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString> serializedData, sd;
+ TQMap<TQString, TQString> addressBookData, ad;
+ TQMap<TQString, TQString>::Iterator it;
//kdDebug( 14010 ) << "Protocol::metaContactAboutToSave: protocol " << pluginId() << ": serializing " << metaContact->displayName() << endl;
- QPtrList<Contact> contacts=metaContact->contacts();
+ TQPtrList<Contact> 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<QString, QString> &data )
+void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &data )
{
/*kdDebug( 14010 ) << "Protocol::deserialize: protocol " <<
pluginId() << ": deserializing " << metaContact->displayName() << endl;*/
- QMap<QString, QStringList> serializedData;
- QMap<QString, QStringList::Iterator> serializedDataIterators;
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQStringList> serializedData;
+ TQMap<TQString, TQStringList::Iterator> serializedDataIterators;
+ TQMap<TQString, TQString>::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<QString, QString> sd;
- QMap<QString, QStringList::Iterator>::Iterator serializedDataIt;
+ TQMap<TQString, TQString> sd;
+ TQMap<TQString, TQStringList::Iterator>::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<QString, QStrin
// never notice, since none of the plugins use the address
// book data in the deserializer yet, only when serializing.
// - Martijn
- QMap<QString, QString> ad;
- QStringList kabcFields = addressBookFields();
- for( QStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt )
+ TQMap<TQString, TQString> 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<QString, QStrin
// who migrate from 0.6, as there's only one account in that case
if( accountId.isNull() )
{
- QDict<Account> accounts = AccountManager::self()->accounts( this );
+ TQDict<Account> accounts = AccountManager::self()->accounts( this );
if ( accounts.count() > 0 )
{
- sd[ QString::fromLatin1( "accountId" ) ] = QDictIterator<Account>( accounts ).currentKey();
+ sd[ TQString::fromLatin1( "accountId" ) ] = TQDictIterator<Account>( accounts ).currentKey();
}
else
{
@@ -326,8 +326,8 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap<QString, QStrin
Contact *Protocol::deserializeContact(
MetaContact */*metaContact */,
- const QMap<QString, QString> & /* serializedData */,
- const QMap<QString, QString> & /* addressBookData */ )
+ const TQMap<TQString, TQString> & /* serializedData */,
+ const TQMap<TQString, TQString> & /* 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<Protocol>
+ * @todo Ideally, the destructor should be protected. but we need it public to allow TQPtrList<Protocol>
*/
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<QString, QString> &serializedData );
+ virtual void deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &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<QString, QString> &serializedData,
- const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &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 <kstaticdeleter.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
namespace Kopete
{
@@ -31,12 +31,12 @@ class SimpleMessageHandlerFactory::Private
public:
Message::MessageDirection direction;
int position;
- QGuardedPtr<QObject> target;
+ TQGuardedPtr<TQObject> 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 <klocale.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace Kopete
{
@@ -33,8 +33,8 @@ public:
}
Task::Result result;
- QString errorMessage;
- QPtrList<Task> subtasks;
+ TQString errorMessage;
+ TQPtrList<Task> 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 <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
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("<unknown>");
+ TQString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n("<unknown>");
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<unsigned, Kopete::Transfer*>::Iterator it = mTransfersMap.begin();
+ for( TQMap<unsigned, Kopete::Transfer*>::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 <qobject.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "kopete_export.h"
#include <kio/job.h>
@@ -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<unsigned int, Transfer *> mTransfersMap;
+ TQMap<unsigned int, Transfer *> 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 <qguardedptr.h>
+#include <tqguardedptr.h>
namespace Kopete
@@ -26,16 +26,16 @@ namespace Kopete
namespace
{
- QGuardedPtr<QWidget> g_mainWidget;
+ TQGuardedPtr<TQWidget> 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 <qwidget.h>
+#include <tqwidget.h>
#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 <qmap.h>
+#include <tqmap.h>
#include <kmessagebox.h>
#include <knotifyclient.h>
@@ -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 <kstaticdeleter.h>
#include <kwallet.h>
-#include <qtimer.h>
-#include <qwidget.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
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 <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
@@ -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 <kdebug.h>
-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 <qstringlist.h>
+#include <tqstringlist.h>
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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#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 <i>command</i>
@@ -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 <qdom.h>
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qimage.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqimage.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -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<QChar, QValueList<Emoticon> > emoticonMap;
- QMap<QString, QStringList> emoticonAndPicList;
+ TQMap<TQChar, TQValueList<Emoticon> > emoticonMap;
+ TQMap<TQString, TQStringList> 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::Token> Emoticons::tokenizeEmoticons( const QString& message, ParseMode mode ) // static
+TQValueList<Emoticons::Token> Emoticons::tokenizeEmoticons( const TQString& message, ParseMode mode ) // static
{
return self()->tokenize( message, mode );
}
-QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint mode )
+TQValueList<Emoticons::Token> Emoticons::tokenize( const TQString& message, uint mode )
{
- QValueList<Token> result;
+ TQValueList<Token> result;
if ( !KopetePrefs::prefs()->useEmoticons() )
{
result.append( Token( Text, message ) );
@@ -115,23 +115,23 @@ QValueList<Emoticons::Token> 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<EmoticonNode> foundEmoticons;
- QValueList<EmoticonNode>::const_iterator found;
+ TQValueList<EmoticonNode> foundEmoticons;
+ TQValueList<EmoticonNode>::const_iterator found;
/* First-pass, store the matched emoticon locations in foundEmoticons */
- QValueList<Emoticon> emoticonList;
- QValueList<Emoticon>::const_iterator it;
+ TQValueList<Emoticon> emoticonList;
+ TQValueList<Emoticon>::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::Token> 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( "<img align=\"center\" src=\"" ) +
+ result = TQString::fromLatin1( "<img align=\"center\" src=\"" ) +
e.picPath +
- QString::fromLatin1( "\" title=\"" ) +
+ TQString::fromLatin1( "\" title=\"" ) +
matchEscaped +
- QString::fromLatin1( "\" width=\"" ) +
- QString::number( p.width() ) +
- QString::fromLatin1( "\" height=\"" ) +
- QString::number( p.height() ) +
- 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" <<endl;
}
-void Emoticons::initEmoticon_emoticonsxml( const QString & filename)
+void Emoticons::initEmoticon_emoticonsxml( const TQString & filename)
{
- QDomDocument emoticonMap( QString::fromLatin1( "messaging-emoticon-map" ) );
+ TQDomDocument emoticonMap( TQString::fromLatin1( "messaging-emoticon-map" ) );
- QFile mapFile( filename );
+ TQFile mapFile( filename );
mapFile.open( IO_ReadOnly );
emoticonMap.setContent( &mapFile );
- QDomElement list = emoticonMap.documentElement();
- QDomNode node = list.firstChild();
+ TQDomElement list = emoticonMap.documentElement();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
- if( element.tagName() == QString::fromLatin1( "emoticon" ) )
+ if( element.tagName() == TQString::fromLatin1( "emoticon" ) )
{
- QString emoticon_file = element.attribute(
- QString::fromLatin1( "file" ), QString::null );
- QStringList items;
+ TQString emoticon_file = element.attribute(
+ TQString::fromLatin1( "file" ), TQString::null );
+ TQStringList items;
- QDomNode emoticonNode = node.firstChild();
+ TQDomNode emoticonNode = node.firstChild();
while( !emoticonNode.isNull() )
{
- QDomElement emoticonElement = emoticonNode.toElement();
+ TQDomElement emoticonElement = emoticonNode.toElement();
if( !emoticonElement.isNull() )
{
- if( emoticonElement.tagName() == QString::fromLatin1( "string" ) )
+ if( emoticonElement.tagName() == TQString::fromLatin1( "string" ) )
{
items << emoticonElement.text();
}
@@ -430,42 +430,42 @@ void Emoticons::initEmoticon_emoticonsxml( const QString & filename)
}
-void Emoticons::initEmoticon_JEP0038( const QString & filename)
+void Emoticons::initEmoticon_JEP0038( const TQString & filename)
{
- QDomDocument emoticonMap( QString::fromLatin1( "icondef" ) );
+ TQDomDocument emoticonMap( TQString::fromLatin1( "icondef" ) );
- QFile mapFile( filename );
+ TQFile mapFile( filename );
mapFile.open( IO_ReadOnly );
emoticonMap.setContent( &mapFile );
- QDomElement list = emoticonMap.documentElement();
- QDomNode node = list.firstChild();
+ TQDomElement list = emoticonMap.documentElement();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
- if( element.tagName() == QString::fromLatin1( "icon" ) )
+ if( element.tagName() == TQString::fromLatin1( "icon" ) )
{
- QStringList items;
- QString emoticon_file;
+ TQStringList items;
+ TQString emoticon_file;
- QDomNode emoticonNode = node.firstChild();
+ TQDomNode emoticonNode = node.firstChild();
while( !emoticonNode.isNull() )
{
- QDomElement emoticonElement = emoticonNode.toElement();
+ TQDomElement emoticonElement = emoticonNode.toElement();
if( !emoticonElement.isNull() )
{
- if( emoticonElement.tagName() == QString::fromLatin1( "text" ) )
+ if( emoticonElement.tagName() == TQString::fromLatin1( "text" ) )
{
//TODO xml:lang
items << emoticonElement.text();
}
- else if( emoticonElement.tagName() == QString::fromLatin1( "object" ) && emoticon_file.isEmpty() )
+ else if( emoticonElement.tagName() == TQString::fromLatin1( "object" ) && emoticon_file.isEmpty() )
{
- QString mime= emoticonElement.attribute(
- QString::fromLatin1( "mime" ), QString::fromLatin1("image/*") );
- if(mime.startsWith(QString::fromLatin1("image/")) && !mime.endsWith(QString::fromLatin1("/svg+xml")))
+ TQString mime= emoticonElement.attribute(
+ TQString::fromLatin1( "mime" ), TQString::fromLatin1("image/*") );
+ if(mime.startsWith(TQString::fromLatin1("image/")) && !mime.endsWith(TQString::fromLatin1("/svg+xml")))
{
emoticon_file = emoticonElement.text();
}
@@ -503,11 +503,11 @@ void Emoticons::sortEmoticons()
{
/* sort strings in order of longest to shortest to provide convenient input for
greedy matching in the tokenizer */
- QValueList<QChar> keys = d->emoticonMap.keys();
- for ( QValueList<QChar>::const_iterator it = keys.begin(); it != keys.end(); ++it )
+ TQValueList<TQChar> keys = d->emoticonMap.keys();
+ for ( TQValueList<TQChar>::const_iterator it = keys.begin(); it != keys.end(); ++it )
{
- QChar key = (*it);
- QValueList<Emoticon> keyValues = d->emoticonMap[key];
+ TQChar key = (*it);
+ TQValueList<Emoticon> keyValues = d->emoticonMap[key];
qHeapSort(keyValues.begin(), keyValues.end());
d->emoticonMap[key] = keyValues;
}
@@ -516,21 +516,21 @@ void Emoticons::sortEmoticons()
-QMap<QString, QStringList> Emoticons::emoticonAndPicList()
+TQMap<TQString, TQStringList> 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<Token> tokens = tokenize( message, mode );
- QValueList<Token>::const_iterator token;
- QString result;
- QPixmap p;
+ TQValueList<Token> tokens = tokenize( message, mode );
+ TQValueList<Token>::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 <qobject.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#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<Token> tokenizeEmoticons( const QString &message, ParseMode mode = DefaultParseMode );
+ static TQValueList<Token> 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<Token> tokenize( const QString &message, uint mode = DefaultParseMode );
+ TQValueList<Token> tokenize( const TQString &message, uint mode = DefaultParseMode );
/**
* Return all emoticons and the corresponding icon.
* (only one emoticon per image)
*/
- QMap<QString, QStringList> emoticonAndPicList();
+ TQMap<TQString, TQStringList> 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 <qmap.h>
+#include <tqmap.h>
#include <kmessagebox.h>
@@ -49,7 +49,7 @@ NotifyHelper* NotifyHelper::self()
void NotifyHelper::slotEventActivated(unsigned int action)
{
- const KNotification *n = dynamic_cast<const KNotification *>(QObject::sender());
+ const KNotification *n = dynamic_cast<const KNotification *>(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<const KNotification *>(QObject::sender());
+ const KNotification *n = dynamic_cast<const KNotification *>(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<const KNotification*, ErrorNotificationInfo> m_events;
+ TQMap<const KNotification*, ErrorNotificationInfo> 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 <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qptrlist.h>
-#include <qstylesheet.h>
+#include <tqptrlist.h>
+#include <tqstylesheet.h>
#include <kplugininfo.h>
#include <knotification.h>
#include <kglobal.h>
@@ -39,8 +39,8 @@
#include "kopeteviewmanager.h"
-typedef QMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
-typedef QPtrList<Kopete::MessageEvent> EventList;
+typedef TQMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
+typedef TQPtrList<Kopete::MessageEvent> 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<QWidget*>(view( manager )) ) )
+ TQWidget *w;
+ if( d->queueUnreadMessages && ( w = dynamic_cast<TQWidget*>(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<QWidget*>(manager->view(false));
+ TQWidget *w=dynamic_cast<TQWidget*>(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( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
+ TQString event;
+ TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
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( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" );
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<Kopete::MessageEvent> it( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> 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<Kopete::MessageEvent> it( d->eventList ); it; ++it )
+ for( TQPtrListIterator<Kopete::MessageEvent> 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<Kopete::MessageEvent> it ( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> 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 <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kstandarddirs.h>
#include <kunittest/module.h>
#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 <stdlib.h>
-#include <qstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -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 <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kinstance.h>
@@ -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 = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>";
+ TQString m = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>";
Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText);
CHECK(m, msg.plainBody());
msg.setBody("<simple> SIMPLE", Kopete::Message::PlainText);
- CHECK(msg.plainBody(), QString("<simple> SIMPLE") );
- CHECK(msg.escapedBody(), QString("&lt;simple&gt; SIMPLE") );
+ CHECK(msg.plainBody(), TQString("<simple> SIMPLE") );
+ CHECK(msg.escapedBody(), TQString("&lt;simple&gt; SIMPLE") );
msg.setBody("<simple>SIMPLE</simple>", Kopete::Message::RichText);
- CHECK(msg.plainBody(), QString("SIMPLE") );
- CHECK(msg.escapedBody(), QString("<simple>SIMPLE</simple>") );
+ CHECK(msg.plainBody(), TQString("SIMPLE") );
+ CHECK(msg.escapedBody(), TQString("<simple>SIMPLE</simple>") );
- CHECK(Kopete::Message::unescape( QString( "<simple>SIMPLE</simple>" ) ), QString("SIMPLE") );
- CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" />" ) ), QString("Foo ") );
- CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), QString("Foo Bar") );
+ CHECK(Kopete::Message::unescape( TQString( "<simple>SIMPLE</simple>" ) ), TQString("SIMPLE") );
+ CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" />" ) ), TQString("Foo ") );
+ CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), 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("<b>HELLO WORLD</b>"));
+ //CHECK(msg.plainBody(), TQString("HELLO WORLD"));
+ //CHECK(msg.escapedBody(), TQString("<b>HELLO WORLD</b>"));
- CHECK(msg.escapedBody(), QString(" &nbsp; <b>HELLO WORLD</b> &nbsp; "));
- CHECK(msg.plainBody(), QString(" HELLO WORLD "));
- CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD"));
- CHECK(msg.escapedBody().stripWhiteSpace(), QString("&nbsp; <b>HELLO WORLD</b> &nbsp;"));
+ CHECK(msg.escapedBody(), TQString(" &nbsp; <b>HELLO WORLD</b> &nbsp; "));
+ CHECK(msg.plainBody(), TQString(" HELLO WORLD "));
+ CHECK(msg.plainBody().stripWhiteSpace(), TQString("HELLO WORLD"));
+ CHECK(msg.escapedBody().stripWhiteSpace(), TQString("&nbsp; <b>HELLO WORLD</b> &nbsp;"));
}
{
Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, Kopete::Message::PlainText);
msg.setBody("<p>foo", Kopete::Message::RichText);
- CHECK(msg.escapedBody(), QString("foo"));
+ CHECK(msg.escapedBody(), TQString("foo"));
msg.setBody("<p>foo</p>", Kopete::Message::RichText);
- CHECK(msg.escapedBody(), QString("foo"));
+ CHECK(msg.escapedBody(), TQString("foo"));
msg.setBody("\n<p>foo</p>\n<br/>", Kopete::Message::RichText);
- CHECK(msg.escapedBody(), QString("foo<br/>"));
+ CHECK(msg.escapedBody(), TQString("foo<br/>"));
}
/**********************************************
@@ -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 <qtextstream.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -28,7 +28,7 @@
#include <kglobal.h>
#include <kstandarddirs.h>
-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 <qobject.h>
+#include <tqobject.h>
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 <qstring.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -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<PropertyHost> {};
-class FooProperty : public SimpleDataProperty<PropertyHost, QString>
+class FooProperty : public SimpleDataProperty<PropertyHost, TQString>
{
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 <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
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 <qheader.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klistview.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(d->proto);
- QDictIterator<Kopete::Account> it(accounts);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(d->proto);
+ TQDictIterator<Kopete::Account> 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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<AccountListViewItem *>(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<AccountListViewItem *>(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 <qwidget.h>
+#include <tqwidget.h>
#include <kopeteprotocol.h>
#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 <qwidget.h>
+#include <tqwidget.h>
#include <kopeteprotocol.h>
#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 <qapplication.h>
+#include <tqapplication.h>
#include <klineedit.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -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 <kdialogbase.h>
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qvbox.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kdialog.h>
@@ -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 <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <klocale.h>
@@ -39,9 +39,9 @@
#include <kdebug.h>
#include <klistview.h>
#include <klistviewsearchline.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "addressbookselectorwidget.h"
#include <addresseeitem.h>
@@ -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 <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
#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 <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -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 <qvbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qstylesheet.h>
-#include <qapplication.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqstylesheet.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -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("<qt><img src=\"kopete-account-icon:%1\" /> The contact <b>%2</b> has added you to his/her contactlist. (Account %3)</qt>")
- .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 <qtextedit.h>
+#include <tqtextedit.h>
#include <klineedit.h>
#include <kconfig.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#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 <qapplication.h>
+#include <tqapplication.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <utility>
#include <memory>
@@ -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<Item*>( 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<QString,QRect> toolTip = item->toolTip( relativePos );
+ std::pair<TQString,TQRect> 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> 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<MyWidget*>( viewport() )->clearWFlags( WStaticContents );
// static_cast<MyWidget*>( 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 <kiconloader.h>
#include <kstringhandler.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qheader.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqheader.h>
+#include <tqstyle.h>
#ifdef HAVE_XRENDER
# include <X11/Xlib.h>
@@ -54,7 +54,7 @@ namespace ListView {
class ComponentBase::Private
{
public:
- QPtrList<Component> components;
+ TQPtrList<Component> 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<QString,QRect> ComponentBase::toolTip( const QPoint &relativePos )
+std::pair<TQString,TQRect> 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<QString,QRect> Component::toolTip( const QPoint &relativePos )
+std::pair<TQString,TQRect> 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<Kopete::Emoticons::Token> tokens;
- QValueList<Kopete::Emoticons::Token>::const_iterator token;
+ TQValueList<Kopete::Emoticons::Token> tokens;
+ TQValueList<Kopete::Emoticons::Token>::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<QString,QRect> ContactComponent::toolTip( const QPoint &/*relativePos*/ )
+std::pair<TQString,TQRect> 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 <kopetecontact.h>
#include <utility>
-#include <qimage.h>
+#include <tqimage.h>
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<QString,QRect> toolTip( const QPoint &relativePos );
+ virtual std::pair<TQString,TQRect> 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<QString,QRect> toolTip( const QPoint &relativePos );
+ std::pair<TQString,TQRect> 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<QString,QRect> toolTip( const QPoint &relativePos );
+ std::pair<TQString,TQRect> 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 <kde@metafoo.co.uk>
*/
-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<Item*>( 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 <kpassdlg.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
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 <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -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 <kaction.h>
-#include <qobject.h>
+#include <tqobject.h>
#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<Kopete::Message> msgs)
+void KopeteView::appendMessages(TQValueList<Kopete::Message> msgs)
{
- QValueList<Kopete::Message>::iterator it;
+ TQValueList<Kopete::Message>::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 <qvaluelist.h>
+#include <tqvaluelist.h>
#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<Kopete::Message> );
+ virtual void appendMessages( TQValueList<Kopete::Message> );
/**
* @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 <qwidgetplugin.h>
+#include <tqwidgetplugin.h>
#include <kinstance.h>
#include <addressbooklinkwidget.h>
@@ -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<QString, WidgetInfo> WidgetInfos;
+ typedef TQMap<TQString, WidgetInfo> 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 <qcheckbox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qvaluelist.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqvaluelist.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -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<Kopete::Contact> contacts = d->metaContact->contacts();
+ TQPtrList<Kopete::Contact> 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<Kopete::MetaContact *> excludedMetaContacts;
+ TQValueList<Kopete::MetaContact *> 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<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts();
+ TQPtrList<Kopete::MetaContact> 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 <kdemacros.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#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 <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
namespace Kopete {
struct UserInfoDialog::UserInfoDialogPrivate {
- QString name;
- QString id;
- QString awayMessage;
- QString status;
- QString warningLevel;
- QString onlineSince;
- QString info;
- QString address;
- QString phone;
- QMap<QString,QString> customFields;
- QVBoxLayout *topLayout;
- QWidget *page;
+ TQString name;
+ TQString id;
+ TQString awayMessage;
+ TQString status;
+ TQString warningLevel;
+ TQString onlineSince;
+ TQString info;
+ TQString address;
+ TQString phone;
+ TQMap<TQString,TQString> 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("<div id=\"name\"><b>") + i18n("Name : ") +
- QString("</b>") );
- text.append( d->name + QString("</div><br>") );
+ text.append( TQString("<div id=\"name\"><b>") + i18n("Name : ") +
+ TQString("</b>") );
+ text.append( d->name + TQString("</div><br>") );
}
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 <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <qcolor.h>
-#include <qpainter.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
#include <kdebug.h>
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<QRect> rects = event->region().rects();
+ TQMemArray<TQRect> 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 <qwidget.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
#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 <kdebug.h>
#include <kbookmark.h>
-#include <qvariant.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#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("<title>([^<]*){1,96}</title>");
+ TQTextCodec *codec = getPageEncoding( data );
+ TQString htmlpage = codec->toUnicode( data );
+ TQRegExp rx("<title>([^<]*){1,96}</title>");
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("<a href=\"[^\\s\"]+\"");
+ TQRegExp rx("<a href=\"[^\\s\"]+\"");
int pos=0;
KURL url;
@@ -119,7 +119,7 @@ KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text )
return list;
}
-void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender )
+void BookmarksPlugin::addKopeteBookmark( const KURL& url, const TQString& sender )
{
KBookmarkGroup group = getKopeteFolder();
@@ -133,8 +133,8 @@ void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender
// make asynchronous transfer to avoid GUI freezing due to overloaded web servers
transfer = KIO::get(url, false, false);
transfer->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("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>");
+ TQString temp = TQString::fromLatin1(data);
+ TQRegExp rx("<meta[^>]*(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 <kopeteplugin.h>
#include <kbookmarkmanager.h>
#include <kio/job.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqmap.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -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<KIO::TransferJob*,URLandName> JobsToURLsMap;
+ typedef TQMap<KIO::TransferJob*,URLandName> 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<BookmarksPlugin> 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 <kgenericfactory.h>
#include <kopetepluginmanager.h>
#include <kopetecontactlist.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qlistbox.h>
-#include <qnamespace.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqlistbox.h>
+#include <tqnamespace.h>
+#include <tqradiobutton.h>
typedef KGenericFactory<BookmarksPreferences> 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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -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<AliasPlugin> 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 <kgenericfactory.h>
#include <kmessagebox.h>
#include <kconfig.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <kplugininfo.h>
#include <kiconloader.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kopetecommandhandler.h"
#include "kopetepluginmanager.h"
@@ -35,11 +35,11 @@ typedef KGenericFactory<AliasPreferences> 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<AliasItem*>( 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<Kopete::Protocol*, QString> pr( protocol, *it );
+ QPair<Kopete::Protocol*, TQString> 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<Kopete::Protocol*,QString>( *it, alias ), true );
+ protocolMap.insert( QPair<Kopete::Protocol*,TQString>( *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("<qt>Could not add alias <b>%1</b>. 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<KPluginInfo*> plugins = Kopete::PluginManager::self()->availablePlugins("Protocols");
- for( QValueList<KPluginInfo*>::Iterator it = plugins.begin(); it != plugins.end(); ++it )
+ TQValueList<KPluginInfo*> plugins = Kopete::PluginManager::self()->availablePlugins("Protocols");
+ for( TQValueList<KPluginInfo*>::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<AliasItem*>( 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("<qt>Could not add alias <b>%1</b>. 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<AliasItem*>( 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<Kopete::Protocol*,QString>( *it, i->text(0) ) );
+ protocolMap.erase( QPair<Kopete::Protocol*,TQString>( *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<Kopete::Protocol*> ProtocolList;
+typedef TQValueList<Kopete::Protocol*> 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<Kopete::Protocol*,ProtocolItem*> itemMap;
- QMap<QPair<Kopete::Protocol*,QString>, bool> protocolMap;
- QMap<QString,AliasItem*> aliasMap;
+ TQMap<Kopete::Protocol*,ProtocolItem*> itemMap;
+ TQMap<QPair<Kopete::Protocol*,TQString>, bool> protocolMap;
+ TQMap<TQString,AliasItem*> 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 <qobject.h>
+#include <tqobject.h>
#include <kpushbutton.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <klineedit.h>
#include <klistview.h>
-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 <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#ifndef AutoReplaceConfig_H
#define AutoReplaceConfig_H
@@ -31,7 +31,7 @@ public:
void save();
void load();
- typedef QMap<QString, QString> WordsToReplace;
+ typedef TQMap<TQString, TQString> 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<AutoReplacePlugin> 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 <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#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 <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlistview.h>
#include <klocale.h>
#include <klineedit.h>
@@ -36,10 +36,10 @@ typedef KGenericFactory<AutoReplacePreferences> 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 <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -28,15 +28,15 @@
typedef KGenericFactory<ConnectionStatusPlugin> 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 <qlabel.h>
-#include <qtextedit.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
#include <klocale.h>
@@ -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 <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kdialogbase.h>
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<ContactNotesPlugin> 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 <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#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<Kopete::Contact> mb=parent->members();
+ TQPtrList<Kopete::Contact> mb=parent->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
@@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
setInstance( KGenericFactory<CryptographyPlugin>::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<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
+ TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(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 <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
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 <qstylesheet.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kaction.h>
@@ -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( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
+const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
typedef KGenericFactory<CryptographyPlugin> 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<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> 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( "<br/>" ) )
- .replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
- .replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "&nbsp; " ) );
+ plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) )
+ .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Outgoing Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ plainBody
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
body = Kopete::Message::escape( body );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Incoming Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ body
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -230,11 +230,11 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(msg.direction() != Kopete::Message::Outbound)
return;
- QStringList keys;
- QPtrList<Kopete::Contact> contactlist = msg.to();
+ TQStringList keys;
+ TQPtrList<Kopete::Contact> 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<QString, QString> m_cachedMessages;
+ TQMap<TQString, TQString> 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 <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kgenericfactory.h>
@@ -27,12 +27,12 @@
typedef KGenericFactory<CryptographyPreferences> 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 <klocale.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#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 <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocio.h>
@@ -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('<',"&lt;");
- QString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
+ TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
if (counter>1)
- passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(QString::number(4-counter)));
+ passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").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 <unistd.h>
#include <sys/wait.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kprocess.h>
#include <kiconloader.h>
@@ -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 <qlayout.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <kdeversion.h>
#include <klistview.h>
@@ -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("<b>Public keys list</b>: select the key that will be used for encryption."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBarmor,i18n("<b>ASCII encryption</b>: makes it possible to open the encrypted file/message in a text editor"));
- QWhatsThis::add
+ TQWhatsThis::add
(CBhideid,i18n("<b>Hide user ID</b>: 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("<b>Allow encryption with untrusted keys</b>: 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("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
- QString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>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.</p><p><b>But you must be aware that this is not secure</b> 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).</p></qt>");
+ TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>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.</p><p><b>But you must be aware that this is not secure</b> 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).</p></qt>");
KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").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("<b>Symmetrical encryption</b>: 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("<b>Custom option</b>: 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<<id;
@@ -442,7 +442,7 @@ void popupPublic::slotprocread(KProcIO *p)
//if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=tst;//.section('(',0,0);
}
@@ -480,9 +480,9 @@ void popupPublic::slotOk()
////// emit selected data
kdDebug(2100)<<"Ok pressed"<<endl;
- QStringList selectedKeys;
- QString userid;
- QPtrList<QListViewItem> list=keysList->selectedItems();
+ TQStringList selectedKeys;
+ TQString userid;
+ TQPtrList<TQListViewItem> list=keysList->selectedItems();
for ( uint i = 0; i < list.count(); ++i )
if ( list.at(i) ) {
@@ -492,7 +492,7 @@ kdDebug(2100)<<"Ok pressed"<<endl;
if (selectedKeys.isEmpty() && !CBsymmetric->isChecked())
return;
kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
- QStringList returnOptions;
+ TQStringList returnOptions;
if (CBuntrusted->isChecked())
returnOptions<<"--always-trust";
if (CBarmor->isChecked())
@@ -500,14 +500,14 @@ kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
if (CBhideid->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 <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
/**
* @author Olivier Goffart <ogoffart @ kde.org>
@@ -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 <qfile.h>
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqdom.h>
#include <ksavefile.h>
#include <kstandarddirs.h>
@@ -53,7 +53,7 @@ void HighlightConfig::appendFilter(Filter *f)
m_filters.append(f);
}
-QPtrList<Filter> HighlightConfig::filters() const
+TQPtrList<Filter> 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(
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE kopete-highlight-plugin>\n"
"<highlight-plugin>\n" );
// Save metafilter information.
- QPtrListIterator<Filter> filtreIt( m_filters );
+ TQPtrListIterator<Filter> filtreIt( m_filters );
for( ; filtreIt.current(); ++filtreIt )
{
Filter *filtre = *filtreIt;
- xml += QString::fromLatin1( " <filter>\n <display-name>" )
- + QStyleSheet::escape(filtre->displayName)
- + QString::fromLatin1( "</display-name>\n" );
+ xml += TQString::fromLatin1( " <filter>\n <display-name>" )
+ + TQStyleSheet::escape(filtre->displayName)
+ + TQString::fromLatin1( "</display-name>\n" );
- xml += QString::fromLatin1(" <search caseSensitive=\"") + QString::number( static_cast<int>( filtre->caseSensitive ) ) +
- QString::fromLatin1("\" regExp=\"") + QString::number( static_cast<int>( filtre->isRegExp ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "</search>\n" );
+ xml += TQString::fromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "</search>\n" );
- xml += QString::fromLatin1(" <BG set=\"") + QString::number( static_cast<int>( filtre->setBG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "</BG>\n" );
- xml += QString::fromLatin1(" <FG set=\"") + QString::number( static_cast<int>( filtre->setFG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "</FG>\n" );
+ xml += TQString::fromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "</BG>\n" );
+ xml += TQString::fromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "</FG>\n" );
- xml += QString::fromLatin1(" <importance set=\"") + QString::number( static_cast<int>( filtre->setImportance ) ) +
- QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "</importance>\n" );
+ xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
+ TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" );
- xml += QString::fromLatin1(" <sound set=\"") + QString::number( static_cast<int>( filtre->playSound ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "</sound>\n" );
+ xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" );
- xml += QString::fromLatin1(" <raise set=\"") + QString::number( static_cast<int>( filtre->raiseView ) ) +
- QString::fromLatin1( "\"></raise>\n" );
+ xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::fromLatin1( "\"></raise>\n" );
- xml += QString::fromLatin1( " </filter>\n" );
+ xml += TQString::fromLatin1( " </filter>\n" );
}
- xml += QString::fromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::fromLatin1( "</highlight-plugin>\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 <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
class Filter;
@@ -32,13 +32,13 @@ public:
void load();
void save();
- QPtrList<Filter> filters() const;
+ TQPtrList<Filter> filters() const;
void removeFilter (Filter *f);
void appendFilter (Filter *f);
Filter* newFilter();
private:
- QPtrList<Filter> m_filters;
+ TQPtrList<Filter> 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 <qregexp.h>
+#include <tqregexp.h>
#include <kgenericfactory.h>
#include <knotifyclient.h>
@@ -29,14 +29,14 @@
typedef KGenericFactory<HighlightPlugin> 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<Filter> filters=m_config->filters();
- QPtrListIterator<Filter> it( filters );
+ TQPtrList<Filter> filters=m_config->filters();
+ TQPtrListIterator<Filter> 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 <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#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 <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -39,35 +39,35 @@
typedef KGenericFactory<HighlightPreferences> 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<Filter> filters=m_config->filters();
- QPtrListIterator<Filter> it( filters );
+ TQPtrList<Filter> filters=m_config->filters();
+ TQPtrListIterator<Filter> 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<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "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 <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
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 <QListViewItem*,Filter*> m_filterItems;
+ TQMap <TQListViewItem*,Filter*> 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 <kprogress.h>
#include <kapplication.h>
#include <ksavefile.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#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::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) )
{
protocolId=p->pluginId();
- QDictIterator<Kopete::Account> it(Kopete::AccountManager::self()->accounts(p));
+ TQDictIterator<Kopete::Account> 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 <message> 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( "<message " ) ) )
+ if( buffer.startsWith( TQString::fromLatin1( "<message " ) ) )
{
msgBlock = buffer;
// find the end of the message block
- while( !feof( f ) && buffer != QString::fromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ )
+ while( !feof( f ) && buffer != TQString::fromLatin1( "</message>\n" ) /*strcmp("</message>\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::Protocol *>( 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 <khtml_part.h>
#include <khtmlview.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qclipboard.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -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<KListViewDateItem*>(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<Kopete::MetaContact> it(mMetaContactList);
+ TQPtrListIterator<Kopete::MetaContact> 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 = "<style>.hf { font-size:" + fontSize + ".0pt; font-family:" + KopetePrefs::prefs()->fontFace().family() + "; color: " + KopetePrefs::prefs()->textColor().name() + "; }</style>";
mHtmlPart->begin();
htmlCode = "<html><head>" + fontStyle + "</head><body class=\"hf\"></body></html>";
- 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<Kopete::MetaContact> it(mMetaContactList);
+ TQPtrListIterator<Kopete::MetaContact> 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<int> dayList = logger.getDaysForMonth(pair.date());
+ TQValueList<int> dayList = logger.getDaysForMonth(pair.date());
for (unsigned int i=0; i<dayList.count(); i++)
{
- QDate c2Date(pair.date().year(),pair.date().month(),dayList[i]);
+ TQDate c2Date(pair.date().year(),pair.date().month(),dayList[i]);
if (mInit.dateMCList.find(pair) == mInit.dateMCList.end())
new KListViewDateItem(mMainWidget->dateListView, 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<Kopete::Contact> contacts=mc->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts=mc->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<KListViewDateItem*>(it);
if (!item) return;
- QDate chosenDate = item->date();
+ TQDate chosenDate = item->date();
HistoryLogger logger(item->metaContact(), this);
- QValueList<Kopete::Message> msgs=logger.readMessages(chosenDate);
+ TQValueList<Kopete::Message> msgs=logger.readMessages(chosenDate);
setMessages(msgs);
}
-void HistoryDialog::setMessages(QValueList<Kopete::Message> msgs)
+void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs)
{
// Clear View
DOM::HTMLElement htmlBody = mHtmlPart->htmlDocument().body();
@@ -339,16 +339,16 @@ void HistoryDialog::setMessages(QValueList<Kopete::Message> 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<Kopete::Message>::iterator it = msgs.begin();
+ TQValueList<Kopete::Message>::iterator it = msgs.begin();
- QString accountLabel;
- QString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>";
- DOM::HTMLElement newNode = mHtmlPart->document().createElement(QString::fromLatin1("span"));
- newNode.setAttribute(QString::fromLatin1("dir"), dir);
+ TQString accountLabel;
+ TQString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>";
+ 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<Kopete::Message> 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<Kopete::Message> msgs)
: "<font color=\"" + KopetePrefs::prefs()->textColor().light(200).name() + "\"><b>&lt;</b></font> ")
+ body + "<br/>";
- 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("^ <msg.*time=\"(\\d+) \\d+:\\d+:\\d+\" >([^<]*)<");
- QMap<QDate, QValueList<Kopete::MetaContact*> > monthsSearched;
- QMap<QDate, QValueList<Kopete::MetaContact*> > matches;
+ TQRegExp rx("^ <msg.*time=\"(\\d+) \\d+:\\d+:\\d+\" >([^<]*)<");
+ TQMap<TQDate, TQValueList<Kopete::MetaContact*> > monthsSearched;
+ TQMap<TQDate, TQValueList<Kopete::MetaContact*> > 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<Kopete::Contact> contacts = curItem->metaContact()->contacts();
- for(QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it)
+ TQPtrList<Kopete::Contact> contacts = curItem->metaContact()->contacts();
+ for(TQPtrListIterator<Kopete::Contact> 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 <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
#include <klistview.h>
@@ -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<Kopete::Message> m);
+ void setMessages(TQValueList<Kopete::Message> m);
void listViewShowElements(bool s);
@@ -123,7 +123,7 @@ class HistoryDialog : public KDialogBase
*/
Kopete::MetaContact *mMetaContact;
- QPtrList<Kopete::MetaContact> mMetaContactList;
+ TQPtrList<Kopete::MetaContact> mMetaContactList;
// History View
KHTMLView *mHtmlView;
@@ -133,14 +133,14 @@ class HistoryDialog : public KDialogBase
struct Init
{
- QValueList<DMPair> dateMCList; // mc for MetaContact
+ TQValueList<DMPair> 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<HistoryPlugin>::instance());
@@ -38,12 +38,12 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name
if(!m_manager || m_manager->members().isEmpty())
deleteLater();
- QPtrList<Kopete::Contact> mb=m_manager->members();
+ TQPtrList<Kopete::Contact> 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<Kopete::Contact> mb = m_manager->members();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
+ TQValueList<Kopete::Message> 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<Kopete::Contact> mb = m_manager->members();
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
m_logger->setPositionToLast();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQValueList<Kopete::Message> 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<Kopete::Contact> mb = m_manager->members();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
+ TQValueList<Kopete::Message> 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 <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
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 <qregexp.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -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<unsigned int , QDomDocument> documents = m_documents[c];
+ TQMap<unsigned int , TQDomDocument> 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<Kopete::Contact> mb=msg.manager()->members() ;
+ TQPtrList<Kopete::Contact> 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<Kopete::Contact> contacts= m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ /*TQPtrList<Kopete::Contact> contacts= m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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 " <<endl ;
- m_toSaveFileName=QString::null;
- m_toSaveDocument=QDomDocument();
+ m_toSaveFileName=TQString::null;
+ m_toSaveDocument=TQDomDocument();
}
else
kdError(14310) << k_funcinfo << "impossible to save the history file " << m_toSaveFileName << endl;
}
-QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
+TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date)
{
- QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
- QValueList<Kopete::Message> messages;
+ TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
+ TQValueList<Kopete::Message> messages;
- QPtrList<Kopete::Contact> ct=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( ct );
+ TQPtrList<Kopete::Contact> ct=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Message> 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<Kopete::Message> 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("<span title=\"%1\">%2</span>")
+ msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>")
.arg( dt.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText);
// We insert it at the good place, given its date
- QValueListIterator<Kopete::Message> msgIt;
+ TQValueListIterator<Kopete::Message> msgIt;
for (msgIt = messages.begin(); msgIt != messages.end(); ++msgIt)
{
@@ -400,15 +400,15 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
return messages;
}
-QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
+TQValueList<Kopete::Message> 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<Kopete::Message> messages;
+ TQValueList<Kopete::Message> 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<Kopete::Message> 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<Kopete::Message> 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<Kopete::Message> 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<Kopete::Contact> ct=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( ct );
+ TQPtrList<Kopete::Contact> ct=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<Kopete::Message> 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<Kopete::Message> 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<Kopete::Message> 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<Kopete::Message> 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("<span style=\"color:%1\" title=\"%2\">%3</span>")
+ msg.setBody( TQString::fromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>")
.arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText
);
@@ -602,7 +602,7 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
}
else
{
- msg.setBody( QString::fromLatin1("<span title=\"%1\">%2</span>")
+ msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>")
.arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText
);
@@ -617,10 +617,10 @@ QValueList<Kopete::Message> 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<Kopete::Message> 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<Kopete::Message> 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<Kopete::Contact> contacts=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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<int> HistoryLogger::getDaysForMonth(QDate date)
+TQValueList<int> 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<int> dayList;
+ TQValueList<int> dayList;
- QPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it(contacts);
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> 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 <qobject.h>
+#include <tqobject.h>
#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<Kopete::Message> readMessages(unsigned int lines,
+ TQValueList<Kopete::Message> 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<Kopete::Message> readMessages(QDate date);
+ TQValueList<Kopete::Message> 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<int> getDaysForMonth(QDate date);
+ TQValueList<int> 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<const Kopete::Contact*,QMap<unsigned int , QDomDocument> > m_documents;
+ TQMap<const Kopete::Contact*,TQMap<unsigned int , TQDomDocument> > m_documents;
/**
* Contains the current message.
* in fact, this is the next, still not showed
*/
- QMap<const Kopete::Contact*, QDomElement> m_currentElements;
+ TQMap<const Kopete::Contact*, TQDomElement> 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<const Kopete::Contact*, QDomElement> m_oldElements;
+ TQMap<const Kopete::Contact*, TQDomElement> 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<QDomElement> workaround;
+ TQValueList<TQDomElement> 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<HistoryPlugin> 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<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> 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<Kopete::Contact> mb=m.manager()->members();
+ TQPtrList<Kopete::Contact> 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<Kopete::Contact> mb = m_currentChatSession->members();
+ TQPtrList<Kopete::Contact> 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<Kopete::Message> msgs = logger->readMessages(nbAutoChatWindow,
+ TQValueList<Kopete::Message> 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 <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#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<Kopete::ChatSession*,HistoryGUIClient*> m_loggers;
+ TQMap<Kopete::ChatSession*,HistoryGUIClient*> 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 <kgenericfactory.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kcolorbutton.h>
#include <knuminput.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
typedef KGenericFactory<HistoryPreferences> 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 <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
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 <qvariant.h>
+#include <tqvariant.h>
#include <kaction.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
#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<QWidget*>(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<TQWidget*>(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 <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
#include <kio/job.h>
@@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; }
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-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 <qregexp.h>
-#include <qimage.h>
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqstylesheet.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -41,7 +41,7 @@
typedef KGenericFactory<LatexPlugin> 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<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> 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<QString, QString> replaceMap;
+ TQMap<TQString, TQString> 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<QString,QString>::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it)
+ for (TQMap<TQString,TQString>::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("\"","&quot;"); //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()), " <img width=\"" + QString::number(imagePxWidth) + "\" height=\"" + QString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
+ TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","&quot;"); //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()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
}
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("\"","&quot;");
- QString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
+ TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","&quot;");
+ TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <ktempfile.h>
@@ -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<KTempFile> m_tempFiles;
+ TQPtrList<KTempFile> 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 <qlayout.h>
+#include <tqlayout.h>
#include <kparts/componentfactory.h>
#include <klocale.h>
#include <kgenericfactory.h>
@@ -30,17 +30,17 @@
typedef KGenericFactory<LatexPreferences> 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 <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
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 <time.h>
#include <unistd.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -92,7 +92,7 @@ typedef __signed__ long long __s64;
typedef KGenericFactory<MotionAwayPlugin> 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 <qlayout.h>
-#include <qobject.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqobject.h>
+#include <tqcheckbox.h>
#include <kgenericfactory.h>
#include <klineedit.h>
@@ -30,15 +30,15 @@
typedef KGenericFactory<MotionAwayPreferences> 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 <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <kaction.h>
@@ -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<NetMeetingPlugin>::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<Kopete::Contact> c=m_manager->members();
+ TQPtrList<Kopete::Contact> c=m_manager->members();
NetMeetingInvitation *i=new NetMeetingInvitation(false, static_cast<MSNContact*>(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 <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -31,7 +31,7 @@ class NetMeetingPlugin;
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-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 <kglobal.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kprocess.h>
-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<MSNChatSession*>(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 <qobject.h>
+#include <tqobject.h>
#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<NetMeetingPlugin>( &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<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> 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<MSNChatSession*>(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 <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -39,13 +39,13 @@
typedef KGenericFactory<NetmeetingPreferences> 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 <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
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 <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#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 <kmessagebox.h>
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 <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
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 <qtimer.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -59,7 +59,7 @@ public:
{}
// abstracted media player interfaces
- QPtrList<NLMediaPlayer> m_mediaPlayerList;
+ TQPtrList<NLMediaPlayer> 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<NowListeningPlugin> 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<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> 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 + "<br>" + 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<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> 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 <qptrlist.h>
+#include <tqptrlist.h>
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 <qspinbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klistbox.h>
#include <klocale.h>
@@ -36,22 +36,22 @@ typedef KGenericFactory<NowListeningPreferences> 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 <qobject.h>
+#include <tqobject.h>
#include "detector.h"
@@ -27,7 +27,7 @@ class IConnector;
/**
@author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-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 <qobject.h>
+#include <tqobject.h>
#include "detector.h"
@@ -27,7 +27,7 @@ class ConnectionManager;
/**
@author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-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 <qstringlist.h>
+#include <tqstringlist.h>
#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 <qstringlist.h>
+#include <tqstringlist.h>
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 <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstreamsocket.h>
@@ -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 <qstringlist.h>
+#include <tqstringlist.h>
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 <cstdlib>
#include <openssl/md5.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstreamsocket.h>
@@ -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 <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -37,7 +37,7 @@
typedef KGenericFactory<SMPPPDCSPlugin> 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<Kopete::Account> it(m->accounts())
+ for(TQPtrListIterator<Kopete::Account> 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<Kopete::Account> it(m->accounts())
+ for(TQPtrListIterator<Kopete::Account> 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 <code>SMPPPDCSPlugin</code> instance
*/
- SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args );
+ SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args );
/**
* @brief Destroys an <code>SMPPPDCSPlugin</code> 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 <qlayout.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
#include <klistview.h>
#include <klineedit.h>
@@ -35,17 +35,17 @@
typedef KGenericFactory<SMPPPDCSPreferences> 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<Kopete::Account> it(manager->accounts()); it.current(); ++it)
+ for(TQPtrListIterator<Kopete::Account> 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<QCheckListItem *>(item);
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(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<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(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<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(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<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(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<QString, AccountPrivMap> AccountMap;
+ typedef TQMap<TQString, AccountPrivMap> AccountMap;
/**
* @brief Creates an <code>SMPPPDCSPreferences</code> 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 <code>SMPPPDCSPreferences</code> 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 <arpa/inet.h>
#include <netdb.h>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include <kstandarddirs.h>
#include <kapplication.h>
@@ -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 <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kprogress.h>
@@ -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 <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <kdebug.h>
@@ -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&auml;fer <heiko@rangun.de>
*/
-class SMPPPDSearcher : public QObject {
+class SMPPPDSearcher : public TQObject {
Q_OBJECT
SMPPPDSearcher(const SMPPPDSearcher&);
@@ -65,7 +65,7 @@ protected:
* @param mask the network mask
* @return <code>TRUE</code> 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 <stdlib.h>
-#include <qvaluelist.h>
-#include <quuid.h>
+#include <tqvaluelist.h>
+#include <tquuid.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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<values.count(); i+=4)
{
unsigned int datetimebegin = values[i+1].toInt(), datetimeend = values[i+2].toInt();
- kdDebug() << "statistics: id "<< values[i+3]<< " status " << values[i] << " datetimeend " << QString::number(datetimeend) << " datetimebegin " << QString::number(datetimebegin) << endl;
+ kdDebug() << "statistics: id "<< values[i+3]<< " status " << values[i] << " datetimeend " << TQString::number(datetimeend) << " datetimebegin " << TQString::number(datetimebegin) << endl;
if (datetimebegin <= dt1.toTime_t()) datetimebegin = dt1.toTime_t();
if (datetimeend >= 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<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status)
+TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status)
{
- QStringList buffer;
- QValueList<QTime> mainEvents;
+ TQStringList buffer;
+ TQValueList<TQTime> 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<buffer.count(); i += 3)
{
if (buffer[i+2] == Kopete::OnlineStatus::statusTypeToString(status)
@@ -409,7 +409,7 @@ QValueList<QTime> 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<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
kdDebug() << "statistics: average events per day : " <<avEventsPerDay << endl;
// We want to work on hours
- QValueList<int> hoursValues;
+ TQValueList<int> hoursValues;
for (uint i=0; i<values.count(); i++)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(values[i].toInt());
- hoursValues.push_back(QTime(0, 0, 0).secsTo(dt.time()));
+ hoursValues.push_back(TQTime(0, 0, 0).secsTo(dt.time()));
}
// Sort the list
qHeapSort(hoursValues);
// Then we put some centroids (centroids in [0..24[)
- QValueList<int> centroids;
+ TQValueList<int> centroids;
int incr=qRound((double)hoursValues.count()/(double)avEventsPerDay);
incr = incr ? incr : 1;
for (uint i=0; i<hoursValues.count(); i+=incr)
@@ -447,7 +447,7 @@ QValueList<QTime> 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<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
return mainEvents;
}
-QValueList<int> StatisticsContact::computeCentroids(const QValueList<int>& centroids, const QValueList<int>& values)
+TQValueList<int> StatisticsContact::computeCentroids(const TQValueList<int>& centroids, const TQValueList<int>& values)
{
kdDebug() << "statistics: enter compute centroids"<< endl;
- QValueList<int> whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one
- QValueList<int> newCentroids;
+ TQValueList<int> whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one
+ TQValueList<int> newCentroids;
for (uint i=0; i<values.count(); i++)
// Iterates over the values. For each one we need to get the closest centroid.
{
diff --git a/kopete/plugins/statistics/statisticscontact.h b/kopete/plugins/statistics/statisticscontact.h
index 217000db..719a65da 100644
--- a/kopete/plugins/statistics/statisticscontact.h
+++ b/kopete/plugins/statistics/statisticscontact.h
@@ -52,7 +52,7 @@ public:
/** \brief Access method
* \return m_statisticsContactId
*/
- QString statisticsContactId() { return m_statisticsContactId; }
+ TQString statisticsContactId() { return m_statisticsContactId; }
/** \brief Access method
* \return m_oldStatus
@@ -62,7 +62,7 @@ public:
/** \brief Access method
* \return m_oldStatusDateTime
*/
- QDateTime oldStatusDateTime() { return m_oldStatusDateTime; }
+ TQDateTime oldStatusDateTime() { return m_oldStatusDateTime; }
/** \brief Access method
* \return m_messageLength
@@ -76,12 +76,12 @@ public:
* \brief Access method
* \return m_lastTalk
*/
- QDateTime lastTalk() { return m_lastTalk; }
+ TQDateTime lastTalk() { return m_lastTalk; }
/**
* \brief Access method
* \return m_lastPresent
*/
- QDateTime lastPresent() { return m_lastPresent; }
+ TQDateTime lastPresent() { return m_lastPresent; }
/**
* \brief sets \p m_isChatWindowOpen to true
*/
@@ -106,17 +106,17 @@ public:
/**
* \returns true if contact was status at dt, false else.
*/
- bool wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType status);
+ bool wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status);
/**
* \returns the status of the contact at dt. Return false if dt is invalid.
*/
- QString statusAt(QDateTime dt);
+ TQString statusAt(TQDateTime dt);
/**
* \returns the main (most used) status of the contact at date (not time) dt. return false if dt is invalid.
*/
- QString mainStatusDate(const QDate& date);
+ TQString mainStatusDate(const TQDate& date);
/*
* Prevision methods
*/
@@ -126,25 +126,25 @@ public:
// * \param status the status to be checked.
// * \retval nextEventDateTime the next event average prevision datetime.
// */
-// QDateTime nextEvent(const Kopete::OnlineStatus::StatusType& status);
+// TQDateTime nextEvent(const Kopete::OnlineStatus::StatusType& status);
//
// /**
// * \brief Convenience method for nextEvent with Offline status
// */
-// QDateTime nextOfflineEvent();
+// TQDateTime nextOfflineEvent();
//
// /**
// * \brief Convenience method for nextEvent with Online status
// */
-// QDateTime nextOnlineEvent();
+// TQDateTime nextOnlineEvent();
/**
* \brief computes the main "status" events for the contact
*/
- QValueList<QTime> mainEvents(const Kopete::OnlineStatus::StatusType& status);
+ TQValueList<TQTime> mainEvents(const Kopete::OnlineStatus::StatusType& status);
/// \brief used by mainEvents()
- QValueList<int> computeCentroids(const QValueList<int>& centroids, const QValueList<int>& values);
+ TQValueList<int> computeCentroids(const TQValueList<int>& centroids, const TQValueList<int>& 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 <qfile.h>
+#include <tqfile.h>
#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 <qtabwidget.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qcombobox.h>
-#include <qstring.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqcombobox.h>
+#include <tqstring.h>
#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; i<values.count(); i+=3)
{
- QDateTime dateTimeBegin;
+ TQDateTime dateTimeBegin;
dateTimeBegin.setTime_t(values[i+1].toInt());
/// @todo Same as for Day, check if second datetime is on the same month
if (dateTimeBegin.date().month() == monthOfYear)
@@ -123,21 +123,21 @@ void StatisticsDialog::generatePageForMonth(const int monthOfYear)
values2.push_back(values[i+2]);
}
}
- generatePageFromQStringList(values2, QDate::longMonthName(monthOfYear));
+ generatePageFromQStringList(values2, TQDate::longMonthName(monthOfYear));
}
void StatisticsDialog::generatePageForDay(const int dayOfWeek)
{
- 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; i<values.count(); i+=3)
{
- QDateTime dateTimeBegin;
+ TQDateTime dateTimeBegin;
dateTimeBegin.setTime_t(values[i+1].toInt());
- QDateTime dateTimeEnd;
+ TQDateTime dateTimeEnd;
dateTimeEnd.setTime_t(values[i+2].toInt());
if (dateTimeBegin.date().dayOfWeek() == dayOfWeek)
{
@@ -149,9 +149,9 @@ void StatisticsDialog::generatePageForDay(const int dayOfWeek)
// datetime from value[i+1]
- dateTimeBegin = QDateTime(dateTimeBegin.date(), QTime(0, 0, 0));
- dateTimeBegin.addSecs(dateTimeBegin.time().secsTo(QTime(23, 59, 59)));
- values2.push_back(QString::number(dateTimeBegin.toTime_t()));
+ dateTimeBegin = TQDateTime(dateTimeBegin.date(), TQTime(0, 0, 0));
+ dateTimeBegin.addSecs(dateTimeBegin.time().secsTo(TQTime(23, 59, 59)));
+ values2.push_back(TQString::number(dateTimeBegin.toTime_t()));
}
else
{
@@ -161,15 +161,15 @@ void StatisticsDialog::generatePageForDay(const int dayOfWeek)
}
}
}
- generatePageFromQStringList(values2, QDate::longDayName(dayOfWeek));
+ generatePageFromQStringList(values2, TQDate::longDayName(dayOfWeek));
}
/// @todo chart problem at midnight.
-void StatisticsDialog::generatePageFromQStringList(QStringList values, const QString & subTitle)
+void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQString & subTitle)
{
generalHTMLPart->begin();
- generalHTMLPart->write(QString("<html><head><style>.bar { margin:0px;} "
+ generalHTMLPart->write(TQString("<html><head><style>.bar { margin:0px;} "
"body"
"{"
"font-size:11px"
@@ -223,7 +223,7 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
// mainWidget->listView->addColumn(i18n("Start Date"));
// mainWidget->listView->addColumn(i18n("End Date"));
- QString todayString;
+ TQString todayString;
todayString.append(i18n("<div class=\"statgroup\" title=\"Contact status history for today\"><h2>Today</h2><table width=\"100%\"><tr><td>Status</td><td>From</td><td>To</td></tr>"));
bool today;
@@ -259,13 +259,13 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
// it is the STARTDATE from the database
- QDateTime dateTime1;
+ TQDateTime dateTime1;
dateTime1.setTime_t(values[i+1].toInt());
// it is the ENDDATE from the database
- QDateTime dateTime2;
+ TQDateTime dateTime2;
dateTime2.setTime_t(values[i+2].toInt());
- if (dateTime1.date() == QDate::currentDate() || dateTime2.date() == QDate::currentDate())
+ if (dateTime1.date() == TQDate::currentDate() || dateTime2.date() == TQDate::currentDate())
today = true;
else today = false;
@@ -330,10 +330,10 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
- QString color;
+ TQString color;
if (today)
{
- QString status;
+ TQString status;
if (Kopete::OnlineStatus::statusStringToType(values[i]) == Kopete::OnlineStatus::Online)
{
color="blue";
@@ -351,12 +351,12 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
}
else color="white";
- todayString.append(QString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
+ todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
}
// We add a listview item to the log list
- // QDateTime listViewDT1, listViewDT2;
+ // TQDateTime listViewDT1, listViewDT2;
// listViewDT1.setTime_t(values[i+1].toInt());
// listViewDT2.setTime_t(values[i+2].toInt());
// new KListViewItem(mainWidget->listView, values[i], values[i+1], values[i+2], listViewDT1.toString(), listViewDT2.toString());
@@ -391,83 +391,83 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
"Total online time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOnlineTime)));
generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalAwayTime)));
generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOfflineTime)));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
if (subTitle == i18n("General information"))
/*
* General stats that should not be shown on "day" or "month" pages
*/
{
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").arg(m_contact->messageLength()));
generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").arg(m_contact->timeBetweenTwoMessages()));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastTalk())));
generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastPresent())));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
- //generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ //generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
//generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").arg(m_contact->metaContact()->displayName()));
- //QValueList<QTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online);
+ //TQValueList<TQTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online);
//for (uint i=0; i<mainEvents.count(); i++)
- //generalHTMLPart->write(QString("%1<br>").arg(mainEvents[i].toString()));
- //generalHTMLPart->write(QString("</div>"));
+ //generalHTMLPart->write(TQString("%1<br>").arg(mainEvents[i].toString()));
+ //generalHTMLPart->write(TQString("</div>"));
generalHTMLPart->write("<div title=\"" +i18n("Current status") + "\" class=\"statgroup\">");
generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").arg(
Kopete::OnlineStatus(m_contact->oldStatus()).description(),
KGlobal::locale()->formatDateTime(m_contact->oldStatusDateTime())));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
}
/*
* Chart which show the hours where plugin has seen this contact online
*/
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
- generalHTMLPart->write(QString("<table width=\"100%\"><tr><td colspan=\"3\">") + i18n("When have I seen this contact ?") + QString("</td></tr>"));
- generalHTMLPart->write(QString("<tr><td height=\"200\" valign=\"bottom\" colspan=\"3\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<table width=\"100%\"><tr><td colspan=\"3\">") + i18n("When have I seen this contact ?") + TQString("</td></tr>"));
+ generalHTMLPart->write(TQString("<tr><td height=\"200\" valign=\"bottom\" colspan=\"3\" class=\"chart\">"));
- QString chartString;
- QString colorPath = ::locate("appdata", "pics/statistics/black.png");
+ TQString chartString;
+ TQString colorPath = ::locate("appdata", "pics/statistics/black.png");
for (uint i=0; i<24; i++)
{
int hrWidth = qRound((double)hours[i]/(double)hours[iMaxHours]*100.);
- chartString += QString("<img class=\"margin:0px;\" height=\"")
- +(totalTime ? QString::number(hrWidth) : QString::number(0))
- +QString("\" src=\"file://")
+ chartString += TQString("<img class=\"margin:0px;\" height=\"")
+ +(totalTime ? TQString::number(hrWidth) : TQString::number(0))
+ +TQString("\" src=\"file://")
+colorPath
+"\" width=\"4%\" title=\""
+i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").arg(i).arg((i+1)%24).arg(m_contact->metaContact()->displayName()).arg(hrWidth)
- +QString("\">");
+ +TQString("\">");
}
generalHTMLPart->write(chartString);
- generalHTMLPart->write(QString("</td></tr>"));
+ generalHTMLPart->write(TQString("</td></tr>"));
- generalHTMLPart->write(QString( "<tr>"
- "<td>")+i18n("Online time")+QString("</td><td>")+i18n("Away time")+QString("</td><td>")+i18n("Offline time")+QString("</td>"
+ generalHTMLPart->write(TQString( "<tr>"
+ "<td>")+i18n("Online time")+TQString("</td><td>")+i18n("Away time")+TQString("</td><td>")+i18n("Offline time")+TQString("</td>"
"</tr>"
"<td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursOnline, hoursAway, hoursOffline, i18n("online"), "blue"));
- generalHTMLPart->write(QString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursAway, hoursOnline, hoursOffline, i18n("away"), "navy"));
- generalHTMLPart->write(QString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursOffline, hoursAway, hoursOnline, i18n("offline"), "gray"));
- generalHTMLPart->write(QString("</td></tr></table></div>"));
+ generalHTMLPart->write(TQString("</td></tr></table></div>"));
if (subTitle == i18n("General information"))
/* On main page, show the different status of the contact today
*/
{
- generalHTMLPart->write(QString(todayString));
+ generalHTMLPart->write(TQString(todayString));
}
- generalHTMLPart->write(QString("</body></html>"));
+ generalHTMLPart->write(TQString("</body></html>"));
generalHTMLPart->end();
@@ -475,18 +475,18 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
void StatisticsDialog::generatePageGeneral()
{
- QStringList values;
- values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values;
+ values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;")
.arg(m_contact->statisticsContactId()));
generatePageFromQStringList(values, i18n("General information"));
}
-QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const QString & caption, const QString & color)
+TQString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color)
{
- QString chartString;
+ TQString chartString;
- QString colorPath = ::locate("appdata", "pics/statistics/"+color+".png");
+ TQString colorPath = ::locate("appdata", "pics/statistics/"+color+".png");
for (uint i=0; i<24; i++)
@@ -494,9 +494,9 @@ QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2,
int totalTime = hours[i] + hours2[i] + hours3[i];
int hrWidth = qRound((double)hours[i]/(double)totalTime*100.);
- chartString += QString("<img class=\"margin:0px;\" height=\"")
- +(totalTime ? QString::number(hrWidth) : QString::number(0))
- +QString("\" src=\"file://")
+ chartString += TQString("<img class=\"margin:0px;\" height=\"")
+ +(totalTime ? TQString::number(hrWidth) : TQString::number(0))
+ +TQString("\" src=\"file://")
+colorPath
+"\" width=\"4%\" title=\""+
i18n("Between %1:00 and %2:00, I have seen %3 %4% %5.").
@@ -510,23 +510,23 @@ QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2,
return chartString;
}
-QString StatisticsDialog::stringFromSeconds(const int seconds)
+TQString StatisticsDialog::stringFromSeconds(const int seconds)
{
int h, m, s;
h = seconds/3600;
m = (seconds % 3600)/60;
s = (seconds % 3600) % 60;
- return QString::number(h)+":"+QString::number(m)+":"+QString::number(s);
+ return TQString::number(h)+":"+TQString::number(m)+":"+TQString::number(s);
}
void StatisticsDialog::slotAskButtonClicked()
{
if (mainWidget->questionComboBox->currentItem()==0)
{
- QString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3")
- .arg(KGlobal::locale()->formatDateTime(QDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
+ TQString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3")
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
.arg(m_contact->metaContact()->displayName())
- .arg(m_contact->statusAt(QDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
+ .arg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
mainWidget->answerEdit->setText(text);
}
else if (mainWidget->questionComboBox->currentItem()==1)
diff --git a/kopete/plugins/statistics/statisticsdialog.h b/kopete/plugins/statistics/statisticsdialog.h
index 32a5aaaf..294ec2a8 100644
--- a/kopete/plugins/statistics/statisticsdialog.h
+++ b/kopete/plugins/statistics/statisticsdialog.h
@@ -16,7 +16,7 @@
#ifndef _STATISTICSDIALOG_H
#define _STATISTICSDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include "kopetemetacontact.h"
@@ -40,12 +40,12 @@ class StatisticsDialog : public KDialogBase
{
Q_OBJECT
public:
- StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, QWidget* parent=0,
+ StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, TQWidget* parent=0,
const char* name="StatisticsDialog");
private:
- QString generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const QString & caption, const QString & color);
- QString generateHTMLChartBar(int height, const QString & color, const QString & caption);
- QString stringFromSeconds(const int seconds);
+ TQString generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color);
+ TQString generateHTMLChartBar(int height, const TQString & color, const TQString & caption);
+ TQString stringFromSeconds(const int seconds);
StatisticsWidget *mainWidget;
KHTMLPart *generalHTMLPart;
@@ -55,7 +55,7 @@ class StatisticsDialog : public KDialogBase
/// Metacontact for which we get the statistics from m_db
StatisticsContact *m_contact;
- void generatePageFromQStringList(QStringList values, const QString & subTitle);
+ void generatePageFromQStringList(TQStringList values, const TQString & subTitle);
/// Generates the main page
void generatePageGeneral();
diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp
index f0d190b3..bef49af8 100644
--- a/kopete/plugins/statistics/statisticsplugin.cpp
+++ b/kopete/plugins/statistics/statisticsplugin.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qdict.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqdict.h>
+#include <tqtimer.h>
#include <kgenericfactory.h>
#include <kaboutdata.h>
@@ -46,34 +46,34 @@ typedef KGenericFactory<StatisticsPlugin> StatisticsPluginFactory;
static const KAboutData aboutdata("kopete_statistics", I18N_NOOP("Statistics") , "0.1" );
K_EXPORT_COMPONENT_FACTORY( kopete_statistics, StatisticsPluginFactory( &aboutdata ) )
-StatisticsPlugin::StatisticsPlugin( QObject *parent, const char *name, const QStringList &)
+StatisticsPlugin::StatisticsPlugin( TQObject *parent, const char *name, const TQStringList &)
: DCOPObject("StatisticsDCOPIface"),
Kopete::Plugin( StatisticsPluginFactory::instance(), parent, name )
{
KAction *viewMetaContactStatistics = new KAction( i18n("View &Statistics" ),
- QString::fromLatin1( "log" ), 0, this, SLOT(slotViewStatistics()),
+ TQString::fromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()),
actionCollection(), "viewMetaContactStatistics" );
viewMetaContactStatistics->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1);
- connect(Kopete::ChatSessionManager::self(),SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
- this, SLOT(slotViewCreated(Kopete::ChatSession*)));
- connect(Kopete::ChatSessionManager::self(),SIGNAL(aboutToReceive(Kopete::Message&)),
- this, SLOT(slotAboutToReceive(Kopete::Message&)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
+ this, TQT_SLOT(slotViewCreated(Kopete::ChatSession*)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(aboutToReceive(Kopete::Message&)),
+ this, TQT_SLOT(slotAboutToReceive(Kopete::Message&)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)),
- viewMetaContactStatistics, SLOT(setEnabled(bool)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)),
+ viewMetaContactStatistics, TQT_SLOT(setEnabled(bool)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
setXMLFile("statisticsui.rc");
/* Initialization reads the database, so it could be a bit time-consuming
due to disk access. This should overcome the problem and makes it non-blocking. */
- QTimer::singleShot(0, this, SLOT(slotInitialize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotInitialize()));
}
void StatisticsPlugin::slotInitialize()
@@ -81,8 +81,8 @@ void StatisticsPlugin::slotInitialize()
// Initializes the database
m_db = new StatisticsDB();
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for (; it.current(); ++it)
{
slotMetaContactAdded(it.current());
@@ -91,7 +91,7 @@ void StatisticsPlugin::slotInitialize()
StatisticsPlugin::~StatisticsPlugin()
{
- QMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
+ TQMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
for ( it = statisticsMetaContactMap.begin(); it != statisticsMetaContactMap.end(); ++it )
{
delete it.data();
@@ -107,13 +107,13 @@ void StatisticsPlugin::slotAboutToReceive(Kopete::Message& m)
void StatisticsPlugin::slotViewCreated(Kopete::ChatSession* session)
{
- connect(session, SIGNAL(closing(Kopete::ChatSession*)), this, SLOT(slotViewClosed(Kopete::ChatSession*)));
+ connect(session, TQT_SIGNAL(closing(Kopete::ChatSession*)), this, TQT_SLOT(slotViewClosed(Kopete::ChatSession*)));
}
void StatisticsPlugin::slotViewClosed(Kopete::ChatSession* session)
{
- QPtrList<Kopete::Contact> list = session->members();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQPtrList<Kopete::Contact> list = session->members();
+ TQPtrListIterator<Kopete::Contact> it( list );
for (; it.current(); ++it)
{
@@ -145,7 +145,7 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
{
statisticsMetaContactMap[mc] = new StatisticsContact(mc, db());
- QPtrList<Kopete::Contact> clist = mc->contacts();
+ TQPtrList<Kopete::Contact> clist = mc->contacts();
Kopete::Contact *contact;
// we need to call slotContactAdded if MetaContact allready have contacts
@@ -154,12 +154,12 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
this->slotContactAdded(contact);
}
- connect(mc, SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
- SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
- connect(mc, SIGNAL(contactAdded( Kopete::Contact *)), this,
- SLOT(slotContactAdded( Kopete::Contact *)));
- connect(mc, SIGNAL(contactRemoved( Kopete::Contact *)), this,
- SLOT(slotContactRemoved( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
+ TQT_SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
+ connect(mc, TQT_SIGNAL(contactAdded( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactAdded( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(contactRemoved( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactRemoved( Kopete::Contact *)));
}
void StatisticsPlugin::slotMetaContactRemoved(Kopete::MetaContact *mc)
@@ -191,7 +191,7 @@ void StatisticsPlugin::slotContactRemoved( Kopete::Contact *c)
statisticsContactMap.remove(c->contactId());
}
-void StatisticsPlugin::dcopStatisticsDialog(QString id)
+void StatisticsPlugin::dcopStatisticsDialog(TQString id)
{
kdDebug() << k_funcinfo << "statistics - DCOP dialog :" << id << endl;
@@ -201,43 +201,43 @@ void StatisticsPlugin::dcopStatisticsDialog(QString id)
}
}
-bool StatisticsPlugin::dcopWasOnline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOnline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasOnline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasAway(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasAway(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::OnlineStatus::StatusType status)
+bool StatisticsPlugin::dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status)
{
kdDebug() << k_funcinfo << "statistics - DCOP wasOnline :" << id << endl;
@@ -249,17 +249,17 @@ bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::Onl
return false;
}
-QString StatisticsPlugin::dcopStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopStatus(id, dt.toString());
}
-QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
+TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime)
{
- QDateTime dt = QDateTime::fromString(dateTime);
+ TQDateTime dt = TQDateTime::fromString(dateTime);
if (dt.isValid() && statisticsContactMap.contains(id))
{
@@ -269,9 +269,9 @@ QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
return "";
}
-QString StatisticsPlugin::dcopMainStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopMainStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
if (dt.isValid() && statisticsContactMap.contains(id))
{
diff --git a/kopete/plugins/statistics/statisticsplugin.h b/kopete/plugins/statistics/statisticsplugin.h
index d757b424..1492cd41 100644
--- a/kopete/plugins/statistics/statisticsplugin.h
+++ b/kopete/plugins/statistics/statisticsplugin.h
@@ -17,10 +17,10 @@
#ifndef STATISTICSPLUGIN_H
#define STATISTICSPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
@@ -101,7 +101,7 @@ class StatisticsPlugin : public Kopete::Plugin, virtual public StatisticsDCOPIfa
Q_OBJECT
public:
/// Standard plugin constructors
- StatisticsPlugin(QObject *parent, const char *name, const QStringList &args);
+ StatisticsPlugin(TQObject *parent, const char *name, const TQStringList &args);
~StatisticsPlugin();
/// Method to access m_db member
@@ -179,34 +179,34 @@ public slots:
* DCOP functions
* See statisticsdcopiface.h for the documentation
*/
- void dcopStatisticsDialog(QString id);
+ void dcopStatisticsDialog(TQString id);
- bool dcopWasOnline(QString id, int timeStamp);
- bool dcopWasOnline(QString id, QString dt);
+ bool dcopWasOnline(TQString id, int timeStamp);
+ bool dcopWasOnline(TQString id, TQString dt);
- bool dcopWasAway(QString id, int timeStamp);
- bool dcopWasAway(QString id, QString dt);
+ bool dcopWasAway(TQString id, int timeStamp);
+ bool dcopWasAway(TQString id, TQString dt);
- bool dcopWasOffline(QString id, int timeStamp);
- bool dcopWasOffline(QString id, QString dt);
+ bool dcopWasOffline(TQString id, int timeStamp);
+ bool dcopWasOffline(TQString id, TQString dt);
- bool dcopWasStatus(QString id, QDateTime dateTime, Kopete::OnlineStatus::StatusType status);
+ bool dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status);
- QString dcopStatus(QString id, QString dateTime);
- QString dcopStatus(QString id, int timeStamp);
+ TQString dcopStatus(TQString id, TQString dateTime);
+ TQString dcopStatus(TQString id, int timeStamp);
- QString dcopMainStatus(QString id, int timeStamp);
+ TQString dcopMainStatus(TQString id, int timeStamp);
private:
StatisticsDB *m_db;
/** Associate a Kopete::Contact id to a StatisticsContact to retrieve
* the StatisticsContact corresponding to the Kopete::Contact
*/
- QMap<QString, StatisticsContact*> statisticsContactMap;
+ TQMap<TQString, StatisticsContact*> statisticsContactMap;
/** Associate a Kopete::MetaContact to a StatisticsContact to retrieve
* the StatisticsContact corresponding to the MetaContact
*/
- QMap<Kopete::MetaContact*, StatisticsContact*> statisticsMetaContactMap;
+ TQMap<Kopete::MetaContact*, StatisticsContact*> statisticsMetaContactMap;
};
diff --git a/kopete/plugins/texteffect/texteffectconfig.cpp b/kopete/plugins/texteffect/texteffectconfig.cpp
index 9ecca3f0..2f6da206 100644
--- a/kopete/plugins/texteffect/texteffectconfig.cpp
+++ b/kopete/plugins/texteffect/texteffectconfig.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -47,9 +47,9 @@ void TextEffectConfig::load()
mWaves = config->readBoolEntry("WaVeS", false);
}
-QStringList TextEffectConfig::defaultColorList()
+TQStringList TextEffectConfig::defaultColorList()
{
- return QStringList::split( ",", "#00BBDD,#0088DD,#0000DD,#8800DD,#DD00DD,#DD0088,#DD0000,#DD8800,#DDBB00,#88BB00,#00BB00" );
+ return TQStringList::split( ",", "#00BBDD,#0088DD,#0000DD,#8800DD,#DD00DD,#DD0088,#DD0000,#DD8800,#DDBB00,#88BB00,#00BB00" );
}
void TextEffectConfig::save()
@@ -69,7 +69,7 @@ void TextEffectConfig::save()
config->sync();
}
-QStringList TextEffectConfig::colors() const
+TQStringList TextEffectConfig::colors() const
{
return mColors;
}
@@ -104,7 +104,7 @@ bool TextEffectConfig::waves() const
return mWaves;
}
-void TextEffectConfig::setColors(const QStringList &newColors)
+void TextEffectConfig::setColors(const TQStringList &newColors)
{
mColors = newColors;
}
diff --git a/kopete/plugins/texteffect/texteffectconfig.h b/kopete/plugins/texteffect/texteffectconfig.h
index 80b19151..103ba772 100644
--- a/kopete/plugins/texteffect/texteffectconfig.h
+++ b/kopete/plugins/texteffect/texteffectconfig.h
@@ -30,7 +30,7 @@ public:
void save();
//accessor functions
- QStringList colors() const;
+ TQStringList colors() const;
bool colorLines() const;
bool colorWords() const;
bool colorChar() const;
@@ -38,18 +38,18 @@ public:
bool lamer() const;
bool waves() const;
- void setColors(const QStringList &newColors = QStringList());
+ void setColors(const TQStringList &newColors = TQStringList());
void setColorLines(bool newLines);
void setColorChar(bool newChar);
void setColorWords(bool newWords);
void setColorRandom(bool newRandom);
void setLamer(bool newLamer);
void setWaves(bool newWaves);
- QStringList defaultColorList();
+ TQStringList defaultColorList();
private:
- QStringList mColors;
+ TQStringList mColors;
bool mColorLines;
bool mColorWords;
bool mColorChar;
diff --git a/kopete/plugins/texteffect/texteffectplugin.cpp b/kopete/plugins/texteffect/texteffectplugin.cpp
index 5374b2ca..47bdbc14 100644
--- a/kopete/plugins/texteffect/texteffectplugin.cpp
+++ b/kopete/plugins/texteffect/texteffectplugin.cpp
@@ -28,7 +28,7 @@
typedef KGenericFactory<TextEffectPlugin> TextEffectPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_texteffect, TextEffectPluginFactory( "kopete_texteffect" ) )
-TextEffectPlugin::TextEffectPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+TextEffectPlugin::TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Plugin( TextEffectPluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
@@ -36,11 +36,11 @@ TextEffectPlugin::TextEffectPlugin( QObject *parent, const char *name, const QSt
m_config = new TextEffectConfig;
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
connect( Kopete::ChatSessionManager::self(),
- SIGNAL( aboutToSend( Kopete::Message & ) ),
- SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
last_color=0;
}
@@ -64,19 +64,19 @@ void TextEffectPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(msg.direction() != Kopete::Message::Outbound)
return;
- QStringList colors=m_config->colors();
+ TQStringList colors=m_config->colors();
if(m_config->colorChar() || m_config->colorWords() || m_config->lamer() || m_config->waves() )
{
- QString original=msg.plainBody();
- QString resultat;
+ TQString original=msg.plainBody();
+ TQString resultat;
unsigned int c=0;
bool wavein=false;
for(unsigned int f=0;f<original.length();f++)
{
- QChar x=original[f];
+ TQChar x=original[f];
if(f==0 || m_config->colorChar() || (m_config->colorWords() && x==' ' ))
{
if(f!=0)
@@ -184,7 +184,7 @@ void TextEffectPlugin::slotOutgoingMessage( Kopete::Message& msg )
last_color=0;
}
- msg.setFg(QColor (colors[last_color]));
+ msg.setFg(TQColor (colors[last_color]));
}
}
diff --git a/kopete/plugins/texteffect/texteffectplugin.h b/kopete/plugins/texteffect/texteffectplugin.h
index db34fdcb..63441435 100644
--- a/kopete/plugins/texteffect/texteffectplugin.h
+++ b/kopete/plugins/texteffect/texteffectplugin.h
@@ -18,9 +18,9 @@
#ifndef TextEffectPLUGIN_H
#define TextEffectPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "kopetemessage.h"
#include "kopeteplugin.h"
@@ -45,7 +45,7 @@ class TextEffectPlugin : public Kopete::Plugin
public:
static TextEffectPlugin *plugin();
- TextEffectPlugin( QObject *parent, const char *name, const QStringList &args );
+ TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &args );
~TextEffectPlugin();
public slots:
diff --git a/kopete/plugins/texteffect/texteffectpreferences.cpp b/kopete/plugins/texteffect/texteffectpreferences.cpp
index c9f0c03b..9fb2994c 100644
--- a/kopete/plugins/texteffect/texteffectpreferences.cpp
+++ b/kopete/plugins/texteffect/texteffectpreferences.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kcolordialog.h>
@@ -35,12 +35,12 @@
typedef KGenericFactory<TextEffectPreferences> TextEffectPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_texteffect, TextEffectPreferencesFactory( "kcm_kopete_texteffect" ) )
-TextEffectPreferences::TextEffectPreferences(QWidget *parent,
+TextEffectPreferences::TextEffectPreferences(TQWidget *parent,
const char* /*name*/,
- const QStringList &args)
+ const TQStringList &args)
: KCModule(TextEffectPreferencesFactory::instance(), parent, args)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
kdDebug( 14310 ) << "Creating preferences dialog" << endl;
@@ -52,32 +52,32 @@ TextEffectPreferences::TextEffectPreferences(QWidget *parent,
kdDebug( 14310 ) << "Setting up connections" << endl;
- connect(preferencesDialog->mColorsAdd , SIGNAL(pressed()) ,
- this , SLOT(slotAddPressed()));
+ connect(preferencesDialog->mColorsAdd , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotAddPressed()));
- connect(preferencesDialog->mColorsRemove , SIGNAL(pressed()) ,
- this , SLOT(slotRemovePressed()));
+ connect(preferencesDialog->mColorsRemove , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotRemovePressed()));
- connect(preferencesDialog->mColorsUp , SIGNAL(pressed()) ,
- this , SLOT(slotUpPressed()));
+ connect(preferencesDialog->mColorsUp , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotUpPressed()));
- connect(preferencesDialog->mColorsDown , SIGNAL(pressed()) ,
- this , SLOT(slotDownPressed()));
+ connect(preferencesDialog->mColorsDown , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotDownPressed()));
// Connect up all the check boxes
- connect( preferencesDialog->m_lamer, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_casewaves, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
-
- connect( preferencesDialog->m_colorRandom, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_fg, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_char, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_words, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_lamer, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_casewaves, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+
+ connect( preferencesDialog->m_colorRandom, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_fg, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_char, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_words, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
//setMainWidget( preferencesDialog, "Text Effect Plugin" );
@@ -142,9 +142,9 @@ void TextEffectPreferences::save()
kdDebug() << k_funcinfo << "EXIT" << endl;
}
-QStringList TextEffectPreferences::colors()
+TQStringList TextEffectPreferences::colors()
{
- QStringList ret;
+ TQStringList ret;
for(unsigned int f=0; f<preferencesDialog->mColorsListBox->count() ; f++)
{
ret.append(preferencesDialog->mColorsListBox->text(f));
@@ -154,7 +154,7 @@ QStringList TextEffectPreferences::colors()
void TextEffectPreferences::slotAddPressed()
{
- QColor myColor;
+ TQColor myColor;
if( KColorDialog::getColor( myColor ) == KColorDialog::Accepted )
{
preferencesDialog->mColorsListBox->insertItem(myColor.name());
@@ -177,7 +177,7 @@ void TextEffectPreferences::slotUpPressed()
int p=preferencesDialog->mColorsListBox->currentItem();
if(p <= 0 )
return;
- QListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
+ TQListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
if(!i)
return;
preferencesDialog->mColorsListBox->setSelected(i,false);
@@ -194,7 +194,7 @@ void TextEffectPreferences::slotDownPressed()
int p=preferencesDialog->mColorsListBox->currentItem();
if(p < 0 )
return;
- QListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
+ TQListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
if(!i)
return;
preferencesDialog->mColorsListBox->setSelected(i,false);
diff --git a/kopete/plugins/texteffect/texteffectpreferences.h b/kopete/plugins/texteffect/texteffectpreferences.h
index 21dc7bff..e455e737 100644
--- a/kopete/plugins/texteffect/texteffectpreferences.h
+++ b/kopete/plugins/texteffect/texteffectpreferences.h
@@ -32,7 +32,7 @@ class TextEffectPreferences : public KCModule {
Q_OBJECT
public:
- TextEffectPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ TextEffectPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~TextEffectPreferences();
// Overloaded from parent
@@ -41,7 +41,7 @@ public:
virtual void defaults();
private:
- QStringList colors();
+ TQStringList colors();
TextEffectPrefs *preferencesDialog;
TextEffectConfig *config;
diff --git a/kopete/plugins/translator/translatordialog.cpp b/kopete/plugins/translator/translatordialog.cpp
index c03921fc..02e405ec 100644
--- a/kopete/plugins/translator/translatordialog.cpp
+++ b/kopete/plugins/translator/translatordialog.cpp
@@ -21,7 +21,7 @@
#include "translatordialog.h"
-TranslatorDialog::TranslatorDialog(const QString &text,QWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok)
+TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok)
{
m_textEdit=new KTextEdit(this);
setMainWidget(m_textEdit);
@@ -31,7 +31,7 @@ TranslatorDialog::~TranslatorDialog()
{
}
-QString TranslatorDialog::translatedText()
+TQString TranslatorDialog::translatedText()
{
return m_textEdit->text();
}
diff --git a/kopete/plugins/translator/translatordialog.h b/kopete/plugins/translator/translatordialog.h
index 70fd46c0..40a5523e 100644
--- a/kopete/plugins/translator/translatordialog.h
+++ b/kopete/plugins/translator/translatordialog.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATORDIALOG_H
#define TRANSLATORDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
//#include <kopetemessage.h>
@@ -33,10 +33,10 @@ class TranslatorDialog : public KDialogBase
Q_OBJECT
public:
- TranslatorDialog(const QString &translated, QWidget *parent=0, const char *name=0);
+ TranslatorDialog(const TQString &translated, TQWidget *parent=0, const char *name=0);
~TranslatorDialog();
- QString translatedText();
+ TQString translatedText();
private:
KTextEdit *m_textEdit;
diff --git a/kopete/plugins/translator/translatorguiclient.cpp b/kopete/plugins/translator/translatorguiclient.cpp
index ae175f41..6af66f37 100644
--- a/kopete/plugins/translator/translatorguiclient.cpp
+++ b/kopete/plugins/translator/translatorguiclient.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <kaction.h>
@@ -34,14 +34,14 @@
#include "translatorlanguages.h"
TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *parent, const char *name )
-: QObject( parent, name ), KXMLGUIClient( parent )
+: TQObject( parent, name ), KXMLGUIClient( parent )
{
setInstance( TranslatorPlugin::plugin()->instance() );
- connect( TranslatorPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) );
+ connect( TranslatorPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) );
m_manager = parent;
- new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" );
+ new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, TQT_SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" );
setXMLFile( "translatorchatui.rc" );
}
@@ -56,14 +56,14 @@ void TranslatorGUIClient::slotTranslateChat()
return;
Kopete::Message msg = m_manager->view()->currentMessage();
- QString body = msg.plainBody();
+ TQString body = msg.plainBody();
if ( body.isEmpty() )
return;
- QString src_lang = TranslatorPlugin::plugin()->m_myLang;
- QString dst_lang;
+ TQString src_lang = TranslatorPlugin::plugin()->m_myLang;
+ TQString dst_lang;
- QPtrList<Kopete::Contact> list = m_manager->members();
+ TQPtrList<Kopete::Contact> list = m_manager->members();
Kopete::MetaContact *to = list.first()->metaContact();
dst_lang = to->pluginData( TranslatorPlugin::plugin(), "languageKey" );
if ( dst_lang.isEmpty() || dst_lang == "null" )
@@ -73,12 +73,12 @@ void TranslatorGUIClient::slotTranslateChat()
}
// We search for src_dst
- TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, SLOT( messageTranslated( const QVariant & ) ) );
+ TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, TQT_SLOT( messageTranslated( const TQVariant & ) ) );
}
-void TranslatorGUIClient::messageTranslated( const QVariant &result )
+void TranslatorGUIClient::messageTranslated( const TQVariant &result )
{
- QString translated = result.toString();
+ TQString translated = result.toString();
if ( translated.isEmpty() )
{
kdDebug( 14308 ) << k_funcinfo << "Empty string returned" << endl;
diff --git a/kopete/plugins/translator/translatorguiclient.h b/kopete/plugins/translator/translatorguiclient.h
index 32ff015f..68cb4fa7 100644
--- a/kopete/plugins/translator/translatorguiclient.h
+++ b/kopete/plugins/translator/translatorguiclient.h
@@ -20,7 +20,7 @@
#ifndef TRANSLATORGUICLIENT_H
#define TRANSLATORGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
#include <kio/job.h>
@@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; }
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class TranslatorGUIClient : public QObject , public KXMLGUIClient
+class TranslatorGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
@@ -44,7 +44,7 @@ public:
private slots:
void slotTranslateChat();
- void messageTranslated(const QVariant&);
+ void messageTranslated(const TQVariant&);
private:
Kopete::ChatSession *m_manager;
diff --git a/kopete/plugins/translator/translatorlanguages.cpp b/kopete/plugins/translator/translatorlanguages.cpp
index d0a1e0a0..5eecbf22 100644
--- a/kopete/plugins/translator/translatorlanguages.cpp
+++ b/kopete/plugins/translator/translatorlanguages.cpp
@@ -19,8 +19,8 @@
*************************************************************************
*/
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <klocale.h>
#include "translatorlanguages.h"
@@ -83,7 +83,7 @@ TranslatorLanguages::TranslatorLanguages()
m_supported["google"].append("it_en");
m_supported["google"].append("pt_en");
- QMap<QString,QString>::ConstIterator i;
+ TQMap<TQString,TQString>::ConstIterator i;
for ( i = m_langs.begin(); i != m_langs.end() ; ++i )
{
diff --git a/kopete/plugins/translator/translatorlanguages.h b/kopete/plugins/translator/translatorlanguages.h
index cbd6385f..3ef4fb16 100644
--- a/kopete/plugins/translator/translatorlanguages.h
+++ b/kopete/plugins/translator/translatorlanguages.h
@@ -22,8 +22,8 @@
#ifndef TRANSLATORLANGUAGES_H_
#define TRANSLATORLANGUAGES_H_
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
class QString;
@@ -37,28 +37,28 @@ public:
* Language APIs *
***************************************************************************/
- const QString& languageName( const QString &key )
+ const TQString& languageName( const TQString &key )
{ return m_langs[key]; };
- const int languageIndex ( const QString &key )
+ const int languageIndex ( const TQString &key )
{ return m_langKeyIntMap[key]; };
- const QString& languageKey( const int index )
+ const TQString& languageKey( const int index )
{ return m_langIntKeyMap[index]; };
- const QMap<QString,QString>& languagesMap()
+ const TQMap<TQString,TQString>& languagesMap()
{ return m_langs; };
- const QMap<QString,QString>& servicesMap()
+ const TQMap<TQString,TQString>& servicesMap()
{ return m_services; };
- const QStringList& supported( const QString &servicekey )
+ const TQStringList& supported( const TQString &servicekey )
{ return m_supported[servicekey]; };
- const int serviceIndex ( const QString &key )
+ const int serviceIndex ( const TQString &key )
{ return m_servicesKeyIntMap[key]; };
- const QString& serviceKey( const int index )
+ const TQString& serviceKey( const int index )
{ return m_servicesIntKeyMap[index]; };
int numLanguages() { return m_lc; };
@@ -68,21 +68,21 @@ public:
private:
/* Known Languages key -> desc ie: en -> English */
- QMap< QString, QString> m_langs;
+ TQMap< TQString, TQString> m_langs;
/* Known Services key -> desc ie: en -> English */
- QMap< QString, QString> m_services;
+ TQMap< TQString, TQString> m_services;
/* Supported translations per service, src_dst format ( ie: en_es )*/
- QMap< QString, QStringList > m_supported;
+ TQMap< TQString, TQStringList > m_supported;
/* int to lang key and viceversa*/
- QMap<int, QString> m_langIntKeyMap;
- QMap<QString, int> m_langKeyIntMap;
+ TQMap<int, TQString> m_langIntKeyMap;
+ TQMap<TQString, int> m_langKeyIntMap;
/* int to services key and viceversa*/
- QMap<int, QString> m_servicesIntKeyMap;
- QMap<QString, int> m_servicesKeyIntMap;
+ TQMap<int, TQString> m_servicesIntKeyMap;
+ TQMap<TQString, int> m_servicesKeyIntMap;
/* Lang counter */
int m_lc;
diff --git a/kopete/plugins/translator/translatorplugin.cpp b/kopete/plugins/translator/translatorplugin.cpp
index 4ac8367f..0767e24e 100644
--- a/kopete/plugins/translator/translatorplugin.cpp
+++ b/kopete/plugins/translator/translatorplugin.cpp
@@ -20,10 +20,10 @@
google translation page layout (13-sept-2007)
*/
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kaction.h>
@@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( &aboutda
K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( "kopete_translator" ) )
#endif
-TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+TranslatorPlugin::TranslatorPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( TranslatorPluginFactory::instance(), parent, name )
{
kdDebug( 14308 ) << k_funcinfo << endl;
@@ -64,32 +64,32 @@ TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QSt
m_languages = new TranslatorLanguages;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ),
- this, SLOT( slotIncomingMessage( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
- this, SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
- this, SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ),
+ this, TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ this, TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
+ this, TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
- QStringList keys;
- QMap<QString, QString> m = m_languages->languagesMap();
+ TQStringList keys;
+ TQMap<TQString, TQString> m = m_languages->languagesMap();
for ( int k = 0; k <= m_languages->numLanguages(); k++ )
keys << m[ m_languages->languageKey( k ) ];
m_actionLanguage = new KSelectAction( i18n( "Set &Language" ), "locale", 0, actionCollection(), "contactLanguage" );
m_actionLanguage->setItems( keys );
- connect( m_actionLanguage, SIGNAL( activated() ), this, SLOT(slotSetLanguage() ) );
- connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotSelectionChanged( bool ) ) );
+ connect( m_actionLanguage, TQT_SIGNAL( activated() ), this, TQT_SLOT(slotSetLanguage() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotSelectionChanged( bool ) ) );
setXMLFile( "translatorui.rc" );
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
slotNewKMM( *it );
loadSettings();
- connect( this, SIGNAL( settingsChanged() ), this, SLOT( loadSettings() ) );
+ connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( loadSettings() ) );
}
TranslatorPlugin::~TranslatorPlugin()
@@ -147,7 +147,7 @@ void TranslatorPlugin::slotSelectionChanged( bool b )
if( !m )
return;
- QString languageKey = m->pluginData( this, "languageKey" );
+ TQString languageKey = m->pluginData( this, "languageKey" );
if ( !languageKey.isEmpty() && languageKey != "null" )
m_actionLanguage->setCurrentItem( m_languages->languageIndex( languageKey ) );
else
@@ -164,8 +164,8 @@ void TranslatorPlugin::slotIncomingMessage( Kopete::Message &msg )
if ( m_incomingMode == DontTranslate )
return;
- QString src_lang;
- QString dst_lang;
+ TQString src_lang;
+ TQString dst_lang;
if ( ( msg.direction() == Kopete::Message::Inbound ) && !msg.plainBody().isEmpty() )
{
@@ -193,8 +193,8 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg )
if ( m_outgoingMode == DontTranslate )
return;
- QString src_lang;
- QString dst_lang;
+ TQString src_lang;
+ TQString dst_lang;
if ( ( msg.direction() == Kopete::Message::Outbound ) && ( !msg.plainBody().isEmpty() ) )
{
@@ -218,12 +218,12 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg )
}
}
-void TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to, QObject *obj, const char* slot )
+void TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to, TQObject *obj, const char* slot )
{
- QSignal completeSignal;
+ TQSignal completeSignal;
completeSignal.connect( obj, slot );
- QString result = translateMessage( msg, from, to );
+ TQString result = translateMessage( msg, from, to );
if(!result.isNull())
{
@@ -232,19 +232,19 @@ void TranslatorPlugin::translateMessage( const QString &msg, const QString &from
}
}
-QString TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
if ( from == to )
{
kdDebug( 14308 ) << k_funcinfo << "Src and Dst languages are the same" << endl;
- return QString::null;
+ return TQString::null;
}
// We search for src_dst
if(! m_languages->supported( m_service ).contains( from + "_" + to ) )
{
kdDebug( 14308 ) << k_funcinfo << from << "_" << to << " is not supported by service " << m_service << endl;
- return QString::null;
+ return TQString::null;
}
@@ -253,19 +253,19 @@ QString TranslatorPlugin::translateMessage( const QString &msg, const QString &f
else if ( m_service == "google" )
return googleTranslateMessage( msg ,from, to );
else
- return QString::null;
+ return TQString::null;
}
-QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
KURL translatorURL ( "http://translate.google.com/translate_t");
- QString body = KURL::encode_string( msg );
- QString lp = from + "|" + to;
+ TQString body = KURL::encode_string( msg );
+ TQString lp = from + "|" + to;
- QCString postData = QString( "text=" + body + "&langpair=" + lp ).utf8();
+ TQCString postData = TQString( "text=" + body + "&langpair=" + lp ).utf8();
- QString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp;
+ TQString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp;
kdDebug(14308) << k_funcinfo << " URL: " << gurl << endl;
KURL geturl ( gurl );
@@ -275,8 +275,8 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
//job->addMetaData( "content-type", "application/x-www-form-urlencoded" );
//job->addMetaData( "referrer", "http://www.google.com" );
- QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
// KIO is async and we use a sync API, so use the processEvents hack to work around that
// FIXME: We need to make the libkopete API async to get rid of this processEvents.
@@ -284,7 +284,7 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
while ( !m_completed[ job ] )
qApp->processEvents();
- QString data = QString::fromLatin1( m_data[ job ] );
+ TQString data = TQString::fromLatin1( m_data[ job ] );
// After hacks, we need to clean
m_data.remove( job );
@@ -292,27 +292,27 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
// kdDebug( 14308 ) << k_funcinfo << "Google response:"<< endl << data << endl;
-// QRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" );
- QRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>");
+// TQRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" );
+ TQRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>");
re.setMinimal( true );
re.search( data );
return re.cap( 1 );
}
-QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::babelTranslateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
- QString body = KURL::encode_string( msg);
- QString lp = from + "_" + to;
- QString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp;
+ TQString body = KURL::encode_string( msg);
+ TQString lp = from + "_" + to;
+ TQString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp;
KURL geturl ( gurl );
kdDebug( 14308 ) << k_funcinfo << "URL: " << gurl << endl;
KIO::TransferJob *job = KIO::get( geturl, false, true );
- QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
// KIO is async and we use a sync API, so use the processEvents hack to work around that
// FIXME: We need to make the libkopete API async to get rid of this processEvents.
@@ -320,7 +320,7 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri
while ( !m_completed[ job ] )
qApp->processEvents();
- QString data = QString::fromUtf8( m_data[ job ] );
+ TQString data = TQString::fromUtf8( m_data[ job ] );
// After hacks, we need to clean
m_data.remove( job );
@@ -328,15 +328,15 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri
//kdDebug( 14308 ) << k_funcinfo << "Babelfish response: " << endl << data << endl;
-// QRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" );
- QRegExp re( "<div style=padding:10px;>(.*)</div>" );
+// TQRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" );
+ TQRegExp re( "<div style=padding:10px;>(.*)</div>" );
re.setMinimal( true );
re.search( data );
return re.cap( 1 );
}
-void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &translated )
+void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const TQString &translated )
{
if ( translated.isEmpty() )
{
@@ -381,16 +381,16 @@ void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &tra
};
}
-void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const QByteArray &data )
+void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const TQByteArray &data )
{
- m_data[ job ] += QCString( data, data.size() + 1 );
+ m_data[ job ] += TQCString( data, data.size() + 1 );
}
void TranslatorPlugin::slotJobDone ( KIO::Job *job )
{
m_completed[ job ] = true;
- QObject::disconnect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::disconnect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::disconnect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::disconnect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
}
void TranslatorPlugin::slotSetLanguage()
diff --git a/kopete/plugins/translator/translatorplugin.h b/kopete/plugins/translator/translatorplugin.h
index 2a04b509..823b6eef 100644
--- a/kopete/plugins/translator/translatorplugin.h
+++ b/kopete/plugins/translator/translatorplugin.h
@@ -21,10 +21,10 @@
#ifndef BABELFISHPLUGIN_H
#define BABELFISHPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qintdict.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqintdict.h>
#include <kio/job.h>
@@ -58,7 +58,7 @@ friend class TranslatorGUIClient;
public:
static TranslatorPlugin *plugin();
- TranslatorPlugin( QObject *parent, const char *name, const QStringList &args );
+ TranslatorPlugin( TQObject *parent, const char *name, const TQStringList &args );
~TranslatorPlugin();
enum TranslateMode
@@ -72,7 +72,7 @@ public:
private slots:
void slotIncomingMessage( Kopete::Message& msg );
void slotOutgoingMessage( Kopete::Message& msg );
- void slotDataReceived ( KIO::Job *, const QByteArray &data);
+ void slotDataReceived ( KIO::Job *, const TQByteArray &data);
void slotJobDone ( KIO::Job *);
void slotSetLanguage();
void slotSelectionChanged(bool);
@@ -80,17 +80,17 @@ private slots:
void loadSettings();
public:
- QString translateMessage( const QString &, const QString &, const QString & );
- void translateMessage( const QString &, const QString &, const QString & , QObject * , const char*);
+ TQString translateMessage( const TQString &, const TQString &, const TQString & );
+ void translateMessage( const TQString &, const TQString &, const TQString & , TQObject * , const char*);
protected:
- QString googleTranslateMessage( const QString &, const QString &, const QString & );
- QString babelTranslateMessage(const QString &, const QString &, const QString & );
+ TQString googleTranslateMessage( const TQString &, const TQString &, const TQString & );
+ TQString babelTranslateMessage(const TQString &, const TQString &, const TQString & );
private:
- QMap< KIO::Job *, QCString> m_data;
- QMap< KIO::Job *, bool> m_completed;
+ TQMap< KIO::Job *, TQCString> m_data;
+ TQMap< KIO::Job *, bool> m_completed;
KSelectAction* m_actionLanguage;
@@ -98,13 +98,13 @@ private:
TranslatorLanguages *m_languages;
//Settings
- QString m_myLang;
- QString m_service;
+ TQString m_myLang;
+ TQString m_service;
unsigned int m_outgoingMode;
unsigned int m_incomingMode;
private:
- void sendTranslation(Kopete::Message &msg, const QString &translated);
+ void sendTranslation(Kopete::Message &msg, const TQString &translated);
};
#endif
diff --git a/kopete/plugins/translator/translatorprefs.cpp b/kopete/plugins/translator/translatorprefs.cpp
index cb67c4c6..8d06b49f 100644
--- a/kopete/plugins/translator/translatorprefs.cpp
+++ b/kopete/plugins/translator/translatorprefs.cpp
@@ -20,7 +20,7 @@
#include "kcautoconfigmodule.h"
#include "translatorprefsbase.h"
#include "translatorlanguages.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
class TranslatorPreferences;
@@ -30,13 +30,13 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_translator, TranslatorConfigFactory( "kcm
class TranslatorPreferences : public KCAutoConfigModule
{
public:
- TranslatorPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args )
+ TranslatorPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args )
{
TranslatorPrefsUI *preferencesDialog = new TranslatorPrefsUI(this);
TranslatorLanguages languages;
- QMap<QString,QString>::ConstIterator i;
- QMap<QString,QString> m;
+ TQMap<TQString,TQString>::ConstIterator i;
+ TQMap<TQString,TQString> m;
m = languages.languagesMap();
for ( i = m.begin(); i != m.end() ; ++i )
diff --git a/kopete/plugins/webpresence/webpresenceplugin.cpp b/kopete/plugins/webpresence/webpresenceplugin.cpp
index 1856d94c..bb7b9d4c 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.cpp
+++ b/kopete/plugins/webpresence/webpresenceplugin.cpp
@@ -20,9 +20,9 @@
#include "config.h"
-#include <qdom.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -51,18 +51,18 @@
typedef KGenericFactory<WebPresencePlugin> WebPresencePluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_webpresence, WebPresencePluginFactory( "kopete_webpresence" ) )
-WebPresencePlugin::WebPresencePlugin( QObject *parent, const char *name, const QStringList& /*args*/ )
+WebPresencePlugin::WebPresencePlugin( TQObject *parent, const char *name, const TQStringList& /*args*/ )
: Kopete::Plugin( WebPresencePluginFactory::instance(), parent, name ),
shuttingDown( false ), resultFormatting( WEB_HTML )
{
- m_writeScheduler = new QTimer( this );
- connect ( m_writeScheduler, SIGNAL( timeout() ), this, SLOT( slotWriteFile() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
-
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ m_writeScheduler = new TQTimer( this );
+ connect ( m_writeScheduler, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotWriteFile() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
loadSettings();
listenToAllAccounts();
}
@@ -113,8 +113,8 @@ void WebPresencePlugin::listenToAllAccounts()
for ( ProtocolList::Iterator it = protocols.begin();
it != protocols.end(); ++it )
{
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
- QDictIterator<Kopete::Account> acIt( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
+ TQDictIterator<Kopete::Account> acIt( accounts );
for( ; Kopete::Account *account = acIt.current(); ++acIt )
{
@@ -130,18 +130,18 @@ void WebPresencePlugin::listenToAccount( Kopete::Account* account )
{
// Connect to the account's status changed signal
// because we can't know if the account has already connected
- QObject::disconnect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQObject::disconnect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) ) ;
- QObject::connect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQT_SLOT( slotWaitMoreStatusChanges() ) ) ;
+ TQObject::connect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) );
+ TQT_SLOT( slotWaitMoreStatusChanges() ) );
}
}
@@ -197,8 +197,8 @@ void WebPresencePlugin::slotWriteFile()
// upload it to the specified URL
KURL src( m_output->name() );
KIO::FileCopyJob *job = KIO::file_move( src, dest, -1, true, false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadJobResult( KIO::Job * ) ) );
}
void WebPresencePlugin::slotUploadJobResult( KIO::Job *job )
@@ -215,26 +215,26 @@ KTempFile* WebPresencePlugin::generateFile()
{
// generate the (temporary) XML file representing the current contactlist
kdDebug( 14309 ) << k_funcinfo << endl;
- QString notKnown = i18n( "Not yet known" );
+ TQString notKnown = i18n( "Not yet known" );
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild( doc.createProcessingInstruction( "xml",
"version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = doc.createElement( "webpresence" );
+ TQDomElement root = doc.createElement( "webpresence" );
doc.appendChild( root );
// insert the current date/time
- QDomElement date = doc.createElement( "listdate" );
- QDomText t = doc.createTextNode(
- KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ TQDomElement date = doc.createElement( "listdate" );
+ TQDomText t = doc.createTextNode(
+ KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
date.appendChild( t );
root.appendChild( date );
// insert the user's name
- QDomElement name = doc.createElement( "name" );
- QDomText nameText;
+ TQDomElement name = doc.createElement( "name" );
+ TQDomText nameText;
if ( !useImName && !userName.isEmpty() )
nameText = doc.createTextNode( userName );
else
@@ -243,37 +243,37 @@ KTempFile* WebPresencePlugin::generateFile()
root.appendChild( name );
// insert the list of the user's accounts
- QDomElement accounts = doc.createElement( "accounts" );
+ TQDomElement accounts = doc.createElement( "accounts" );
root.appendChild( accounts );
- QPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
// If no accounts, stop here
if ( !list.isEmpty() )
{
- for( QPtrListIterator<Kopete::Account> it( list );
+ for( TQPtrListIterator<Kopete::Account> it( list );
Kopete::Account *account=it.current();
++it )
{
- QDomElement acc = doc.createElement( "account" );
+ TQDomElement acc = doc.createElement( "account" );
//output += h.openTag( "account" );
- QDomElement protoName = doc.createElement( "protocol" );
- QDomText protoNameText = doc.createTextNode(
+ TQDomElement protoName = doc.createElement( "protocol" );
+ TQDomText protoNameText = doc.createTextNode(
account->protocol()->pluginId() );
protoName.appendChild( protoNameText );
acc.appendChild( protoName );
Kopete::Contact* me = account->myself();
- QString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
- QDomElement accName = doc.createElement( "accountname" );
- QDomText accNameText = doc.createTextNode( ( me )
+ TQString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
+ TQDomElement accName = doc.createElement( "accountname" );
+ TQDomText accNameText = doc.createTextNode( ( me )
? displayName
: notKnown );
accName.appendChild( accNameText );
acc.appendChild( accName );
- QDomElement accStatus = doc.createElement( "accountstatus" );
- QDomText statusText = doc.createTextNode( ( me )
+ TQDomElement accStatus = doc.createElement( "accountstatus" );
+ TQDomText statusText = doc.createTextNode( ( me )
? statusAsString( me->onlineStatus() )
: notKnown ) ;
accStatus.appendChild( statusText );
@@ -299,8 +299,8 @@ KTempFile* WebPresencePlugin::generateFile()
if ( showAddresses )
{
- QDomElement accAddress = doc.createElement( "accountaddress" );
- QDomText addressText = doc.createTextNode( ( me )
+ TQDomElement accAddress = doc.createElement( "accountaddress" );
+ TQDomText addressText = doc.createTextNode( ( me )
? me->contactId()
: notKnown );
accAddress.appendChild( addressText );
@@ -313,8 +313,8 @@ KTempFile* WebPresencePlugin::generateFile()
// write the XML to a temporary file
KTempFile* file = new KTempFile();
- QTextStream *stream = file->textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = file->textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
doc.save( *stream, 4 );
file->close();
return file;
@@ -327,7 +327,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
xmlSubstituteEntitiesDefault( 1 );
xmlLoadExtDtdDefaultValue = 1;
- QFile sheet;
+ TQFile sheet;
switch ( resultFormatting ) {
case WEB_XML:
@@ -374,7 +374,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
goto end;
}
- doc = xmlParseFile( QFile::encodeName( src->name() ) );
+ doc = xmlParseFile( TQFile::encodeName( src->name() ) );
if ( !doc ) {
kdDebug(14309) << k_funcinfo << "ERROR: XML parsing failed" << endl;
retval = false;
@@ -430,12 +430,12 @@ ProtocolList WebPresencePlugin::allProtocols()
return result;
}
-QString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
+TQString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
{
if (shuttingDown)
return "OFFLINE";
- QString status;
+ TQString status;
switch ( newStatus.status() )
{
case Kopete::OnlineStatus::Online:
diff --git a/kopete/plugins/webpresence/webpresenceplugin.h b/kopete/plugins/webpresence/webpresenceplugin.h
index 3aea9af0..6e8ba946 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.h
+++ b/kopete/plugins/webpresence/webpresenceplugin.h
@@ -20,7 +20,7 @@
#ifndef WEBPRESENCEPLUGIN_H
#define WEBPRESENCEPLUGIN_H
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kio/job.h>
@@ -33,7 +33,7 @@ namespace Kopete { class MetaContact; }
class KToggleAction;
class KActionCollection;
-typedef QValueList<Kopete::Protocol*> ProtocolList;
+typedef TQValueList<Kopete::Protocol*> ProtocolList;
class WebPresencePlugin : public Kopete::Plugin
{
@@ -43,8 +43,8 @@ private:
int frequency;
bool showAddresses;
bool useImName;
- QString userName;
- QString userStyleSheet;
+ TQString userName;
+ TQString userStyleSheet;
bool useImagesInHTML;
// Is set to true when Kopete has notified us
@@ -59,10 +59,10 @@ private:
WEB_UNDEFINED
} resultFormatting;
- QString resultURL;
+ TQString resultURL;
public:
- WebPresencePlugin( QObject *parent, const char *name, const QStringList &args );
+ WebPresencePlugin( TQObject *parent, const char *name, const TQStringList &args );
virtual ~WebPresencePlugin();
virtual void aboutToUnload();
@@ -108,11 +108,11 @@ protected:
/**
* Converts numeric status to a string
*/
- QString statusAsString( const Kopete::OnlineStatus &newStatus );
+ TQString statusAsString( const Kopete::OnlineStatus &newStatus );
/**
* Schedules writes
*/
- QTimer* m_writeScheduler;
+ TQTimer* m_writeScheduler;
// The file to be uploaded to the WWW
KTempFile *m_output;
diff --git a/kopete/plugins/webpresence/webpresencepreferences.cpp b/kopete/plugins/webpresence/webpresencepreferences.cpp
index 9b00435a..8aebcd53 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.cpp
+++ b/kopete/plugins/webpresence/webpresencepreferences.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kgenericfactory.h>
#include <kautoconfig.h>
@@ -27,19 +27,19 @@
typedef KGenericFactory<WebPresencePreferences> WebPresencePreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_webpresence, WebPresencePreferencesFactory("kcm_kopete_webpresence"))
-WebPresencePreferences::WebPresencePreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+WebPresencePreferences::WebPresencePreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(WebPresencePreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new WebPresencePrefsUI(this);
preferencesDialog->uploadURL->setMode( KFile::File );
preferencesDialog->formatStylesheetURL->setFilter( "*.xsl" );
// KAutoConfig stuff
kautoconfig = new KAutoConfig(KGlobal::config(), this, "kautoconfig");
- connect(kautoconfig, SIGNAL(widgetModified()), SLOT(widgetModified()));
- connect(kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified()));
kautoconfig->addWidget(preferencesDialog, "Web Presence Plugin");
kautoconfig->retrieveSettings(true);
}
diff --git a/kopete/plugins/webpresence/webpresencepreferences.h b/kopete/plugins/webpresence/webpresencepreferences.h
index 120e7a9a..8c272cdc 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.h
+++ b/kopete/plugins/webpresence/webpresencepreferences.h
@@ -31,7 +31,7 @@ class WebPresencePreferences : public KCModule {
Q_OBJECT
public:
- WebPresencePreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ WebPresencePreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual void save();
virtual void defaults();
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp
index 9d7846d5..2293143f 100644
--- a/kopete/protocols/gadu/gaduaccount.cpp
+++ b/kopete/protocols/gadu/gaduaccount.cpp
@@ -46,13 +46,13 @@
#include <ktempfile.h>
#include <kio/netaccess.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
-#include <qhostaddress.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
+#include <tqhostaddress.h>
#include <netinet/in.h>
@@ -64,9 +64,9 @@ public:
GaduSession* session_;
GaduDCC* gaduDcc_;
- QTimer* pingTimer_;
+ TQTimer* pingTimer_;
- QTextCodec* textcodec_;
+ TQTextCodec* textcodec_;
KFileDialog* saveListDialog;
KFileDialog* loadListDialog;
@@ -85,12 +85,12 @@ public:
bool forFriends;
bool ignoreAnons;
- QTimer* exportTimer_;
+ TQTimer* exportTimer_;
bool exportUserlist;
KConfigGroup* config;
Kopete::OnlineStatus status;
- QValueList<unsigned int> servers;
+ TQValueList<unsigned int> servers;
KGaduLoginParams loginInfo;
};
@@ -114,10 +114,10 @@ static const char* const servers_ip[] = {
#define NUM_SERVERS (sizeof(servers_ip)/sizeof(char*))
- GaduAccount::GaduAccount( Kopete::Protocol* parent, const QString& accountID,const char* name )
+ GaduAccount::GaduAccount( Kopete::Protocol* parent, const TQString& accountID,const char* name )
: Kopete::PasswordedAccount( parent, accountID, 0, name )
{
- QHostAddress ip;
+ TQHostAddress ip;
p = new GaduAccountPrivate;
p->pingTimer_ = NULL;
@@ -125,7 +125,7 @@ static const char* const servers_ip[] = {
p->loadListDialog = NULL;
p->forFriends = false;
- p->textcodec_ = QTextCodec::codecForName( "CP1250" );
+ p->textcodec_ = TQTextCodec::codecForName( "CP1250" );
p->session_ = new GaduSession( this, "GaduSession" );
KGlobal::config()->setGroup( "Gadu" );
@@ -133,10 +133,10 @@ static const char* const servers_ip[] = {
setMyself( new GaduContact( accountId().toInt(), accountId(), this, Kopete::ContactList::self()->myself() ) );
p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL );
- p->lastDescription = QString::null;
+ p->lastDescription = TQString::null;
for ( unsigned int i = 0; i < NUM_SERVERS ; i++ ) {
- ip.setAddress( QString( servers_ip[i] ) );
+ ip.setAddress( TQString( servers_ip[i] ) );
p->servers.append( htonl( ip.toIPv4Address() ) );
kdDebug( 14100 ) << "adding IP: " << p->servers[ i ] << " to cache" << endl;
}
@@ -151,8 +151,8 @@ static const char* const servers_ip[] = {
p->loginInfo.client_port = 0;
p->loginInfo.client_addr = 0;
- p->pingTimer_ = new QTimer( this );
- p->exportTimer_ = new QTimer( this );
+ p->pingTimer_ = new TQTimer( this );
+ p->exportTimer_ = new TQTimer( this );
p->exportUserlist = false;
p->gaduDcc_ = NULL;
@@ -165,13 +165,13 @@ static const char* const servers_ip[] = {
initConnections();
initActions();
- QString nick = p->config->readEntry( QString::fromAscii( "nickName" ) );
+ TQString nick = p->config->readEntry( TQString::fromAscii( "nickName" ) );
if ( !nick.isNull() ) {
myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nick );
}
else {
myself()->setProperty( Kopete::Global::Properties::self()->nickName(), accountId() );
- p->config->writeEntry( QString::fromAscii( "nickName" ), accountId() );
+ p->config->writeEntry( TQString::fromAscii( "nickName" ), accountId() );
}
}
@@ -184,15 +184,15 @@ void
GaduAccount::initActions()
{
p->searchAction = new KAction( i18n( "&Search for Friends" ), "", 0,
- this, SLOT( slotSearch() ), this, "actionSearch" );
+ this, TQT_SLOT( slotSearch() ), this, "actionSearch" );
p->listputAction = new KAction( i18n( "Export Contacts to Server" ), "", 0,
- this, SLOT( slotExportContactsList() ), this, "actionListput" );
+ this, TQT_SLOT( slotExportContactsList() ), this, "actionListput" );
p->listToFileAction = new KAction( i18n( "Export Contacts to File..." ), "", 0,
- this, SLOT( slotExportContactsListToFile() ), this, "actionListputFile" );
+ this, TQT_SLOT( slotExportContactsListToFile() ), this, "actionListputFile" );
p->listFromFileAction = new KAction( i18n( "Import Contacts From File..." ), "", 0,
- this, SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" );
+ this, TQT_SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" );
p->friendsModeAction = new KToggleAction( i18n( "Only for Friends" ), "", 0,
- this, SLOT( slotFriendsMode() ), this,
+ this, TQT_SLOT( slotFriendsMode() ), this,
"actionFriendsMode" );
static_cast<KToggleAction*>(p->friendsModeAction)->setChecked( p->forFriends );
@@ -201,38 +201,38 @@ GaduAccount::initActions()
void
GaduAccount::initConnections()
{
- QObject::connect( p->session_, SIGNAL( error( const QString&, const QString& ) ),
- SLOT( error( const QString&, const QString& ) ) );
- QObject::connect( p->session_, SIGNAL( messageReceived( KGaduMessage* ) ),
- SLOT( messageReceived( KGaduMessage* ) ) );
- QObject::connect( p->session_, SIGNAL( contactStatusChanged( KGaduNotify* ) ),
- SLOT( contactStatusChanged( KGaduNotify* ) ) );
- QObject::connect( p->session_, SIGNAL( connectionFailed( gg_failure_t )),
- SLOT( connectionFailed( gg_failure_t ) ) );
- QObject::connect( p->session_, SIGNAL( connectionSucceed( ) ),
- SLOT( connectionSucceed( ) ) );
- QObject::connect( p->session_, SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ),
- SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) );
- QObject::connect( p->session_, SIGNAL( ackReceived( unsigned int ) ),
- SLOT( ackReceived( unsigned int ) ) );
- QObject::connect( p->session_, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
- SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
- QObject::connect( p->session_, SIGNAL( userListExported() ),
- SLOT( userListExportDone() ) );
- QObject::connect( p->session_, SIGNAL( userListRecieved( const QString& ) ),
- SLOT( userlist( const QString& ) ) );
- QObject::connect( p->session_, SIGNAL( incomingCtcp( unsigned int ) ),
- SLOT( slotIncomingDcc( unsigned int ) ) );
-
- QObject::connect( p->pingTimer_, SIGNAL( timeout() ),
- SLOT( pingServer() ) );
-
- QObject::connect( p->exportTimer_, SIGNAL( timeout() ),
- SLOT( slotUserlistSynch() ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( error( const TQString&, const TQString& ) ),
+ TQT_SLOT( error( const TQString&, const TQString& ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( messageReceived( KGaduMessage* ) ),
+ TQT_SLOT( messageReceived( KGaduMessage* ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( contactStatusChanged( KGaduNotify* ) ),
+ TQT_SLOT( contactStatusChanged( KGaduNotify* ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( connectionFailed( gg_failure_t )),
+ TQT_SLOT( connectionFailed( gg_failure_t ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( connectionSucceed( ) ),
+ TQT_SLOT( connectionSucceed( ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ),
+ TQT_SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( ackReceived( unsigned int ) ),
+ TQT_SLOT( ackReceived( unsigned int ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
+ TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( userListExported() ),
+ TQT_SLOT( userListExportDone() ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( userListRecieved( const TQString& ) ),
+ TQT_SLOT( userlist( const TQString& ) ) );
+ TQObject::connect( p->session_, TQT_SIGNAL( incomingCtcp( unsigned int ) ),
+ TQT_SLOT( slotIncomingDcc( unsigned int ) ) );
+
+ TQObject::connect( p->pingTimer_, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( pingServer() ) );
+
+ TQObject::connect( p->exportTimer_, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotUserlistSynch() ) );
}
void
-GaduAccount::setAway( bool isAway, const QString& awayMessage )
+GaduAccount::setAway( bool isAway, const TQString& awayMessage )
{
unsigned int currentStatus;
@@ -288,22 +288,22 @@ GaduAccount::actionMenu()
}
p->actionMenu_->insert( new KAction( i18n( "Go O&nline" ),
GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ),
- 0, this, SLOT( slotGoOnline() ), this, "actionGaduConnect" ) );
+ 0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ),
GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ),
- 0, this, SLOT( slotGoBusy() ), this, "actionGaduConnect" ) );
+ 0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ),
GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ),
- 0, this, SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) );
+ 0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ),
GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ),
- 0, this, SLOT( slotGoOffline() ), this, "actionGaduConnect" ) );
+ 0, this, TQT_SLOT( slotGoOffline() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Description..." ), "info",
- 0, this, SLOT( slotDescription() ), this, "actionGaduDescription" ) );
+ 0, this, TQT_SLOT( slotDescription() ), this, "actionGaduDescription" ) );
p->actionMenu_->insert( p->friendsModeAction );
@@ -324,7 +324,7 @@ GaduAccount::actionMenu()
}
void
-GaduAccount::connectWithPassword(const QString& password)
+GaduAccount::connectWithPassword(const TQString& password)
{
if (password.isEmpty()) {
return;
@@ -350,7 +350,7 @@ GaduAccount::disconnect( DisconnectReason reason )
}
void
-GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason )
+GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason )
{
kdDebug(14100) << k_funcinfo << "Called" << endl;
changeStatus( status, reason);
@@ -375,7 +375,7 @@ GaduAccount::userlistChanged()
}
bool
-GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact )
+GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact )
{
kdDebug(14100) << "createContact " << contactId << endl;
@@ -390,7 +390,7 @@ GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* paren
}
void
-GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& descr )
+GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr )
{
unsigned int ns;
@@ -477,7 +477,7 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& de
}
void
-GaduAccount::slotLogin( int status, const QString& dscr )
+GaduAccount::slotLogin( int status, const TQString& dscr )
{
p->lastDescription = dscr;
@@ -581,7 +581,7 @@ GaduAccount::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl
}
void
-GaduAccount::error( const QString& title, const QString& message )
+GaduAccount::error( const TQString& title, const TQString& message )
{
KMessageBox::error( Kopete::UI::Global::mainWidget(), title, message );
}
@@ -590,7 +590,7 @@ void
GaduAccount::messageReceived( KGaduMessage* gaduMessage )
{
GaduContact* contact = 0;
- QPtrList<Kopete::Contact> contactsListTmp;
+ TQPtrList<Kopete::Contact> contactsListTmp;
// FIXME:check for ignored users list
@@ -600,7 +600,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage )
return;
}
- contact = static_cast<GaduContact*> ( contacts()[ QString::number( gaduMessage->sender_id ) ] );
+ contact = static_cast<GaduContact*> ( contacts()[ TQString::number( gaduMessage->sender_id ) ] );
if ( !contact ) {
if ( p->ignoreAnons == true ) {
@@ -610,7 +610,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage )
Kopete::MetaContact* metaContact = new Kopete::MetaContact ();
metaContact->setTemporary ( true );
contact = new GaduContact( gaduMessage->sender_id,
- QString::number( gaduMessage->sender_id ), this, metaContact );
+ TQString::number( gaduMessage->sender_id ), this, metaContact );
Kopete::ContactList::self ()->addMetaContact( metaContact );
addNotify( gaduMessage->sender_id );
}
@@ -625,7 +625,7 @@ GaduAccount::ackReceived( unsigned int recipient )
{
GaduContact* contact;
- contact = static_cast<GaduContact*> ( contacts()[ QString::number( recipient ) ] );
+ contact = static_cast<GaduContact*> ( contacts()[ TQString::number( recipient ) ] );
if ( contact ) {
kdDebug(14100) << "####" << "Received an ACK from " << contact->uin() << endl;
contact->messageAck();
@@ -642,7 +642,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify )
GaduContact* contact;
- contact = static_cast<GaduContact*>( contacts()[ QString::number( gaduNotify->contact_id ) ] );
+ contact = static_cast<GaduContact*>( contacts()[ TQString::number( gaduNotify->contact_id ) ] );
if( !contact ) {
kdDebug(14100) << "Notify not in the list " << gaduNotify->contact_id << endl;
return;
@@ -668,7 +668,7 @@ void
GaduAccount::connectionFailed( gg_failure_t failure )
{
bool tryReconnect = false;
- QString pass;
+ TQString pass;
switch (failure) {
@@ -682,7 +682,7 @@ GaduAccount::connectionFailed( gg_failure_t failure )
default:
if ( p->connectWithSSL ) {
if ( useTls() != TLS_only ) {
- slotCommandDone( QString::null, i18n( "connection using SSL was not possible, retrying without." ) );
+ slotCommandDone( TQString::null, i18n( "connection using SSL was not possible, retrying without." ) );
kdDebug( 14100 ) << "try without tls now" << endl;
p->connectWithSSL = false;
tryReconnect = true;
@@ -753,7 +753,7 @@ GaduAccount::slotIncomingDcc( unsigned int uin )
return;
}
- contact = static_cast<GaduContact*>( contacts()[ QString::number( uin ) ] );
+ contact = static_cast<GaduContact*>( contacts()[ TQString::number( uin ) ] );
if ( !contact ) {
kdDebug(14100) << "attempt to make dcc connection from unknown uin " << uin << endl;
@@ -798,7 +798,7 @@ GaduAccount::startNotify()
return;
}
- QDictIterator<Kopete::Contact> kopeteContactsList( contacts() );
+ TQDictIterator<Kopete::Contact> kopeteContactsList( contacts() );
uin_t* userlist = 0;
userlist = new uin_t[ contacts().count() ];
@@ -832,13 +832,13 @@ GaduAccount::slotSessionDisconnect( Kopete::Account::DisconnectReason reason )
}
void
-GaduAccount::userlist( const QString& contactsListString )
+GaduAccount::userlist( const TQString& contactsListString )
{
kdDebug(14100)<<"### Got userlist - gadu account"<<endl;
GaduContactsList contactsList( contactsListString );
- QString contactName;
- QStringList groups;
+ TQString contactName;
+ TQStringList groups;
GaduContact* contact;
Kopete::MetaContact* metaContact;
unsigned int i;
@@ -880,8 +880,8 @@ GaduAccount::userlist( const QString& contactsListString )
metaContact = contact->metaContact();
metaContact->removeFromGroup( Kopete::Group::topLevel() );
// put him in all desired groups:
- groups = QStringList::split( ",", contactsList[i].group );
- for ( QStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) {
+ groups = TQStringList::split( ",", contactsList[i].group );
+ for ( TQStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) {
metaContact->addToGroup( Kopete::ContactList::self ()->findGroup ( *groupsIterator) );
}
}
@@ -894,7 +894,7 @@ GaduAccount::userlist( const QString& contactsListString )
void
GaduAccount::userListExportDone()
{
- slotCommandDone( QString::null, i18n( "Contacts exported to the server.") );
+ slotCommandDone( TQString::null, i18n( "Contacts exported to the server.") );
}
void
@@ -922,21 +922,21 @@ GaduAccount::slotExportContactsListToFile()
return;
}
- p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null,
+ p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null,
Kopete::UI::Global::mainWidget(), "gadu-list-save", false );
p->saveListDialog->setCaption(
i18n("Save Contacts List for Account %1 As").arg(
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) );
- if ( p->saveListDialog->exec() == QDialog::Accepted ) {
- QCString list = p->textcodec_->fromUnicode( userlist()->asString() );
+ if ( p->saveListDialog->exec() == TQDialog::Accepted ) {
+ TQCString list = p->textcodec_->fromUnicode( userlist()->asString() );
if ( tempFile.status() ) {
// say cheese, can't create file.....
error( i18n( "Unable to create temporary file." ), i18n( "Save Contacts List Failed" ) );
}
else {
- QTextStream* tempStream = tempFile.textStream();
+ TQTextStream* tempStream = tempFile.textStream();
(*tempStream) << list.data();
tempFile.close();
@@ -960,25 +960,25 @@ void
GaduAccount::slotImportContactsFromFile()
{
KURL url;
- QCString list;
- QString oname;
+ TQCString list;
+ TQString oname;
if ( p->loadListDialog ) {
kdDebug( 14100 ) << "load contacts from file: alread waiting for input " << endl ;
return;
}
- p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null,
+ p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null,
Kopete::UI::Global::mainWidget(), "gadu-list-load", true );
p->loadListDialog->setCaption(
i18n("Load Contacts List for Account %1 As").arg(
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) );
- if ( p->loadListDialog->exec() == QDialog::Accepted ) {
+ if ( p->loadListDialog->exec() == TQDialog::Accepted ) {
url = p->loadListDialog->selectedURL();
kdDebug(14100) << "a:" << url << "\nb:" << oname << endl;
if ( KIO::NetAccess::download( url, oname, Kopete::UI::Global::mainWidget() ) ) {
- QFile tempFile( oname );
+ TQFile tempFile( oname );
if ( tempFile.open( IO_ReadOnly ) ) {
list = tempFile.readAll();
tempFile.close();
@@ -1034,7 +1034,7 @@ GaduAccount::userlist()
return contactsList;
}
- QDictIterator<Kopete::Contact> contactsIterator( contacts() );
+ TQDictIterator<Kopete::Contact> contactsIterator( contacts() );
for( i=0 ; contactsIterator.current() ; ++contactsIterator ) {
contact = static_cast<GaduContact*>( *contactsIterator );
@@ -1058,7 +1058,7 @@ GaduAccount::slotChangePassword()
}
void
-GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what )
+GaduAccount::slotCommandDone( const TQString& /*title*/, const TQString& what )
{
//FIXME: any chance to have my own title in event popup ?
KNotifyClient::userEvent( 0, what,
@@ -1066,7 +1066,7 @@ GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what )
}
void
-GaduAccount::slotCommandError(const QString& title, const QString& what )
+GaduAccount::slotCommandError(const TQString& title, const TQString& what )
{
error( title, what );
}
@@ -1076,7 +1076,7 @@ GaduAccount::slotDescription()
{
GaduAway* away = new GaduAway( this );
- if( away->exec() == QDialog::Accepted ) {
+ if( away->exec() == TQDialog::Accepted ) {
changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ),
away->awayText() );
}
@@ -1102,7 +1102,7 @@ GaduAccount::slotSearchResult( const SearchResult& result, unsigned int seq )
}
void
-GaduAccount::sendFile( GaduContact* peer, QString& filePath )
+GaduAccount::sendFile( GaduContact* peer, TQString& filePath )
{
GaduDCCTransaction* gtran = new GaduDCCTransaction( p->gaduDcc_ );
gtran->setupOutgoing( peer, filePath );
@@ -1120,9 +1120,9 @@ GaduAccount::dccRequest( GaduContact* peer )
bool
GaduAccount::dccEnabled()
{
- QString s = p->config->readEntry( QString::fromAscii( "useDcc" ) );
+ TQString s = p->config->readEntry( TQString::fromAscii( "useDcc" ) );
kdDebug( 14100 ) << "dccEnabled: "<< s << endl;
- if ( s == QString::fromAscii( "enabled" ) ) {
+ if ( s == TQString::fromAscii( "enabled" ) ) {
return true;
}
return false;
@@ -1131,18 +1131,18 @@ GaduAccount::dccEnabled()
bool
GaduAccount::setDcc( bool d )
{
- QString s;
+ TQString s;
bool f = true;
if ( d == false ) {
dccOff();
- s = QString::fromAscii( "disabled" );
+ s = TQString::fromAscii( "disabled" );
}
else {
- s = QString::fromAscii( "enabled" );
+ s = TQString::fromAscii( "enabled" );
}
- p->config->writeEntry( QString::fromAscii( "useDcc" ), s );
+ p->config->writeEntry( TQString::fromAscii( "useDcc" ), s );
if ( p->session_->isConnected() && d ) {
dccOn();
@@ -1156,18 +1156,18 @@ GaduAccount::setDcc( bool d )
void
GaduAccount::saveFriendsMode( bool i )
{
- p->config->writeEntry( QString::fromAscii( "forFriends" ),
- i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) );
+ p->config->writeEntry( TQString::fromAscii( "forFriends" ),
+ i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) );
}
bool
GaduAccount::loadFriendsMode()
{
- QString s;
+ TQString s;
bool r;
int n;
- s = p->config->readEntry( QString::fromAscii( "forFriends" ) );
+ s = p->config->readEntry( TQString::fromAscii( "forFriends" ) );
n = s.toInt( &r );
if ( n ) {
@@ -1182,11 +1182,11 @@ GaduAccount::loadFriendsMode()
bool
GaduAccount::ignoreAnons()
{
- QString s;
+ TQString s;
bool r;
int n;
- s = p->config->readEntry( QString::fromAscii( "ignoreAnons" ) );
+ s = p->config->readEntry( TQString::fromAscii( "ignoreAnons" ) );
n = s.toInt( &r );
if ( n ) {
@@ -1201,19 +1201,19 @@ void
GaduAccount::setIgnoreAnons( bool i )
{
p->ignoreAnons = i;
- p->config->writeEntry( QString::fromAscii( "ignoreAnons" ),
- i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) );
+ p->config->writeEntry( TQString::fromAscii( "ignoreAnons" ),
+ i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) );
}
GaduAccount::tlsConnection
GaduAccount::useTls()
{
- QString s;
+ TQString s;
bool c;
unsigned int oldC;
tlsConnection Tls;
- s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) );
+ s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) );
oldC = s.toUInt( &c );
// we have old format
if ( c ) {
@@ -1221,7 +1221,7 @@ GaduAccount::useTls()
oldC << " willl be converted to new string value" << endl;
setUseTls( (tlsConnection) oldC );
// should be string now, unless there was an error reading
- s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) );
+ s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) );
kdDebug( 14100 ) << "new useEncryptedConnection value : " << s << endl;
}
@@ -1239,7 +1239,7 @@ GaduAccount::useTls()
void
GaduAccount::setUseTls( tlsConnection ut )
{
- QString s;
+ TQString s;
switch( ut ) {
case TLS_ifAvaliable:
s = "TLS_ifAvaliable";
@@ -1255,7 +1255,7 @@ GaduAccount::setUseTls( tlsConnection ut )
break;
}
- p->config->writeEntry( QString::fromAscii( "useEncryptedConnection" ), s );
+ p->config->writeEntry( TQString::fromAscii( "useEncryptedConnection" ), s );
}
#include "gaduaccount.moc"
diff --git a/kopete/protocols/gadu/gaduaccount.h b/kopete/protocols/gadu/gaduaccount.h
index 22d68842..234f3514 100644
--- a/kopete/protocols/gadu/gaduaccount.h
+++ b/kopete/protocols/gadu/gaduaccount.h
@@ -32,10 +32,10 @@
#include <libgadu.h>
-#include <qhostaddress.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqhostaddress.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kfiledialog.h>
@@ -56,13 +56,13 @@ class GaduAccount : public Kopete::PasswordedAccount
Q_OBJECT
public:
- GaduAccount( Kopete::Protocol*, const QString& accountID, const char* name = 0L );
+ GaduAccount( Kopete::Protocol*, const TQString& accountID, const char* name = 0L );
~GaduAccount();
//{
- void setAway( bool isAway, const QString& awayMessage = QString::null );
+ void setAway( bool isAway, const TQString& awayMessage = TQString::null );
KActionMenu* actionMenu();
void dccRequest( GaduContact* );
- void sendFile( GaduContact* , QString& );
+ void sendFile( GaduContact* , TQString& );
//}
enum tlsConnection{ TLS_ifAvaliable = 0, TLS_only, TLS_no };
unsigned int getPersonalInformation();
@@ -70,14 +70,14 @@ public:
public slots:
//{
- void connectWithPassword(const QString &password);
+ void connectWithPassword(const TQString &password);
void disconnect( DisconnectReason );
void disconnect();
- void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null);
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null);
//}
- void changeStatus( const Kopete::OnlineStatus& status, const QString& descr = QString::null );
- void slotLogin( int status = GG_STATUS_AVAIL, const QString& dscr = QString::null );
+ void changeStatus( const Kopete::OnlineStatus& status, const TQString& descr = TQString::null );
+ void slotLogin( int status = GG_STATUS_AVAIL, const TQString& dscr = TQString::null );
void slotLogoff();
void slotGoOnline();
void slotGoOffline();
@@ -94,7 +94,7 @@ public slots:
void sendMessage( uin_t recipient, const Kopete::Message& msg,
int msgClass = GG_CLASS_CHAT );
- void error( const QString& title, const QString& message );
+ void error( const TQString& title, const TQString& message );
void pong();
void pingServer();
@@ -126,7 +126,7 @@ signals:
protected:
//{
- bool createContact( const QString& contactId,
+ bool createContact( const TQString& contactId,
Kopete::MetaContact* parentContact );
//}
@@ -143,7 +143,7 @@ private slots:
void slotImportContactsFromFile();
void slotFriendsMode();
- void userlist( const QString& contacts );
+ void userlist( const TQString& contacts );
GaduContactsList* userlist();
void slotUserlistSynch();
@@ -152,8 +152,8 @@ private slots:
void slotChangePassword();
- void slotCommandDone( const QString&, const QString& );
- void slotCommandError( const QString&, const QString& );
+ void slotCommandDone( const TQString&, const TQString& );
+ void slotCommandError( const TQString&, const TQString& );
void slotSearchResult( const SearchResult& result, unsigned int seq );
void userListExportDone();
diff --git a/kopete/protocols/gadu/gaduaddcontactpage.cpp b/kopete/protocols/gadu/gaduaddcontactpage.cpp
index 2b914bab..89645afd 100644
--- a/kopete/protocols/gadu/gaduaddcontactpage.cpp
+++ b/kopete/protocols/gadu/gaduaddcontactpage.cpp
@@ -34,22 +34,22 @@
#include <kopetecontactlist.h>
#include <kopetegroup.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qcombobox.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqcombobox.h>
#include <krestrictedline.h>
-GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, QWidget* parent, const char* name )
+GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, TQWidget* parent, const char* name )
: AddContactPage( parent, name )
{
account_ = owner;
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
addUI_ = new GaduAddUI( this );
- connect( addUI_->addEdit_, SIGNAL( textChanged( const QString & ) ), SLOT( slotUinChanged( const QString & ) ) );
+ connect( addUI_->addEdit_, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotUinChanged( const TQString & ) ) );
addUI_->addEdit_->setValidChars( "1234567890" );
addUI_->addEdit_->setText( "" );
addUI_->groups->setDisabled( TRUE );
@@ -69,23 +69,23 @@ GaduAddContactPage::fillGroups()
{
/*
Kopete::Group *g;
- QPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups();
for( g = gl.first(); g; g = gl.next() ) {
- QCheckListItem* item = new QCheckListItem( addUI_->groups, g->displayName(), QCheckListItem::CheckBox );
+ TQCheckListItem* item = new TQCheckListItem( addUI_->groups, g->displayName(), TQCheckListItem::CheckBox );
kdDebug(14100) << g->displayName() << " " << g->groupId() << endl;
}
*/
}
void
-GaduAddContactPage::showEvent( QShowEvent* e )
+GaduAddContactPage::showEvent( TQShowEvent* e )
{
- slotUinChanged( QString::null );
+ slotUinChanged( TQString::null );
AddContactPage::showEvent( e );
}
void
-GaduAddContactPage::slotUinChanged( const QString & )
+GaduAddContactPage::slotUinChanged( const TQString & )
{
emit dataValid( this, validateData() );
}
@@ -108,8 +108,8 @@ bool
GaduAddContactPage::apply( Kopete::Account* a , Kopete::MetaContact* mc )
{
if ( validateData() ) {
- QString userid = addUI_->addEdit_->text().stripWhiteSpace();
- QString name = addUI_->nickEdit_->text().stripWhiteSpace();
+ TQString userid = addUI_->addEdit_->text().stripWhiteSpace();
+ TQString name = addUI_->nickEdit_->text().stripWhiteSpace();
if ( a != account_ ) {
kdDebug(14100) << "Problem because accounts differ: " << a->accountId()
<< " , " << account_->accountId() << endl;
diff --git a/kopete/protocols/gadu/gaduaddcontactpage.h b/kopete/protocols/gadu/gaduaddcontactpage.h
index e922bde7..8ba36bc8 100644
--- a/kopete/protocols/gadu/gaduaddcontactpage.h
+++ b/kopete/protocols/gadu/gaduaddcontactpage.h
@@ -39,23 +39,23 @@ class GaduAddContactPage : public AddContactPage
Q_OBJECT
public:
- GaduAddContactPage( GaduAccount*, QWidget* parent = 0, const char* name = 0 );
+ GaduAddContactPage( GaduAccount*, TQWidget* parent = 0, const char* name = 0 );
~GaduAddContactPage();
virtual bool validateData();
virtual bool apply( Kopete::Account* , Kopete::MetaContact * );
protected:
- void showEvent(QShowEvent *e);
+ void showEvent(TQShowEvent *e);
public slots:
- void slotUinChanged( const QString& );
+ void slotUinChanged( const TQString& );
private:
void fillGroups();
GaduAccount* account_;
GaduAddUI* addUI_;
- QLabel* noaddMsg1_;
- QLabel* noaddMsg2_;
+ TQLabel* noaddMsg1_;
+ TQLabel* noaddMsg2_;
};
#endif
diff --git a/kopete/protocols/gadu/gaduaway.cpp b/kopete/protocols/gadu/gaduaway.cpp
index 3fe42d62..dd86fa23 100644
--- a/kopete/protocols/gadu/gaduaway.cpp
+++ b/kopete/protocols/gadu/gaduaway.cpp
@@ -29,14 +29,14 @@
#include <ktextedit.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
#include "gaduawayui.h"
#include "gaduaway.h"
-GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name )
+GaduAway::GaduAway( GaduAccount* account, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Away Dialog" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, true ), account_( account )
@@ -59,7 +59,7 @@ GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name )
}
ui_->textEdit_->setText( account->myself()->property( "awayMessage" ).value().toString() );
- connect( this, SIGNAL( applyClicked() ), SLOT( slotApply() ) );
+ connect( this, TQT_SIGNAL( applyClicked() ), TQT_SLOT( slotApply() ) );
}
int
diff --git a/kopete/protocols/gadu/gaduaway.h b/kopete/protocols/gadu/gaduaway.h
index 525291d2..c7ec2f5f 100644
--- a/kopete/protocols/gadu/gaduaway.h
+++ b/kopete/protocols/gadu/gaduaway.h
@@ -24,7 +24,7 @@
#define GADUAWAY_H
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
class GaduAccount;
class GaduAwayUI;
@@ -34,9 +34,9 @@ class GaduAway : public KDialogBase
Q_OBJECT
public:
- GaduAway( GaduAccount*, QWidget* parent = 0, const char* name = 0 );
+ GaduAway( GaduAccount*, TQWidget* parent = 0, const char* name = 0 );
int status() const;
- QString awayText() const;
+ TQString awayText() const;
protected slots:
void slotApply();
diff --git a/kopete/protocols/gadu/gaducommands.cpp b/kopete/protocols/gadu/gaducommands.cpp
index 00a571ff..2be539c0 100644
--- a/kopete/protocols/gadu/gaducommands.cpp
+++ b/kopete/protocols/gadu/gaducommands.cpp
@@ -27,18 +27,18 @@
#include "gaducommands.h"
#include "gadusession.h"
-#include <qsocketnotifier.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qimage.h>
+#include <tqsocketnotifier.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kdebug.h>
#include <errno.h>
-GaduCommand::GaduCommand( QObject* parent, const char* name )
-: QObject( parent, name ), read_( 0 ), write_( 0 )
+GaduCommand::GaduCommand( TQObject* parent, const char* name )
+: TQObject( parent, name ), read_( 0 ), write_( 0 )
{
}
@@ -57,13 +57,13 @@ GaduCommand::done() const
void
GaduCommand::checkSocket( int fd, int checkWhat )
{
- read_ = new QSocketNotifier( fd, QSocketNotifier::Read, this );
+ read_ = new TQSocketNotifier( fd, TQSocketNotifier::Read, this );
read_->setEnabled( false );
- QObject::connect( read_, SIGNAL( activated(int) ), SLOT( forwarder() ) );
+ TQObject::connect( read_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) );
- write_ = new QSocketNotifier( fd, QSocketNotifier::Write, this );
+ write_ = new TQSocketNotifier( fd, TQSocketNotifier::Write, this );
write_->setEnabled( false );
- QObject::connect( write_, SIGNAL( activated(int) ), SLOT( forwarder() ) );
+ TQObject::connect( write_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) );
enableNotifiers( checkWhat );
}
@@ -114,12 +114,12 @@ GaduCommand::forwarder()
emit socketReady();
}
-RegisterCommand::RegisterCommand( QObject* parent, const char* name )
+RegisterCommand::RegisterCommand( TQObject* parent, const char* name )
:GaduCommand( parent, name ), state( RegisterStateNoToken ), session_( 0 ), uin( 0 )
{
}
-RegisterCommand::RegisterCommand( const QString& email, const QString& password, QObject* parent, const char* name )
+RegisterCommand::RegisterCommand( const TQString& email, const TQString& password, TQObject* parent, const char* name )
:GaduCommand( parent, name ), state( RegisterStateNoToken ), email_( email ), password_( password ), session_( 0 ), uin( 0 )
{
}
@@ -148,14 +148,14 @@ RegisterCommand::requestToken()
return;
}
- connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) );
+ connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) );
checkSocket( session_->fd, session_->check );
return;
}
void
-RegisterCommand::setUserinfo( const QString& email, const QString& password, const QString& token )
+RegisterCommand::setUserinfo( const TQString& email, const TQString& password, const TQString& token )
{
email_ = email;
password_ = password;
@@ -184,7 +184,7 @@ RegisterCommand::execute()
return;
}
state = RegisterStateWaitingForNumber;
- connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) );
+ connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) );
checkSocket( session_->fd, session_->check );
}
@@ -225,7 +225,7 @@ void RegisterCommand::watcher()
kdDebug( 14100 ) << "got Token!, ID: " << tokenId << endl;
deleteNotifiers();
if ( pubDir->success ) {
- QPixmap tokenImg;
+ TQPixmap tokenImg;
tokenImg.loadFromData( (const unsigned char *)session_->body, session_->body_size );
state = RegisterStateGotToken;
emit tokenRecieved( tokenImg, tokenId );
@@ -237,7 +237,7 @@ void RegisterCommand::watcher()
}
gg_token_free( session_ );
session_ = NULL;
- disconnect( this, SLOT( watcher() ) );
+ disconnect( this, TQT_SLOT( watcher() ) );
return;
break;
}
@@ -283,7 +283,7 @@ void RegisterCommand::watcher()
}
gg_free_register( session_ );
session_ = NULL;
- disconnect( this, SLOT( watcher() ) );
+ disconnect( this, TQT_SLOT( watcher() ) );
deleteLater();
return;
break;
@@ -293,12 +293,12 @@ void RegisterCommand::watcher()
}
}
-RemindPasswordCommand::RemindPasswordCommand( QObject* parent, const char* name )
+RemindPasswordCommand::RemindPasswordCommand( TQObject* parent, const char* name )
: GaduCommand( parent, name ), uin_( 0 ), session_( 0 )
{
}
-RemindPasswordCommand::RemindPasswordCommand( uin_t uin, QObject* parent, const char* name )
+RemindPasswordCommand::RemindPasswordCommand( uin_t uin, TQObject* parent, const char* name )
: GaduCommand( parent, name ), uin_( uin ), session_( 0 )
{
}
@@ -341,7 +341,7 @@ RemindPasswordCommand::watcher()
if ( session_->state == GG_STATE_DONE ) {
struct gg_pubdir* p = static_cast<struct gg_pubdir*>( session_->data );
- QString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." );
+ TQString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." );
emit done( i18n( "Remind Password" ), i18n( "Remind password finished: " ) + finished );
gg_free_remind_passwd( session_ );
done_ = true;
@@ -351,7 +351,7 @@ RemindPasswordCommand::watcher()
enableNotifiers( session_->check );
}
-ChangePasswordCommand::ChangePasswordCommand( QObject* parent, const char* name )
+ChangePasswordCommand::ChangePasswordCommand( TQObject* parent, const char* name )
: GaduCommand( parent, name ), session_( 0 )
{
}
@@ -361,7 +361,7 @@ ChangePasswordCommand::~ChangePasswordCommand()
}
void
-ChangePasswordCommand::setInfo( uin_t uin, const QString& passwd, const QString& newpasswd, const QString& newemail )
+ChangePasswordCommand::setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd, const TQString& newemail )
{
uin_ = uin;
passwd_ = passwd;
diff --git a/kopete/protocols/gadu/gaducommands.h b/kopete/protocols/gadu/gaducommands.h
index 7253734e..2c56ba8a 100644
--- a/kopete/protocols/gadu/gaducommands.h
+++ b/kopete/protocols/gadu/gaducommands.h
@@ -29,7 +29,7 @@
#include <libgadu.h>
-#include <qobject.h>
+#include <tqobject.h>
class QSocketNotifier;
class QStringList;
@@ -40,7 +40,7 @@ class GaduCommand : public QObject
Q_OBJECT
public:
- GaduCommand( QObject* parent = 0, const char* name = 0 );
+ GaduCommand( TQObject* parent = 0, const char* name = 0 );
virtual ~GaduCommand();
virtual void execute() = 0;
@@ -49,10 +49,10 @@ public:
signals:
//e.g. emit done( i18n("Done"), i18n("Registration complete") );
- void done( const QString& title, const QString& what );
- void error( const QString& title, const QString& error );
+ void done( const TQString& title, const TQString& what );
+ void error( const TQString& title, const TQString& error );
void socketReady();
- void operationStatus( const QString );
+ void operationStatus( const TQString );
protected:
void checkSocket( int, int );
@@ -66,8 +66,8 @@ protected slots:
void forwarder();
private:
- QSocketNotifier* read_;
- QSocketNotifier* write_;
+ TQSocketNotifier* read_;
+ TQSocketNotifier* write_;
};
class RegisterCommand : public GaduCommand
@@ -75,19 +75,19 @@ class RegisterCommand : public GaduCommand
Q_OBJECT
public:
- RegisterCommand( QObject* parent = 0, const char* name = 0 );
- RegisterCommand( const QString& email, const QString& password ,
- QObject* parent = 0, const char* name = 0 );
+ RegisterCommand( TQObject* parent = 0, const char* name = 0 );
+ RegisterCommand( const TQString& email, const TQString& password ,
+ TQObject* parent = 0, const char* name = 0 );
~RegisterCommand();
- void setUserinfo( const QString& email, const QString& password, const QString& token );
+ void setUserinfo( const TQString& email, const TQString& password, const TQString& token );
void execute();
unsigned int newUin();
void requestToken();
void cancel();
signals:
- void tokenRecieved( QPixmap, QString );
+ void tokenRecieved( TQPixmap, TQString );
protected slots:
void watcher();
@@ -108,8 +108,8 @@ class RemindPasswordCommand : public GaduCommand
Q_OBJECT
public:
- RemindPasswordCommand( uin_t uin, QObject* parent = 0, const char* name = 0 );
- RemindPasswordCommand( QObject* parent = 0, const char* name = 0 );
+ RemindPasswordCommand( uin_t uin, TQObject* parent = 0, const char* name = 0 );
+ RemindPasswordCommand( TQObject* parent = 0, const char* name = 0 );
~RemindPasswordCommand();
void setUIN( uin_t );
@@ -128,11 +128,11 @@ class ChangePasswordCommand : public GaduCommand
Q_OBJECT
public:
- ChangePasswordCommand( QObject* parent = 0, const char* name = 0 );
+ ChangePasswordCommand( TQObject* parent = 0, const char* name = 0 );
~ChangePasswordCommand();
- void setInfo( uin_t uin, const QString& passwd, const QString& newpasswd,
- const QString& newemail );
+ void setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd,
+ const TQString& newemail );
void execute();
protected slots:
diff --git a/kopete/protocols/gadu/gaducontact.cpp b/kopete/protocols/gadu/gaducontact.cpp
index 2cb4806f..dfbb93a4 100644
--- a/kopete/protocols/gadu/gaducontact.cpp
+++ b/kopete/protocols/gadu/gaducontact.cpp
@@ -44,8 +44,8 @@
using Kopete::UserInfoDialog;
-GaduContact::GaduContact( uin_t uin, const QString& name, Kopete::Account* account, Kopete::MetaContact* parent )
-: Kopete::Contact( account, QString::number( uin ), parent ), uin_( uin )
+GaduContact::GaduContact( uin_t uin, const TQString& name, Kopete::Account* account, Kopete::MetaContact* parent )
+: Kopete::Contact( account, TQString::number( uin ), parent ), uin_( uin )
{
msgManager_ = 0L;
account_ = static_cast<GaduAccount*>( account );
@@ -78,7 +78,7 @@ GaduContact::identityId() const
}
void
-GaduContact::setParentIdentity( const QString& id)
+GaduContact::setParentIdentity( const TQString& id)
{
parentIdentity_ = id;
}
@@ -90,13 +90,13 @@ GaduContact::uin() const
}
void
-GaduContact::sendFile( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+GaduContact::sendFile( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer"));
+ filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer"));
else
filePath = sourceURL.path(-1);
@@ -129,7 +129,7 @@ GaduContact::changedStatus( KGaduNotify* newstatus )
}
-QHostAddress&
+TQHostAddress&
GaduContact::contactIp()
{
return remote_ip;
@@ -146,9 +146,9 @@ GaduContact::manager( Kopete::Contact::CanCreateFlags canCreate )
{
if ( !msgManager_ && canCreate ) {
msgManager_ = Kopete::ChatSessionManager::self()->create( account_->myself(), thisContact_, GaduProtocol::protocol() );
- connect( msgManager_, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ),
- this, SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) );
- connect( msgManager_, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) );
+ connect( msgManager_, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ),
+ this, TQT_SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) );
+ connect( msgManager_, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) );
}
kdDebug(14100) << "GaduContact::manager returning: " << msgManager_ << endl;
@@ -164,8 +164,8 @@ GaduContact::slotChatSessionDestroyed()
void
GaduContact::initActions()
{
- actionSendMessage_ = KopeteStdAction::sendMessage( this, SLOT( execute() ), this, "actionMessage" );
- actionInfo_ = KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), this, "actionInfo" );
+ actionSendMessage_ = KopeteStdAction::sendMessage( this, TQT_SLOT( execute() ), this, "actionMessage" );
+ actionInfo_ = KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), this, "actionInfo" );
}
void
@@ -190,19 +190,19 @@ GaduContact::isReachable()
return account_->isConnected();
}
-QPtrList<KAction>*
+TQPtrList<KAction>*
GaduContact::customContextMenuActions()
{
- QPtrList<KAction> *fakeCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *fakeCollection = new TQPtrList<KAction>();
//show profile
KAction* actionShowProfile = new KAction( i18n("Show Profile") , "info", 0,
- this, SLOT( slotShowPublicProfile() ),
+ this, TQT_SLOT( slotShowPublicProfile() ),
this, "actionShowPublicProfile" );
fakeCollection->append( actionShowProfile );
KAction* actionEditContact = new KAction( i18n("Edit...") , "edit", 0,
- this, SLOT( slotEditContact() ),
+ this, TQT_SLOT( slotEditContact() ),
this, "actionEditContact" );
fakeCollection->append( actionEditContact );
@@ -229,7 +229,7 @@ GaduContact::slotUserInfo()
UserInfoDialog *dlg = new UserInfoDialog( i18n( "Gadu contact" ) );
dlg->setName( metaContact()->displayName() );
- dlg->setId( QString::number( uin_ ) );
+ dlg->setId( TQString::number( uin_ ) );
dlg->setStatus( onlineStatus().description() );
dlg->setAwayMessage( description_ );
dlg->show();
@@ -250,7 +250,7 @@ GaduContact::deleteContact()
}
void
-GaduContact::serialize( QMap<QString, QString>& serializedData, QMap<QString, QString>& )
+GaduContact::serialize( TQMap<TQString, TQString>& serializedData, TQMap<TQString, TQString>& )
{
serializedData[ "email" ] = property( GaduProtocol::protocol()->propEmail ).value().toString();
serializedData[ "FirstName" ] = property( GaduProtocol::protocol()->propFirstName ).value().toString();
@@ -288,11 +288,11 @@ GaduContact::contactDetails()
cl->phonenr = property( GaduProtocol::protocol()->propPhoneNr ).value().toString();
cl->ignored = ignored_; //( property( "ignored" ).value().toString() == "true" );
- cl->uin = QString::number( uin_ );
+ cl->uin = TQString::number( uin_ );
cl->displayname = metaContact()->displayName();
cl->offlineTo = false;
- cl->landline = QString("");
+ cl->landline = TQString("");
groupList = metaContact()->groups();
@@ -318,7 +318,7 @@ GaduContact::contactDetails()
QString
GaduContact::findBestContactName( const GaduContactsList::ContactLine* cl )
{
- QString name;
+ TQString name;
if ( cl == NULL ) {
return name;
diff --git a/kopete/protocols/gadu/gaducontact.h b/kopete/protocols/gadu/gaducontact.h
index 16278215..a96c1ded 100644
--- a/kopete/protocols/gadu/gaducontact.h
+++ b/kopete/protocols/gadu/gaducontact.h
@@ -23,8 +23,8 @@
#ifndef GADUCONTACT_H
#define GADUCONTACT_H
-#include <qpoint.h>
-#include <qhostaddress.h>
+#include <tqpoint.h>
+#include <tqhostaddress.h>
#include "gaducontactlist.h"
@@ -47,12 +47,12 @@ class GaduContact : public Kopete::Contact
Q_OBJECT
public:
- GaduContact( unsigned int, const QString&, Kopete::Account*, Kopete::MetaContact* );
+ GaduContact( unsigned int, const TQString&, Kopete::Account*, Kopete::MetaContact* );
virtual bool isReachable();
- virtual void serialize( QMap<QString, QString>&, QMap<QString, QString>& );
- virtual QPtrList<KAction>* customContextMenuActions();
- virtual QString identityId() const;
+ virtual void serialize( TQMap<TQString, TQString>&, TQMap<TQString, TQString>& );
+ virtual TQPtrList<KAction>* customContextMenuActions();
+ virtual TQString identityId() const;
GaduContactsList::ContactLine* contactDetails();
@@ -61,16 +61,16 @@ public:
// uin is const for GaduContact, and displayname needs to be changed through metaContact
bool setContactDetails( const GaduContactsList::ContactLine* );
- void setParentIdentity( const QString& );
+ void setParentIdentity( const TQString& );
void setIgnored( bool );
bool ignored();
- static QString findBestContactName( const GaduContactsList::ContactLine* );
+ static TQString findBestContactName( const GaduContactsList::ContactLine* );
void changedStatus( KGaduNotify* );
uin_t uin() const;
- QHostAddress& contactIp();
+ TQHostAddress& contactIp();
unsigned short contactPort();
public slots:
@@ -82,7 +82,7 @@ public slots:
void slotShowPublicProfile();
void slotEditContact();
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
protected:
@@ -102,10 +102,10 @@ private:
KAction* actionInfo_;
KAction* actionRemove_;
- QPtrList<Kopete::Contact> thisContact_;
+ TQPtrList<Kopete::Contact> thisContact_;
- QHostAddress remote_ip;
+ TQHostAddress remote_ip;
unsigned int remote_port;
unsigned int version;
unsigned int image_size;
diff --git a/kopete/protocols/gadu/gaducontactlist.cpp b/kopete/protocols/gadu/gaducontactlist.cpp
index 6601800d..314e661f 100644
--- a/kopete/protocols/gadu/gaducontactlist.cpp
+++ b/kopete/protocols/gadu/gaducontactlist.cpp
@@ -22,7 +22,7 @@
#include "gaducontactlist.h"
-#include "qstringlist.h"
+#include "tqstringlist.h"
#include "kdebug.h"
GaduContactsList::GaduContactsList()
@@ -33,11 +33,11 @@ GaduContactsList::~GaduContactsList()
{
}
-GaduContactsList::GaduContactsList( QString sList )
+GaduContactsList::GaduContactsList( TQString sList )
{
- QStringList::iterator stringIterator;
- QStringList strList;
- QString empty;
+ TQStringList::iterator stringIterator;
+ TQStringList strList;
+ TQString empty;
ContactLine cl;
bool email;
@@ -49,17 +49,17 @@ GaduContactsList::GaduContactsList( QString sList )
return;
}
- QStringList ln = QStringList::split( QChar( '\n' ), sList, true );
- QStringList::iterator lni = ln.begin( );
+ TQStringList ln = TQStringList::split( TQChar( '\n' ), sList, true );
+ TQStringList::iterator lni = ln.begin( );
while( lni != ln.end() ) {
- QString cline = (*lni);
+ TQString cline = (*lni);
if ( cline.isNull() ) {
break;
}
- strList = QStringList::split( QChar( ';' ), cline, true );
+ strList = TQStringList::split( TQChar( ';' ), cline, true );
stringIterator = strList.begin();
@@ -78,7 +78,7 @@ GaduContactsList::GaduContactsList( QString sList )
cl.firstname = (*stringIterator);
- if ( cl.firstname == QString( "i" ) ) {
+ if ( cl.firstname == TQString( "i" ) ) {
kdDebug(14100) << cline << " ignored" << endl;
cl.ignored = true;
cl.uin = strList[6];
@@ -105,7 +105,7 @@ GaduContactsList::GaduContactsList( QString sList )
++stringIterator;
if ( stringIterator != strList.end() ) {
- cl.offlineTo = (*++stringIterator) == QString("0") ? false : true;
+ cl.offlineTo = (*++stringIterator) == TQString("0") ? false : true;
cl.landline = (*++stringIterator);
}
}
@@ -133,17 +133,17 @@ GaduContactsList::addContact( ContactLine& cl )
void
GaduContactsList::addContact(
- QString& displayname,
- QString& group,
- QString& uin,
- QString& firstname,
- QString& surname,
- QString& nickname,
- QString& phonenr,
- QString& email,
+ TQString& displayname,
+ TQString& group,
+ TQString& uin,
+ TQString& firstname,
+ TQString& surname,
+ TQString& nickname,
+ TQString& phonenr,
+ TQString& email,
bool ignored,
bool offlineTo,
- QString& landline
+ TQString& landline
)
{
ContactLine cl;
@@ -167,7 +167,7 @@ GaduContactsList::addContact(
QString
GaduContactsList::asString()
{
- QString contacts;
+ TQString contacts;
for ( it = cList.begin(); it != cList.end(); ++it ) {
if ( (*it).ignored ) {
@@ -185,7 +185,7 @@ GaduContactsList::asString()
(*it).uin + ";"+
(*it).email +
";;0;0;;" +
- ((*it).offlineTo == true ? QString("1") : QString("0"))
+ ((*it).offlineTo == true ? TQString("1") : TQString("0"))
+ ";" +
(*it).landline +
";\r\n";
diff --git a/kopete/protocols/gadu/gaducontactlist.h b/kopete/protocols/gadu/gaducontactlist.h
index d4aa9e6e..389a8443 100644
--- a/kopete/protocols/gadu/gaducontactlist.h
+++ b/kopete/protocols/gadu/gaducontactlist.h
@@ -23,7 +23,7 @@
#ifndef GADUCONTACTLIST_H
#define GADUCONTACTLIST_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QString;
@@ -32,35 +32,35 @@ class GaduContactsList
public:
struct ContactLine {
- QString displayname;
- QString group;
- QString uin;
- QString firstname;
- QString surname;
- QString nickname;
- QString phonenr;
- QString email;
+ TQString displayname;
+ TQString group;
+ TQString uin;
+ TQString firstname;
+ TQString surname;
+ TQString nickname;
+ TQString phonenr;
+ TQString email;
bool ignored;
bool offlineTo;
- QString landline;
+ TQString landline;
};
GaduContactsList();
- GaduContactsList( QString );
+ GaduContactsList( TQString );
~GaduContactsList();
- QString asString();
+ TQString asString();
void addContact( ContactLine &cl );
- void addContact( QString& displayname, QString& group,
- QString& uin, QString& firstname,
- QString& surname, QString& nickname,
- QString& phonenr, QString& email,
+ void addContact( TQString& displayname, TQString& group,
+ TQString& uin, TQString& firstname,
+ TQString& surname, TQString& nickname,
+ TQString& phonenr, TQString& email,
bool ignored, bool offlineTo,
- QString& landline
+ TQString& landline
);
unsigned int size();
const GaduContactsList::ContactLine& operator[]( unsigned int i );
private:
- typedef QValueList<ContactLine> CList;
+ typedef TQValueList<ContactLine> CList;
CList cList;
CList::iterator it;
};
diff --git a/kopete/protocols/gadu/gadudcc.cpp b/kopete/protocols/gadu/gadudcc.cpp
index d81eaf67..4235d4e3 100644
--- a/kopete/protocols/gadu/gadudcc.cpp
+++ b/kopete/protocols/gadu/gadudcc.cpp
@@ -35,23 +35,23 @@
#include "libgadu.h"
-#include <qsocketnotifier.h>
-#include <qhostaddress.h>
-#include <qmutex.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqsocketnotifier.h>
+#include <tqhostaddress.h>
+#include <tqmutex.h>
+#include <tqmap.h>
+#include <tqstring.h>
volatile unsigned int GaduDCC::referenceCount = 0;
GaduDCCServer* GaduDCC::dccServer = NULL;
-static QMutex initmutex;
+static TQMutex initmutex;
-typedef QMap< unsigned int, GaduAccount* > gaduAccounts;
+typedef TQMap< unsigned int, GaduAccount* > gaduAccounts;
static gaduAccounts accounts;
-GaduDCC::GaduDCC( QObject* parent, const char* name )
-:QObject( parent, name )
+GaduDCC::GaduDCC( TQObject* parent, const char* name )
+:TQObject( parent, name )
{
}
@@ -135,7 +135,7 @@ GaduDCC::registerAccount( GaduAccount* account )
dccServer = new GaduDCCServer();
}
- connect( dccServer, SIGNAL( incoming( gg_dcc*, bool& ) ), SLOT( slotIncoming( gg_dcc*, bool& ) ) );
+ connect( dccServer, TQT_SIGNAL( incoming( gg_dcc*, bool& ) ), TQT_SLOT( slotIncoming( gg_dcc*, bool& ) ) );
initmutex.unlock();
diff --git a/kopete/protocols/gadu/gadudcc.h b/kopete/protocols/gadu/gadudcc.h
index 25ae27cf..05d5c992 100644
--- a/kopete/protocols/gadu/gadudcc.h
+++ b/kopete/protocols/gadu/gadudcc.h
@@ -23,7 +23,7 @@
#ifndef GADUDCC_H
#define GADUDCC_H
-#include <qobject.h>
+#include <tqobject.h>
class QSocketNotifier;
class QHostAddress;
@@ -33,10 +33,10 @@ class GaduDCCTransaction;
class GaduAccount;
class GaduDCCServer;
-class GaduDCC: public QObject {
+class GaduDCC: public TQObject {
Q_OBJECT
public:
- GaduDCC( QObject* parent, const char* name = NULL );
+ GaduDCC( TQObject* parent, const char* name = NULL );
~GaduDCC();
bool unregisterAccount();
bool registerAccount( GaduAccount* );
@@ -45,7 +45,7 @@ public:
void execute();
GaduAccount* account( unsigned int );
- QMap<unsigned int,QString> requests;
+ TQMap<unsigned int,TQString> requests;
signals:
void dccConnect( GaduDCCTransaction* dccTransaction );
diff --git a/kopete/protocols/gadu/gadudccserver.cpp b/kopete/protocols/gadu/gadudccserver.cpp
index d3f37982..6e6c370b 100644
--- a/kopete/protocols/gadu/gadudccserver.cpp
+++ b/kopete/protocols/gadu/gadudccserver.cpp
@@ -32,12 +32,12 @@
#include "libgadu.h"
#include "gaduaccount.h"
-#include <qobject.h>
-#include <qsocketnotifier.h>
-#include <qhostaddress.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
+#include <tqhostaddress.h>
-GaduDCCServer::GaduDCCServer( QHostAddress* dccIp, unsigned int port )
-:QObject()
+GaduDCCServer::GaduDCCServer( TQHostAddress* dccIp, unsigned int port )
+:TQObject()
{
kdDebug( 14100 ) << "dcc socket NULL, creating new liteining socket " << endl;
@@ -115,15 +115,15 @@ GaduDCCServer::createNotifiers( bool connect )
return;
}
- read_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Read, this );
+ read_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Read, this );
read_->setEnabled( false );
- write_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Write, this );
+ write_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Write, this );
write_->setEnabled( false );
if ( connect ) {
- QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) );
- QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) );
+ TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) );
+ TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) );
}
}
diff --git a/kopete/protocols/gadu/gadudccserver.h b/kopete/protocols/gadu/gadudccserver.h
index df984650..7db791e5 100644
--- a/kopete/protocols/gadu/gadudccserver.h
+++ b/kopete/protocols/gadu/gadudccserver.h
@@ -23,8 +23,8 @@
#ifndef GADUDCCSERVER_H
#define GADUDCCSERVER_H
-#include <qobject.h>
-#include <qhostaddress.h>
+#include <tqobject.h>
+#include <tqhostaddress.h>
class QSocketNotifier;
class QString;
@@ -32,10 +32,10 @@ class gg_dcc;
class GaduDCCTransaction;
class GaduAccount;
-class GaduDCCServer: public QObject {
+class GaduDCCServer: public TQObject {
Q_OBJECT
public:
- GaduDCCServer( QHostAddress* dccIp = NULL, unsigned int port = 1550 );
+ GaduDCCServer( TQHostAddress* dccIp = NULL, unsigned int port = 1550 );
~GaduDCCServer();
unsigned int listeingPort();
@@ -54,13 +54,13 @@ private:
void createNotifiers( bool );
void closeDCC();
- QHostAddress config_dccip;
- QHostAddress config_extip;
+ TQHostAddress config_dccip;
+ TQHostAddress config_extip;
gg_dcc* dccSock;
- QSocketNotifier* read_;
- QSocketNotifier* write_;
+ TQSocketNotifier* read_;
+ TQSocketNotifier* write_;
};
#endif
diff --git a/kopete/protocols/gadu/gadudcctransaction.cpp b/kopete/protocols/gadu/gadudcctransaction.cpp
index 92d9ffa8..7ec8d2ac 100644
--- a/kopete/protocols/gadu/gadudcctransaction.cpp
+++ b/kopete/protocols/gadu/gadudcctransaction.cpp
@@ -34,8 +34,8 @@
#include "kopetemetacontact.h"
#include "kopeteuiglobal.h"
-#include <qsocketnotifier.h>
-#include <qfile.h>
+#include <tqsocketnotifier.h>
+#include <tqfile.h>
#include "gadudcctransaction.h"
#include "gaducontact.h"
@@ -45,7 +45,7 @@
#include "libgadu.h"
GaduDCCTransaction::GaduDCCTransaction( GaduDCC* parent, const char* name )
-:QObject( parent, name ), gaduDCC_( parent )
+:TQObject( parent, name ), gaduDCC_( parent )
{
read_ = NULL;
write_ = NULL;
@@ -79,7 +79,7 @@ GaduDCCTransaction::peerUIN()
}
bool
-GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath )
+GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, TQString& filePath )
{
GaduContact* me;
GaduAccount* metoo;
@@ -90,7 +90,7 @@ GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath )
me = static_cast<GaduContact*>( peerContact->account()->myself() );
- QString aaa = peerContact->contactIp().toString();
+ TQString aaa = peerContact->contactIp().toString();
kdDebug( 14100 ) << "slotOutgoin for UIN: " << peerContact->uin() << " port " << peerContact->contactPort() << " ip " <<aaa<< endl;
kdDebug( 14100 ) << "File path is " << filePath << endl;
@@ -121,7 +121,7 @@ GaduDCCTransaction::setupIncoming( const unsigned int uin, GaduContact* peerCont
return false;
}
- QString aaa = peerContact->contactIp().toString();
+ TQString aaa = peerContact->contactIp().toString();
kdDebug( 14100 ) << "setupIncoming for UIN: " << uin << " port " << peerContact->contactPort() << " ip " <<aaa<< endl;
peer = peerContact->uin();
@@ -144,10 +144,10 @@ GaduDCCTransaction::setupIncoming( gg_dcc* dccS )
peer = dccS->uin;
- connect ( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString & ) ),
- this, SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) );
- connect ( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ),
- this, SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) );
+ connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString & ) ),
+ this, TQT_SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) );
+ connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ),
+ this, TQT_SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) );
incoming = true;
createNotifiers( true );
@@ -189,15 +189,15 @@ GaduDCCTransaction::createNotifiers( bool connect )
return;
}
- read_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Read, this );
+ read_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Read, this );
read_->setEnabled( false );
- write_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Write, this );
+ write_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Write, this );
write_->setEnabled( false );
if ( connect ) {
- QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) );
- QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) );
+ TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) );
+ TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) );
}
}
@@ -223,7 +223,7 @@ GaduDCCTransaction::disableNotifiers()
}
}
void
-GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const QString& fileName )
+GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const TQString& fileName )
{
if ( (long)transfer->info().transferId () != transferId_ ) {
@@ -280,7 +280,7 @@ GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, c
dccSock_->file_fd = localFile_.handle();
}
- connect ( transfer, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotTransferResult() ) );
+ connect ( transfer, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotTransferResult() ) );
// reenable notifiers
enableNotifiers( dccSock_->check );
@@ -310,7 +310,7 @@ GaduDCCTransaction::askIncommingTransfer()
{
transferId_ = Kopete::TransferManager::transferManager()->askIncomingTransfer ( contact,
- QString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size );
+ TQString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size );
}
@@ -345,10 +345,10 @@ GaduDCCTransaction::watcher() {
}
if ( !peer ) {
- contact = static_cast<GaduContact*> (account->contacts()[ QString::number( dccSock_->peer_uin ) ]);
+ contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( dccSock_->peer_uin ) ]);
}
else {
- contact = static_cast<GaduContact*> (account->contacts()[ QString::number( peer ) ]);
+ contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( peer ) ]);
}
if ( contact == NULL ) {
@@ -385,7 +385,7 @@ GaduDCCTransaction::watcher() {
break;
case GG_EVENT_DCC_NEED_FILE_INFO:
if (gaduDCC_->requests.contains(dccSock_->peer_uin)) {
- QString filePath = gaduDCC_->requests[dccSock_->peer_uin];
+ TQString filePath = gaduDCC_->requests[dccSock_->peer_uin];
kdDebug() << "Callback request found. Sending " << filePath << endl;
gaduDCC_->requests.remove(dccSock_->peer_uin);
gg_dcc_fill_file_info(dccSock_,filePath.ascii());
diff --git a/kopete/protocols/gadu/gadudcctransaction.h b/kopete/protocols/gadu/gadudcctransaction.h
index 541f3838..8f5b57b8 100644
--- a/kopete/protocols/gadu/gadudcctransaction.h
+++ b/kopete/protocols/gadu/gadudcctransaction.h
@@ -23,8 +23,8 @@
#ifndef GADUDCCTRANS_H
#define GADUDCCTRANS_H
-#include <qobject.h>
-#include <qfile.h>
+#include <tqobject.h>
+#include <tqfile.h>
class QSocketNotifier;
class gg_dcc;
@@ -34,7 +34,7 @@ namespace Kopete { class Transfer; }
namespace Kopete { class FileTransferInfo; }
class GaduDCC;
-class GaduDCCTransaction: QObject {
+class GaduDCCTransaction: TQObject {
Q_OBJECT
public:
GaduDCCTransaction( GaduDCC*, const char* name = NULL );
@@ -42,7 +42,7 @@ public:
bool setupIncoming( const unsigned int, GaduContact* );
bool setupIncoming( gg_dcc* );
- bool setupOutgoing( GaduContact*, QString& );
+ bool setupOutgoing( GaduContact*, TQString& );
unsigned int recvUIN();
unsigned int peerUIN();
@@ -56,7 +56,7 @@ protected slots:
private slots:
void watcher();
- void slotIncomingTransferAccepted ( Kopete::Transfer*, const QString& );
+ void slotIncomingTransferAccepted ( Kopete::Transfer*, const TQString& );
void slotTransferRefused ( const Kopete::FileTransferInfo& );
void slotTransferResult();
@@ -71,14 +71,14 @@ private:
gg_dcc* dccSock_;
- QSocketNotifier* read_;
- QSocketNotifier* write_;
+ TQSocketNotifier* read_;
+ TQSocketNotifier* write_;
GaduContact* contact;
Kopete::Transfer* transfer_;
long transferId_;
- QFile localFile_;
+ TQFile localFile_;
int peer;
unsigned int incoming;
GaduDCC* gaduDCC_;
diff --git a/kopete/protocols/gadu/gadueditaccount.cpp b/kopete/protocols/gadu/gadueditaccount.cpp
index cf38c4bc..08987c16 100644
--- a/kopete/protocols/gadu/gadueditaccount.cpp
+++ b/kopete/protocols/gadu/gadueditaccount.cpp
@@ -24,16 +24,16 @@
#include "gaduprotocol.h"
#include "gadusession.h"
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qbutton.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqbutton.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
#include <klineedit.h>
#include <kmessagebox.h>
@@ -43,7 +43,7 @@
#include "kopetepasswordwidget.h"
-GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, QWidget* parent, const char* name )
+GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, TQWidget* parent, const char* name )
: GaduAccountEditUI( parent, name ), KopeteEditAccountWidget( ident ), protocol_( proto ), rcmd( 0 )
{
@@ -69,7 +69,7 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q
passwordWidget_->load( &account_->password() );
- QString nick = account()->myself()->property(
+ TQString nick = account()->myself()->property(
Kopete::Global::Properties::self()->nickName() ).value().toString();
if ( nick.isEmpty() ) {
nick = account_->myself()->contactId();
@@ -82,18 +82,18 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q
useTls_->setCurrentItem( isSsl ? ( account_->useTls() ) : 2 );
ignoreCheck_->setChecked( account_->ignoreAnons() );
- connect( account(), SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
- SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
+ connect( account(), TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
+ TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
connectLabel->setText( i18n( "personal information being fetched from server",
"<p align=\"center\">Fetching from server</p>" ) );
seqNr = account_->getPersonalInformation();
}
- connect( registerNew, SIGNAL( clicked( ) ), SLOT( registerNewAccount( ) ) );
+ connect( registerNew, TQT_SIGNAL( clicked( ) ), TQT_SLOT( registerNewAccount( ) ) );
- QWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered );
- QWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword );
- QWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ );
+ TQWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered );
+ TQWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword );
+ TQWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ );
}
void
@@ -114,11 +114,11 @@ GaduEditAccount::publishUserInfo()
kdDebug(14100) << uiGender->currentItem() << " gender " << endl;
if ( uiGender->currentItem() == 1 ) {
kdDebug(14100) << "so you become female now" << endl;
- sr.gender = QString( GG_PUBDIR50_GENDER_SET_FEMALE );
+ sr.gender = TQString( GG_PUBDIR50_GENDER_SET_FEMALE );
}
if ( uiGender->currentItem() == 2 ) {
kdDebug(14100) << "so you become male now" << endl;
- sr.gender = QString( GG_PUBDIR50_GENDER_SET_MALE );
+ sr.gender = TQString( GG_PUBDIR50_GENDER_SET_MALE );
}
if ( account_ ) {
@@ -142,12 +142,12 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq
uiCity->setText( result[0].city );
kdDebug( 14100 ) << "gender found: " << result[0].gender << endl;
- if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) {
+ if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) {
uiGender->setCurrentItem( 1 );
kdDebug(14100) << "looks like female" << endl;
}
else {
- if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_MALE ) ) {
+ if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_MALE ) ) {
uiGender->setCurrentItem( 2 );
kdDebug( 14100 ) <<" looks like male" << endl;
}
@@ -158,7 +158,7 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq
enableUserInfo( true );
- disconnect( SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
+ disconnect( TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
}
void
@@ -180,8 +180,8 @@ GaduEditAccount::registerNewAccount()
{
registerNew->setDisabled( true );
regDialog = new GaduRegisterAccount( NULL , "Register account dialog" );
- connect( regDialog, SIGNAL( registeredNumber( unsigned int, QString ) ), SLOT( newUin( unsigned int, QString ) ) );
- if ( regDialog->exec() != QDialog::Accepted ) {
+ connect( regDialog, TQT_SIGNAL( registeredNumber( unsigned int, TQString ) ), TQT_SLOT( newUin( unsigned int, TQString ) ) );
+ if ( regDialog->exec() != TQDialog::Accepted ) {
loginEdit_->setText( "" );
return;
}
@@ -195,10 +195,10 @@ GaduEditAccount::registrationFailed()
}
void
-GaduEditAccount::newUin( unsigned int uin, QString password )
+GaduEditAccount::newUin( unsigned int uin, TQString password )
{
if ( uin ) {
- loginEdit_->setText( QString::number( uin ) );
+ loginEdit_->setText( TQString::number( uin ) );
passwordWidget_->setPassword( password );
}
else {
@@ -246,7 +246,7 @@ GaduEditAccount::apply()
account_->myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nickName->text() );
// this is changed only here, so i won't add any proper handling now
- account_->configGroup()->writeEntry( QString::fromAscii( "nickName" ), nickName->text() );
+ account_->configGroup()->writeEntry( TQString::fromAscii( "nickName" ), nickName->text() );
account_->setExcludeConnect( autoLoginCheck_->isChecked() );
account_->setUseTls( (GaduAccount::tlsConnection) useTls_->currentItem() );
diff --git a/kopete/protocols/gadu/gadueditaccount.h b/kopete/protocols/gadu/gadueditaccount.h
index 4782cb68..1b870496 100644
--- a/kopete/protocols/gadu/gadueditaccount.h
+++ b/kopete/protocols/gadu/gadueditaccount.h
@@ -37,13 +37,13 @@ class GaduEditAccount : public GaduAccountEditUI, public KopeteEditAccountWidget
Q_OBJECT
public:
- GaduEditAccount( GaduProtocol*, Kopete::Account*, QWidget* parent = 0, const char* name = 0 );
+ GaduEditAccount( GaduProtocol*, Kopete::Account*, TQWidget* parent = 0, const char* name = 0 );
virtual bool validateData();
Kopete::Account* apply();
private slots:
void registerNewAccount();
- void newUin( unsigned int, QString );
+ void newUin( unsigned int, TQString );
void registrationFailed();
void slotSearchResult( const SearchResult&, unsigned int );
diff --git a/kopete/protocols/gadu/gadueditcontact.cpp b/kopete/protocols/gadu/gadueditcontact.cpp
index 24aa8940..985a9874 100644
--- a/kopete/protocols/gadu/gadueditcontact.cpp
+++ b/kopete/protocols/gadu/gadueditcontact.cpp
@@ -34,19 +34,19 @@
#include <kopetecontactlist.h>
#include <kopetemetacontact.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qptrlist.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
#include <krestrictedline.h>
// FIXME: this and gaduadcontactpage should have one base class, with some code duplicated in both.
GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, true ), account_( account ), contact_( contact )
@@ -64,7 +64,7 @@ GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact,
}
GaduEditContact::GaduEditContact( GaduAccount* account, GaduContactsList::ContactLine* clin,
- QWidget* parent , const char* name )
+ TQWidget* parent , const char* name )
: KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, true ), account_( account ), contact_( NULL )
@@ -83,8 +83,8 @@ void
GaduEditContact::fillGroups()
{
Kopete::Group *g, *cg;
- QPtrList<Kopete::Group> cgl;
- QPtrList<Kopete::Group> gl;
+ TQPtrList<Kopete::Group> cgl;
+ TQPtrList<Kopete::Group> gl;
if ( contact_ ) {
cgl = contact_->metaContact()->groups();
@@ -96,7 +96,7 @@ GaduEditContact::fillGroups()
if ( g->type() == Kopete::Group::Temporary ) {
continue;
}
- QCheckListItem* item = new QCheckListItem( ui_->groups, g->displayName(), QCheckListItem::CheckBox );
+ TQCheckListItem* item = new TQCheckListItem( ui_->groups, g->displayName(), TQCheckListItem::CheckBox );
// FIXME: optimize this O(2) search
for( cg = cgl.first(); cg; cg = cgl.next() ) {
if ( cg->groupId() == g->groupId() ) {
@@ -118,12 +118,12 @@ GaduEditContact::init()
// fill values from cl into proper fields on widget
show();
- connect( this, SIGNAL( okClicked() ), SLOT( slotApply() ) );
- connect( ui_->groups, SIGNAL( clicked( QListViewItem * ) ), SLOT( listClicked( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotApply() ) );
+ connect( ui_->groups, TQT_SIGNAL( clicked( TQListViewItem * ) ), TQT_SLOT( listClicked( TQListViewItem * ) ) );
}
void
-GaduEditContact::listClicked( QListViewItem* /*item*/ )
+GaduEditContact::listClicked( TQListViewItem* /*item*/ )
{
}
@@ -147,7 +147,7 @@ GaduEditContact::fillIn()
void
GaduEditContact::slotApply()
{
- QPtrList<Kopete::Group> gl;
+ TQPtrList<Kopete::Group> gl;
Kopete::Group* group;
cl_->firstname = ui_->fornameEdit_->text().stripWhiteSpace();
@@ -173,8 +173,8 @@ GaduEditContact::slotApply()
contact_->setContactDetails( cl_ );
gl = Kopete::ContactList::self()->groups();
- for ( QListViewItemIterator it( ui_->groups ); it.current(); ++it ) {
- QCheckListItem *check = dynamic_cast<QCheckListItem *>( it.current() );
+ for ( TQListViewItemIterator it( ui_->groups ); it.current(); ++it ) {
+ TQCheckListItem *check = dynamic_cast<TQCheckListItem *>( it.current() );
if ( !check ) {
continue;
diff --git a/kopete/protocols/gadu/gadueditcontact.h b/kopete/protocols/gadu/gadueditcontact.h
index 9c4596fa..c27a5e7e 100644
--- a/kopete/protocols/gadu/gadueditcontact.h
+++ b/kopete/protocols/gadu/gadueditcontact.h
@@ -40,12 +40,12 @@ class GaduEditContact : public KDialogBase
public:
GaduEditContact( GaduAccount*, GaduContact*,
- QWidget* parent = 0, const char* name = 0 );
+ TQWidget* parent = 0, const char* name = 0 );
GaduEditContact( GaduAccount*, GaduContactsList::ContactLine*,
- QWidget* parent = 0, const char* name = 0 );
+ TQWidget* parent = 0, const char* name = 0 );
protected slots:
void slotApply();
- void listClicked( QListViewItem* );
+ void listClicked( TQListViewItem* );
private:
void init();
diff --git a/kopete/protocols/gadu/gaduprotocol.cpp b/kopete/protocols/gadu/gaduprotocol.cpp
index 1e0e06a9..1a59f17f 100644
--- a/kopete/protocols/gadu/gaduprotocol.cpp
+++ b/kopete/protocols/gadu/gaduprotocol.cpp
@@ -45,7 +45,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_gadu, KGenericFactory<GaduProtocol>( "kopete_
GaduProtocol* GaduProtocol::protocolStatic_ = 0L;
-GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList& )
+GaduProtocol::GaduProtocol( TQObject* parent, const char* name, const TQStringList& )
:Kopete::Protocol( GaduProtocolFactory::instance(), parent, name ),
propFirstName(Kopete::Global::Properties::self()->firstName()),
propLastName(Kopete::Global::Properties::self()->lastName()),
@@ -58,17 +58,17 @@ GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList
gaduStatusOffline_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL, this, GG_STATUS_NOT_AVAIL,
"gg_offline", i18n( "Offline" ) , i18n( "O&ffline" ) , Kopete::OnlineStatusManager::Offline ),
gaduStatusOfflineDescr_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL_DESCR, this, GG_STATUS_NOT_AVAIL_DESCR,
- QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ),
+ TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ),
gaduStatusBusy_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY, this, GG_STATUS_BUSY,
"contact_away_overlay", i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Busy ),
gaduStatusBusyDescr_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY_DESCR, this, GG_STATUS_BUSY_DESCR,
- QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ),
+ TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ),
gaduStatusInvisible_( Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE, this, GG_STATUS_INVISIBLE,
"contact_invisible_overlay", i18n( "Invisible" ) , i18n( "I&nvisible" ) , Kopete::OnlineStatusManager::Invisible),
gaduStatusInvisibleDescr_(Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE_DESCR, this, GG_STATUS_INVISIBLE_DESCR,
- QStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )),
+ TQStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )),
gaduStatusAvail_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL, this, GG_STATUS_AVAIL,
- QString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ),
+ TQString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ),
gaduStatusAvailDescr_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL_DESCR, this, GG_STATUS_AVAIL_DESCR,
"gg_description_overlay", i18n( "Online" ) , i18n( "&Online" )),
gaduConnecting_(Kopete::OnlineStatus::Offline, GG_STATUS_CONNECTING, this, GG_STATUS_CONNECTING,
@@ -99,7 +99,7 @@ GaduProtocol::protocol()
}
AddContactPage*
-GaduProtocol::createAddContactWidget( QWidget* parent, Kopete::Account* account )
+GaduProtocol::createAddContactWidget( TQWidget* parent, Kopete::Account* account )
{
return new GaduAddContactPage( static_cast<GaduAccount*>( account ), parent );
}
@@ -111,15 +111,15 @@ GaduProtocol::settingsChanged()
Kopete::Contact *
GaduProtocol::deserializeContact( Kopete::MetaContact* metaContact,
- const QMap<QString, QString>& serializedData,
- const QMap<QString, QString>& /* addressBookData */ )
+ const TQMap<TQString, TQString>& serializedData,
+ const TQMap<TQString, TQString>& /* addressBookData */ )
{
- const QString aid = serializedData[ "accountId" ];
- const QString cid = serializedData[ "contactId" ];
- const QString dn = serializedData[ "displayName" ];
+ const TQString aid = serializedData[ "accountId" ];
+ const TQString cid = serializedData[ "contactId" ];
+ const TQString dn = serializedData[ "displayName" ];
- QDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this );
Kopete::Account* account = daccounts[ aid ];
if (!account) {
@@ -228,14 +228,14 @@ GaduProtocol::convertStatus( uint status ) const
}
Kopete::Account*
-GaduProtocol::createNewAccount( const QString& accountId )
+GaduProtocol::createNewAccount( const TQString& accountId )
{
defaultAccount_ = new GaduAccount( this, accountId );
return defaultAccount_ ;
}
KopeteEditAccountWidget*
-GaduProtocol::createEditAccountWidget( Kopete::Account* account, QWidget* parent )
+GaduProtocol::createEditAccountWidget( Kopete::Account* account, TQWidget* parent )
{
return( new GaduEditAccount( this, account, parent ) );
}
diff --git a/kopete/protocols/gadu/gaduprotocol.h b/kopete/protocols/gadu/gaduprotocol.h
index 7baf481c..f277ef35 100644
--- a/kopete/protocols/gadu/gaduprotocol.h
+++ b/kopete/protocols/gadu/gaduprotocol.h
@@ -23,7 +23,7 @@
#ifndef GADUPROTOCOL_H
#define GADUPROTOCOL_H
-#include <qmap.h>
+#include <tqmap.h>
#include "kopeteprotocol.h"
#include "kopeteonlinestatus.h"
@@ -52,21 +52,21 @@ class GaduProtocol : public Kopete::Protocol
Q_OBJECT
public:
- GaduProtocol( QObject* parent, const char* name, const QStringList& str);
+ GaduProtocol( TQObject* parent, const char* name, const TQStringList& str);
~GaduProtocol();
static GaduProtocol *protocol();
// Plugin reimplementation
// {
- AddContactPage* createAddContactWidget( QWidget* parent, Kopete::Account* account );
- Kopete::Account* createNewAccount( const QString& accountId );
- KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, QWidget* parent );
+ AddContactPage* createAddContactWidget( TQWidget* parent, Kopete::Account* account );
+ Kopete::Account* createNewAccount( const TQString& accountId );
+ KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, TQWidget* parent );
bool canSendOffline() const { return true; }
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 );
// }
//!Plugin reimplementation
diff --git a/kopete/protocols/gadu/gadupubdir.cpp b/kopete/protocols/gadu/gadupubdir.cpp
index 2b61d3ff..1c329cf0 100644
--- a/kopete/protocols/gadu/gadupubdir.cpp
+++ b/kopete/protocols/gadu/gadupubdir.cpp
@@ -27,12 +27,12 @@
#include "gaduaccount.h"
#include "gaduprotocol.h"
-#include <qwidgetstack.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include <tqwidgetstack.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <krestrictedline.h>
@@ -40,8 +40,8 @@
#include <klistview.h>
#include <klocale.h>
-GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* name )
-: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
+GaduPublicDir::GaduPublicDir( GaduAccount* account, TQWidget* parent, const char* name )
+: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 )
{
mAccount = account;
createWidget();
@@ -50,8 +50,8 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char*
show();
}
-GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* parent, const char* name )
-: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
+GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, TQWidget* parent, const char* name )
+: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 )
{
ResLine rs;
@@ -80,7 +80,7 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* pare
// now it is time to switch to Right Page(tm)
rs.uin = searchFor;
- fName = fSurname = fNick = fCity = QString::null;
+ fName = fSurname = fNick = fCity = TQString::null;
fUin = searchFor;
fGender = fAgeFrom = fAgeTo = 0;
fOnlyOnline = false;
@@ -118,7 +118,7 @@ void
GaduPublicDir::slotAddContact()
{
GaduContactsList::ContactLine* cl = new GaduContactsList::ContactLine;
- QListViewItem* item = mMainWidget->listFound->currentItem();
+ TQListViewItem* item = mMainWidget->listFound->currentItem();
cl->ignored = false;
cl->firstname = item->text( 1 );
@@ -134,7 +134,7 @@ GaduPublicDir::slotAddContact()
void
GaduPublicDir::slotListSelected( )
{
- QListViewItem* item = mMainWidget->listFound->currentItem();
+ TQListViewItem* item = mMainWidget->listFound->currentItem();
if ( item ) {
enableButton( User3, true );
}
@@ -146,35 +146,35 @@ GaduPublicDir::slotListSelected( )
void
GaduPublicDir::initConnections()
{
- connect( this, SIGNAL( user2Clicked() ), SLOT( slotSearch() ) );
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotNewSearch() ) );
- connect( this, SIGNAL( user3Clicked() ), SLOT( slotAddContact() ) );
+ connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( slotSearch() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotNewSearch() ) );
+ connect( this, TQT_SIGNAL( user3Clicked() ), TQT_SLOT( slotAddContact() ) );
- connect( mAccount, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
- SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
+ connect( mAccount, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ),
+ TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) );
- connect( mMainWidget->nameS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->surname, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->nick, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->UIN, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->cityS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->gender, SIGNAL( activated( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->ageFrom, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->ageTo, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( mMainWidget->radioByData, SIGNAL( toggled( bool ) ), SLOT( inputChanged( bool ) ) );
+ connect( mMainWidget->nameS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->surname, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->nick, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->UIN, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->cityS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->gender, TQT_SIGNAL( activated( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->ageFrom, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->ageTo, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( mMainWidget->radioByData, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( inputChanged( bool ) ) );
- connect( mMainWidget->listFound, SIGNAL( selectionChanged () ), SLOT( slotListSelected() ) );
+ connect( mMainWidget->listFound, TQT_SIGNAL( selectionChanged () ), TQT_SLOT( slotListSelected() ) );
}
void
GaduPublicDir::inputChanged( bool )
{
- inputChanged( QString::null );
+ inputChanged( TQString::null );
}
void
-GaduPublicDir::inputChanged( const QString& )
+GaduPublicDir::inputChanged( const TQString& )
{
if ( validateData() == false ) {
enableButton( User2, false );
@@ -217,7 +217,7 @@ GaduPublicDir::validateData()
CHECK_INT( fAgeTo );
}
else {
- fSurname = QString::null;
+ fSurname = TQString::null;
CHECK_INT( fUin );
}
return false;
@@ -227,7 +227,7 @@ GaduPublicDir::validateData()
QPixmap
GaduPublicDir::iconForStatus( uint status )
{
- QPixmap n;
+ TQPixmap n;
if ( GaduProtocol::protocol() ) {
return GaduProtocol::protocol()->convertStatus( status ).protocolIcon();
@@ -238,23 +238,23 @@ GaduPublicDir::iconForStatus( uint status )
void
GaduPublicDir::slotSearchResult( const SearchResult& result, unsigned int )
{
- QListView* list = mMainWidget->listFound;
+ TQListView* list = mMainWidget->listFound;
kdDebug(14100) << "searchResults(" << result.count() <<")" << endl;
- QListViewItem* sl;
+ TQListViewItem* sl;
SearchResult::const_iterator r;
for ( r = result.begin(); r != result.end() ; ++r ){
kdDebug(14100) << "adding" << (*r).uin << endl;
- sl= new QListViewItem(
- list, QString::fromAscii(""),
+ sl= new TQListViewItem(
+ list, TQString::fromAscii(""),
(*r).firstname,
(*r).nickname,
(*r).age,
(*r).city,
- QString::number( (*r).uin ).ascii()
+ TQString::number( (*r).uin ).ascii()
);
sl->setPixmap( 0, iconForStatus( (*r).status ) );
}
@@ -282,7 +282,7 @@ GaduPublicDir::slotNewSearch()
showButton( User1, false );
showButton( User3, false );
enableButton( User2, false );
- inputChanged( QString::null );
+ inputChanged( TQString::null );
mAccount->pubDirSearchClose();
}
@@ -291,7 +291,7 @@ GaduPublicDir::slotSearch()
{
mMainWidget->listFound->clear();
- QString empty;
+ TQString empty;
// search more, or search ?
if ( mMainWidget->pubsearch->id( mMainWidget->pubsearch->visibleWidget() ) == 0 ) {
diff --git a/kopete/protocols/gadu/gadupubdir.h b/kopete/protocols/gadu/gadupubdir.h
index 022c353d..b69c21b0 100644
--- a/kopete/protocols/gadu/gadupubdir.h
+++ b/kopete/protocols/gadu/gadupubdir.h
@@ -41,16 +41,16 @@ class GaduPublicDir : public KDialogBase
Q_OBJECT
public:
- GaduPublicDir( GaduAccount* , QWidget *parent = 0, const char* name = "GaduPublicDir" );
- GaduPublicDir( GaduAccount* , int searchFor, QWidget* parent = 0, const char* name = "GaduPublicDir" );
- QPixmap iconForStatus( uint status );
+ GaduPublicDir( GaduAccount* , TQWidget *parent = 0, const char* name = "GaduPublicDir" );
+ GaduPublicDir( GaduAccount* , int searchFor, TQWidget* parent = 0, const char* name = "GaduPublicDir" );
+ TQPixmap iconForStatus( uint status );
private slots:
void slotSearch();
void slotNewSearch();
void slotSearchResult( const SearchResult& result, unsigned int seq );
void slotAddContact();
- void inputChanged( const QString& );
+ void inputChanged( const TQString& );
void inputChanged( bool );
void slotListSelected();
diff --git a/kopete/protocols/gadu/gaduregisteraccount.cpp b/kopete/protocols/gadu/gaduregisteraccount.cpp
index 92126cb5..b2ee0bc1 100644
--- a/kopete/protocols/gadu/gaduregisteraccount.cpp
+++ b/kopete/protocols/gadu/gaduregisteraccount.cpp
@@ -19,10 +19,10 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
// 02110-1301, USA.
-#include <qstring.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <klineedit.h>
#include <kmessagebox.h>
@@ -35,7 +35,7 @@
#include "gaduregisteraccount.h"
#include "gaducommands.h"
-GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name )
+GaduRegisterAccount::GaduRegisterAccount( TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Register New Account" ), KDialogBase::User1 | KDialogBase::Ok, KDialogBase::User1, true )
{
ui = new GaduRegisterAccountUI( this );
@@ -48,21 +48,21 @@ GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name )
cRegister = new RegisterCommand( this );
- emailRegexp = new QRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" );
+ emailRegexp = new TQRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" );
hintPixmap = KGlobal::iconLoader()->loadIcon ( "gadu_protocol", KIcon::Small );
- connect( this, SIGNAL( user1Clicked() ), SLOT( doRegister() ) );
- connect( this, SIGNAL( okClicked() ), SLOT( slotClose() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( doRegister() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotClose() ) );
- connect( ui->valueEmailAddress, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) );
- connect( ui->valuePassword, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) );
- connect( ui->valuePasswordVerify, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) );
- connect( ui->valueVerificationSequence, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) );
+ connect( ui->valueEmailAddress, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( ui->valuePassword, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( ui->valuePasswordVerify, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) );
+ connect( ui->valueVerificationSequence, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) );
- connect( cRegister, SIGNAL( tokenRecieved( QPixmap, QString ) ), SLOT( displayToken( QPixmap, QString ) ) );
- connect( cRegister, SIGNAL( done( const QString&, const QString& ) ), SLOT( registrationDone( const QString&, const QString& ) ) );
- connect( cRegister, SIGNAL( error( const QString&, const QString& ) ), SLOT( registrationError( const QString&, const QString& ) ) );
- connect( cRegister, SIGNAL( operationStatus( const QString ) ), SLOT( updateStatus( const QString ) ) );
+ connect( cRegister, TQT_SIGNAL( tokenRecieved( TQPixmap, TQString ) ), TQT_SLOT( displayToken( TQPixmap, TQString ) ) );
+ connect( cRegister, TQT_SIGNAL( done( const TQString&, const TQString& ) ), TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) );
+ connect( cRegister, TQT_SIGNAL( error( const TQString&, const TQString& ) ), TQT_SLOT( registrationError( const TQString&, const TQString& ) ) );
+ connect( cRegister, TQT_SIGNAL( operationStatus( const TQString ) ), TQT_SLOT( updateStatus( const TQString ) ) );
updateStatus( i18n( "Retrieving token" ) );
cRegister->requestToken();
@@ -138,13 +138,13 @@ GaduRegisterAccount::validateInput()
}
void
-GaduRegisterAccount::inputChanged( const QString & )
+GaduRegisterAccount::inputChanged( const TQString & )
{
validateInput();
}
void
-GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString& /*what */ )
+GaduRegisterAccount::registrationDone( const TQString& /*title*/, const TQString& /*what */ )
{
ui->valueEmailAddress->setDisabled( true );
ui->valuePassword->setDisabled( true );
@@ -156,21 +156,21 @@ GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString
ui->labelVerificationSequence->setDisabled( true );
ui->labelInstructions->setDisabled( true );
emit registeredNumber( cRegister->newUin(), ui->valuePassword->text() );
- updateStatus( i18n( "Account created; your new UIN is %1." ).arg(QString::number( cRegister->newUin() ) ) );
+ updateStatus( i18n( "Account created; your new UIN is %1." ).arg(TQString::number( cRegister->newUin() ) ) );
enableButton( User1, false );
setButtonText( Ok, i18n( "&Close" ) );
}
void
-GaduRegisterAccount::registrationError( const QString& title, const QString& what )
+GaduRegisterAccount::registrationError( const TQString& title, const TQString& what )
{
updateStatus( i18n( "Registration failed: %1" ).arg( what ) );
KMessageBox::sorry( this, "Registration was unsucessful, please try again.", title );
- disconnect( this, SLOT( displayToken( QPixmap, QString ) ) );
- disconnect( this, SLOT( registrationDone( const QString&, const QString& ) ) );
- disconnect( this, SLOT( registrationError( const QString&, const QString& ) ) );
- disconnect( this, SLOT( updateStatus( const QString ) ) );
+ disconnect( this, TQT_SLOT( displayToken( TQPixmap, TQString ) ) );
+ disconnect( this, TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) );
+ disconnect( this, TQT_SLOT( registrationError( const TQString&, const TQString& ) ) );
+ disconnect( this, TQT_SLOT( updateStatus( const TQString ) ) );
ui->valueVerificationSequence->setDisabled( true );
ui->valueVerificationSequence->setText( "" );
@@ -178,13 +178,13 @@ GaduRegisterAccount::registrationError( const QString& title, const QString& w
updateStatus( "" );
// emit UIN 0, to enable 'register new account' button again in dialog below
- emit registeredNumber( 0, QString( "" ) );
+ emit registeredNumber( 0, TQString( "" ) );
deleteLater();
}
void
-GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ )
+GaduRegisterAccount::displayToken( TQPixmap image, TQString /*tokenId */ )
{
ui->valueVerificationSequence->setDisabled( false );
ui->pixmapToken->setPixmap( image );
@@ -192,7 +192,7 @@ GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ )
}
void
-GaduRegisterAccount::updateStatus( const QString status )
+GaduRegisterAccount::updateStatus( const TQString status )
{
ui->labelStatusMessage->setAlignment( AlignCenter );
ui->labelStatusMessage->setText( status );
diff --git a/kopete/protocols/gadu/gaduregisteraccount.h b/kopete/protocols/gadu/gaduregisteraccount.h
index 27a0c7b5..f3f03260 100644
--- a/kopete/protocols/gadu/gaduregisteraccount.h
+++ b/kopete/protocols/gadu/gaduregisteraccount.h
@@ -35,27 +35,27 @@ class GaduRegisterAccount : public KDialogBase
Q_OBJECT
public:
- GaduRegisterAccount( QWidget* , const char* );
+ GaduRegisterAccount( TQWidget* , const char* );
~GaduRegisterAccount( );
signals:
- void registeredNumber( unsigned int, QString );
+ void registeredNumber( unsigned int, TQString );
protected slots:
void slotClose();
- void displayToken( QPixmap, QString );
- void registrationError( const QString&, const QString& );
- void registrationDone( const QString&, const QString& );
- void inputChanged( const QString & );
+ void displayToken( TQPixmap, TQString );
+ void registrationError( const TQString&, const TQString& );
+ void registrationDone( const TQString&, const TQString& );
+ void inputChanged( const TQString & );
void doRegister();
- void updateStatus( const QString status );
+ void updateStatus( const TQString status );
private:
void validateInput();
GaduRegisterAccountUI* ui;
RegisterCommand* cRegister;
- QRegExp* emailRegexp;
+ TQRegExp* emailRegexp;
QPixmap hintPixmap;
};
diff --git a/kopete/protocols/gadu/gadurichtextformat.cpp b/kopete/protocols/gadu/gadurichtextformat.cpp
index 049d665b..fd567bf6 100644
--- a/kopete/protocols/gadu/gadurichtextformat.cpp
+++ b/kopete/protocols/gadu/gadurichtextformat.cpp
@@ -26,8 +26,8 @@
#include "gadurichtextformat.h"
#include "gadusession.h"
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
GaduRichTextFormat::GaduRichTextFormat()
{
@@ -38,9 +38,9 @@ GaduRichTextFormat::~GaduRichTextFormat()
}
QString
-GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, void* formatStructure)
+GaduRichTextFormat::convertToHtml( const TQString& msg, unsigned int formats, void* formatStructure)
{
- QString tmp, nb;
+ TQString tmp, nb;
gg_msg_richtext_format *format;
char *pointer = (char*) formatStructure;
@@ -59,7 +59,7 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi
format = (gg_msg_richtext_format*) pointer;
unsigned int position = format->position;
char font = format->font;
- QString style;
+ TQString style;
if ( position < j || position > msg.length() ) {
break;
@@ -100,9 +100,9 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi
g = (int)color->green;
b = (int)color->blue;
}
- style += QString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b );
+ style += TQString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b );
- tmp += formatOpeningTag( QString::fromLatin1("span"), QString::fromLatin1("style=\"%1\"").arg( style ) );
+ tmp += formatOpeningTag( TQString::fromLatin1("span"), TQString::fromLatin1("style=\"%1\"").arg( style ) );
opened = true;
}
@@ -122,16 +122,16 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi
}
QString
-GaduRichTextFormat::formatOpeningTag( const QString& tag, const QString& attributes )
+GaduRichTextFormat::formatOpeningTag( const TQString& tag, const TQString& attributes )
{
- QString res = "<" + tag;
+ TQString res = "<" + tag;
if(!attributes.isEmpty())
res.append(" " + attributes);
return res + ">";
}
QString
-GaduRichTextFormat::formatClosingTag( const QString& tag )
+GaduRichTextFormat::formatClosingTag( const TQString& tag )
{
return "</" + tag + ">";
}
@@ -140,18 +140,18 @@ GaduRichTextFormat::formatClosingTag( const QString& tag )
KGaduMessage*
GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message )
{
- QString htmlString = message.escapedBody();
+ TQString htmlString = message.escapedBody();
KGaduMessage* output = new KGaduMessage;
rtcs.blue = rtcs.green = rtcs.red = 0;
- color = QColor();
+ color = TQColor();
int position = 0;
rtf.resize( sizeof( gg_msg_richtext) );
output->rtf.resize(0);
// test first if there is any HTML formating in it
- if( htmlString.find( QString::fromLatin1("</span") ) > -1 ) {
- QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
+ if( htmlString.find( TQString::fromLatin1("</span") ) > -1 ) {
+ TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
findTags.setMinimal( true );
int pos = 0;
int lastpos = 0;
@@ -160,7 +160,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message )
pos = findTags.search( htmlString );
rtfs.font = 0;
if ( pos != lastpos ) {
- QString tmp;
+ TQString tmp;
if ( pos < 0 ) {
tmp = htmlString.mid( lastpos );
}
@@ -180,16 +180,16 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message )
}
if ( pos > -1 ) {
- QString styleHTML = findTags.cap(1);
- QString replacement = findTags.cap(2);
- QStringList styleAttrs = QStringList::split( ';', styleHTML );
+ TQString styleHTML = findTags.cap(1);
+ TQString replacement = findTags.cap(2);
+ TQStringList styleAttrs = TQStringList::split( ';', styleHTML );
rtfs.font = 0;
lastpos = pos + replacement.length();
- for( QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) {
- QString attribute = (*attrPair).section(':',0,0);
- QString value = (*attrPair).section(':',1);
+ for( TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) {
+ TQString attribute = (*attrPair).section(':',0,0);
+ TQString value = (*attrPair).section(':',1);
parseAttributes( attribute, value );
}
@@ -198,7 +198,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message )
return NULL;
}
- QString rep = QString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement );
+ TQString rep = TQString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement );
htmlString.replace( findTags.pos( 0 ), rep.length(), replacement );
replacement = unescapeGaduMessage( replacement );
@@ -224,35 +224,35 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message )
}
void
-GaduRichTextFormat::parseAttributes( const QString attribute, const QString value )
+GaduRichTextFormat::parseAttributes( const TQString attribute, const TQString value )
{
- if( attribute == QString::fromLatin1("color") ) {
+ if( attribute == TQString::fromLatin1("color") ) {
color.setNamedColor( value );
}
- if( attribute == QString::fromLatin1("font-weight") && value == QString::fromLatin1("600") ) {
+ if( attribute == TQString::fromLatin1("font-weight") && value == TQString::fromLatin1("600") ) {
rtfs.font |= GG_FONT_BOLD;
}
- if( attribute == QString::fromLatin1("text-decoration") && value == QString::fromLatin1("underline") ) {
+ if( attribute == TQString::fromLatin1("text-decoration") && value == TQString::fromLatin1("underline") ) {
rtfs.font |= GG_FONT_UNDERLINE ;
}
- if( attribute == QString::fromLatin1("font-style") && value == QString::fromLatin1("italic") ) {
+ if( attribute == TQString::fromLatin1("font-style") && value == TQString::fromLatin1("italic") ) {
rtfs.font |= GG_FONT_ITALIC;
}
}
QString
-GaduRichTextFormat::unescapeGaduMessage( QString& ns )
+GaduRichTextFormat::unescapeGaduMessage( TQString& ns )
{
- QString s;
+ TQString s;
s = Kopete::Message::unescape( ns );
- s.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) );
+ s.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) );
return s;
}
bool
GaduRichTextFormat::insertRtf( uint position)
{
- if ( color != QColor( rtcs.red, rtcs.green, rtcs.blue ) ) {
+ if ( color != TQColor( rtcs.red, rtcs.green, rtcs.blue ) ) {
rtcs.red = color.red();
rtcs.green = color.green();
rtcs.blue = color.blue();
@@ -280,12 +280,12 @@ GaduRichTextFormat::insertRtf( uint position)
}
QString
-GaduRichTextFormat::escapeBody( QString& input )
+GaduRichTextFormat::escapeBody( TQString& input )
{
- input.replace( '<', QString::fromLatin1("&lt;") );
- input.replace( '>', QString::fromLatin1("&gt;") );
- input.replace( '\n', QString::fromLatin1( "<br />" ) );
- input.replace( '\t', QString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) );
- input.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " &nbsp;" ) );
+ input.replace( '<', TQString::fromLatin1("&lt;") );
+ input.replace( '>', TQString::fromLatin1("&gt;") );
+ input.replace( '\n', TQString::fromLatin1( "<br />" ) );
+ input.replace( '\t', TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) );
+ input.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " &nbsp;" ) );
return input;
}
diff --git a/kopete/protocols/gadu/gadurichtextformat.h b/kopete/protocols/gadu/gadurichtextformat.h
index 4f508f17..9476539e 100644
--- a/kopete/protocols/gadu/gadurichtextformat.h
+++ b/kopete/protocols/gadu/gadurichtextformat.h
@@ -33,17 +33,17 @@ class GaduRichTextFormat {
public:
GaduRichTextFormat();
~GaduRichTextFormat();
- QString convertToHtml( const QString&, unsigned int, void* );
+ TQString convertToHtml( const TQString&, unsigned int, void* );
KGaduMessage* convertToGaduMessage( const Kopete::Message& );
private:
- QString formatOpeningTag( const QString& , const QString& = QString::null );
- QString formatClosingTag( const QString& );
+ TQString formatOpeningTag( const TQString& , const TQString& = TQString::null );
+ TQString formatClosingTag( const TQString& );
bool insertRtf( uint );
- QString unescapeGaduMessage( QString& );
- void parseAttributes( const QString, const QString );
- QString escapeBody( QString& );
- QColor color;
+ TQString unescapeGaduMessage( TQString& );
+ void parseAttributes( const TQString, const TQString );
+ TQString escapeBody( TQString& );
+ TQColor color;
gg_msg_richtext_format rtfs;
gg_msg_richtext_color rtcs;
gg_msg_richtext* header;
diff --git a/kopete/protocols/gadu/gadusession.cpp b/kopete/protocols/gadu/gadusession.cpp
index 3f7c6617..63b696d4 100644
--- a/kopete/protocols/gadu/gadusession.cpp
+++ b/kopete/protocols/gadu/gadusession.cpp
@@ -29,19 +29,19 @@
#include <kdebug.h>
#include "kopetemessage.h"
-#include <qsocketnotifier.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
+#include <tqsocketnotifier.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
#include "gadurichtextformat.h"
#include <errno.h>
#include <string.h>
#include <netinet/in.h>
-GaduSession::GaduSession( QObject* parent, const char* name )
-: QObject( parent, name ), session_( 0 ), searchSeqNr_( 0 )
+GaduSession::GaduSession( TQObject* parent, const char* name )
+: TQObject( parent, name ), session_( 0 ), searchSeqNr_( 0 )
{
- textcodec = QTextCodec::codecForName( "CP1250" );
+ textcodec = TQTextCodec::codecForName( "CP1250" );
rtf = new GaduRichTextFormat;
}
@@ -114,15 +114,15 @@ GaduSession::createNotifiers( bool connect )
return;
}
- read_ = new QSocketNotifier( session_->fd, QSocketNotifier::Read, this );
+ read_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Read, this );
read_->setEnabled( false );
- write_ = new QSocketNotifier( session_->fd, QSocketNotifier::Write, this );
+ write_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Write, this );
write_->setEnabled( false );
if ( connect ) {
- QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) );
- QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) );
+ TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) );
+ TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) );
}
}
@@ -159,7 +159,7 @@ GaduSession::dccRequest( const unsigned int uin )
void
GaduSession::login( KGaduLoginParams* loginp )
{
- QCString desc = textcodec->fromUnicode( loginp->statusDescr );
+ TQCString desc = textcodec->fromUnicode( loginp->statusDescr );
memset( &params_, 0, sizeof(params_) );
@@ -248,8 +248,8 @@ GaduSession::removeNotify( uin_t uin )
int
GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass )
{
- QString sendMsg;
- QCString cpMsg;
+ TQString sendMsg;
+ TQCString cpMsg;
KGaduMessage* gadumessage;
if ( isConnected() ) {
@@ -265,7 +265,7 @@ GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl
}
else {
sendMsg = msg.plainBody();
- sendMsg.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) );
+ sendMsg.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) );
cpMsg = textcodec->fromUnicode( sendMsg );
return gg_send_message( session_, msgClass, recipient, (const unsigned char *)cpMsg.data() );
@@ -293,9 +293,9 @@ GaduSession::changeStatus( int status, bool forFriends )
}
int
-GaduSession::changeStatusDescription( int status, const QString& descr, bool forFriends )
+GaduSession::changeStatusDescription( int status, const TQString& descr, bool forFriends )
{
- QCString ndescr;
+ TQCString ndescr;
ndescr= textcodec->fromUnicode(descr);
@@ -393,7 +393,7 @@ GaduSession::publishPersonalInformation( ResLine& d )
unsigned int
GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAlive )
{
- QString bufYear;
+ TQString bufYear;
unsigned int reqNr;
gg_pubdir50_t searchRequest;
@@ -424,8 +424,8 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli
(const char*)textcodec->fromUnicode( query.city ) );
}
if ( ageFrom || ageTo ) {
- QString yearFrom = QString::number( QDate::currentDate().year() - ageFrom );
- QString yearTo = QString::number( QDate::currentDate().year() - ageTo );
+ TQString yearFrom = TQString::number( TQDate::currentDate().year() - ageFrom );
+ TQString yearTo = TQString::number( TQDate::currentDate().year() - ageTo );
if ( ageFrom && ageTo ) {
gg_pubdir50_add( searchRequest, GG_PUBDIR50_BIRTHYEAR,
@@ -452,10 +452,10 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli
}
// otherwise we are looking only for one fellow with this nice UIN
else{
- gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, QString::number( query.uin ).ascii() );
+ gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, TQString::number( query.uin ).ascii() );
}
- gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, QString::number( searchSeqNr_ ).ascii() );
+ gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, TQString::number( searchSeqNr_ ).ascii() );
reqNr = gg_pubdir50( session_, searchRequest );
gg_pubdir50_free( searchRequest );
@@ -476,13 +476,13 @@ GaduSession::sendResult( gg_pubdir50_t result )
}
for ( i = 0; i < count; i++ ) {
- resultLine.uin = QString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt();
+ resultLine.uin = TQString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt();
resultLine.firstname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FIRSTNAME ) );
resultLine.surname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_LASTNAME ) );
resultLine.nickname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_NICKNAME ) );
resultLine.age = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_BIRTHYEAR ) );
resultLine.city = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_CITY ) );
- QString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) );
+ TQString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) );
resultLine.orgin = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYCITY ) );
resultLine.meiden = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYNAME ) );
resultLine.gender = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_GENDER ) );
@@ -490,7 +490,7 @@ GaduSession::sendResult( gg_pubdir50_t result )
resultLine.status = stat.toInt();
age = resultLine.age.toInt();
if ( age ) {
- resultLine.age = QString::number( QDate::currentDate().year() - age );
+ resultLine.age = TQString::number( TQDate::currentDate().year() - age );
}
else {
resultLine.age.truncate( 0 );
@@ -522,7 +522,7 @@ GaduSession::requestContacts()
void
GaduSession::exportContactsOnServer( GaduContactsList* contactsList )
{
- QCString plist;
+ TQCString plist;
if ( !session_ || session_->state != GG_STATE_CONNECTED ) {
kdDebug( 14100 ) << "you need to connect to export Contacts list " << endl;
@@ -544,7 +544,7 @@ GaduSession::exportContactsOnServer( GaduContactsList* contactsList )
void
GaduSession::handleUserlist( gg_event* event )
{
- QString ul;
+ TQString ul;
switch( event->event.userlist.type ) {
case GG_USERLIST_GET_REPLY:
if ( event->event.userlist.reply ) {
@@ -617,7 +617,7 @@ GaduSession::errorDescription( int err )
case GG_ERROR_WRITING:
return i18n( "Writing error." );
default:
- return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)err ) );
+ return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)err ) );
}
}
@@ -638,11 +638,11 @@ GaduSession::failureDescription( gg_failure_t f )
case GG_FAILURE_PASSWORD:
return i18n( "Incorrect password." );
case GG_FAILURE_404:
- return QString::fromAscii( "404." );
+ return TQString::fromAscii( "404." );
case GG_FAILURE_TLS:
return i18n( "Unable to connect over encrypted channel.\nTry to turn off encryption support in Gadu account settings and reconnect." );
default:
- return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)f ) );
+ return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)f ) );
}
}
@@ -730,7 +730,7 @@ GaduSession::checkDescriptor()
gaduNotify.description = textcodec->toUnicode( event->event.status.descr );
}
else {
- gaduNotify.description = QString::null;
+ gaduNotify.description = TQString::null;
}
gaduNotify.remote_port = 0;
gaduNotify.version = 0;
@@ -747,7 +747,7 @@ GaduSession::checkDescriptor()
gaduNotify.description = textcodec->toUnicode( event->event.status60.descr );
}
else {
- gaduNotify.description = QString::null;
+ gaduNotify.description = TQString::null;
}
gaduNotify.remote_ip.setAddress( ntohl( event->event.status60.remote_ip ) );
gaduNotify.remote_port = event->event.status60.remote_port;
diff --git a/kopete/protocols/gadu/gadusession.h b/kopete/protocols/gadu/gadusession.h
index 9ace0f18..f690ed46 100644
--- a/kopete/protocols/gadu/gadusession.h
+++ b/kopete/protocols/gadu/gadusession.h
@@ -25,14 +25,14 @@
#include "kopeteaccount.h"
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qcstring.h>
-#include <qhostaddress.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqcstring.h>
+#include <tqhostaddress.h>
#include "gaducontactlist.h"
@@ -47,10 +47,10 @@ struct KGaduMessage {
struct KGaduLoginParams {
uin_t uin;
- QString password;
+ TQString password;
bool useTls;
int status;
- QString statusDescr;
+ TQString statusDescr;
unsigned int server;
bool forFriends;
unsigned int client_addr;
@@ -59,30 +59,30 @@ struct KGaduLoginParams {
struct KGaduNotify {
int status;
- QHostAddress remote_ip;
+ TQHostAddress remote_ip;
unsigned short remote_port;
bool fileCap;
int version;
int image_size;
int time;
- QString description;
+ TQString description;
unsigned int contact_id;
};
struct ResLine{
unsigned int uin;
- QString firstname;
- QString surname;
- QString nickname;
- QString age;
- QString city;
- QString orgin;
- QString meiden;
- QString gender;
+ TQString firstname;
+ TQString surname;
+ TQString nickname;
+ TQString age;
+ TQString city;
+ TQString orgin;
+ TQString meiden;
+ TQString gender;
int status;
};
-typedef QValueList<ResLine> SearchResult;
+typedef TQValueList<ResLine> SearchResult;
class QSocketNotifier;
class QStringList;
@@ -94,15 +94,15 @@ class GaduSession : public QObject
Q_OBJECT
public:
- GaduSession( QObject* parent = 0, const char* name = 0 );
+ GaduSession( TQObject* parent = 0, const char* name = 0 );
virtual ~GaduSession();
bool isConnected() const;
int status() const;
- QString contactsToString( GaduContactsList* contactsList );
- bool stringToContacts( GaduContactsList& , const QString& );
- static QString failureDescription( gg_failure_t );
- static QString errorDescription( int err );
- static QString stateDescription( int state );
+ TQString contactsToString( GaduContactsList* contactsList );
+ bool stringToContacts( GaduContactsList& , const TQString& );
+ static TQString failureDescription( gg_failure_t );
+ static TQString errorDescription( int err );
+ static TQString stateDescription( int state );
void dccRequest( const unsigned int );
unsigned int getPersonalInformation();
/*
@@ -124,7 +124,7 @@ public slots:
int removeNotify( uin_t );
int sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass );
int changeStatus( int, bool forFriends = false );
- int changeStatusDescription( int, const QString&, bool forFriends = false );
+ int changeStatusDescription( int, const TQString&, bool forFriends = false );
int ping();
void requestContacts();
@@ -138,7 +138,7 @@ public slots:
bool publishPersonalInformation( ResLine& );
signals:
- void error( const QString&, const QString& );
+ void error( const TQString&, const TQString& );
void messageReceived( KGaduMessage* );
void ackReceived( unsigned int );
void contactStatusChanged( KGaduNotify* );
@@ -147,7 +147,7 @@ signals:
void connectionSucceed( );
void disconnect( Kopete::Account::DisconnectReason );
void pubDirSearchResult( const SearchResult&, unsigned int );
- void userListRecieved( const QString& );
+ void userListRecieved( const TQString& );
void userListExported();
void incomingCtcp( unsigned int );
@@ -167,10 +167,10 @@ private:
void createNotifiers( bool connect );
gg_session* session_;
- QSocketNotifier* read_;
- QSocketNotifier* write_;
+ TQSocketNotifier* read_;
+ TQSocketNotifier* write_;
gg_login_params params_;
- QTextCodec* textcodec;
+ TQTextCodec* textcodec;
int searchSeqNr_;
GaduRichTextFormat* rtf;
};
diff --git a/kopete/protocols/groupwise/gwaccount.cpp b/kopete/protocols/groupwise/gwaccount.cpp
index 48ef3833..b2951233 100644
--- a/kopete/protocols/groupwise/gwaccount.cpp
+++ b/kopete/protocols/groupwise/gwaccount.cpp
@@ -20,7 +20,7 @@
#include <sys/utsname.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -65,7 +65,7 @@
#include "gwaccount.h"
-GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& accountID, const char *name )
+GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const TQString& accountID, const char *name )
: Kopete::ManagedConnectionAccount ( parent, accountID, 0, "groupwiseaccount" )
{
Q_UNUSED( name );
@@ -74,17 +74,17 @@ GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& ac
myself()->setOnlineStatus( GroupWiseProtocol::protocol()->groupwiseOffline );
// Contact list management
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ),
- SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ),
- SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
-
- m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), QString::null, 0, this,
- SLOT( slotSetAutoReply() ), this, "actionSetAutoReply");
- m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), QString::null, 0, this,
- SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom");
- m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), QString::null, 0, this,
- SLOT( slotPrivacy() ), this, "actionPrivacy");
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ),
+ TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ),
+ TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
+
+ m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), TQString::null, 0, this,
+ TQT_SLOT( slotSetAutoReply() ), this, "actionSetAutoReply");
+ m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), TQString::null, 0, this,
+ TQT_SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom");
+ m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), TQString::null, 0, this,
+ TQT_SLOT( slotPrivacy() ), this, "actionPrivacy");
m_connector = 0;
m_QCATLS = 0;
@@ -112,8 +112,8 @@ KActionMenu* GroupWiseAccount::actionMenu()
m_actionMenu->insert( m_actionJoinChatRoom );
/* Used for debugging */
/*
- theActionMenu->insert( new KAction ( "Test rtfize()", QString::null, 0, this,
- SLOT( slotTestRTFize() ), this,
+ theActionMenu->insert( new KAction ( "Test rtfize()", TQString::null, 0, this,
+ TQT_SLOT( slotTestRTFize() ), this,
"actionTestRTFize") );
*/
return m_actionMenu;
@@ -124,7 +124,7 @@ int GroupWiseAccount::port() const
return configGroup()->readNumEntry( "Port" );
}
-const QString GroupWiseAccount::server() const
+const TQString GroupWiseAccount::server() const
{
return configGroup()->readEntry( "Server" );
}
@@ -178,8 +178,8 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth
m_chatSessions.append( chatSession );
// listen for the message manager telling us that the user
//has left the conference so we remove it from our map
- QObject::connect( chatSession, SIGNAL( leavingConference( GroupWiseChatSession * ) ),
- SLOT( slotLeavingConference( GroupWiseChatSession * ) ) );
+ TQObject::connect( chatSession, TQT_SIGNAL( leavingConference( GroupWiseChatSession * ) ),
+ TQT_SLOT( slotLeavingConference( GroupWiseChatSession * ) ) );
break;
}
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo <<
@@ -193,7 +193,7 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth
GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise::ConferenceGuid & guid )
{
GroupWiseChatSession * chatSession = 0;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin(); it != m_chatSessions.end(); ++it )
{
if ( (*it)->guid() == guid )
@@ -205,9 +205,9 @@ GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise:
return chatSession;
}
-GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn )
+GroupWiseContact * GroupWiseAccount::contactForDN( const TQString & dn )
{
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
// check if we have a DN for them
for( ; it.current(); ++it )
{
@@ -219,12 +219,12 @@ GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn )
return static_cast< GroupWiseContact * >( contacts()[ protocol()->dnToDotted( dn ).section( '.', 0, 0 ) ] );
}
-void GroupWiseAccount::setAway( bool away, const QString & reason )
+void GroupWiseAccount::setAway( bool away, const TQString & reason )
{
if ( away )
{
if ( Kopete::Away::getInstance()->idleTime() > 10 ) // don't go AwayIdle unless the user has actually been idle this long
- setOnlineStatus( protocol()->groupwiseAwayIdle, QString::null );
+ setOnlineStatus( protocol()->groupwiseAwayIdle, TQString::null );
else
setOnlineStatus( protocol()->groupwiseAway, reason );
}
@@ -232,7 +232,7 @@ void GroupWiseAccount::setAway( bool away, const QString & reason )
setOnlineStatus( protocol()->groupwiseAvailable );
}
-void GroupWiseAccount::performConnectWithPassword( const QString &password )
+void GroupWiseAccount::performConnectWithPassword( const TQString &password )
{
if ( password.isEmpty() )
{
@@ -268,86 +268,86 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password )
m_tlsHandler = new QCATLSHandler( m_QCATLS );
m_clientStream = new ClientStream( m_connector, m_tlsHandler, 0);
- QObject::connect( m_connector, SIGNAL( error() ), this, SLOT( slotConnError() ) );
- QObject::connect( m_connector, SIGNAL( connected() ), this, SLOT( slotConnConnected() ) );
+ TQObject::connect( m_connector, TQT_SIGNAL( error() ), this, TQT_SLOT( slotConnError() ) );
+ TQObject::connect( m_connector, TQT_SIGNAL( connected() ), this, TQT_SLOT( slotConnConnected() ) );
- QObject::connect (m_clientStream, SIGNAL (connectionClosed()),
- this, SLOT (slotCSDisconnected()));
- QObject::connect (m_clientStream, SIGNAL (delayedCloseFinished()),
- this, SLOT (slotCSDisconnected()));
+ TQObject::connect (m_clientStream, TQT_SIGNAL (connectionClosed()),
+ this, TQT_SLOT (slotCSDisconnected()));
+ TQObject::connect (m_clientStream, TQT_SIGNAL (delayedCloseFinished()),
+ this, TQT_SLOT (slotCSDisconnected()));
// Notify us when the transport layer is connected
- QObject::connect( m_clientStream, SIGNAL( connected() ), SLOT( slotCSConnected() ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( connected() ), TQT_SLOT( slotCSConnected() ) );
// it's necessary to catch this signal and tell the TLS handler to proceed
// even if we don't check cert validity
- QObject::connect( m_tlsHandler, SIGNAL(tlsHandshaken()), SLOT( slotTLSHandshaken()) );
+ TQObject::connect( m_tlsHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT( slotTLSHandshaken()) );
// starts the client once the security layer is up, but see below
- QObject::connect( m_clientStream, SIGNAL( securityLayerActivated(int) ), SLOT( slotTLSReady(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotTLSReady(int) ) );
// we could handle login etc in start(), in which case we would emit this signal after that
- //QObject::connect (jabberClientStream, SIGNAL (authenticated()),
- // this, SLOT (slotCSAuthenticated ()));
+ //TQObject::connect (jabberClientStream, TQT_SIGNAL (authenticated()),
+ // this, TQT_SLOT (slotCSAuthenticated ()));
// we could also get do the actual login in response to this..
- //QObject::connect (m_clientStream, SIGNAL (needAuthParams(bool, bool, bool)),
- // this, SLOT (slotCSNeedAuthParams (bool, bool, bool)));
+ //TQObject::connect (m_clientStream, TQT_SIGNAL (needAuthParams(bool, bool, bool)),
+ // this, TQT_SLOT (slotCSNeedAuthParams (bool, bool, bool)));
// not implemented: warning
- QObject::connect( m_clientStream, SIGNAL( warning(int) ), SLOT( slotCSWarning(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotCSWarning(int) ) );
// not implemented: error
- QObject::connect( m_clientStream, SIGNAL( error(int) ), SLOT( slotCSError(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( error(int) ), TQT_SLOT( slotCSError(int) ) );
m_client = new Client( 0, CMSGPRES_GW_6_5 );
- // NB these are prefixed with QObject:: to avoid any chance of a clash with our connect() methods.
+ // NB these are prefixed with TQObject:: to avoid any chance of a clash with our connect() methods.
// we connected successfully
- QObject::connect( m_client, SIGNAL( loggedIn() ), SLOT( slotLoggedIn() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( loggedIn() ), TQT_SLOT( slotLoggedIn() ) );
// or connection failed
- QObject::connect( m_client, SIGNAL( loginFailed() ), SLOT( slotLoginFailed() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( loginFailed() ), TQT_SLOT( slotLoginFailed() ) );
// folder listed
- QObject::connect( m_client, SIGNAL( folderReceived( const FolderItem & ) ), SLOT( receiveFolder( const FolderItem & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( folderReceived( const FolderItem & ) ), TQT_SLOT( receiveFolder( const FolderItem & ) ) );
// contact listed
- QObject::connect( m_client, SIGNAL( contactReceived( const ContactItem & ) ), SLOT( receiveContact( const ContactItem & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactReceived( const ContactItem & ) ), TQT_SLOT( receiveContact( const ContactItem & ) ) );
// contact details listed
- QObject::connect( m_client, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), TQT_SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) );
// contact status changed
- QObject::connect( m_client, SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ), SLOT( receiveStatus( const QString &, Q_UINT16 , const QString & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ), TQT_SLOT( receiveStatus( const TQString &, Q_UINT16 , const TQString & ) ) );
// incoming message
- QObject::connect( m_client, SIGNAL( messageReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( messageReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
// auto reply to one of our messages because the recipient is away
- QObject::connect( m_client, SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( ourStatusChanged( GroupWise::Status, const QString &, const QString & ) ), SLOT( changeOurStatus( GroupWise::Status, const QString &, const QString & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( ourStatusChanged( GroupWise::Status, const TQString &, const TQString & ) ), TQT_SLOT( changeOurStatus( GroupWise::Status, const TQString &, const TQString & ) ) );
// conference events
- QObject::connect( m_client,
- SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ),
- SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceCreationFailed( const int, const int ) ), SIGNAL( conferenceCreationFailed( const int, const int ) ) );
- QObject::connect( m_client, SIGNAL( invitationReceived( const ConferenceEvent & ) ), SLOT( receiveInvitation( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceLeft( const ConferenceEvent & ) ), SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveInviteNotify( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) );
-
- QObject::connect( m_client, SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & ) ), SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const QStringList & , const QStringList & ) ) );
+ TQObject::connect( m_client,
+ TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ),
+ TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ), TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInvitation( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteNotify( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) );
+
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & ) ), TQT_SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const TQStringList & , const TQStringList & ) ) );
// typing events
- QObject::connect( m_client, SIGNAL( contactTyping( const ConferenceEvent & ) ),
- SIGNAL( contactTyping( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
- SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ),
+ TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
+ TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
// misc
- QObject::connect( m_client, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) );
- QObject::connect( m_client, SIGNAL( connectedElsewhere() ), SLOT( slotConnectedElsewhere() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), TQT_SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( connectedElsewhere() ), TQT_SLOT( slotConnectedElsewhere() ) );
// privacy - contacts can't connect directly to this signal because myself() is initialised before m_client
- QObject::connect( m_client->privacyManager(), SIGNAL( privacyChanged( const QString &, bool ) ), SIGNAL( privacyChanged( const QString &, bool ) ) );
+ TQObject::connect( m_client->privacyManager(), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ) );
// GW7
- QObject::connect( m_client, SIGNAL( broadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
struct utsname utsBuf;
uname (&utsBuf);
m_client->setClientName ("Kopete");
m_client->setClientVersion ( kapp->aboutData ()->version () );
- m_client->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
+ m_client->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to GroupWise server " << server() << ":" << port() << endl;
@@ -358,7 +358,7 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password )
myself()->setOnlineStatus( protocol()->groupwiseConnecting );
m_client->connectToServer( m_clientStream, dn, true );
- QObject::connect( m_client, SIGNAL( messageSendingFailed() ), SLOT( slotMessageSendingFailed() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( messageSendingFailed() ), TQT_SLOT( slotMessageSendingFailed() ) );
}
void GroupWiseAccount::slotMessageSendingFailed()
@@ -367,7 +367,7 @@ void GroupWiseAccount::slotMessageSendingFailed()
i18n("Message Sending Failed", "Kopete was not able to send the last message sent on account '%1'.\nIf possible, please send the console output from Kopete to <wstephenson@novell.com> for analysis." ).arg( accountId() ) , i18n ("Unable to Send Message on Account '%1'").arg( accountId() ) );
}
-void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString &reason )
+void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString &reason )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
if ( status == protocol()->groupwiseUnknown
@@ -415,7 +415,7 @@ void GroupWiseAccount::disconnect( Kopete::Account::DisconnectReason reason )
if( isConnected () )
{
kdDebug (GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << "Still connected, closing connection..." << endl;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
(*it)->setClosed();
@@ -448,7 +448,7 @@ void GroupWiseAccount::cleanup()
m_client = 0;
}
-void GroupWiseAccount::createConference( const int clientId, const QStringList& invitees )
+void GroupWiseAccount::createConference( const int clientId, const TQStringList& invitees )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// TODO: remove this it prevents sending a list of participants with the createconf
@@ -456,7 +456,7 @@ void GroupWiseAccount::createConference( const int clientId, const QStringList&
m_client->createConference( clientId , invitees );
}
-void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const QString & message )
+void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const TQString & message )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
if ( isConnected() )
@@ -508,7 +508,7 @@ void GroupWiseAccount::reconcileOfflineChanges()
// // affecting other protocols' contacts
// set flag to warn user that incompatible changes were made on other client
bool conflicts = false;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
if ( *it == myself() )
@@ -516,17 +516,17 @@ void GroupWiseAccount::reconcileOfflineChanges()
GroupWiseContact * c = static_cast< GroupWiseContact *>( *it );
GWContactInstanceList instances = m_serverListModel->instancesWithDn( c->dn() );
- QPtrList<Kopete::Group> groups = c->metaContact()->groups();
- QPtrListIterator<Kopete::Group> grpIt( groups );
+ TQPtrList<Kopete::Group> groups = c->metaContact()->groups();
+ TQPtrListIterator<Kopete::Group> grpIt( groups );
while ( *grpIt )
{
- QPtrListIterator<Kopete::Group> candidate = grpIt;
+ TQPtrListIterator<Kopete::Group> candidate = grpIt;
++grpIt;
bool found = false;
GWContactInstanceList::Iterator instIt = instances.begin();
for ( ; instIt != instances.end(); ++instIt )
{
- QString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" );
+ TQString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" );
if ( groupId.isEmpty() )
if ( *candidate == Kopete::Group::topLevel() )
groupId = "0"; // hack the top level's objectId to 0
@@ -590,7 +590,7 @@ void GroupWiseAccount::slotKopeteGroupRenamed( Kopete::Group * renamedGroup )
{
if ( isConnected() )
{
- QString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" );
+ TQString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" );
// if this group exists on the server
if ( !objectIdString.isEmpty() )
{
@@ -623,7 +623,7 @@ void GroupWiseAccount::slotKopeteGroupRemoved( Kopete::Group * group )
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// the member contacts should be deleted separately, so just delete the folder here
// get the folder object id
- QString objectIdString = group->pluginData( protocol(), accountId() + " objectId" );
+ TQString objectIdString = group->pluginData( protocol(), accountId() + " objectId" );
if ( !objectIdString.isEmpty() )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "deleting folder with objectId: " << objectIdString << endl;
@@ -661,7 +661,7 @@ void GroupWiseAccount::slotCSDisconnected()
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Disconnected from Groupwise server." << endl;
myself()->setOnlineStatus( protocol()->groupwiseOffline );
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
(*it)->setClosed();
setAllContactsStatus( protocol()->groupwiseOffline );
@@ -710,9 +710,9 @@ void GroupWiseAccount::slotTLSHandshaken()
}
}
-int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString accountId)
+int GroupWiseAccount::handleTLSWarning (int warning, TQString server, TQString accountId)
{
- QString validityString, code;
+ TQString validityString, code;
switch(warning)
{
@@ -776,7 +776,7 @@ int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString acc
arg(validityString),
i18n("GroupWise Connection Certificate Problem"),
KStdGuiItem::cont(),
- QString("KopeteTLSWarning") + server + code);
+ TQString("KopeteTLSWarning") + server + code);
}
void GroupWiseAccount::slotTLSReady( int secLayerCode )
@@ -789,7 +789,7 @@ void GroupWiseAccount::slotTLSReady( int secLayerCode )
void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message )
{
- QString typeName = "UNKNOWN";
+ TQString typeName = "UNKNOWN";
if ( message.type == ReceiveMessage )
typeName = "message";
else if ( message.type == ReceiveAutoReply )
@@ -818,23 +818,23 @@ void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message )
GroupWiseChatSession *sess = chatSession( contactList, message.guid, Kopete::Contact::CanCreate );
// add an auto-reply indicator if needed
- QString messageMunged = message.message;
+ TQString messageMunged = message.message;
if ( message.type == ReceiveAutoReply )
{
- QString prefix = i18n("Prefix used for automatically generated auto-reply"
+ TQString prefix = i18n("Prefix used for automatically generated auto-reply"
" messages when the contact is Away, contains contact's name",
"Auto reply from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
if ( message.type == GroupWise::ReceivedBroadcast )
{
- QString prefix = i18n("Prefix used for broadcast messages",
+ TQString prefix = i18n("Prefix used for broadcast messages",
"Broadcast message from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
if ( message.type == GroupWise::ReceivedSystemBroadcast )
{
- QString prefix = i18n("Prefix used for system broadcast messages",
+ TQString prefix = i18n("Prefix used for system broadcast messages",
"System Broadcast message from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
@@ -868,15 +868,15 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder )
// either find a local group and record these details there, or create a new group to suit
Kopete::Group * found = 0;
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
for ( Kopete::Group *grp = groupList.first(); grp; grp = groupList.next() )
{
// see if there is already a local group that matches this group
- QString groupId = grp->pluginData( protocol(), accountId() + " objectId" );
+ TQString groupId = grp->pluginData( protocol(), accountId() + " objectId" );
if ( groupId.isEmpty() )
if ( folder.name == grp->displayName() ) // no match on id, match on display name instead
{
- grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) );
+ grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) );
found = grp;
break;
}
@@ -900,7 +900,7 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - not found locally, creating Kopete::Group" << endl;
Kopete::Group * grp = new Kopete::Group( folder.name );
grp->setPluginData( protocol(), accountId() + " serverDisplayName", folder.name );
- grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) );
+ grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) );
Kopete::ContactList::self()->addGroup( grp );
}
}
@@ -940,7 +940,7 @@ void GroupWiseAccount::receiveContact( const ContactItem & contact )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - ERROR - contact's folder doesn't exist on server" << endl;
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( contact.parentId, contact.id );
-// QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+// TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
return;
}
@@ -1019,7 +1019,7 @@ void GroupWiseAccount::receiveContactUserDetails( const ContactDetails & details
}
}
-GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn )
+GroupWiseContact * GroupWiseAccount::createTemporaryContact( const TQString & dn )
{
ContactDetails details = client()->userDetailsManager()->details( dn );
GroupWiseContact * c = static_cast<GroupWiseContact *>( contacts()[ details.dn.lower() ] );
@@ -1029,7 +1029,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn
// the client is telling us about a temporary contact we need to know about so add them
Kopete::MetaContact *metaContact = new Kopete::MetaContact ();
metaContact->setTemporary (true);
- QString displayName = details.fullName;
+ TQString displayName = details.fullName;
if ( displayName.isEmpty() )
displayName = details.givenName + " " + details.surname;
@@ -1047,7 +1047,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn
return c;
}
-void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status, const QString &awayMessage )
+void GroupWiseAccount::receiveStatus( const TQString & contactId, Q_UINT16 status, const TQString &awayMessage )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "got status for: " << contactId << ", status: " << status << ", away message: " << awayMessage << endl;
GroupWiseContact * c = contactForDN( contactId );
@@ -1062,7 +1062,7 @@ void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " couldn't find " << contactId << endl;
}
-void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const QString & awayMessage, const QString & autoReply )
+void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const TQString & awayMessage, const TQString & autoReply )
{
if ( status == GroupWise::Offline )
myself()->setOnlineStatus( protocol()->groupwiseAppearOffline );
@@ -1083,7 +1083,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const
outMsg.message = message.plainBody();
outMsg.rtfMessage = protocol()->rtfizeText( message.plainBody() );
// make a list of DNs to send to
- QStringList addresseeDNs;
+ TQStringList addresseeDNs;
Kopete::ContactPtrList addressees = message.to();
for ( Kopete::Contact * contact = addressees.first(); contact; contact = addressees.next() )
addresseeDNs.append( static_cast< GroupWiseContact* >( contact )->dn() );
@@ -1092,7 +1092,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const
}
}
-bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact )
+bool GroupWiseAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "contactId: " << contactId << endl;
@@ -1100,7 +1100,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// record, in a folderitem, their display names and groupwise object id
// Set object id to 0 if not found - they do not exist on the server
bool topLevel = false;
- QValueList< FolderItem > folders;
+ TQValueList< FolderItem > folders;
Kopete::GroupList groupList = parentContact->groups();
for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
@@ -1146,7 +1146,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// we have to create the contact optimistically.
GroupWiseContact * gc = new GroupWiseContact( this, contactId, parentContact, 0, 0, 0 );
ContactDetails dt = client()->userDetailsManager()->details( contactId );
- QString displayAs;
+ TQString displayAs;
if ( dt.fullName.isEmpty() )
displayAs = dt.givenName + " " + dt.surname;
else
@@ -1165,7 +1165,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// get the contact's full name to use as the display name of the created contact
CreateContactTask * cct = new CreateContactTask( client()->rootTask() );
cct->contactFromUserId( contactId, parentContact->displayName(), highestFreeSequence, folders, topLevel );
- QObject::connect( cct, SIGNAL( finished() ), SLOT( receiveContactCreated() ) );
+ TQObject::connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( receiveContactCreated() ) );
cct->go( true );
return true;
}
@@ -1188,7 +1188,7 @@ void GroupWiseAccount::receiveContactCreated()
}
else
{
- client()->requestDetails( QStringList( cct->dn() ) );
+ client()->requestDetails( TQStringList( cct->dn() ) );
client()->requestStatus( cct->dn() );
}
}
@@ -1228,7 +1228,7 @@ void GroupWiseAccount::deleteContact( GroupWiseContact * contact )
{
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( ::qt_cast<GWFolder*>( (*it)->parent() )->id, (*it)->id );
- QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
}
}
@@ -1279,13 +1279,13 @@ void GroupWiseAccount::receiveInvitation( const ConferenceEvent & event )
}
-void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const QStringList & participants, const QStringList & invitees )
+void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const TQStringList & participants, const TQStringList & invitees )
{
// get a new GWMM
Kopete::ContactPtrList others;
GroupWiseChatSession * sess = chatSession( others, guid, Kopete::Contact::CanCreate);
// find each contact and add them to the GWMM, and tell them they are in the conference
- for ( QValueList<QString>::ConstIterator it = participants.begin(); it != participants.end(); ++it )
+ for ( TQValueList<TQString>::ConstIterator it = participants.begin(); it != participants.end(); ++it )
{
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding participant " << *it << endl;
GroupWiseContact * c = contactForDN( *it );
@@ -1294,7 +1294,7 @@ void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid &
sess->joined( c );
}
// add each invitee too
- for ( QValueList<QString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it )
+ for ( TQValueList<TQString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it )
{
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding invitee " << *it << endl;
GroupWiseContact * c = contactForDN( *it );
@@ -1388,9 +1388,9 @@ void GroupWiseAccount::slotLeavingConference( GroupWiseChatSession * sess )
void GroupWiseAccount::slotSetAutoReply()
{
bool ok;
- QRegExp rx( ".*" );
- QRegExpValidator validator( rx, this );
- QString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ),
+ TQRegExp rx( ".*" );
+ TQRegExpValidator validator( rx, this );
+ TQString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ),
i18n( "Please enter an Auto-Reply message that will be shown to users who message you while Away or Busy" ), configGroup()->readEntry( "AutoReply" ),
&ok, Kopete::UI::Global::mainWidget(), "autoreplymessagedlg", &validator );
if ( ok )
@@ -1400,14 +1400,14 @@ void GroupWiseAccount::slotSetAutoReply()
void GroupWiseAccount::slotTestRTFize()
{
/* bool ok;
- const QString query = QString::fromLatin1("Enter a string to rtfize:");
- QString testText = KLineEditDlg::getText( query, QString::null, &ok, Kopete::UI::Global::mainWidget() );
+ const TQString query = TQString::fromLatin1("Enter a string to rtfize:");
+ TQString testText = KLineEditDlg::getText( query, TQString::null, &ok, Kopete::UI::Global::mainWidget() );
if ( ok )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Converted text is: '" << protocol()->rtfizeText( testText ) << "'" << endl;*/
// bool ok;
-// const QString query = i18n("Enter a contactId:");
-// QString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), QString::null, &ok, Kopete::UI::Global::mainWidget() );
+// const TQString query = i18n("Enter a contactId:");
+// TQString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), TQString::null, &ok, Kopete::UI::Global::mainWidget() );
// if ( !ok )
// return;
// kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Trying to add contact: '" << protocol()->rtfizeText( testText ) << "'" << endl;
@@ -1427,7 +1427,7 @@ void GroupWiseAccount::slotJoinChatRoom()
new GroupWiseChatSearchDialog( this, Kopete::UI::Global::mainWidget(), "gwjoinchatdialog" );
}
-bool GroupWiseAccount::isContactBlocked( const QString & dn )
+bool GroupWiseAccount::isContactBlocked( const TQString & dn )
{
if ( isConnected() )
return client()->privacyManager()->isBlocked( dn );
@@ -1439,7 +1439,7 @@ void GroupWiseAccount::dumpManagers()
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " for: " << accountId()
<< " containing: " << m_chatSessions.count() << " managers " << endl;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "guid: " << (*it)->guid() << endl;
}
@@ -1479,16 +1479,16 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
int nextFreeSequence = m_serverListModel->maxSequenceNumber() + 1;
// 1)
// make a list of all the groups the metacontact is in
- QPtrList<Kopete::Group> groupList = contact->metaContact()->groups();
+ TQPtrList<Kopete::Group> groupList = contact->metaContact()->groups();
// make a list of all the groups this contact is in, according to the server model
GWContactInstanceList instances = m_serverListModel->instancesWithDn( contact->dn() );
// seek corresponding pairs in both lists and remove
// ( for each group )
- QPtrListIterator< Kopete::Group > grpIt( groupList );
+ TQPtrListIterator< Kopete::Group > grpIt( groupList );
while ( *grpIt )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
@@ -1521,7 +1521,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
// ( take the first pair and carry out a move )
while ( *grpIt && !instances.isEmpty() )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
GWContactInstanceList::Iterator instIt = instances.begin();
@@ -1541,21 +1541,21 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
mit->moveContact( instance, destinationFolder->id );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
mit->go();
}
else if ( *candidateGrp == Kopete::Group::topLevel() )
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
mit->moveContact( instance, 0 );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
mit->go();
}
else
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ),
- SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ),
+ TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
// discover the next free sequence number and add the group using that
mit->moveContactToNewFolder( instance, nextFreeSequence++,
( *candidateGrp )->displayName() );
@@ -1569,7 +1569,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
grpIt.toFirst();
while ( *grpIt )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
GWFolder * destinationFolder = m_serverListModel->findFolderByName( ( ( *candidateGrp )->displayName() ) );
@@ -1609,7 +1609,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( folder->id, (*candidateInst)->id );
- QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
instances.remove( candidateInst );
@@ -1625,7 +1625,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
const GWContactInstanceList::Iterator end = instances.end();
for ( ; it != end; ++it )
{
- QValueList< ContactItem > instancesToChange;
+ TQValueList< ContactItem > instancesToChange;
ContactItem instance;
instance.id = (*it)->id;
instance.parentId = ::qt_cast<GWFolder *>( (*it)->parent() )->id;
@@ -1636,7 +1636,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
UpdateContactTask * uct = new UpdateContactTask( client()->rootTask() );
uct->renameContact( contact->metaContact()->displayName(), instancesToChange );
- QObject::connect ( uct, SIGNAL( finished() ), contact, SLOT( renamedOnServer() ) );
+ TQObject::connect ( uct, TQT_SIGNAL( finished() ), contact, TQT_SLOT( renamedOnServer() ) );
uct->go( true );
}
}
diff --git a/kopete/protocols/groupwise/gwaccount.h b/kopete/protocols/groupwise/gwaccount.h
index 2e8f8348..fd137154 100644
--- a/kopete/protocols/groupwise/gwaccount.h
+++ b/kopete/protocols/groupwise/gwaccount.h
@@ -58,7 +58,7 @@ class GroupWiseAccount : public Kopete::ManagedConnectionAccount
{
Q_OBJECT
public:
- GroupWiseAccount( GroupWiseProtocol *parent, const QString& accountID, const char *name = 0 );
+ GroupWiseAccount( GroupWiseProtocol *parent, const TQString& accountID, const char *name = 0 );
~GroupWiseAccount();
/**
@@ -73,7 +73,7 @@ public:
* Creates a protocol specific Kopete::Contact subclass and adds it to the supplied
* Kopete::MetaContact
*/
- virtual bool createContact(const QString& contactId, Kopete::MetaContact* parentContact);
+ virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact);
/**
* Delete a contact on the server
*/
@@ -81,7 +81,7 @@ public:
/**
* Called when Kopete is set globally away
*/
- virtual void setAway(bool away, const QString& reason);
+ virtual void setAway(bool away, const TQString& reason);
/**
* Utility access to the port given by the user
*/
@@ -89,7 +89,7 @@ public:
/**
* Utility access to the server given by the user
*/
- const QString server() const;
+ const TQString server() const;
/**
* Utility access to our protocol
*/
@@ -108,11 +108,11 @@ public:
* Look up a contact given a DN
* Returns 0 if none found
*/
- GroupWiseContact * contactForDN( const QString & dn );
+ GroupWiseContact * contactForDN( const TQString & dn );
/**
* Create a conference (start a chat) on the server
*/
- void createConference( const int clientId, const QStringList& invitees );
+ void createConference( const int clientId, const TQStringList& invitees );
/**
* Send a message
@@ -122,17 +122,17 @@ public:
/**
* Invite someone to join a conference
*/
- void sendInvitation( const ConferenceGuid & guid, const QString & dn, const QString & message );
+ void sendInvitation( const ConferenceGuid & guid, const TQString & dn, const TQString & message );
/**
* Check a contact's blocking status
* Only works when connected - otherwise always returns false
*/
- bool isContactBlocked( const QString & m_dn );
+ bool isContactBlocked( const TQString & m_dn );
/**
* Set up a temporary contact (not on our contact list but is messaging us or involved in a conversation that we have been invited to.
*/
- GroupWiseContact * createTemporaryContact( const QString & dn );
+ GroupWiseContact * createTemporaryContact( const TQString & dn );
/**
* Check whether sync is not currently needed
@@ -146,20 +146,20 @@ public slots:
void slotTestRTFize();
/* Connects to the server. */
- void performConnectWithPassword ( const QString &password );
+ void performConnectWithPassword ( const TQString &password );
/* Disconnects from the server. */
virtual void disconnect();
virtual void disconnect( Kopete::Account::DisconnectReason reason );
/** Set the online status for the account. 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);
signals:
void conferenceCreated( const int mmId, const GroupWise::ConferenceGuid & guid );
void conferenceCreationFailed( const int mmId, const int statusCode );
void contactTyping( const ConferenceEvent & );
void contactNotTyping( const ConferenceEvent & );
- void privacyChanged( const QString & dn, bool allowed );
+ void privacyChanged( const TQString & dn, bool allowed );
protected slots:
@@ -224,11 +224,11 @@ protected slots:
/**
* A contact changed status
*/
- void receiveStatus( const QString &, Q_UINT16, const QString & );
+ void receiveStatus( const TQString &, Q_UINT16, const TQString & );
/**
* Our status changed on the server
*/
- void changeOurStatus( GroupWise::Status, const QString &, const QString & );
+ void changeOurStatus( GroupWise::Status, const TQString &, const TQString & );
/**
* Called when we've been disconnected for logging in as this user somewhere else
*/
@@ -244,7 +244,7 @@ protected slots:
/**
* We joined a conference having accepted an invitation, create a message manager
*/
- void receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const QStringList & participants, const QStringList & invitees );
+ void receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const TQStringList & participants, const TQStringList & invitees );
/**
* Someone joined a conference, add them to the appropriate message manager
*/
@@ -306,9 +306,9 @@ protected:
/**
* Sends a status message to the server - called by the status specific slotGoAway etc
*/
- //void setStatus( GroupWise::Status status, const QString & reason = QString::null );
+ //void setStatus( GroupWise::Status status, const TQString & reason = TQString::null );
- int handleTLSWarning (int warning, QString server, QString accountId);
+ int handleTLSWarning (int warning, TQString server, TQString accountId);
GroupWiseChatSession * findChatSessionByGuid( const GroupWise::ConferenceGuid & guid );
/**
@@ -333,8 +333,8 @@ private:
// Client, entry point of libgroupwise
Client * m_client;
- QString m_initialReason;
- QValueList<GroupWiseChatSession*> m_chatSessions;
+ TQString m_initialReason;
+ TQValueList<GroupWiseChatSession*> m_chatSessions;
bool m_dontSync;
GWContactList * m_serverListModel;
};
@@ -347,14 +347,14 @@ private:
{
Q_OBJECT
public:
- OnlineStatusMessageAction ( const Kopete::OnlineStatus& status, const QString &text, const QString &message, const QIconSet &pix, QObject *parent=0, const char *name=0);
+ OnlineStatusMessageAction ( const Kopete::OnlineStatus& status, const TQString &text, const TQString &message, const TQIconSet &pix, TQObject *parent=0, const char *name=0);
signals:
- void activated( const Kopete::OnlineStatus& status, const QString & );
+ void activated( const Kopete::OnlineStatus& status, const TQString & );
private slots:
void slotActivated();
private:
Kopete::OnlineStatus m_status;
- QString m_message;
+ TQString m_message;
};
*/
#endif
diff --git a/kopete/protocols/groupwise/gwbytestream.cpp b/kopete/protocols/groupwise/gwbytestream.cpp
index cd476070..e3c71483 100644
--- a/kopete/protocols/groupwise/gwbytestream.cpp
+++ b/kopete/protocols/groupwise/gwbytestream.cpp
@@ -17,7 +17,7 @@
* *
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kbufferedsocket.h>
#include <kdebug.h>
#include <kresolver.h>
@@ -25,7 +25,7 @@
#include "gwbytestream.h"
#include "gwerror.h"
-KNetworkByteStream::KNetworkByteStream ( QObject *parent, const char */*name*/ )
+KNetworkByteStream::KNetworkByteStream ( TQObject *parent, const char */*name*/ )
: ByteStream ( parent )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl;
@@ -39,15 +39,15 @@ 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 ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl;
@@ -77,7 +77,7 @@ int KNetworkByteStream::tryWrite ()
{
// send all data from the buffers to the socket
- QByteArray writeData = takeWrite();
+ TQByteArray writeData = takeWrite();
socket()->writeBlock ( writeData.data (), writeData.size () );
return writeData.size ();
@@ -128,7 +128,7 @@ 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/groupwise/gwbytestream.h b/kopete/protocols/groupwise/gwbytestream.h
index 9422f9c3..0cd95f77 100644
--- a/kopete/protocols/groupwise/gwbytestream.h
+++ b/kopete/protocols/groupwise/gwbytestream.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/groupwise/gwconnector.cpp b/kopete/protocols/groupwise/gwconnector.cpp
index c145ddfe..946116b6 100644
--- a/kopete/protocols/groupwise/gwconnector.cpp
+++ b/kopete/protocols/groupwise/gwconnector.cpp
@@ -25,7 +25,7 @@
#include "gwerror.h"
#include "gwbytestream.h"
-KNetworkConnector::KNetworkConnector ( QObject *parent, const char */*name*/ )
+KNetworkConnector::KNetworkConnector ( TQObject *parent, const char */*name*/ )
: Connector ( parent )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "New KNetwork connector." << endl;
@@ -34,8 +34,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;
}
@@ -46,7 +46,7 @@ KNetworkConnector::~KNetworkConnector ()
}
-void KNetworkConnector::connectToServer ( const QString &server )
+void KNetworkConnector::connectToServer ( const TQString &server )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << mHost << endl;
Q_ASSERT( !mHost.isNull() );
@@ -60,7 +60,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 ();
@@ -75,7 +75,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 ();
@@ -109,7 +109,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 ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl;
diff --git a/kopete/protocols/groupwise/gwconnector.h b/kopete/protocols/groupwise/gwconnector.h
index 12dc59d2..bfd6c260 100644
--- a/kopete/protocols/groupwise/gwconnector.h
+++ b/kopete/protocols/groupwise/gwconnector.h
@@ -37,15 +37,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 );
void setOptSSL ( bool );
int errorCode ();
@@ -55,7 +55,7 @@ private slots:
void slotError ( int );
private:
- QString mHost;
+ TQString mHost;
Q_UINT16 mPort;
int mErrorCode;
diff --git a/kopete/protocols/groupwise/gwcontact.cpp b/kopete/protocols/groupwise/gwcontact.cpp
index 6dbb8c1b..d15c76b9 100644
--- a/kopete/protocols/groupwise/gwcontact.cpp
+++ b/kopete/protocols/groupwise/gwcontact.cpp
@@ -25,7 +25,7 @@
*************************************************************************
*/
-#include <qmap.h>
+#include <tqmap.h>
#include <kaction.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@
using namespace GroupWise;
-GroupWiseContact::GroupWiseContact( Kopete::Account* account, const QString &dn,
+GroupWiseContact::GroupWiseContact( Kopete::Account* account, const TQString &dn,
Kopete::MetaContact *parent,
const int objectId, const int parentId, const int sequence )
: Kopete::Contact( account, GroupWiseProtocol::dnToDotted( dn ), parent ), m_objectId( objectId ), m_parentId( parentId ),
@@ -56,8 +56,8 @@ GroupWiseContact::GroupWiseContact( Kopete::Account* account, const QString &dn,
{
m_dn = dn;
}
- connect( static_cast< GroupWiseAccount *>( account ), SIGNAL( privacyChanged( const QString &, bool ) ),
- SLOT( receivePrivacyChanged( const QString &, bool ) ) );
+ connect( static_cast< GroupWiseAccount *>( account ), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ),
+ TQT_SLOT( receivePrivacyChanged( const TQString &, bool ) ) );
setOnlineStatus( ( parent && parent->isTemporary() ) ? protocol()->groupwiseUnknown : protocol()->groupwiseOffline );
}
@@ -70,7 +70,7 @@ GroupWiseContact::~GroupWiseContact()
account()->client()->userDetailsManager()->removeContact( contactId() );
}
-QString GroupWiseContact::dn() const
+TQString GroupWiseContact::dn() const
{
return m_dn;
}
@@ -94,7 +94,7 @@ void GroupWiseContact::updateDetails( const ContactDetails & details )
m_serverProperties = details.properties;
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
// work phone number
if ( ( it = m_serverProperties.find( "telephoneNumber" ) )
!= m_serverProperties.end() )
@@ -143,7 +143,7 @@ bool GroupWiseContact::isReachable()
return false;
}
-void GroupWiseContact::serialize( QMap< QString, QString > &serializedData, QMap< QString, QString > & /* addressBookData */ )
+void GroupWiseContact::serialize( TQMap< TQString, TQString > &serializedData, TQMap< TQString, TQString > & /* addressBookData */ )
{
serializedData[ "DN" ] = m_dn;
}
@@ -155,18 +155,18 @@ Kopete::ChatSession * GroupWiseContact::manager( Kopete::Contact::CanCreateFlags
Kopete::ContactPtrList chatMembers;
chatMembers.append( this );
- return account()->chatSession( chatMembers, QString::null, canCreate );
+ return account()->chatSession( chatMembers, TQString::null, canCreate );
}
-QPtrList<KAction> *GroupWiseContact::customContextMenuActions()
+TQPtrList<KAction> *GroupWiseContact::customContextMenuActions()
{
- QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>;
+ TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>;
// Block/unblock Contact
- QString label = account()->isContactBlocked( m_dn ) ? i18n( "Unblock User" ) : i18n( "Block User" );
+ TQString label = account()->isContactBlocked( m_dn ) ? i18n( "Unblock User" ) : i18n( "Block User" );
if( !m_actionBlock )
{
- m_actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlock() ),
+ m_actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlock() ),
this, "actionBlock" );
}
else
@@ -183,7 +183,7 @@ void GroupWiseContact::slotUserInfo()
new GroupWiseContactProperties( this, Kopete::UI::Global::mainWidget(), "gwcontactproperties" );
}
-QMap< QString, QString > GroupWiseContact::serverProperties()
+TQMap< TQString, TQString > GroupWiseContact::serverProperties()
{
return m_serverProperties;
}
@@ -218,7 +218,7 @@ void GroupWiseContact::slotBlock()
}
}
-void GroupWiseContact::receivePrivacyChanged( const QString & dn, bool allow )
+void GroupWiseContact::receivePrivacyChanged( const TQString & dn, bool allow )
{
Q_UNUSED( allow );
if ( dn == m_dn ) // set the online status back to itself. this will set the blocking state
@@ -236,7 +236,7 @@ void GroupWiseContact::setOnlineStatus( const Kopete::OnlineStatus& status )
if ( account()->isContactBlocked( m_dn ) && status.internalStatus() < 15 )
{
Kopete::Contact::setOnlineStatus(Kopete::OnlineStatus(status.status() , (status.weight()==0) ? 0 : (status.weight() -1) ,
- protocol() , status.internalStatus()+15 , QString::fromLatin1("msn_blocked"),
+ protocol() , status.internalStatus()+15 , TQString::fromLatin1("msn_blocked"),
i18n("%1|Blocked").arg( status.description() ) ) );
}
else
diff --git a/kopete/protocols/groupwise/gwcontact.h b/kopete/protocols/groupwise/gwcontact.h
index e5079387..64486e75 100644
--- a/kopete/protocols/groupwise/gwcontact.h
+++ b/kopete/protocols/groupwise/gwcontact.h
@@ -27,8 +27,8 @@
#ifndef GW_CONTACT_H
#define GW_CONTACT_H
-#include <qdict.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqmap.h>
#include "kopetecontact.h"
#include "kopetemessage.h"
@@ -63,7 +63,7 @@ public:
* @param parentId The ID of this contact's parent (folder).
* @param sequence This contact's sequence number (The position it appears in within its parent).
*/
- GroupWiseContact( Kopete::Account* account, const QString &uniqueName,
+ GroupWiseContact( Kopete::Account* account, const TQString &uniqueName,
Kopete::MetaContact *parent,
const int objectId, const int parentId, const int sequence );
@@ -82,7 +82,7 @@ public:
/**
* Get the contact's DN (used for communications with the server, not the contactId )
*/
- QString dn() const;
+ TQString dn() const;
/**
* Update the contact's status and metadata from the supplied fields
@@ -94,12 +94,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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
/**
* Returns a Kopete::ChatSession associated with this contact
@@ -109,7 +109,7 @@ public:
/**
* Access the contact's server properties
*/
- QMap< QString, QString > serverProperties();
+ TQMap< TQString, TQString > serverProperties();
/**
* Updates this contact's group membership and display name on the server
*/
@@ -170,20 +170,20 @@ protected slots:
/**
* Receive notification that this contact's privacy setting changed - update status
*/
- void receivePrivacyChanged( const QString &, bool );
+ void receivePrivacyChanged( const TQString &, bool );
protected:
KActionCollection* m_actionCollection;
int m_objectId;
int m_parentId;
int m_sequence;
- QString m_dn;
- QString m_displayName;
+ TQString m_dn;
+ TQString m_displayName;
KAction* m_actionPrefs;
KAction *m_actionBlock;
// Novell Messenger Properties, as received by the server.
// Unfortunately we don't the domain of the set of keys, so they are not easily mappable to KopeteContactProperties
- QMap< QString, QString > m_serverProperties;
+ TQMap< TQString, TQString > m_serverProperties;
bool m_archiving;
// HACK: flag used to differentiate between 'all contact list instances gone while we are moving on the server'
// and 'all contact list instances gone because we wanted to delete them all'
diff --git a/kopete/protocols/groupwise/gwcontactlist.cpp b/kopete/protocols/groupwise/gwcontactlist.cpp
index 2af6d42a..3f8b5c4d 100644
--- a/kopete/protocols/groupwise/gwcontactlist.cpp
+++ b/kopete/protocols/groupwise/gwcontactlist.cpp
@@ -15,18 +15,18 @@
*************************************************************************
*/
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
#include "gwcontactlist.h"
#include "gwerror.h" //debug area
-GWContactList::GWContactList( QObject * parent )
- : QObject( parent ), rootFolder( new GWFolder( this, 0, 0, QString::null ) )
+GWContactList::GWContactList( TQObject * parent )
+ : TQObject( parent ), rootFolder( new GWFolder( this, 0, 0, TQString::null ) )
{ }
-GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, const QString & displayName )
+GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, const TQString & displayName )
{
if ( rootFolder )
return new GWFolder( rootFolder, id, sequence, displayName );
@@ -34,11 +34,11 @@ GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, con
return 0;
}
-GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const QString & displayName, const QString & dn )
+GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const TQString & displayName, const TQString & dn )
{
- QObjectList * l = queryList( "GWFolder", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWFolder", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
GWContactInstance * contact = 0;
while ( (obj = it.current()) != 0 )
{
@@ -56,9 +56,9 @@ GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned
GWFolder * GWContactList::findFolderById( unsigned int id )
{
- QObjectList * l = queryList( "GWFolder", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWFolder", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
GWFolder * candidate, * folder = 0;
while ( (obj = it.current()) != 0 )
{
@@ -74,11 +74,11 @@ GWFolder * GWContactList::findFolderById( unsigned int id )
return folder;
}
-GWFolder * GWContactList::findFolderByName( const QString & displayName )
+GWFolder * GWContactList::findFolderByName( const TQString & displayName )
{
- QObjectList * l = queryList( "GWFolder", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWFolder", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
GWFolder * folder = 0;
while ( (obj = it.current()) != 0 )
{
@@ -96,9 +96,9 @@ GWFolder * GWContactList::findFolderByName( const QString & displayName )
int GWContactList::maxSequenceNumber()
{
- QObjectList * l = queryList( "GWFolder", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWFolder", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
unsigned int sequence = 0;
while ( (obj = it.current()) != 0 )
{
@@ -110,11 +110,11 @@ int GWContactList::maxSequenceNumber()
return sequence;
}
-GWContactInstanceList GWContactList::instancesWithDn( const QString & dn )
+GWContactInstanceList GWContactList::instancesWithDn( const TQString & dn )
{
- QObjectList * l = queryList( "GWContactInstance", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWContactInstance", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
GWContactInstanceList matches;
while ( (obj = it.current()) != 0 )
{
@@ -134,9 +134,9 @@ void GWContactList::removeInstance( GWContactListItem * instance )
void GWContactList::removeInstanceById( unsigned int id )
{
- QObjectList * l = queryList( "GWContactInstance", 0, false, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList * l = queryList( "GWContactInstance", 0, false, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
GWContactInstanceList matches;
while ( (obj = it.current()) != 0 )
{
@@ -154,11 +154,11 @@ void GWContactList::removeInstanceById( unsigned int id )
void GWContactList::dump()
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- const QObjectList * l = children();
+ const TQObjectList * l = children();
if ( l && !l->isEmpty() )
{
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 )
{
GWFolder * folder = ::qt_cast< GWFolder * >( obj );
@@ -174,11 +174,11 @@ void GWContactList::dump()
void GWContactList::clear()
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- const QObjectList * l = children();
+ const TQObjectList * l = children();
if ( l && !l->isEmpty() )
{
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 )
{
delete obj;
@@ -187,24 +187,24 @@ void GWContactList::clear()
}
}
-GWContactListItem::GWContactListItem( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ) :
- QObject( parent), id( theId ), sequence( theSequence ), displayName( theDisplayName )
+GWContactListItem::GWContactListItem( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
+ TQObject( parent), id( theId ), sequence( theSequence ), displayName( theDisplayName )
{ }
-GWFolder::GWFolder( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ) :
+GWFolder::GWFolder( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
GWContactListItem( parent, theId, theSequence, theDisplayName )
{ }
void GWFolder::dump( unsigned int depth )
{
- QString s;
+ TQString s;
s.fill( ' ', ++depth * 2 );
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s <<"Folder " << displayName << " id: " << id << " contains: " << endl;
- const QObjectList * l = children();
+ const TQObjectList * l = children();
if ( l )
{
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 )
{
++it;
@@ -223,13 +223,13 @@ void GWFolder::dump( unsigned int depth )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s << " no contacts." << endl;
}
-GWContactInstance::GWContactInstance( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName, const QString & theDn ) :
+GWContactInstance::GWContactInstance( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn ) :
GWContactListItem( parent, theId, theSequence, theDisplayName ), dn( theDn )
{ }
void GWContactInstance::dump( unsigned int depth )
{
- QString s;
+ TQString s;
s.fill( ' ', ++depth * 2 );
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s << "Contact " << displayName << " id: " << id << " dn: " << dn << endl;
}
diff --git a/kopete/protocols/groupwise/gwcontactlist.h b/kopete/protocols/groupwise/gwcontactlist.h
index e596b96c..613e1b3f 100644
--- a/kopete/protocols/groupwise/gwcontactlist.h
+++ b/kopete/protocols/groupwise/gwcontactlist.h
@@ -17,7 +17,7 @@
// GROUPWISE SERVER SIDE CONTACT LIST MODEL
-#include <qobject.h>
+#include <tqobject.h>
#ifndef GW_CONTACTLIST_H
#define GW_CONTACTLIST_H
@@ -26,7 +26,7 @@ class GWFolder;
class GWContactInstance;
class GWContactListItem;
-typedef QValueList<GWContactInstance *> GWContactInstanceList;
+typedef TQValueList<GWContactInstance *> GWContactInstanceList;
/**
* These functions model the server side contact list structure enough to allow Kopete to manipulate it correctly
@@ -43,12 +43,12 @@ class GWContactList : public QObject
{
Q_OBJECT
public:
- GWContactList( QObject * parent );
- GWFolder * addFolder( unsigned int id, unsigned int sequence, const QString & displayName );
- GWContactInstance * addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const QString & displayName, const QString & dn );
+ GWContactList( TQObject * parent );
+ GWFolder * addFolder( unsigned int id, unsigned int sequence, const TQString & displayName );
+ GWContactInstance * addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const TQString & displayName, const TQString & dn );
GWFolder * findFolderById( unsigned int id );
- GWFolder * findFolderByName( const QString & name );
- GWContactInstanceList instancesWithDn( const QString & dn );
+ GWFolder * findFolderByName( const TQString & name );
+ GWContactInstanceList instancesWithDn( const TQString & dn );
void removeInstance( GWContactListItem * instance );
void removeInstanceById( unsigned int id );
int maxSequenceNumber();
@@ -61,18 +61,18 @@ class GWContactListItem : public QObject
{
Q_OBJECT
public:
- GWContactListItem( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName );
+ GWContactListItem( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName );
unsigned int id; // OBJECT_ID
unsigned int sequence; // SEQUENCE_NUMBER
- QString displayName; // DISPLAY_NAME
+ TQString displayName; // DISPLAY_NAME
};
class GWFolder : public GWContactListItem
{
Q_OBJECT
public:
- GWFolder( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName );
+ GWFolder( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName );
virtual void dump( unsigned int depth );
};
@@ -80,8 +80,8 @@ class GWContactInstance : public GWContactListItem
{
Q_OBJECT
public:
- GWContactInstance( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName, const QString & theDn );
- QString dn; // DN
+ GWContactInstance( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn );
+ TQString dn; // DN
virtual void dump( unsigned int depth );
};
diff --git a/kopete/protocols/groupwise/gwmessagemanager.cpp b/kopete/protocols/groupwise/gwmessagemanager.cpp
index d9467dfd..7a792486 100644
--- a/kopete/protocols/groupwise/gwmessagemanager.cpp
+++ b/kopete/protocols/groupwise/gwmessagemanager.cpp
@@ -10,8 +10,8 @@
//
//
-#include <qlabel.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <kdialogbase.h>
#include <kiconloader.h>
@@ -53,22 +53,22 @@ GroupWiseChatSession::GroupWiseChatSession(const Kopete::Contact* user, Kopete::
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
- connect ( this, SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
- SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
- connect( this, SIGNAL( myselfTyping ( bool ) ), SLOT( slotSendTypingNotification ( bool ) ) );
- connect( account(), SIGNAL( contactTyping( const ConferenceEvent & ) ),
- SLOT( slotGotTypingNotification( const ConferenceEvent & ) ) );
- connect( account(), SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
- SLOT( slotGotNotTypingNotification( const ConferenceEvent & ) ) );
+ connect ( this, TQT_SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
+ TQT_SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
+ connect( this, TQT_SIGNAL( myselfTyping ( bool ) ), TQT_SLOT( slotSendTypingNotification ( bool ) ) );
+ connect( account(), TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ),
+ TQT_SLOT( slotGotTypingNotification( const ConferenceEvent & ) ) );
+ connect( account(), TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
+ TQT_SLOT( slotGotNotTypingNotification( const ConferenceEvent & ) ) );
// Set up the Invite menu
m_actionInvite = new KActionMenu( i18n( "&Invite" ), actionCollection() , "gwInvite" );
- connect( m_actionInvite->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT(slotActionInviteAboutToShow() ) ) ;
+ connect( m_actionInvite->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT(slotActionInviteAboutToShow() ) ) ;
- m_secure = new KAction( i18n( "Security Status" ), "encrypted", KShortcut(), this, SLOT( slotShowSecurity() ), actionCollection(), "gwSecureChat" );
+ m_secure = new KAction( i18n( "Security Status" ), "encrypted", KShortcut(), this, TQT_SLOT( slotShowSecurity() ), actionCollection(), "gwSecureChat" );
m_secure->setToolTip( i18n( "Conversation is secure" ) );
- m_logging = new KAction( i18n( "Archiving Status" ), "logchat", KShortcut(), this, SLOT( slotShowArchiving() ), actionCollection(), "gwLoggingChat" );
+ m_logging = new KAction( i18n( "Archiving Status" ), "logchat", KShortcut(), this, TQT_SLOT( slotShowArchiving() ), actionCollection(), "gwLoggingChat" );
updateArchiving();
setXMLFile("gwchatui.rc");
@@ -116,7 +116,7 @@ bool GroupWiseChatSession::secure()
void GroupWiseChatSession::setClosed()
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " Conference " << m_guid << " is now Closed " << endl;
- m_guid = QString::null;
+ m_guid = TQString::null;
m_flags = m_flags | GroupWise::Closed;
}
@@ -147,15 +147,15 @@ void GroupWiseChatSession::createConference()
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// form a list of invitees
- QStringList invitees;
+ TQStringList invitees;
Kopete::ContactPtrList chatMembers = members();
for ( Kopete::Contact * contact = chatMembers.first(); contact; contact = chatMembers.next() )
{
invitees.append( static_cast< GroupWiseContact * >( contact )->dn() );
}
// this is where we will set the GUID and send any pending messages
- connect( account(), SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), SLOT( receiveGuid( const int, const GroupWise::ConferenceGuid & ) ) );
- connect( account(), SIGNAL( conferenceCreationFailed( const int, const int ) ), SLOT( slotCreationFailed( const int, const int ) ) );
+ connect( account(), TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), TQT_SLOT( receiveGuid( const int, const GroupWise::ConferenceGuid & ) ) );
+ connect( account(), TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ), TQT_SLOT( slotCreationFailed( const int, const int ) ) );
// create the conference
account()->createConference( mmId(), invitees );
@@ -175,7 +175,7 @@ void GroupWiseChatSession::receiveGuid( const int newMmId, const GroupWise::Conf
// they are removed from the chat member list GUI. By re-adding them here, we guarantee they appear
// in the UI again, at the price of a debug message when starting up a new chatwindow
- QPtrListIterator< Kopete::Contact > it( members() );
+ TQPtrListIterator< Kopete::Contact > it( members() );
Kopete::Contact * contact;
while ( ( contact = it.current() ) )
{
@@ -276,14 +276,14 @@ void GroupWiseChatSession::slotGotNotTypingNotification( const ConferenceEvent&
void GroupWiseChatSession::dequeueMessagesAndInvites()
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
- for ( QValueListIterator< Kopete::Message > it = m_pendingOutgoingMessages.begin();
+ for ( TQValueListIterator< Kopete::Message > it = m_pendingOutgoingMessages.begin();
it != m_pendingOutgoingMessages.end();
++it )
{
slotMessageSent( *it, this );
}
m_pendingOutgoingMessages.clear();
- QPtrListIterator< Kopete::Contact > it( m_pendingInvites );
+ TQPtrListIterator< Kopete::Contact > it( m_pendingInvites );
Kopete::Contact * contact;
while ( ( contact = it.current() ) )
{
@@ -304,19 +304,19 @@ void GroupWiseChatSession::slotActionInviteAboutToShow()
m_actionInvite->popupMenu()->clear();
- QDictIterator<Kopete::Contact> it( account()->contacts() );
+ TQDictIterator<Kopete::Contact> it( account()->contacts() );
for( ; it.current(); ++it )
{
if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() )
{
KAction *a=new KopeteContactAction( it.current(), this,
- SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
+ TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
m_actionInvite->insert( a );
m_inviteActions.append( a ) ;
}
}
// Invite someone off-list
- KAction *b=new KAction( i18n ("&Other..."), 0, this, SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
+ KAction *b=new KAction( i18n ("&Other..."), 0, this, TQT_SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
m_actionInvite->insert( b );
m_inviteActions.append( b ) ;
}
@@ -330,13 +330,13 @@ void GroupWiseChatSession::slotInviteContact( Kopete::Contact * contact )
}
else
{
- QWidget * w = view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : 0L;
+ TQWidget * w = view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : 0L;
bool ok;
- QRegExp rx( ".*" );
- QRegExpValidator validator( rx, this );
- QString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ),
- i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), QString(),
+ TQRegExp rx( ".*" );
+ TQRegExpValidator validator( rx, this );
+ TQString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ),
+ i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), TQString(),
&ok, w ? w : Kopete::UI::Global::mainWidget(), "invitemessagedlg", &validator );
if ( ok )
{
@@ -346,7 +346,7 @@ void GroupWiseChatSession::slotInviteContact( Kopete::Contact * contact )
}
}
-void GroupWiseChatSession::inviteContact( const QString &contactId )
+void GroupWiseChatSession::inviteContact( const TQString &contactId )
{
Kopete::Contact * contact = account()->contacts()[ contactId ];
if ( contact )
@@ -358,12 +358,12 @@ void GroupWiseChatSession::slotInviteOtherContact()
if ( !m_searchDlg )
{
// show search dialog
- QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
+ TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
Kopete::UI::Global::mainWidget() );
m_searchDlg = new KDialogBase( w, "invitesearchdialog", false, i18n( "Search for Contact to Invite" ), KDialogBase::Ok|KDialogBase::Cancel );
- m_search = new GroupWiseContactSearch( account(), QListView::Single, true, m_searchDlg, "invitesearchwidget" );
+ m_search = new GroupWiseContactSearch( account(), TQListView::Single, true, m_searchDlg, "invitesearchwidget" );
m_searchDlg->setMainWidget( m_search );
- connect( m_search, SIGNAL( selectionValidates( bool ) ), m_searchDlg, SLOT( enableButtonOK( bool ) ) );
+ connect( m_search, TQT_SIGNAL( selectionValidates( bool ) ), m_searchDlg, TQT_SLOT( enableButtonOK( bool ) ) );
m_searchDlg->enableButtonOK( false );
}
m_searchDlg->show();
@@ -372,17 +372,17 @@ void GroupWiseChatSession::slotInviteOtherContact()
void GroupWiseChatSession::slotSearchedForUsers()
{
// create an item for each result, in the block list
- QValueList< ContactDetails > selected = m_search->selectedResults();
+ TQValueList< ContactDetails > selected = m_search->selectedResults();
if ( selected.count() )
{
- QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
+ TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
Kopete::UI::Global::mainWidget() );
ContactDetails cd = selected.first();
bool ok;
- QRegExp rx( ".*" );
- QRegExpValidator validator( rx, this );
- QString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ),
- i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), QString(),
+ TQRegExp rx( ".*" );
+ TQRegExpValidator validator( rx, this );
+ TQString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ),
+ i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), TQString(),
&ok, w , "invitemessagedlg", &validator );
if ( ok )
{
@@ -395,7 +395,7 @@ void GroupWiseChatSession::addInvitee( const Kopete::Contact * c )
{
// create a placeholder contact for each invitee
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
- QString pending = i18n("label attached to contacts who have been invited but are yet to join a chat", "(pending)");
+ TQString pending = i18n("label attached to contacts who have been invited but are yet to join a chat", "(pending)");
Kopete::MetaContact * inviteeMC = new Kopete::MetaContact();
inviteeMC->setDisplayName( c->metaContact()->displayName() + pending );
GroupWiseContact * invitee = new GroupWiseContact( account(), c->contactId() + " " + pending, inviteeMC, 0, 0, 0 );
@@ -417,7 +417,7 @@ void GroupWiseChatSession::joined( GroupWiseContact * c )
{
if ( pending->contactId().startsWith( c->contactId() ) )
{
- removeContact( pending, QString::null, Kopete::Message::PlainText, true );
+ removeContact( pending, TQString::null, Kopete::Message::PlainText, true );
break;
}
}
@@ -459,13 +459,13 @@ void GroupWiseChatSession::inviteDeclined( GroupWiseContact * c )
{
if ( pending->contactId().startsWith( c->contactId() ) )
{
- removeContact( pending, QString::null, Kopete::Message::PlainText, true );
+ removeContact( pending, TQString::null, Kopete::Message::PlainText, true );
break;
}
}
m_invitees.remove( pending );
- QString from = c->metaContact()->displayName();
+ TQString from = c->metaContact()->displayName();
Kopete::Message declined = Kopete::Message( myself(), members(),
i18n("%1 has rejected an invitation to join this conversation.").arg( from ),
@@ -476,7 +476,7 @@ void GroupWiseChatSession::inviteDeclined( GroupWiseContact * c )
void GroupWiseChatSession::updateArchiving()
{
bool archiving = false;
- QPtrListIterator< Kopete::Contact > it( members() );
+ TQPtrListIterator< Kopete::Contact > it( members() );
GroupWiseContact * contact;
while ( ( contact = static_cast<GroupWiseContact*>( it.current() ) ) )
{
@@ -501,14 +501,14 @@ void GroupWiseChatSession::updateArchiving()
void GroupWiseChatSession::slotShowSecurity()
{
- QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
+ TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
Kopete::UI::Global::mainWidget() );
KMessageBox::queuedMessageBox( w, KMessageBox::Information, i18n( "This conversation is secured with SSL security." ), i18n("Security Status" ) );
}
void GroupWiseChatSession::slotShowArchiving()
{
- QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
+ TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) :
Kopete::UI::Global::mainWidget() );
KMessageBox::queuedMessageBox( w, KMessageBox::Information, i18n( "This conversation is being logged administratively." ), i18n("Archiving Status" ) );
}
diff --git a/kopete/protocols/groupwise/gwmessagemanager.h b/kopete/protocols/groupwise/gwmessagemanager.h
index 5413fd23..5d1fd48b 100644
--- a/kopete/protocols/groupwise/gwmessagemanager.h
+++ b/kopete/protocols/groupwise/gwmessagemanager.h
@@ -12,7 +12,7 @@
#ifndef GWMESSAGEMANAGER_H
#define GWMESSAGEMANAGER_H
-#include <qptrqueue.h>
+#include <tqptrqueue.h>
#include <kopetemessage.h>
#include <kopetechatsession.h>
@@ -87,7 +87,7 @@ public:
/**
* Reimplemented from Kopete::ChatSession - invites contacts via DND
*/
- virtual void inviteContact(const QString& );
+ virtual void inviteContact(const TQString& );
signals:
/**
* Tell the contact we got a GUID so it can route incoming messages here.
@@ -150,10 +150,10 @@ private:
ConferenceGuid m_guid; // The conference's globally unique identifier, which is given to it by the server
int m_flags; // flags for secure connections, central logging and "conference closed" as given by the server
- QValueList< Kopete::Message > m_pendingOutgoingMessages; // messages queued while we wait for the server to tell us the conference is created.
+ TQValueList< Kopete::Message > m_pendingOutgoingMessages; // messages queued while we wait for the server to tell us the conference is created.
Kopete::ContactPtrList m_pendingInvites; // people we wanted to invite to the conference, queued while waiting for the conference to be created.
KActionMenu *m_actionInvite;
- QPtrList<KAction> m_inviteActions;
+ TQPtrList<KAction> m_inviteActions;
// labels showing secure and logging status
KAction *m_secure;
KAction *m_logging;
diff --git a/kopete/protocols/groupwise/gwprotocol.cpp b/kopete/protocols/groupwise/gwprotocol.cpp
index dcf92a17..6eb489a2 100644
--- a/kopete/protocols/groupwise/gwprotocol.cpp
+++ b/kopete/protocols/groupwise/gwprotocol.cpp
@@ -19,8 +19,8 @@
* *
*************************************************************************
*/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -41,12 +41,12 @@ K_EXPORT_COMPONENT_FACTORY( kopete_groupwise, GroupWiseProtocolFactory( "kopete_
GroupWiseProtocol *GroupWiseProtocol::s_protocol = 0L;
-GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const QStringList &/*args*/ )
+GroupWiseProtocol::GroupWiseProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Protocol( GroupWiseProtocolFactory::instance(), parent, name ),
/* initialise Kopete::OnlineStatus that should be user selectable in the user interface */
- groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, QString::null,
+ groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, TQString::null,
i18n( "Offline" ), i18n( "O&ffline" ), Kopete::OnlineStatusManager::Offline ),
- groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, QString::null,
+ groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, TQString::null,
i18n( "Online" ), i18n( "&Online" ), Kopete::OnlineStatusManager::Online ),
groupwiseBusy ( Kopete::OnlineStatus::Away, 18, this, GroupWise::Busy, "contact_busy_overlay",
i18n( "Busy" ), i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ),
@@ -68,8 +68,8 @@ GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const Q
propLastName( Kopete::Global::Properties::self()->lastName() ),
propFullName( Kopete::Global::Properties::self()->fullName() ),
propAwayMessage( Kopete::Global::Properties::self()->awayMessage() ),
- propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), QString::null, false, false ),
- propCN( "groupwiseCommonName", i18n( "Common Name" ), QString::null, true, false ),
+ propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), TQString::null, false, false ),
+ propCN( "groupwiseCommonName", i18n( "Common Name" ), TQString::null, true, false ),
propPhoneWork( Kopete::Global::Properties::self()->workPhone() ),
propPhoneMobile( Kopete::Global::Properties::self()->privateMobilePhone() ),
propEmail( Kopete::Global::Properties::self()->emailAddress() )
@@ -87,17 +87,17 @@ GroupWiseProtocol::~GroupWiseProtocol()
}
Kopete::Contact *GroupWiseProtocol::deserializeContact(
- Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> &/* addressBookData */)
+ Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/* addressBookData */)
{
- QString dn = serializedData[ "DN" ];
- QString accountId = serializedData[ "accountId" ];
- QString displayName = serializedData[ "displayName" ];
+ TQString dn = serializedData[ "DN" ];
+ TQString accountId = serializedData[ "accountId" ];
+ TQString displayName = serializedData[ "displayName" ];
int objectId = serializedData[ "objectId" ].toInt();
int parentId = serializedData[ "parentId" ].toInt();
int sequence = serializedData[ "sequenceNumber" ].toInt();
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
Kopete::Account *account = accounts[ accountId ];
if ( !account )
@@ -110,19 +110,19 @@ Kopete::Contact *GroupWiseProtocol::deserializeContact(
return new GroupWiseContact(account, dn, metaContact, objectId, parentId, sequence );
}
-AddContactPage * GroupWiseProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * account )
+AddContactPage * GroupWiseProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * account )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Creating Add Contact Page" << endl;
return new GroupWiseAddContactPage( account, parent, "addcontactpage");
}
-KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent )
+KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent )
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << "Creating Edit Account Page" << endl;
return new GroupWiseEditAccountWidget( parent, account );
}
-Kopete::Account *GroupWiseProtocol::createNewAccount( const QString &accountId )
+Kopete::Account *GroupWiseProtocol::createNewAccount( const TQString &accountId )
{
return new GroupWiseAccount( this, accountId );
}
@@ -165,7 +165,7 @@ Kopete::OnlineStatus GroupWiseProtocol::gwStatusToKOS( const int gwInternal )
return status;
}
-QString GroupWiseProtocol::rtfizeText( const QString & plain )
+TQString GroupWiseProtocol::rtfizeText( const TQString & plain )
{
// transcode a utf-8 encoded string into an rtf string
// iterate through the input string converting each char into the equivalent rtf
@@ -173,12 +173,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain )
// of multi-byte UTF-8 characters 2 to 6 bytes long (with first byte > 0x7f), these are recoded as 32 bit values, escaped as \u<val>? strings
// vanilla RTF "envelope" that doesn't say much but causes other clients to accept the message
- QString rtfTemplate = QString::fromLatin1("{\\rtf1\\ansi\n"
+ TQString rtfTemplate = TQString::fromLatin1("{\\rtf1\\ansi\n"
"{\\fonttbl{\\f0\\fnil Unknown;}}\n"
"{\\colortbl ;\\red0\\green0\\blue0;}\n"
"\\uc1\\cf1\\f0\\fs18 %1\\par\n}");
- QString outputText; // output text
- QCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin
+ TQString outputText; // output text
+ TQCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin
uint index = 0; // current char to transcode
while ( index < plainUtf8.length() )
{
@@ -190,13 +190,13 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain )
case '{':
case '}':
case '\\':
- outputText.append( QString( "\\%1" ).arg( QChar( current ) ) );
+ outputText.append( TQString( "\\%1" ).arg( TQChar( current ) ) );
break;
case '\n':
outputText.append( "\\par " );
break;
default:
- outputText.append( QChar( current ) );
+ outputText.append( TQChar( current ) );
break;
}
++index;
@@ -205,7 +205,7 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain )
{
Q_UINT32 ucs4Char;
int bytesEncoded;
- QString escapedUnicodeChar;
+ TQString escapedUnicodeChar;
if ( current <= 0xDF )
{
ucs4Char = (( plainUtf8.data()[ index ] & 0x001F) << 6) |
@@ -248,12 +248,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain )
}
else
{
- kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << QTextStream::hex << current << endl;
+ kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << TQTextStream::hex << current << endl;
ucs4Char = 0x003F;
bytesEncoded = 1;
}
index += bytesEncoded;
- escapedUnicodeChar = QString("\\u%1?").arg( ucs4Char );
+ escapedUnicodeChar = TQString("\\u%1?").arg( ucs4Char );
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "unicode escaped char: " << escapedUnicodeChar << endl;
outputText.append( escapedUnicodeChar );
}
@@ -261,21 +261,21 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain )
return rtfTemplate.arg( outputText );
}
-QString GroupWiseProtocol::dnToDotted( const QString & dn )
+TQString GroupWiseProtocol::dnToDotted( const TQString & dn )
{
- QRegExp rx("[a-zA-Z]*=(.*)$", false );
+ TQRegExp rx("[a-zA-Z]*=(.*)$", false );
if( !dn.find( '=' ) ) // if it's not a DN, return it unprocessed
return dn;
// split the dn into elements
- QStringList elements = QStringList::split( ',', dn );
+ TQStringList elements = TQStringList::split( ',', dn );
// remove the key, keep the value
- for ( QStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
+ for ( TQStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
{
if ( rx.search( *it ) != -1 )
*it = rx.cap( 1 );
}
- QString dotted = elements.join( "." );
+ TQString dotted = elements.join( "." );
// reassemble as dotted
return dotted;
diff --git a/kopete/protocols/groupwise/gwprotocol.h b/kopete/protocols/groupwise/gwprotocol.h
index c3271f18..f0c439f1 100644
--- a/kopete/protocols/groupwise/gwprotocol.h
+++ b/kopete/protocols/groupwise/gwprotocol.h
@@ -35,7 +35,7 @@ class GroupWiseProtocol : public Kopete::Protocol
{
Q_OBJECT
public:
- GroupWiseProtocol(QObject *parent, const char *name, const QStringList &args);
+ GroupWiseProtocol(TQObject *parent, const char *name, const TQStringList &args);
~GroupWiseProtocol();
/**
* Convert the serialised data back into a GroupWiseContact and add this
@@ -43,21 +43,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 GroupWiseContacts
*/
- 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 GroupWiseAccount
*/
- virtual Kopete::Account * createNewAccount( const QString &accountId );
+ virtual Kopete::Account * createNewAccount( const TQString &accountId );
/**
* Access the instance of this protocol
*/
@@ -71,13 +71,13 @@ public:
* @param plain unformatted text
* @return RTF text (in UCS-4 encoding)
*/
- QString rtfizeText( const QString & plain );
+ TQString rtfizeText( const TQString & plain );
/**
* Convert full DNs to dotted-untyped format
* Assumes the DN is normalised - comma separated, no spaces between elements
* eg cn=wstephenson,o=suse becomes wstephenson.suse
*/
- static QString dnToDotted( const QString & dn );
+ static TQString dnToDotted( const TQString & dn );
/**
* Online statuses used for contacts' presence
*/
diff --git a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp
index ad860b98..0b20c050 100644
--- a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp
@@ -35,7 +35,7 @@
//!
//! The signals connectionClosed(), delayedCloseFinished(), readyRead(),
//! bytesWritten(), and error() serve the exact same function as those from
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! 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/groupwise/libgroupwise/bytestream.h b/kopete/protocols/groupwise/libgroupwise/bytestream.h
index b90f109d..f10b46a1 100644
--- a/kopete/protocols/groupwise/libgroupwise/bytestream.h
+++ b/kopete/protocols/groupwise/libgroupwise/bytestream.h
@@ -21,8 +21,8 @@
#ifndef CS_BYTESTREAM_H
#define CS_BYTESTREAM_H
-#include<qobject.h>
-#include<qcstring.h>
+#include<tqobject.h>
+#include<tqcstring.h>
// 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/groupwise/libgroupwise/chatroommanager.cpp b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp
index adbb66de..3ee9b947 100644
--- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp
@@ -16,8 +16,8 @@
*************************************************************************
*/
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
#include "chatroommanager.h"
ChatroomManager::ChatroomManager( Client * parent, const char *name)
- : QObject(parent, name), m_client( parent ), m_replace( false )
+ : TQObject(parent, name), m_client( parent ), m_replace( false )
{
}
@@ -52,7 +52,7 @@ void ChatroomManager::getChatrooms( bool refresh )
m_replace = !refresh;
SearchChatTask * sct = new SearchChatTask( m_client->rootTask() );
sct->search( ( refresh ? SearchChatTask::SinceLastSearch : SearchChatTask::FetchAll ) );
- connect( sct, SIGNAL( finished() ), SLOT( slotGotChatroomList() ) );
+ connect( sct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatroomList() ) );
sct->go( true );
}
@@ -65,9 +65,9 @@ void ChatroomManager::slotGotChatroomList()
if ( m_replace )
m_rooms.clear();
- QValueList<ChatroomSearchResult> roomsFound = sct->results();
- QValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin();
- const QValueList<ChatroomSearchResult>::Iterator end = roomsFound.end();
+ TQValueList<ChatroomSearchResult> roomsFound = sct->results();
+ TQValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin();
+ const TQValueList<ChatroomSearchResult>::Iterator end = roomsFound.end();
for ( ; it != end; ++it )
{
GroupWise::Chatroom c( *it );
@@ -80,7 +80,7 @@ void ChatroomManager::slotGotChatroomList()
void ChatroomManager::updateCounts()
{
ChatCountsTask * cct = new ChatCountsTask( m_client->rootTask() );
- connect( cct, SIGNAL( finished() ), SLOT( slotGotChatCounts() ) );
+ connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatCounts() ) );
cct->go( true );
}
@@ -89,9 +89,9 @@ void ChatroomManager::slotGotChatCounts()
ChatCountsTask * cct = (ChatCountsTask *)sender();
if ( cct )
{
- QMap< QString, int > newCounts = cct->results();
- QMap< QString, int >::iterator it = newCounts.begin();
- const QMap< QString, int >::iterator end = newCounts.end();
+ TQMap< TQString, int > newCounts = cct->results();
+ TQMap< TQString, int >::iterator it = newCounts.begin();
+ const TQMap< TQString, int >::iterator end = newCounts.end();
for ( ; it != end; ++it )
if ( m_rooms.contains( it.key() ) )
@@ -100,7 +100,7 @@ void ChatroomManager::slotGotChatCounts()
emit updated();
}
-void ChatroomManager::requestProperties( const QString & displayName )
+void ChatroomManager::requestProperties( const TQString & displayName )
{
if ( 0 /*m_rooms.contains( displayName ) */)
emit gotProperties( m_rooms[ displayName ] );
@@ -108,7 +108,7 @@ void ChatroomManager::requestProperties( const QString & displayName )
{
ChatPropertiesTask * cpt = new ChatPropertiesTask( m_client->rootTask() );
cpt->setChat( displayName );
- connect ( cpt, SIGNAL( finished() ), SLOT( slotGotChatProperties() ) );
+ connect ( cpt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatProperties() ) );
cpt->go( true );
}
}
diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
index 4d0e888b..5fff7b73 100644
--- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
+++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
@@ -19,7 +19,7 @@
#ifndef CHATROOMMANAGER_H
#define CHATROOMMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "gwchatrooms.h"
@@ -36,7 +36,7 @@ class ChatroomManager : public QObject
ChatroomManager( Client * client, const char *name = 0);
~ChatroomManager();
GroupWise::ChatroomMap rooms();
- void requestProperties( const QString & displayName );
+ void requestProperties( const TQString & displayName );
void updateRooms();
void updateCounts();
signals:
diff --git a/kopete/protocols/groupwise/libgroupwise/client.cpp b/kopete/protocols/groupwise/libgroupwise/client.cpp
index 274a9ea8..1a88fbc3 100644
--- a/kopete/protocols/groupwise/libgroupwise/client.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/client.cpp
@@ -19,8 +19,8 @@
*************************************************************************
*/
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include "chatroommanager.h"
#include "gwclientstream.h"
@@ -53,8 +53,8 @@ public:
ClientStream *stream;
int id_seed;
Task *root;
- QString host, user, userDN, pass;
- QString osname, tzname, clientName, clientVersion;
+ TQString host, user, userDN, pass;
+ TQString osname, tzname, clientName, clientVersion;
uint port;
/* int tzoffset;*/
bool active;
@@ -63,12 +63,12 @@ public:
UserDetailsManager * userDetailsMgr;
PrivacyManager * privacyMgr;
uint protocolVersion;
- QValueList<GroupWise::CustomStatus> customStatuses;
- QTimer * keepAliveTimer;
+ TQValueList<GroupWise::CustomStatus> customStatuses;
+ TQTimer * keepAliveTimer;
};
-Client::Client(QObject *par, uint protocolVersion )
-:QObject(par, "groupwiseclient")
+Client::Client(TQObject *par, uint protocolVersion )
+:TQObject(par, "groupwiseclient")
{
d = new ClientPrivate;
/* d->tzoffset = 0;*/
@@ -85,8 +85,8 @@ Client::Client(QObject *par, uint protocolVersion )
d->stream = 0;
d->protocolVersion = protocolVersion;
// Sends regular keepalives so the server knows we are still running
- d->keepAliveTimer = new QTimer( this );
- connect( d->keepAliveTimer, SIGNAL( timeout() ), SLOT( sendKeepAlive() ) );
+ d->keepAliveTimer = new TQTimer( this );
+ connect( d->keepAliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( sendKeepAlive() ) );
}
Client::~Client()
@@ -100,32 +100,32 @@ Client::~Client()
void Client::connectToServer( ClientStream *s, const NovellDN &server, bool auth )
{
d->stream = s;
- //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected()));
- //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken()));
- connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int)));
- //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &)));
- connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead()));
- //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished()));
+ //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected()));
+ //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken()));
+ connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int)));
+ //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &)));
+ connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead()));
+ //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished()));
d->stream->connectToServer(server, auth);
}
-void Client::setOSName(const QString &name)
+void Client::setOSName(const TQString &name)
{
d->osname = name;
}
-void Client::setClientName(const QString &s)
+void Client::setClientName(const TQString &s)
{
d->clientName = s;
}
-void Client::setClientVersion(const QString &s)
+void Client::setClientVersion(const TQString &s)
{
d->clientVersion = s;
}
-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 )
{
d->host = host;
d->port = port;
@@ -136,27 +136,27 @@ void Client::start( const QString &host, const uint port, const QString &userId,
LoginTask * login = new LoginTask( d->root );
- connect( login, SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ),
- this, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) );
+ connect( login, TQT_SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ),
+ this, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) );
- connect( login, SIGNAL( gotFolder( const FolderItem & ) ),
- this, SIGNAL( folderReceived( const FolderItem & ) ) );
+ connect( login, TQT_SIGNAL( gotFolder( const FolderItem & ) ),
+ this, TQT_SIGNAL( folderReceived( const FolderItem & ) ) );
- connect( login, SIGNAL( gotContact( const ContactItem & ) ),
- this, SIGNAL( contactReceived( const ContactItem & ) ) );
+ connect( login, TQT_SIGNAL( gotContact( const ContactItem & ) ),
+ this, TQT_SIGNAL( contactReceived( const ContactItem & ) ) );
- connect( login, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
- this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ;
+ connect( login, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
+ this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ;
- connect( login, SIGNAL( gotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ),
- privacyManager(), SLOT( slotGotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ) );
+ connect( login, TQT_SIGNAL( gotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ),
+ privacyManager(), TQT_SLOT( slotGotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ) );
- connect( login, SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ),
- SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) );
+ connect( login, TQT_SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ),
+ TQT_SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) );
- connect( login, SIGNAL( gotKeepalivePeriod( int ) ), SLOT( lt_gotKeepalivePeriod( int ) ) );
+ connect( login, TQT_SIGNAL( gotKeepalivePeriod( int ) ), TQT_SLOT( lt_gotKeepalivePeriod( int ) ) );
- connect( login, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+ connect( login, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) );
login->initialise();
login->go( true );
@@ -175,7 +175,7 @@ void Client::close()
}
}
-QString Client::host()
+TQString Client::host()
{
return d->host;
}
@@ -185,7 +185,7 @@ int Client::port()
return d->port;
}
-QValueList<GroupWise::CustomStatus> Client::customStatuses()
+TQValueList<GroupWise::CustomStatus> Client::customStatuses()
{
return d->customStatuses;
}
@@ -194,51 +194,51 @@ void Client::initialiseEventTasks()
{
// The StatusTask handles incoming status changes
StatusTask * st = new StatusTask( d->root ); // FIXME - add an additional EventRoot?
- connect( st, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) );
+ connect( st, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) );
// The ConferenceTask handles incoming conference events, messages, joins, leaves, etc
ConferenceTask * ct = new ConferenceTask( d->root );
- connect( ct, SIGNAL( message( const ConferenceEvent & ) ), SLOT( ct_messageReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( typing( const ConferenceEvent & ) ), SIGNAL( contactTyping( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( notTyping( const ConferenceEvent & ) ), SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( joined( const ConferenceEvent & ) ), SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( left( const ConferenceEvent & ) ), SIGNAL( conferenceLeft( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( invited( const ConferenceEvent & ) ), SIGNAL( invitationReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( otherInvited( const ConferenceEvent & ) ), SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SIGNAL( invitationDeclined( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( closed( const ConferenceEvent & ) ), SIGNAL( conferenceClosed( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( autoReply( const ConferenceEvent & ) ), SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( broadcast( const ConferenceEvent & ) ), SIGNAL( broadcastReceived( const ConferenceEvent & ) ) );
- connect( ct, SIGNAL( systemBroadcast( const ConferenceEvent & ) ), SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( message( const ConferenceEvent & ) ), TQT_SLOT( ct_messageReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( typing( const ConferenceEvent & ) ), TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( notTyping( const ConferenceEvent & ) ), TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( joined( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( left( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( invited( const ConferenceEvent & ) ), TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( otherInvited( const ConferenceEvent & ) ), TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( closed( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceClosed( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( autoReply( const ConferenceEvent & ) ), TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( broadcast( const ConferenceEvent & ) ), TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ) );
+ connect( ct, TQT_SIGNAL( systemBroadcast( const ConferenceEvent & ) ), TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) );
// The ConnectionTask handles incoming connection events
ConnectionTask* cont = new ConnectionTask( d->root );
- connect( cont, SIGNAL( connectedElsewhere() ), SIGNAL( connectedElsewhere() ) );
+ connect( cont, TQT_SIGNAL( connectedElsewhere() ), TQT_SIGNAL( connectedElsewhere() ) );
}
-void Client::setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply )
+void Client::setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply )
{
- debug( QString("Setting status to %1").arg( status ) );;
+ debug( TQString("Setting status to %1").arg( status ) );;
SetStatusTask * sst = new SetStatusTask( d->root );
sst->status( status, reason, autoReply );
- connect( sst, SIGNAL( finished() ), this, SLOT( sst_statusChanged() ) );
+ connect( sst, TQT_SIGNAL( finished() ), this, TQT_SLOT( sst_statusChanged() ) );
sst->go( true );
// TODO: set status change in progress flag
}
-void Client::requestStatus( const QString & userDN )
+void Client::requestStatus( const TQString & userDN )
{
GetStatusTask * gst = new GetStatusTask( d->root );
gst->userDN( userDN );
- connect( gst, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) );
+ connect( gst, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) );
gst->go( true );
}
-void Client::sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message )
+void Client::sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message )
{
SendMessageTask * smt = new SendMessageTask( d->root );
smt->message( addresseeDNs, message );
- connect( smt, SIGNAL( finished() ), SLOT( smt_messageSent() ) );
+ connect( smt, TQT_SIGNAL( finished() ), TQT_SLOT( smt_messageSent() ) );
smt->go( true );
}
@@ -251,23 +251,23 @@ void Client::sendTyping( const GroupWise::ConferenceGuid & conferenceGuid, bool
void Client::createConference( const int clientId )
{
- QStringList dummy;
+ TQStringList dummy;
createConference( clientId, dummy );
}
-void Client::createConference( const int clientId, const QStringList & participants )
+void Client::createConference( const int clientId, const TQStringList & participants )
{
CreateConferenceTask * cct = new CreateConferenceTask( d->root );
cct->conference( clientId, participants );
- connect( cct, SIGNAL( finished() ), SLOT( cct_conferenceCreated() ) );
+ connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( cct_conferenceCreated() ) );
cct->go( true );
}
-void Client::requestDetails( const QStringList & userDNs )
+void Client::requestDetails( const TQStringList & userDNs )
{
GetDetailsTask * gdt = new GetDetailsTask( d->root );
gdt->userDNs( userDNs );
- connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
- this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) );
+ connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
+ this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) );
gdt->go( true );
}
@@ -275,7 +275,7 @@ void Client::joinConference( const GroupWise::ConferenceGuid & guid )
{
JoinConferenceTask * jct = new JoinConferenceTask( d->root );
jct->join( guid );
- connect( jct, SIGNAL( finished() ), SLOT( jct_joinConfCompleted() ) );
+ connect( jct, TQT_SIGNAL( finished() ), TQT_SLOT( jct_joinConfCompleted() ) );
jct->go( true );
}
@@ -291,14 +291,14 @@ void Client::leaveConference( const GroupWise::ConferenceGuid & guid )
{
LeaveConferenceTask * lct = new LeaveConferenceTask( d->root );
lct->leave( guid );
- //connect( lct, SIGNAL( finished() ), SLOT( lct_leftConference() ) );
+ //connect( lct, TQT_SIGNAL( finished() ), TQT_SLOT( lct_leftConference() ) );
lct->go( true );
}
-void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message )
+void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message )
{
SendInviteTask * sit = new SendInviteTask( d->root );
- QStringList invitees( dn );
+ TQStringList invitees( dn );
sit->invite( guid, dn, message );
sit->go( true );
}
@@ -306,7 +306,7 @@ void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QStri
// SLOTS //
void Client::streamError( int error )
{
- debug( QString( "CLIENT ERROR (Error %1)" ).arg( error ) );
+ debug( TQString( "CLIENT ERROR (Error %1)" ).arg( error ) );
}
void Client::streamReadyRead()
@@ -326,7 +326,7 @@ void Client::lt_loginFinished()
debug( "Client::lt_loginFinished() LOGIN SUCCEEDED" );
// set our initial status
SetStatusTask * sst = new SetStatusTask( d->root );
- sst->status( GroupWise::Available, QString::null, QString::null );
+ sst->status( GroupWise::Available, TQString::null, TQString::null );
sst->go( true );
emit loggedIn();
// fetch details for any privacy list items that aren't in our contact list.
@@ -357,17 +357,17 @@ void Client::ct_messageReceived( const ConferenceEvent & messageEvent )
debug( "parsing received message's RTF" );
ConferenceEvent transformedEvent = messageEvent;
RTF2HTML parser;
- QString rtf = messageEvent.message;
+ TQString rtf = messageEvent.message;
if ( !rtf.isEmpty() )
transformedEvent.message = parser.Parse( rtf.latin1(), "" );
// fixes for RTF to HTML conversion problems
// we can drop these once the server reenables the sending of unformatted text
// redundant linebreak at the end of the message
- QRegExp rx(" </span> </span> </span><br>$");
+ TQRegExp rx(" </span> </span> </span><br>$");
transformedEvent.message.replace( rx, "</span></span></span>" );
// missing linebreak after first line of an encrypted message
- QRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>");
+ TQRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>");
transformedEvent.message.replace( ry, "-----BEGIN PGP MESSAGE-----</span></span></span><br/>" );
emit messageReceived( transformedEvent );
@@ -390,14 +390,14 @@ void Client::jct_joinConfCompleted()
{
const JoinConferenceTask * jct = ( JoinConferenceTask * )sender();
#ifdef LIBGW_DEBUG
- debug( QString( "Joined conference %1, participants are: " ).arg( jct->guid() ) );
- QStringList parts = jct->participants();
- for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it )
- debug( QString( " - %1" ).arg(*it) );
+ debug( TQString( "Joined conference %1, participants are: " ).arg( jct->guid() ) );
+ TQStringList parts = jct->participants();
+ for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it )
+ debug( TQString( " - %1" ).arg(*it) );
debug( "invitees are: " );
- QStringList invitees = jct->invitees();
- for ( QStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it )
- debug( QString( " - %1" ).arg(*it) );
+ TQStringList invitees = jct->invitees();
+ for ( TQStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it )
+ debug( TQString( " - %1" ).arg(*it) );
#endif
emit conferenceJoined( jct->guid(), jct->participants(), jct->invitees() );
}
@@ -409,32 +409,32 @@ void Client::lt_gotCustomStatus( const GroupWise::CustomStatus & custom )
// INTERNALS //
-QString Client::userId()
+TQString Client::userId()
{
return d->user;
}
-void Client::setUserDN( const QString & userDN )
+void Client::setUserDN( const TQString & userDN )
{
d->userDN = userDN;
}
-QString Client::userDN()
+TQString Client::userDN()
{
return d->userDN;
}
-QString Client::password()
+TQString Client::password()
{
return d->pass;
}
-QString Client::userAgent()
+TQString Client::userAgent()
{
- return QString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname );
+ return TQString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname );
}
-QCString Client::ipAddress()
+TQCString Client::ipAddress()
{
// TODO: remove hardcoding
return "10.10.11.103";
@@ -456,14 +456,14 @@ void Client::send( Request * request )
debug( "CLIENT - NO STREAM TO SEND ON!");
return;
}
-// QString out = request.toString();
-// debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+// TQString out = request.toString();
+// debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
// xmlOutgoing(out);
d->stream->write( request );
}
-void Client::debug( const QString &str )
+void Client::debug( const TQString &str )
{
#ifdef LIBGW_USE_KDEBUG
kdDebug( GROUPWISE_DEBUG_LIBGW ) << "debug: " << str << endl;
@@ -472,9 +472,9 @@ void Client::debug( const QString &str )
#endif
}
-QString Client::genUniqueId()
+TQString Client::genUniqueId()
{
- QString s;
+ TQString s;
s.sprintf("a%x", d->id_seed);
d->id_seed += 0x10;
return s;
diff --git a/kopete/protocols/groupwise/libgroupwise/client.h b/kopete/protocols/groupwise/libgroupwise/client.h
index 102b0c27..9cdb7c68 100644
--- a/kopete/protocols/groupwise/libgroupwise/client.h
+++ b/kopete/protocols/groupwise/libgroupwise/client.h
@@ -21,7 +21,7 @@
#ifndef LIBGW_CLIENT_H
#define LIBGW_CLIENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "gwclientstream.h"
#include "gwerror.h"
@@ -46,12 +46,12 @@ Q_OBJECT
EXTERNAL API
*************/
- Client( QObject *parent = 0, uint protocolVersion = 2 );
+ Client( TQObject *parent = 0, uint protocolVersion = 2 );
~Client();
- void setOSName( const QString &name );
- void setClientName( const QString &s );
- void setClientVersion( const QString &s );
- void setUserDN( const QString & userDN );
+ void setOSName( const TQString &name );
+ void setClientName( const TQString &s );
+ void setClientVersion( const TQString &s );
+ void setUserDN( const TQString & userDN );
/**
* Start a connection to the server using the supplied @ref ClientStream.
* This is only a transport layer connection.
@@ -69,11 +69,11 @@ Q_OBJECT
* @param user The user name to log in as.
fd * @param password
*/
- 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
- * Protocol action P4 void distribute(const QDomElement &);
+ * Protocol action P4 void distribute(const TQDomElement &);
*/
void close();
@@ -81,7 +81,7 @@ fd * @param password
/**
* Accessors needed for login
*/
- QString host();
+ TQString host();
int port();
/**
@@ -91,14 +91,14 @@ fd * @param password
* @param reason custom status name for away statuses
* @param autoReply auto reply message for use in this status
*/
- void setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply );
+ void setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply );
/**
* Send a message
* Protocol action P10
* @param message contains the text and the recipient.
*/
- void sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message );
+ void sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message );
/**
* Send a typing notification
@@ -112,12 +112,12 @@ fd * @param password
* Request details for one or more users, for example, if we receive a message from someone who isn't on our contact list
* @param userDNs A list of one or more user's DNs to fetch details for
*/
- void requestDetails( const QStringList & userDNs );
+ void requestDetails( const TQStringList & userDNs );
/**
* Request the status of a single user, for example, if they have messaged us and are not on our contact list
*/
- void requestStatus( const QString & userDN );
+ void requestStatus( const TQString & userDN );
/**
* Add a contact to the contact list
@@ -137,7 +137,7 @@ fd * @param password
/**
* Overloaded version of the above to create a conference with a supplied list of invitees
*/
- void createConference( const int clientId, const QStringList & participants );
+ void createConference( const int clientId, const TQStringList & participants );
/**
* Join a conference, accepting an invitation
@@ -161,7 +161,7 @@ fd * @param password
* Send an invitation to join a conference
* Protocol action P9
*/
- void sendInvitation( const ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message );
+ void sendInvitation( const ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message );
/*************
INTERNAL (FOR USE BY TASKS) METHODS
*************/
@@ -172,7 +172,7 @@ fd * @param password
/**
* Print a debug statement
*/
- void debug( const QString &str );
+ void debug( const TQString &str );
/**
* The protocol version of the Client
@@ -181,36 +181,36 @@ fd * @param password
/**
* Generate a unique ID for Tasks.
*/
- QString genUniqueId();
+ TQString genUniqueId();
/**
* The current user's user ID
*/
- QString userId();
+ TQString userId();
/**
* The current user's DN
*/
- QString userDN();
+ TQString userDN();
/**
* The current user's password
*/
- QString password();
+ TQString password();
/**
* User agent details for this host
*/
- QString userAgent();
+ TQString userAgent();
/**
* Host's IP address
*/
- QCString ipAddress();
+ TQCString ipAddress();
/**
* Obtain the list of custom statuses stored on the server
*/
- QValueList<GroupWise::CustomStatus> customStatuses();
+ TQValueList<GroupWise::CustomStatus> customStatuses();
/**
* Get a reference to the RequestFactory for this Client.
@@ -276,11 +276,11 @@ fd * @param password
/**
* A remote contact changed status
*/
- void statusReceived( const QString & contactId, Q_UINT16 status, const QString & statusText );
+ void statusReceived( const TQString & contactId, Q_UINT16 status, const TQString & statusText );
/**
* Our status changed on the server
*/
- void ourStatusChanged( GroupWise::Status status, const QString & statusText, const QString & autoReply );
+ void ourStatusChanged( GroupWise::Status status, const TQString & statusText, const TQString & autoReply );
/** CONFERENCE (MANAGEMENT) EVENTS */
/**
@@ -324,7 +324,7 @@ fd * @param password
/**
* We joined a conference.
*/
- void conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & );
+ void conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & );
/**
* We received an "is typing" event in a conference
*/
diff --git a/kopete/protocols/groupwise/libgroupwise/connector.cpp b/kopete/protocols/groupwise/libgroupwise/connector.cpp
index 55e866ee..57e4d222 100644
--- a/kopete/protocols/groupwise/libgroupwise/connector.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/connector.cpp
@@ -20,8 +20,8 @@
#include "connector.h"
-Connector::Connector(QObject *parent)
-:QObject(parent)
+Connector::Connector(TQObject *parent)
+:TQObject(parent)
{
setUseSSL(false);
setPeerAddressNone();
@@ -41,7 +41,7 @@ bool Connector::havePeerAddress() const
return haveaddr;
}
-QHostAddress Connector::peerAddress() const
+TQHostAddress Connector::peerAddress() const
{
return addr;
}
@@ -59,11 +59,11 @@ void Connector::setUseSSL(bool b)
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/groupwise/libgroupwise/connector.h b/kopete/protocols/groupwise/libgroupwise/connector.h
index 1cae3426..b1c31743 100644
--- a/kopete/protocols/groupwise/libgroupwise/connector.h
+++ b/kopete/protocols/groupwise/libgroupwise/connector.h
@@ -21,8 +21,8 @@
#ifndef LIBGW_CONNECTOR_H
#define LIBGW_CONNECTOR_H
-#include <qhostaddress.h>
-#include <qobject.h>
+#include <tqhostaddress.h>
+#include <tqobject.h>
class ByteStream;
@@ -30,16 +30,16 @@ 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 useSSL() const;
bool havePeerAddress() const;
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
@@ -49,12 +49,12 @@ signals:
protected:
void setUseSSL(bool b);
void setPeerAddressNone();
- void setPeerAddress(const QHostAddress &addr, Q_UINT16 port);
+ void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port);
private:
bool ssl;
bool haveaddr;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp
index 1e15287e..4c811eba 100644
--- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp
@@ -24,9 +24,9 @@
#include <iostream>
#include <stdlib.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
#include <kdebug.h>
@@ -62,7 +62,7 @@ url_escape_string( const char *src)
static const char hex_table[17] = "0123456789abcdef";
if (src == NULL) {
- return QCString();
+ return TQCString();
}
/* Find number of chars to escape */
@@ -73,7 +73,7 @@ url_escape_string( const char *src)
}
}
- QCString encoded((p - src) + (escape * 2) + 1);
+ TQCString encoded((p - src) + (escape * 2) + 1);
/* Escape the string */
for (p = src, q = 0; *p != '\0'; p++) {
@@ -102,7 +102,7 @@ url_escape_string( const char *src)
return encoded;
}
-CoreProtocol::CoreProtocol() : QObject()
+CoreProtocol::CoreProtocol() : TQObject()
{
m_eventProtocol = new EventProtocol( this, "eventprotocol" );
m_responseProtocol = new ResponseProtocol( this, "responseprotocol" );
@@ -117,7 +117,7 @@ int CoreProtocol::state()
return m_state;
}
-void CoreProtocol::debug( const QString &str )
+void CoreProtocol::debug( const TQString &str )
{
#ifdef LIBGW_USE_KDEBUG
kdDebug( 14191 ) << "debug: " << str << endl;
@@ -126,7 +126,7 @@ void CoreProtocol::debug( const QString &str )
#endif
}
-void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
+void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes )
{
// store locally
debug( "CoreProtocol::addIncomingData()");
@@ -142,13 +142,13 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
while ( m_in.size() && ( parsedBytes = wireToTransfer( m_in ) ) )
{
transferCount++;
- debug( QString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) );
+ debug( TQString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) );
int size = m_in.size();
if ( parsedBytes < size )
{
debug( " - more data in chunk!" );
// 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;
}
@@ -182,10 +182,10 @@ Transfer* CoreProtocol::incomingTransfer()
}
}
-void cp_dump( const QByteArray &bytes )
+void cp_dump( const TQByteArray &bytes )
{
#ifdef LIBGW_DEBUG
- CoreProtocol::debug( QString( "contains: %1 bytes" ).arg( bytes.count() ) );
+ CoreProtocol::debug( TQString( "contains: %1 bytes" ).arg( bytes.count() ) );
for ( uint i = 0; i < bytes.count(); ++i )
{
printf( "%02x ", bytes[ i ] );
@@ -214,19 +214,19 @@ void CoreProtocol::outgoingTransfer( Request* outgoing )
fields.append( fld );
// convert to QByteArray
- QByteArray bytesOut;
- QTextStream dout( bytesOut, IO_WriteOnly );
- dout.setEncoding( QTextStream::Latin1 );
- //dout.setByteOrder( QDataStream::LittleEndian );
+ TQByteArray bytesOut;
+ TQTextStream dout( bytesOut, IO_WriteOnly );
+ dout.setEncoding( TQTextStream::Latin1 );
+ //dout.setByteOrder( TQDataStream::LittleEndian );
// strip out any embedded host and port in the command string
- QCString command, host, port;
+ TQCString command, host, port;
if ( request->command().section( ':', 0, 0 ) == "login" )
{
command = "login";
host = request->command().section( ':', 1, 1 ).ascii();
port = request->command().section( ':', 2, 2 ).ascii();
- debug( QString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) );
+ debug( TQString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) );
}
else
command = request->command().ascii();
@@ -246,7 +246,7 @@ void CoreProtocol::outgoingTransfer( Request* outgoing )
else
dout << "\r\n";
- debug( QString( "data out: %1" ).arg( bytesOut.data() ) );
+ debug( TQString( "data out: %1" ).arg( bytesOut.data() ) );
emit outgoingData( bytesOut );
// now convert
@@ -261,7 +261,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
debug( "CoreProtocol::fieldsToWire()");
int subFieldCount = 0;
- // TODO: consider constructing this as a QStringList and then join()ing it.
+ // TODO: consider constructing this as a TQStringList and then join()ing it.
Field::FieldListIterator it;
Field::FieldListIterator end = fields.end();
Field::FieldBase* field;
@@ -269,9 +269,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
{
field = *it;
//debug( " - writing a field" );
- QByteArray bytesOut;
- QDataStream dout( bytesOut, IO_WriteOnly );
- dout.setByteOrder( QDataStream::LittleEndian );
+ TQByteArray bytesOut;
+ TQDataStream dout( bytesOut, IO_WriteOnly );
+ dout.setByteOrder( TQDataStream::LittleEndian );
// these fields are ignored by Gaim's novell
if ( field->type() == NMFIELD_TYPE_BINARY || field->method() == NMFIELD_METHOD_IGNORE )
@@ -299,7 +299,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
{
//debug( " - it's a single string" );
const Field::SingleField *sField = static_cast<const Field::SingleField*>( field );
-// QString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */);
+// TQString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */);
// encoded.replace( "%20", "+" );
// dout << encoded.ascii();
@@ -313,7 +313,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
//debug( " - it's a multi" );
const Field::MultiField *mField = static_cast<const Field::MultiField*>( field );
subFieldCount = mField->fields().count(); // determines if we have a subarray to send after this field
- //dout << QString::number( subFieldCount ).ascii();
+ //dout << TQString::number( subFieldCount ).ascii();
snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", subFieldCount );
break;
}
@@ -321,7 +321,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
{
//debug( " - it's a number" );
const Field::SingleField *sField = static_cast<const Field::SingleField*>( field );
- //dout << QString::number( sField->value().toInt() ).ascii();
+ //dout << TQString::number( sField->value().toInt() ).ascii();
snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", sField->value().toInt() );
}
}
@@ -329,15 +329,15 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
// type
//dout.writeRawBytes( GW_URLVAR_TYPE, sizeof( GW_URLVAR_TYPE ) );
- //dout << QString::number( field->type() ).ascii();
- QCString typeString;
+ //dout << TQString::number( field->type() ).ascii();
+ TQCString typeString;
typeString.setNum( field->type() );
- QCString outgoing = GW_URLVAR_TAG + field->tag()
+ TQCString outgoing = GW_URLVAR_TAG + field->tag()
+ GW_URLVAR_METHOD + (char)encode_method( field->method() )
+ GW_URLVAR_VAL + (const char *)valString
+ GW_URLVAR_TYPE + typeString;
- debug( QString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) );
+ debug( TQString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) );
dout.writeRawBytes( outgoing.data(), outgoing.length() );
// write what we have so far, we may be calling this function recursively
//kdDebug( 14999 ) << k_funcinfo << "writing \'" << bout << "\'" << endl;
@@ -356,9 +356,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
if ( depth == 0 ) // this call to the function was not recursive, so the entire request has been sent at this point
{
// very important, don't send put the \r\n on the wire as a string or it will be preceded with the string length and 0 terminated, which the server reads as a request to disconnect.
- QByteArray bytesOut;
- QDataStream dout( bytesOut, IO_WriteOnly );
- dout.setByteOrder( QDataStream::LittleEndian );
+ TQByteArray bytesOut;
+ TQDataStream dout( bytesOut, IO_WriteOnly );
+ dout.setByteOrder( TQDataStream::LittleEndian );
dout.writeRawBytes( "\r\n", 2 );
emit outgoingData( bytesOut );
debug( "CoreProtocol::fieldsToWire - request completed" );
@@ -366,13 +366,13 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth )
//debug( " - method done" );
}
-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
uint bytesParsed = 0;
- m_din = new QDataStream( wire, IO_ReadOnly );
- m_din->setByteOrder( QDataStream::LittleEndian );
+ m_din = new TQDataStream( wire, IO_ReadOnly );
+ m_din->setByteOrder( TQDataStream::LittleEndian );
// look at first four bytes and decide what to do with the chunk
Q_UINT32 val;
@@ -398,12 +398,12 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
}
else // otherwise -> Event code
{
- debug( QString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) );
+ debug( TQString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) );
Transfer * t = m_eventProtocol->parse( wire, bytesParsed );
if ( t )
{
m_inTransfer = t;
- debug( QString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) );
+ debug( TQString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) );
m_state = Available;
emit incomingData();
}
@@ -423,9 +423,9 @@ void CoreProtocol::reset()
m_in.resize( 0 );
}
-QChar CoreProtocol::encode_method( Q_UINT8 method )
+TQChar CoreProtocol::encode_method( Q_UINT8 method )
{
- QChar str;
+ TQChar str;
switch (method) {
case NMFIELD_METHOD_EQUAL:
@@ -484,9 +484,9 @@ QChar CoreProtocol::encode_method( Q_UINT8 method )
return str;
}
-void CoreProtocol::slotOutgoingData( const QCString &out )
+void CoreProtocol::slotOutgoingData( const TQCString &out )
{
- debug( QString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) );
+ debug( TQString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) );
}
bool CoreProtocol::okToProceed()
diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h
index 4cd30b88..e9a14122 100644
--- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h
+++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h
@@ -21,9 +21,9 @@
#ifndef GW_CORE_PROTOCOL_H
#define GW_CORE_PROTOCOL_H
-#include <qcstring.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "gwfield.h"
@@ -124,7 +124,7 @@ public:
/**
* Debug output
*/
- static void debug(const QString &str);
+ static void debug(const TQString &str);
/**
* Reset the protocol, clear buffers
@@ -135,7 +135,7 @@ public:
* Accept data from the network, and buffer it into a useful message
* @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.
@@ -157,7 +157,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
*/
@@ -166,7 +166,7 @@ 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:
/**
@@ -177,7 +177,7 @@ protected:
* 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 );
/**
* Convert fields to a wire representation. Emits outgoingData as each field is written.
* Calls itself recursively to process nested fields, hence
@@ -187,10 +187,10 @@ protected:
/**
* encodes a method number (usually supplied as a #defined symbol) to a char
*/
- QChar encode_method( Q_UINT8 method );
+ TQChar encode_method( Q_UINT8 method );
private:
- QByteArray m_in; // buffer containing unprocessed bytes we received
- QDataStream* m_din; // contains the packet currently being parsed
+ TQByteArray m_in; // buffer containing unprocessed bytes we received
+ TQDataStream* m_din; // contains the packet currently being parsed
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/groupwise/libgroupwise/eventprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp
index 05320676..da8025b7 100644
--- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include "gwerror.h"
@@ -25,7 +25,7 @@
using namespace GroupWise;
-EventProtocol::EventProtocol(QObject *parent, const char *name)
+EventProtocol::EventProtocol(TQObject *parent, const char *name)
: InputProtocolBase(parent, name)
{
}
@@ -34,14 +34,14 @@ EventProtocol::~EventProtocol()
{
}
-Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes )
+Transfer * EventProtocol::parse( const TQByteArray & wire, uint& bytes )
{
m_bytes = 0;
- //m_din = new QDataStream( wire, IO_ReadOnly );
- QBuffer inBuf( wire );
+ //m_din = new TQDataStream( wire, IO_ReadOnly );
+ TQBuffer inBuf( wire );
inBuf.open( IO_ReadOnly);
m_din.setDevice( &inBuf );
- m_din.setByteOrder( QDataStream::LittleEndian );
+ m_din.setByteOrder( TQDataStream::LittleEndian );
Q_UINT32 type;
if ( !okToProceed() )
@@ -53,16 +53,16 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes )
m_din >> type;
m_bytes += sizeof( Q_UINT32 );
- debug( QString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) );
+ debug( TQString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) );
if ( type > Stop )
{
- debug( QString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) );
+ debug( TQString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) );
m_state = OutOfSync;
return 0;
}
// read the event source
- QString source;
+ TQString source;
if ( !readString( source ) )
{
m_din.unsetDevice();
@@ -71,15 +71,15 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes )
// now create an event object
//HACK: lowercased DN
- EventTransfer * tentative = new EventTransfer( type, source.lower(), QDateTime::currentDateTime() );
+ EventTransfer * tentative = new EventTransfer( type, source.lower(), TQDateTime::currentDateTime() );
// add any additional data depending on the type of event
// Note: if there are any errors in the way the data is read below, we will soon be OutOfSync
- QString statusText;
- QString guid;
+ TQString statusText;
+ TQString guid;
Q_UINT16 status;
Q_UINT32 flags;
- QString message;
+ TQString message;
switch ( type )
{
@@ -96,9 +96,9 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes )
m_din.unsetDevice();
return 0;
}
- debug( QString( "got status: %1").arg( status ) );
+ debug( TQString( "got status: %1").arg( status ) );
tentative->setStatus( status );
- debug( QString( "tentative status: %1").arg( tentative->status() ) );
+ debug( TQString( "tentative status: %1").arg( tentative->status() ) );
tentative->setStatusText( statusText );
break;
case ConferenceJoined: // 106 - GUID + FLAGS
@@ -191,7 +191,7 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes )
tentative->setMessage( message );
break;
default:
- debug( QString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) );
+ debug( TQString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) );
break;
}
// if we got this far, the parse succeeded, return the Transfer
diff --git a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h
index 4f6d94e5..cb9fe204 100644
--- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h
+++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h
@@ -32,7 +32,7 @@ class EventTransfer;
Ablauf:
CoreProtocol receives data in addIncomingData, and passes to wireToTransfer.
wireToTransfer detects an event.
- Passes whole chunk to EventProtocol ( as QByteArray )
+ Passes whole chunk to EventProtocol ( as TQByteArray )
In to EventProtocol - QByteArray
Returned from EventProtocol - EventTransfer *, bytes read, set state?
EventProtocol tries to parse data into eventTransfer
@@ -50,7 +50,7 @@ class EventTransfer;
All Events contain an event code, and a source ( a DN )
NOTHANDLED indicates that there is no further data and we don't handle events of that type, because they are not sent by the server
NONE indicates there is no further data
- STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a QString, subtract one from the string length.
+ STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a TQString, subtract one from the string length.
FLAGS contains a UINT32 containing the server's flags for this conference. See gwerror.h for the possible values and meanings of these flags. Only Logging has been observed in practice.
All events are timestamped with the local time on receipt.
@@ -110,7 +110,7 @@ class EventProtocol : public InputProtocolBase
{
Q_OBJECT
public:
- EventProtocol(QObject *parent = 0, const char *name = 0);
+ EventProtocol(TQObject *parent = 0, const char *name = 0);
~EventProtocol();
/**
* Attempt to parse the supplied data into an @ref EventTransfer object.
@@ -119,7 +119,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 );
protected:
/**
* Reads a conference's flags
diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp
index 06178f21..fb3f3101 100644
--- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp
@@ -17,7 +17,7 @@
#include "eventtransfer.h"
-EventTransfer::EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp )
+EventTransfer::EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp )
: Transfer(), m_eventType( eventType ), m_source( source ), m_timeStamp( timeStamp )
{
m_contentFlags |= ( EventType | Source | TimeStamp );
@@ -77,12 +77,12 @@ int EventTransfer::eventType()
return m_eventType;
}
-QString EventTransfer::source()
+TQString EventTransfer::source()
{
return m_source;
}
-QDateTime EventTransfer::timeStamp()
+TQDateTime EventTransfer::timeStamp()
{
return m_timeStamp;
}
@@ -97,7 +97,7 @@ Q_UINT32 EventTransfer::flags()
return m_flags;
}
-QString EventTransfer::message()
+TQString EventTransfer::message()
{
return m_message;
}
@@ -107,7 +107,7 @@ Q_UINT16 EventTransfer::status()
return m_status;
}
-QString EventTransfer::statusText()
+TQString EventTransfer::statusText()
{
return m_statusText;
}
@@ -125,7 +125,7 @@ void EventTransfer::setFlags( const Q_UINT32 flags )
m_flags = flags;
}
-void EventTransfer::setMessage( const QString & message )
+void EventTransfer::setMessage( const TQString & message )
{
m_contentFlags |= Message;
m_message = message;
@@ -137,7 +137,7 @@ void EventTransfer::setStatus( const Q_UINT16 inStatus )
m_status = inStatus;
}
-void EventTransfer::setStatusText( const QString & statusText )
+void EventTransfer::setStatusText( const TQString & statusText )
{
m_contentFlags |= StatusText;
m_statusText = statusText;
diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h
index 335d4593..d044fb55 100644
--- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h
+++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h
@@ -18,8 +18,8 @@
#ifndef GW_EVENTTRANSFER_H
#define GW_EVENTTRANSFER_H
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
#include "gwerror.h"
@@ -55,7 +55,7 @@ public:
* @param source the user generating the event.
* @param timeStamp the time at which the event was received.
*/
- EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp );
+ EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp );
~EventTransfer();
/**
* Access the bitmask that describes the transfer's contents. Use @ref Contents to determine what it contains
@@ -78,33 +78,33 @@ public:
*/
TransferType type() { return Transfer::EventTransfer; }
int eventType();
- QString source();
- QDateTime timeStamp();
+ TQString source();
+ TQDateTime timeStamp();
GroupWise::ConferenceGuid guid();
Q_UINT32 flags();
- QString message();
+ TQString message();
Q_UINT16 status();
- QString statusText();
+ TQString statusText();
/**
* Mutators to set the transfer's contents
*/
void setGuid( const GroupWise::ConferenceGuid & guid );
void setFlags( const Q_UINT32 flags );
- void setMessage( const QString & message );
+ void setMessage( const TQString & message );
void setStatus( const Q_UINT16 status );
- void setStatusText( const QString & statusText);
+ void setStatusText( const TQString & statusText);
private:
Q_UINT32 m_contentFlags;
int m_eventType;
- QString m_source;
- QDateTime m_timeStamp;
+ TQString m_source;
+ TQDateTime m_timeStamp;
GroupWise::ConferenceGuid m_guid;
Q_UINT32 m_flags;
- QString m_message;
+ TQString m_message;
Q_UINT16 m_status;
- QString m_statusText;
+ TQString m_statusText;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h
index 207531bb..4e73955a 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h
+++ b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h
@@ -16,8 +16,8 @@
*************************************************************************
*/
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#ifndef GROUPWISE_CHATROOMS_H
#define GROUPWISE_CHATROOMS_H
@@ -28,15 +28,15 @@ namespace GroupWise
class ChatContact
{
public:
- QString dn;
+ TQString dn;
uint chatRights;
};
-typedef QValueList<GroupWise::ChatContact> ChatContactList;
+typedef TQValueList<GroupWise::ChatContact> ChatContactList;
struct ChatroomSearchResult
{
- QString name;
- QString ownerDN;
+ TQString name;
+ TQString ownerDN;
uint participants;
};
@@ -46,19 +46,19 @@ class Chatroom
public:
enum UserStatus { Participating, NotParticipating };
enum Rights { Read = 1, Write = 2, Modify = 4, Moderator = 8, Owner = 16 };
- QString creatorDN;
- QString description;
- QString disclaimer;
- QString displayName;
- QString objectId;
- QString ownerDN;
- QString query;
- QString topic;
+ TQString creatorDN;
+ TQString description;
+ TQString disclaimer;
+ TQString displayName;
+ TQString objectId;
+ TQString ownerDN;
+ TQString query;
+ TQString topic;
bool archive;
uint maxUsers;
uint chatRights;
UserStatus userStatus;
- QDateTime createdOn;
+ TQDateTime createdOn;
uint participantsCount;
// haveParticipants, Acl, Invites indicate if we have obtained these lists from the server, so we can tell 'not fetched list' and 'fetched empty list' apart.
bool haveParticipants;
@@ -72,7 +72,7 @@ class Chatroom
Chatroom( ChatroomSearchResult csr ) { archive = false; maxUsers = 0; chatRights = 0; participantsCount = csr.participants; haveParticipants = false; haveAcl = false; haveInvites = false; ownerDN = csr.ownerDN; displayName = csr.name; }
};
-typedef QValueList<Chatroom> ChatroomList;
-typedef QMap<QString, Chatroom> ChatroomMap;
+typedef TQValueList<Chatroom> ChatroomList;
+typedef TQMap<TQString, Chatroom> ChatroomMap;
}
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp
index 7d58de93..5d964ad0 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp
@@ -19,8 +19,8 @@
*************************************************************************
*/
-//#include<qtextstream.h>
-//#include<qguardedptr.h>
+//#include<tqtextstream.h>
+//#include<tqguardedptr.h>
// #include<qca.h>
// #include<stdlib.h>
// #include"bytestream.h"
@@ -30,11 +30,11 @@
// #include"securestream.h"
// #include"protocol.h"
-#include <qapplication.h> // for qdebug
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qptrqueue.h>
-#include <qtimer.h>
+#include <tqapplication.h> // for qdebug
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqptrqueue.h>
+#include <tqtimer.h>
#include "bytestream.h"
#include "connector.h"
@@ -49,7 +49,7 @@
//#define LIBGW_DEBUG 1
-void cs_dump( const QByteArray &bytes );
+void cs_dump( const TQByteArray &bytes );
enum {
Idle,
@@ -101,14 +101,14 @@ public:
}
NovellDN id;
- QString server;
+ TQString server;
bool oldOnly;
bool allowPlain, mutualAuth;
bool haveLocalAddr;
- QHostAddress localAddr;
+ TQHostAddress localAddr;
Q_UINT16 localPort;
// int minimumSSF, maximumSSF;
-// QString sasl_mech;
+// TQString sasl_mech;
bool doBinding;
bool in_rrsig;
@@ -122,7 +122,7 @@ public:
CoreProtocol client;
//CoreProtocol srv;
- QString defRealm;
+ TQString defRealm;
int mode;
int state;
@@ -132,30 +132,30 @@ public:
bool tls_warned, using_tls;
bool doAuth;
-// QStringList sasl_mechlist;
+// TQStringList sasl_mechlist;
int errCond;
- QString errText;
+ TQString errText;
- QPtrQueue<Transfer> in;
+ TQPtrQueue<Transfer> in;
- QTimer noopTimer; // probably not needed
+ TQTimer noopTimer; // probably not needed
int noop_time;
};
-ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent)
+ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent)
:Stream(parent)
{
d = new Private;
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()));
d->tlsHandler = tlsHandler; // all the extra stuff happening in the larger ctor happens at connect time :)
}
@@ -250,7 +250,7 @@ bool ClientStream::isAuthenticated() const
return (d->state == Active);
}
-// void ClientStream::setPassword(const QString &s)
+// void ClientStream::setPassword(const TQString &s)
// {
// if(d->client.old) {
// d->client.setPassword(s);
@@ -261,7 +261,7 @@ bool ClientStream::isAuthenticated() const
// }
// }
-// void ClientStream::setRealm(const QString &s)
+// void ClientStream::setRealm(const TQString &s)
// {
// if(d->sasl)
// d->sasl->setRealm(s);
@@ -295,7 +295,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;
@@ -307,12 +307,12 @@ int ClientStream::errorCondition() const
return d->errCond;
}
-QString ClientStream::errorText() const
+TQString ClientStream::errorText() const
{
return d->errText;
}
-// QDomElement ClientStream::errorAppSpec() const
+// TQDomElement ClientStream::errorAppSpec() const
// {
// return d->errAppSpec;cr_error
// }
@@ -374,11 +374,11 @@ void ClientStream::write( Request *request )
d->client.outgoingTransfer( request );
}
-void cs_dump( const QByteArray &bytes )
+void cs_dump( const TQByteArray &bytes )
{
//#define GW_CLIENTSTREAM_DEBUG 1
#ifdef GW_CLIENTSTREAM_DEBUG
- CoreProtocol::debug( QString( "contains: %1 bytes " ).arg( bytes.count() ) );
+ CoreProtocol::debug( TQString( "contains: %1 bytes " ).arg( bytes.count() ) );
uint count = 0;
while ( count < bytes.count() )
{
@@ -418,7 +418,7 @@ void cs_dump( const QByteArray &bytes )
#endif
}
-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
#ifdef LIBGW_DEBUG
@@ -440,23 +440,23 @@ void ClientStream::cp_incomingData()
emit doReadyRead();
}
else
- CoreProtocol::debug( QString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) );
+ CoreProtocol::debug( TQString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) );
}
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, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
//d->client.startDialbackOut("andbit.net", "im.pyxa.org");
//d->client.startServerOut(d->server);
@@ -474,7 +474,7 @@ void ClientStream::cr_connected()
d->client.doTLS = d->tlsHandler ? true: false;
d->client.doBinding = d->doBinding;*/
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
emit connected();
if(!self)
return;
@@ -515,12 +515,12 @@ void ClientStream::bs_error(int)
void ClientStream::ss_readyRead()
{
- QByteArray a;
+ TQByteArray a;
a = d->ss->read();
#ifdef LIBGW_DEBUG
- QCString cs(a.data(), a.size()+1);
- CoreProtocol::debug( QString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) );
+ TQCString cs(a.data(), a.size()+1);
+ CoreProtocol::debug( TQString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) );
cs_dump( a );
#endif
@@ -532,7 +532,7 @@ void ClientStream::ss_readyRead()
void ClientStream::ss_bytesWritten(int bytes)
{
#ifdef LIBGW_DEBUG
- CoreProtocol::debug( QString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) );
+ CoreProtocol::debug( TQString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) );
#else
Q_UNUSED( bytes );
#endif
@@ -540,7 +540,7 @@ void ClientStream::ss_bytesWritten(int bytes)
void ClientStream::ss_tlsHandshaken()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
emit securityLayerActivated(LayerTLS);
if(!self)
return;
@@ -556,7 +556,7 @@ void ClientStream::ss_tlsClosed()
void ClientStream::ss_error(int x)
{
- CoreProtocol::debug( QString( "ClientStream::ss_error() x=%1 ").arg( x ) );
+ CoreProtocol::debug( TQString( "ClientStream::ss_error() x=%1 ").arg( x ) );
if(x == SecureStream::ErrTLS) {
reset();
d->errCond = TLSFail;
@@ -574,7 +574,7 @@ void ClientStream::srvProcessNext()
void ClientStream::doReadyRead()
{
- //QGuardedPtr<QObject> self = this;
+ //TQGuardedPtr<TQObject> self = this;
emit readyRead();
//if(!self)
// return;
@@ -585,7 +585,7 @@ void ClientStream::processNext()
{
if( !d->in.isEmpty() ) {
//d->in_rrsig = true;
- QTimer::singleShot(0, this, SLOT(doReadyRead()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead()));
}
}
diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h
index 5ae5ec8c..2d0cef92 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h
+++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h
@@ -33,8 +33,8 @@ class TLSHandler;
typedef struct NovellDN
{
- QString dn;
- QString server;
+ TQString dn;
+ TQString server;
};
class ClientStream : public Stream
@@ -86,7 +86,7 @@ public:
BindConflict // resource in-use
};
- ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0);
+ ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0);
~ClientStream();
void connectToServer(const NovellDN &id, bool auth=true);
@@ -95,15 +95,15 @@ public:
bool isAuthenticated() const;
// login params
- void setUsername(const QString &s);
- void setPassword(const QString &s);
- void setRealm(const QString &s);
+ void setUsername(const TQString &s);
+ void setPassword(const TQString &s);
+ void setRealm(const TQString &s);
void continueAfterParams();
// security options (old protocol only uses the first !)
void setAllowPlain(bool);
void setRequireMutualAuth(bool);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
void close();
@@ -122,11 +122,11 @@ public:
void write( Request * request );
int errorCondition() const;
- QString errorText() const;
-// # QDomElement errorAppSpec() const; // redondo
+ TQString errorText() const;
+// # TQDomElement errorAppSpec() const; // redondo
// 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:
@@ -135,8 +135,8 @@ signals:
//void needAuthParams(bool user, bool pass, bool realm);
void authenticated(); // this signal is ordinarily emitted in processNext
void warning(int);
-// # void incomingXml(const QString &s); // signals emitted in processNext but don't seem to go anywhere...
-// # void outgoingXml(const QString &s); //
+// # void incomingXml(const TQString &s); // signals emitted in processNext but don't seem to go anywhere...
+// # void outgoingXml(const TQString &s); //
// void readyRead(); //signals that there is a transfer ready to be read - defined in stream
public slots:
void continueAfterWarning();
@@ -147,7 +147,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/groupwise/libgroupwise/gwerror.cpp b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp
index 5338cea0..ba2a2a58 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwerror.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp
@@ -19,9 +19,9 @@
#include "gwerror.h"
-QString GroupWise::errorCodeToString( int errorCode )
+TQString GroupWise::errorCodeToString( int errorCode )
{
- QString errorString;
+ TQString errorString;
switch ( errorCode )
{
#if 0
@@ -269,7 +269,7 @@ QString GroupWise::errorCodeToString( int errorCode )
errorString = "Chat has been removed from server";
break;
default:
- errorString = QString("Unrecognized error code: %s").arg( errorCode );
+ errorString = TQString("Unrecognized error code: %s").arg( errorCode );
#endif
}
return errorString;
diff --git a/kopete/protocols/groupwise/libgroupwise/gwerror.h b/kopete/protocols/groupwise/libgroupwise/gwerror.h
index 5300f788..52a5ef36 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwerror.h
+++ b/kopete/protocols/groupwise/libgroupwise/gwerror.h
@@ -18,10 +18,10 @@
#ifndef GW_ERROR_H
#define GW_ERROR_H
-#include <qdatetime.h>
-#include <qglobal.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqglobal.h>
+#include <tqmap.h>
+#include <tqstring.h>
typedef Q_UINT16 NMERR_T;
#define GROUPWISE_DEBUG_GLOBAL 14190
@@ -94,29 +94,29 @@ namespace GroupWise
Closed = 0x10000000
};
- QString errorCodeToString( int errorCode );
+ TQString errorCodeToString( int errorCode );
// helpful structs used to pass data between the client library and the application using it
- class ConferenceGuid : public QString
+ class ConferenceGuid : public TQString
{
public:
ConferenceGuid();
- ConferenceGuid( const QString & string );
+ ConferenceGuid( const TQString & string );
~ConferenceGuid();
};
bool operator==( const ConferenceGuid & g1, const ConferenceGuid & g2 );
- bool operator==( const QString & s, const ConferenceGuid & g );
- bool operator==( const ConferenceGuid & g, const QString & s );
+ bool operator==( const TQString & s, const ConferenceGuid & g );
+ bool operator==( const ConferenceGuid & g, const TQString & s );
struct ConferenceEvent
{
Event type;
ConferenceGuid guid;
- QString user;
- QDateTime timeStamp;
+ TQString user;
+ TQDateTime timeStamp;
Q_UINT32 flags;
- QString message;
+ TQString message;
};
struct FolderItem
@@ -124,7 +124,7 @@ namespace GroupWise
uint id;
uint sequence;
uint parentId;
- QString name;
+ TQString name;
};
struct ContactItem
@@ -132,13 +132,13 @@ namespace GroupWise
uint id;
uint parentId;
uint sequence;
- QString dn;
- QString displayName;
+ TQString dn;
+ TQString displayName;
};
struct ContactDetails
{
- QString cn,
+ TQString cn,
dn,
givenName,
surname,
@@ -147,28 +147,28 @@ namespace GroupWise
authAttribute;
int status;
bool archive;
- QMap< QString, QString > properties;
+ TQMap< TQString, TQString > properties;
};
struct OutgoingMessage
{
ConferenceGuid guid;
- QString message;
- QString rtfMessage;
+ TQString message;
+ TQString rtfMessage;
};
struct UserSearchQueryTerm
{
- QString field;
- QString argument;
+ TQString field;
+ TQString argument;
int operation;
};
struct CustomStatus
{
GroupWise::Status status;
- QString name;
- QString autoReply;
+ TQString name;
+ TQString autoReply;
};
}
diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp
index e0d3c5db..6d025e47 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qcstring.h>
+#include <tqcstring.h>
#include "gwerror.h"
@@ -36,13 +36,13 @@ FieldList::~FieldList()
{
}
-FieldListIterator FieldList::find( QCString tag )
+FieldListIterator FieldList::find( TQCString tag )
{
FieldListIterator it = begin();
return find( it, tag );
}
-FieldListIterator FieldList::find( FieldListIterator &it, QCString tag )
+FieldListIterator FieldList::find( FieldListIterator &it, TQCString tag )
{
FieldListIterator theEnd = end();
//cout << "FieldList::find() looking for " << tag.data() << endl;
@@ -55,7 +55,7 @@ FieldListIterator FieldList::find( FieldListIterator &it, QCString tag )
return it;
}
-int FieldList::findIndex( QCString tag )
+int FieldList::findIndex( TQCString tag )
{
FieldListIterator it = begin();
FieldListIterator theEnd = end();
@@ -74,7 +74,7 @@ void FieldList::dump( bool recursive, int offset )
kdDebug( GROUPWISE_DEBUG_LIBGW ) << k_funcinfo << ( recursive ? ", recursively" : ", non-recursive" ) << endl;
for( FieldListIterator it = begin(); it != myEnd; ++it )
{
- QString s;
+ TQString s;
s.fill(' ', offset*2 );
s.append( (*it)->tag() );
SingleField * sf;
@@ -105,13 +105,13 @@ void FieldList::purge()
// THIS IS AN ATTEMPT TO HIDE THE POLYMORPHISM INSIDE THE LIST
// HOWEVER IT FAILS BECAUSE WE NEED BOTH THE ITERATOR AND THE CASTED Single|MultiField it points to
-SingleField * FieldList::findSingleField( QCString tag )
+SingleField * FieldList::findSingleField( TQCString tag )
{
FieldListIterator it = begin();
return findSingleField( it, tag );
}
-SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag )
+SingleField * FieldList::findSingleField( FieldListIterator &it, TQCString tag )
{
FieldListIterator found = find( it, tag );
if ( found == end() )
@@ -120,13 +120,13 @@ SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag )
return dynamic_cast<SingleField *>( *found );
}
-MultiField * FieldList::findMultiField( QCString tag )
+MultiField * FieldList::findMultiField( TQCString tag )
{
FieldListIterator it = begin();
return findMultiField( it, tag );
}
-MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag )
+MultiField * FieldList::findMultiField( FieldListIterator &it, TQCString tag )
{
FieldListIterator found = find( it, tag );
if ( found == end() )
@@ -138,13 +138,13 @@ MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag )
/* === FieldBase ========================================================= */
-FieldBase::FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type )
+FieldBase::FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type )
: m_tag( tag ), m_method( method ), m_flags( flags ), m_type( type )
{
}
-QCString FieldBase::tag() const
+TQCString FieldBase::tag() const
{
return m_tag;
}
@@ -171,12 +171,12 @@ void FieldBase::setFlags( const Q_UINT8 flags )
/* === SingleField ========================================================= */
-SingleField::SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value )
+SingleField::SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value )
: FieldBase( tag, method, flags, type ), m_value( value )
{
}
-SingleField::SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value )
+SingleField::SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value )
: FieldBase( tag, NMFIELD_METHOD_VALID, flags, type ), m_value( value )
{
}
@@ -185,24 +185,24 @@ SingleField::~SingleField()
{
}
-void SingleField::setValue( const QVariant v )
+void SingleField::setValue( const TQVariant v )
{
m_value = v;
}
-QVariant SingleField::value() const
+TQVariant SingleField::value() const
{
return m_value;
}
/* === MultiField ========================================================= */
-MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields )
+MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields )
: FieldBase( tag, method, flags, type ), m_fields( fields )
{
}
-MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type )
+MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type )
: FieldBase( tag, method, flags, type )
{
}
diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.h b/kopete/protocols/groupwise/libgroupwise/gwfield.h
index 9362b5ad..0117b3e5 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwfield.h
+++ b/kopete/protocols/groupwise/libgroupwise/gwfield.h
@@ -146,10 +146,10 @@
#define NMFIELD_MAX_STR_LENGTH 32768
-#include <qglobal.h>
-#include <qobject.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqobject.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
/**
* Fields are typed units of information interchanged between the groupwise server and its clients.
@@ -167,26 +167,26 @@ namespace Field
{
public:
FieldBase() {}
- FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type );
+ FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type );
virtual ~FieldBase() {}
- QCString tag() const;
+ TQCString tag() const;
Q_UINT8 method() const;
Q_UINT8 flags() const;
Q_UINT8 type() const;
void setFlags( const Q_UINT8 flags );
protected:
- QCString m_tag;
+ TQCString m_tag;
Q_UINT8 m_method;
Q_UINT8 m_flags;
Q_UINT8 m_type; // doch needed
};
- typedef QValueListIterator<FieldBase *> FieldListIterator;
- typedef QValueListConstIterator<FieldBase *> FieldListConstIterator;
+ typedef TQValueListIterator<FieldBase *> FieldListIterator;
+ typedef TQValueListConstIterator<FieldBase *> FieldListConstIterator;
class SingleField;
class MultiField;
- class FieldList : public QValueList<FieldBase *>
+ class FieldList : public TQValueList<FieldBase *>
{
public:
/**
@@ -194,22 +194,22 @@ namespace Field
*/
virtual ~FieldList();
/**
- * Locate the first occurrence of a given field in the list. Same semantics as QValueList::find().
+ * Locate the first occurrence of a given field in the list. Same semantics as TQValueList::find().
* @param tag The tag name of the field to search for.
* @return An iterator pointing to the first occurrence found, or end() if none was found.
*/
- FieldListIterator find( QCString tag );
+ FieldListIterator find( TQCString tag );
/**
* Locate the first occurrence of a given field in the list, starting at the supplied iterator
* @param tag The tag name of the field to search for.
* @param it An iterator within the list, to start searching from.
* @return An iterator pointing to the first occurrence found, or end() if none was found.
*/
- FieldListIterator find( FieldListIterator &it, QCString tag );
+ FieldListIterator find( FieldListIterator &it, TQCString tag );
/**
* Get the index of the first occurrence of tag, or -1 if not found
*/
- int findIndex( QCString tag );
+ int findIndex( TQCString tag );
/**
* Debug function, dumps to stdout
*/
@@ -222,11 +222,11 @@ namespace Field
* Utility functions for finding the first instance of a tag
* @return 0 if no field of the right tag and type was found.
*/
- SingleField * findSingleField( QCString tag );
- MultiField * findMultiField( QCString tag );
+ SingleField * findSingleField( TQCString tag );
+ MultiField * findMultiField( TQCString tag );
protected:
- SingleField * findSingleField( FieldListIterator &it, QCString tag );
- MultiField * findMultiField( FieldListIterator &it, QCString tag );
+ SingleField * findSingleField( FieldListIterator &it, TQCString tag );
+ MultiField * findMultiField( FieldListIterator &it, TQCString tag );
};
@@ -242,16 +242,16 @@ namespace Field
/**
* Single field constructor
*/
- SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value );
+ SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value );
/**
* Convenience constructor for NMFIELD_METHOD_VALID fields
*/
- SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value );
+ SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value );
~SingleField();
- void setValue( const QVariant v );
- QVariant value() const;
+ void setValue( const TQVariant v );
+ TQVariant value() const;
private:
- QVariant m_value;
+ TQVariant m_value;
};
/**
@@ -261,8 +261,8 @@ namespace Field
class MultiField : public FieldBase
{
public:
- MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type );
- MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields );
+ MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type );
+ MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields );
~MultiField();
FieldList fields() const;
void setFields( FieldList );
diff --git a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp
index 4ea25779..bb747945 100644
--- a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp
@@ -20,7 +20,7 @@
namespace GroupWise
{
ConferenceGuid::ConferenceGuid() {}
- ConferenceGuid::ConferenceGuid( const QString & string ) : QString( string ) {}
+ ConferenceGuid::ConferenceGuid( const TQString & string ) : TQString( string ) {}
ConferenceGuid::~ConferenceGuid() {}
@@ -28,11 +28,11 @@ namespace GroupWise
{
return g1.left( CONF_GUID_END ) == g2.left( CONF_GUID_END );
}
- bool operator==( const QString & s, const ConferenceGuid & g )
+ bool operator==( const TQString & s, const ConferenceGuid & g )
{
return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END );
}
- bool operator==( const ConferenceGuid & g, const QString & s )
+ bool operator==( const ConferenceGuid & g, const TQString & s )
{
return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp
index 30627a81..6dfb1d0f 100644
--- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp
@@ -23,8 +23,8 @@
#include "gwfield.h"
#include "inputprotocolbase.h"
-InputProtocolBase::InputProtocolBase(QObject *parent, const char *name)
- : QObject(parent, name)
+InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
}
@@ -33,7 +33,7 @@ InputProtocolBase::~InputProtocolBase()
{
}
-void InputProtocolBase::debug( const QString &str )
+void InputProtocolBase::debug( const TQString &str )
{
#ifdef LIBGW_USE_KDEBUG
kdDebug( 14191 ) << "debug: " << str << endl;
@@ -47,13 +47,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;
}
@@ -73,7 +73,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;
@@ -84,7 +84,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len )
if ( val > NMFIELD_MAX_STR_LENGTH )
return false;
//qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val );
- QCString temp( val );
+ TQCString temp( val );
if ( val != 0 )
{
if ( !okToProceed() )
@@ -98,7 +98,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len )
// if ( (Q_UINT8)( * ( temp.data() + ( temp.length() - 1 ) ) ) == 0xFF )
if ( temp.length() < ( val - 1 ) )
{
- debug( QString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) );
+ debug( TQString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) );
m_state = NeedMore;
return false;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h
index efd2979f..529fea21 100644
--- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h
+++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h
@@ -19,7 +19,7 @@
#ifndef INPUTPROTOCOLBASE_H
#define INPUTPROTOCOLBASE_H
-#include <qobject.h>
+#include <tqobject.h>
class Transfer;
/**
@@ -32,13 +32,13 @@ 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();
/**
* Debug output
*/
- static void debug(const QString &str);
+ static void debug(const TQString &str);
/**
* Returns a value describing the state of the object.
@@ -51,13 +51,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.
*/
@@ -67,12 +67,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/groupwise/libgroupwise/privacymanager.cpp b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp
index 3d42207b..4960310a 100644
--- a/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp
@@ -23,7 +23,7 @@
#include "privacymanager.h"
PrivacyManager::PrivacyManager( Client * client, const char *name)
- : QObject(client, name), m_client( client )
+ : TQObject(client, name), m_client( client )
{
}
@@ -41,12 +41,12 @@ bool PrivacyManager::defaultDeny()
return m_defaultDeny;
}
-QStringList PrivacyManager::allowList()
+TQStringList PrivacyManager::allowList()
{
return m_allowList;
}
-QStringList PrivacyManager::denyList()
+TQStringList PrivacyManager::denyList()
{
return m_denyList;
}
@@ -56,7 +56,7 @@ bool PrivacyManager::isPrivacyLocked()
return m_locked;
}
-bool PrivacyManager::isBlocked( const QString & dn )
+bool PrivacyManager::isBlocked( const TQString & dn )
{
if ( m_defaultDeny )
return !m_allowList.contains( dn );
@@ -64,7 +64,7 @@ bool PrivacyManager::isBlocked( const QString & dn )
return m_denyList.contains( dn );
}
-void PrivacyManager::setAllow( const QString & dn )
+void PrivacyManager::setAllow( const TQString & dn )
{
if ( m_defaultDeny )
{
@@ -78,7 +78,7 @@ void PrivacyManager::setAllow( const QString & dn )
}
}
-void PrivacyManager::setDeny( const QString & dn )
+void PrivacyManager::setDeny( const TQString & dn )
{
if ( m_defaultDeny )
{
@@ -97,7 +97,7 @@ void PrivacyManager::setDefaultAllow( bool allow )
{
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->defaultPolicy( !allow );
- connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) );
pit->go( true );
}
@@ -105,73 +105,73 @@ void PrivacyManager::setDefaultDeny( bool deny )
{
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->defaultPolicy( deny);
- connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) );
pit->go( true );
}
-void PrivacyManager::addAllow( const QString & dn )
+void PrivacyManager::addAllow( const TQString & dn )
{
// start off a CreatePrivacyItemTask
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->allow( dn );
- connect( pit, SIGNAL( finished() ), SLOT( slotAllowAdded() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowAdded() ) );
pit->go( true );
}
-void PrivacyManager::addDeny( const QString & dn )
+void PrivacyManager::addDeny( const TQString & dn )
{
// start off a CreatePrivacyItemTask
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->deny( dn );
- connect( pit, SIGNAL( finished() ), SLOT( slotDenyAdded() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyAdded() ) );
pit->go( true );
}
-void PrivacyManager::removeAllow( const QString & dn )
+void PrivacyManager::removeAllow( const TQString & dn )
{
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->removeAllow( dn );
- connect( pit, SIGNAL( finished() ), SLOT( slotAllowRemoved() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowRemoved() ) );
pit->go( true );
}
-void PrivacyManager::removeDeny( const QString & dn )
+void PrivacyManager::removeDeny( const TQString & dn )
{
// start off a CreatePrivacyItemTask
PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() );
pit->removeDeny( dn );
- connect( pit, SIGNAL( finished() ), SLOT( slotDenyRemoved() ) );
+ connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyRemoved() ) );
pit->go( true );
}
-void PrivacyManager::setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList )
+void PrivacyManager::setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList )
{
if ( defaultIsDeny != m_defaultDeny )
setDefaultDeny( defaultIsDeny );
// find the DNs no longer in the allow list
- QStringList allowsToRemove = difference( m_allowList, allowList );
+ TQStringList allowsToRemove = difference( m_allowList, allowList );
// find the DNs no longer in the deny list
- QStringList denysToRemove = difference( m_denyList, denyList );
+ TQStringList denysToRemove = difference( m_denyList, denyList );
// find the DNs new in the allow list
- QStringList allowsToAdd = difference( allowList, m_allowList );
+ TQStringList allowsToAdd = difference( allowList, m_allowList );
// find the DNs new in the deny list
- QStringList denysToAdd = difference( denyList, m_denyList );
+ TQStringList denysToAdd = difference( denyList, m_denyList );
- QStringList::ConstIterator end = allowsToRemove.end();
- for ( QStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it )
+ TQStringList::ConstIterator end = allowsToRemove.end();
+ for ( TQStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it )
removeAllow( *it );
end = denysToRemove.end();
- for ( QStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it )
removeDeny( *it );
end = allowsToAdd.end();
- for ( QStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it )
addAllow( *it );
end = denysToAdd.end();
- for ( QStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it )
addDeny( *it );
}
-void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList )
+void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList )
{
m_locked = locked;
m_defaultDeny = defaultDeny;
@@ -236,12 +236,12 @@ void PrivacyManager::slotDenyRemoved()
}
}
-QStringList PrivacyManager::difference( const QStringList & lhs, const QStringList & rhs )
+TQStringList PrivacyManager::difference( const TQStringList & lhs, const TQStringList & rhs )
{
- QStringList diff;
- const QStringList::ConstIterator lhsEnd = lhs.end();
- const QStringList::ConstIterator rhsEnd = rhs.end();
- for ( QStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt )
+ TQStringList diff;
+ const TQStringList::ConstIterator lhsEnd = lhs.end();
+ const TQStringList::ConstIterator rhsEnd = rhs.end();
+ for ( TQStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt )
{
if ( rhs.find( *lhsIt ) == rhsEnd )
diff.append( *lhsIt );
diff --git a/kopete/protocols/groupwise/libgroupwise/privacymanager.h b/kopete/protocols/groupwise/libgroupwise/privacymanager.h
index 102c2b0a..0f01eb89 100644
--- a/kopete/protocols/groupwise/libgroupwise/privacymanager.h
+++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.h
@@ -19,8 +19,8 @@
#ifndef PRIVACYMANAGER_H
#define PRIVACYMANAGER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class Client;
@@ -36,40 +36,40 @@ public:
PrivacyManager( Client * client, const char *name = 0);
~PrivacyManager();
// accessors
- bool isBlocked( const QString & dn );
- QStringList allowList();
- QStringList denyList();
+ bool isBlocked( const TQString & dn );
+ TQStringList allowList();
+ TQStringList denyList();
bool isPrivacyLocked();
bool defaultDeny();
bool defaultAllow();
// mutators
void setDefaultAllow( bool allow );
void setDefaultDeny( bool deny );
- void setAllow( const QString & dn );
- void setDeny( const QString & dn );
+ void setAllow( const TQString & dn );
+ void setDeny( const TQString & dn );
void getDetailsForPrivacyLists();
// change everything at once
- void setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList );
+ void setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList );
signals:
- void privacyChanged( const QString &dn, bool allowed );
+ void privacyChanged( const TQString &dn, bool allowed );
public slots:
/**
* Used to initialise the privacy manager using the server side privacy list
*/
- void slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList );
+ void slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList );
protected:
- void addAllow( const QString & dn );
- void addDeny( const QString & dn );
- void removeAllow( const QString & dn );
- void removeDeny( const QString & dn );
+ void addAllow( const TQString & dn );
+ void addDeny( const TQString & dn );
+ void removeAllow( const TQString & dn );
+ void removeDeny( const TQString & dn );
/**
* A set difference function
* @param lhs The set of strings to be subtracted from
* @param rhs The set of string to subtract
* @return The difference between the two sets
*/
- QStringList difference( const QStringList & lhs, const QStringList & rhs );
+ TQStringList difference( const TQStringList & lhs, const TQStringList & rhs );
protected slots:
// Receive the results of Tasks manipulating the privacy lists
void slotDefaultPolicyChanged();
@@ -81,8 +81,8 @@ private:
Client * m_client;
bool m_locked;
bool m_defaultDeny;
- QStringList m_allowList;
- QStringList m_denyList;
+ TQStringList m_allowList;
+ TQStringList m_denyList;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp
index e660ef42..10cae6b8 100644
--- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp
@@ -20,15 +20,15 @@
#include"qca.h"
-#include<qptrlist.h>
-#include<qdir.h>
-#include<qfileinfo.h>
-#include<qstringlist.h>
-#include<qlibrary.h>
-#include<qtimer.h>
-#include<qhostaddress.h>
-#include<qapplication.h>
-#include<qguardedptr.h>
+#include<tqptrlist.h>
+#include<tqdir.h>
+#include<tqfileinfo.h>
+#include<tqstringlist.h>
+#include<tqlibrary.h>
+#include<tqtimer.h>
+#include<tqhostaddress.h>
+#include<tqapplication.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include"qcaprovider.h"
@@ -46,11 +46,11 @@ class ProviderItem
{
public:
QCAProvider *p;
- QString fname;
+ TQString fname;
- static ProviderItem *load(const QString &fname)
+ static ProviderItem *load(const TQString &fname)
{
- QLibrary *lib = new QLibrary(fname);
+ TQLibrary *lib = new TQLibrary(fname);
if(!lib->load()) {
delete lib;
return 0;
@@ -92,10 +92,10 @@ public:
}
private:
- QLibrary *lib;
+ TQLibrary *lib;
bool init_done;
- ProviderItem(QLibrary *_lib, QCAProvider *_p)
+ ProviderItem(TQLibrary *_lib, QCAProvider *_p)
{
lib = _lib;
p = _p;
@@ -103,12 +103,12 @@ private:
}
};
-static QPtrList<ProviderItem> providerList;
+static TQPtrList<ProviderItem> providerList;
static bool qca_init = false;
-static bool plugin_have(const QString &fname)
+static bool plugin_have(const TQString &fname)
{
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->fname == fname)
return true;
@@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname)
static void plugin_scan()
{
- QStringList dirs = QApplication::libraryPaths();
- for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
- QDir libpath(*it);
- QDir dir(libpath.filePath("crypto"));
+ TQStringList dirs = TQApplication::libraryPaths();
+ for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
+ TQDir libpath(*it);
+ TQDir dir(libpath.filePath("crypto"));
if(!dir.exists())
continue;
- QStringList list = dir.entryList();
- for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QFileInfo fi(dir.filePath(*it));
+ TQStringList list = dir.entryList();
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQFileInfo fi(dir.filePath(*it));
if(fi.isDir())
continue;
if(fi.extension() != PLUGIN_EXT)
continue;
- QString fname = fi.filePath();
+ TQString fname = fi.filePath();
// don't load the same plugin again!
if(plugin_have(fname))
@@ -166,26 +166,26 @@ static void plugin_unloadall()
static int plugin_caps()
{
int caps = 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it)
caps |= i->p->capabilities();
return caps;
}
-QString QCA::arrayToHex(const QByteArray &a)
+TQString QCA::arrayToHex(const TQByteArray &a)
{
- QString out;
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
return out;
}
-QByteArray QCA::hexToArray(const QString &str)
+TQByteArray QCA::hexToArray(const TQString &str)
{
- QByteArray out(str.length() / 2);
+ TQByteArray out(str.length() / 2);
int at = 0;
for(int n = 0; n + 1 < (int)str.length(); n += 2) {
uchar a = str[n];
@@ -239,7 +239,7 @@ static void *getContext(int cap)
if(!QCA::isSupported(cap))
return 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->p->capabilities() & cap) {
i->ensureInit();
@@ -303,14 +303,14 @@ void Hash::clear()
d->reset();
}
-void Hash::update(const QByteArray &a)
+void Hash::update(const TQByteArray &a)
{
d->c->update(a.data(), a.size());
}
-QByteArray Hash::final()
+TQByteArray Hash::final()
{
- QByteArray buf;
+ TQByteArray buf;
d->c->final(&buf);
return buf;
}
@@ -343,11 +343,11 @@ public:
QCA_CipherContext *c;
int dir;
int mode;
- QByteArray key, iv;
+ TQByteArray key, iv;
bool err;
};
-Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d = new Private;
d->c = c;
@@ -377,27 +377,27 @@ Cipher::~Cipher()
delete d;
}
-QByteArray Cipher::dyn_generateKey(int size) const
+TQByteArray Cipher::dyn_generateKey(int size) const
{
- QByteArray buf;
+ TQByteArray buf;
if(size != -1)
buf.resize(size);
else
buf.resize(d->c->keySize());
if(!d->c->generateKey(buf.data(), size))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-QByteArray Cipher::dyn_generateIV() const
+TQByteArray Cipher::dyn_generateIV() const
{
- QByteArray buf(d->c->blockSize());
+ TQByteArray buf(d->c->blockSize());
if(!d->c->generateIV(buf.data()))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d->reset();
@@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i
}
}
-bool Cipher::update(const QByteArray &a)
+bool Cipher::update(const TQByteArray &a)
{
if(d->err)
return false;
@@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a)
return true;
}
-QByteArray Cipher::final(bool *ok)
+TQByteArray Cipher::final(bool *ok)
{
if(ok)
*ok = false;
if(d->err)
- return QByteArray();
+ return TQByteArray();
- QByteArray out;
+ TQByteArray out;
if(!d->c->final(&out)) {
d->err = true;
- return QByteArray();
+ return TQByteArray();
}
if(ok)
*ok = true;
@@ -473,7 +473,7 @@ MD5::MD5()
//----------------------------------------------------------------------------
// BlowFish
//----------------------------------------------------------------------------
-BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad)
{
}
@@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i
//----------------------------------------------------------------------------
// TripleDES
//----------------------------------------------------------------------------
-TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad)
{
}
@@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray
//----------------------------------------------------------------------------
// AES128
//----------------------------------------------------------------------------
-AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad)
{
}
@@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b
//----------------------------------------------------------------------------
// AES256
//----------------------------------------------------------------------------
-AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad)
{
}
@@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const
return d->c->havePrivate();
}
-QByteArray RSAKey::toDER(bool publicOnly) const
+TQByteArray RSAKey::toDER(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool RSAKey::fromDER(const QByteArray &a)
+bool RSAKey::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString RSAKey::toPEM(bool publicOnly) const
+TQString RSAKey::toPEM(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool RSAKey::fromPEM(const QString &str)
+bool RSAKey::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p)
return d->c->createFromNative(p);
}
-bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->encrypt(a, &out, oaep))
return false;
*b = out;
return true;
}
-bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->decrypt(a, &out, oaep))
return false;
*b = out;
@@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k)
v_key = k;
}
-bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
return v_key.encrypt(a, b, oaep);
}
-bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
@@ -727,84 +727,84 @@ bool Cert::isNull() const
return d->c->isNull();
}
-QString Cert::commonName() const
+TQString Cert::commonName() const
{
CertProperties props = subject();
return props["CN"];
}
-QString Cert::serialNumber() const
+TQString Cert::serialNumber() const
{
return d->c->serialNumber();
}
-QString Cert::subjectString() const
+TQString Cert::subjectString() const
{
return d->c->subjectString();
}
-QString Cert::issuerString() const
+TQString Cert::issuerString() const
{
return d->c->issuerString();
}
CertProperties Cert::subject() const
{
- QValueList<QCA_CertProperty> list = d->c->subject();
+ TQValueList<QCA_CertProperty> list = d->c->subject();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
CertProperties Cert::issuer() const
{
- QValueList<QCA_CertProperty> list = d->c->issuer();
+ TQValueList<QCA_CertProperty> list = d->c->issuer();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
-QDateTime Cert::notBefore() const
+TQDateTime Cert::notBefore() const
{
return d->c->notBefore();
}
-QDateTime Cert::notAfter() const
+TQDateTime Cert::notAfter() const
{
return d->c->notAfter();
}
-QByteArray Cert::toDER() const
+TQByteArray Cert::toDER() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool Cert::fromDER(const QByteArray &a)
+bool Cert::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString Cert::toPEM() const
+TQString Cert::toPEM() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool Cert::fromPEM(const QString &str)
+bool Cert::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -842,7 +842,7 @@ public:
tryMore = false;
}
- void appendArray(QByteArray *a, const QByteArray &b)
+ void appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -851,21 +851,21 @@ public:
Cert cert;
QCA_TLSContext *c;
- QByteArray in, out, to_net, from_net;
+ TQByteArray in, out, to_net, from_net;
int bytesEncoded;
bool tryMore;
bool handshaken;
- QString host;
+ TQString host;
bool hostMismatch;
bool closing;
Cert ourCert;
RSAKey ourKey;
- QPtrList<QCA_CertContext> store;
+ TQPtrList<QCA_CertContext> store;
};
-TLS::TLS(QObject *parent)
-:QObject(parent)
+TLS::TLS(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -881,11 +881,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key)
d->ourKey = key;
}
-void TLS::setCertificateStore(const QPtrList<Cert> &store)
+void TLS::setCertificateStore(const TQPtrList<Cert> &store)
{
// convert the cert list into a context list
d->store.clear();
- QPtrListIterator<Cert> it(store);
+ TQPtrListIterator<Cert> it(store);
for(Cert *cert; (cert = it.current()); ++it)
d->store.append(cert->d->c);
}
@@ -895,14 +895,14 @@ void TLS::reset()
d->reset();
}
-bool TLS::startClient(const QString &host)
+bool TLS::startClient(const TQString &host)
{
d->reset();
d->host = host;
if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -912,7 +912,7 @@ bool TLS::startServer()
if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -922,7 +922,7 @@ void TLS::close()
return;
d->closing = true;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
}
bool TLS::isHandshaken() const
@@ -930,35 +930,35 @@ bool TLS::isHandshaken() const
return d->handshaken;
}
-void TLS::write(const QByteArray &a)
+void TLS::write(const TQByteArray &a)
{
d->appendArray(&d->out, a);
update();
}
-QByteArray TLS::read()
+TQByteArray TLS::read()
{
- QByteArray a = d->in.copy();
+ TQByteArray a = d->in.copy();
d->in.resize(0);
return a;
}
-void TLS::writeIncoming(const QByteArray &a)
+void TLS::writeIncoming(const TQByteArray &a)
{
d->appendArray(&d->from_net, a);
update();
}
-QByteArray TLS::readOutgoing()
+TQByteArray TLS::readOutgoing()
{
- QByteArray a = d->to_net.copy();
+ TQByteArray a = d->to_net.copy();
d->to_net.resize(0);
return a;
}
-QByteArray TLS::readUnprocessed()
+TQByteArray TLS::readUnprocessed()
{
- QByteArray a = d->from_net.copy();
+ TQByteArray a = d->from_net.copy();
d->from_net.resize(0);
return a;
}
@@ -981,10 +981,10 @@ void TLS::update()
bool force_read = false;
bool eof = false;
bool done = false;
- QGuardedPtr<TLS> self = this;
+ TQGuardedPtr<TLS> self = this;
if(d->closing) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->shutdown(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -1000,7 +1000,7 @@ void TLS::update()
}
else {
if(!d->handshaken) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->handshake(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -1029,7 +1029,7 @@ void TLS::update()
if(d->handshaken) {
if(!d->out.isEmpty() || d->tryMore) {
d->tryMore = false;
- QByteArray a;
+ TQByteArray a;
int enc;
bool more = false;
bool ok = d->c->encode(d->out, &a, &enc);
@@ -1050,7 +1050,7 @@ void TLS::update()
}
}
if(!d->from_net.isEmpty() || force_read) {
- QByteArray a, b;
+ TQByteArray a, b;
bool ok = d->c->decode(d->from_net, &a, &b);
eof = d->c->eof();
d->from_net.resize(0);
@@ -1096,7 +1096,7 @@ void TLS::update()
//----------------------------------------------------------------------------
// SASL
//----------------------------------------------------------------------------
-QString saslappname = "qca";
+TQString saslappname = "qca";
class SASL::Private
{
public:
@@ -1118,22 +1118,22 @@ public:
// security opts
bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual;
int ssfmin, ssfmax;
- QString ext_authid;
+ TQString ext_authid;
int ext_ssf;
bool tried;
QCA_SASLContext *c;
- QHostAddress localAddr, remoteAddr;
+ TQHostAddress localAddr, remoteAddr;
int localPort, remotePort;
- QByteArray stepData;
+ TQByteArray stepData;
bool allowCSF;
bool first, server;
- QByteArray inbuf, outbuf;
+ TQByteArray inbuf, outbuf;
};
-SASL::SASL(QObject *parent)
-:QObject(parent)
+SASL::SASL(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
reset();
@@ -1144,7 +1144,7 @@ SASL::~SASL()
delete d;
}
-void SASL::setAppName(const QString &name)
+void SASL::setAppName(const TQString &name)
{
saslappname = name;
}
@@ -1222,7 +1222,7 @@ void SASL::setMaximumSSF(int x)
d->ssfmax = x;
}
-void SASL::setExternalAuthID(const QString &authid)
+void SASL::setExternalAuthID(const TQString &authid)
{
d->ext_authid = authid;
}
@@ -1232,19 +1232,19 @@ void SASL::setExternalSSF(int x)
d->ext_ssf = x;
}
-void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->localAddr = addr;
d->localPort = port;
}
-void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->remoteAddr = addr;
d->remotePort = port;
}
-bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst)
+bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1265,11 +1265,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin
d->first = true;
d->server = false;
d->tried = false;
- QTimer::singleShot(0, this, SLOT(tryAgain()));
+ TQTimer::singleShot(0, this, TQT_SLOT(tryAgain()));
return true;
}
-bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist)
+bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1292,13 +1292,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin
return true;
}
-void SASL::putServerFirstStep(const QString &mech)
+void SASL::putServerFirstStep(const TQString &mech)
{
int r = d->c->serverFirstStep(mech, 0);
handleServerFirstStep(r);
}
-void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit)
+void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit)
{
int r = d->c->serverFirstStep(mech, &clientInit);
handleServerFirstStep(r);
@@ -1316,28 +1316,28 @@ void SASL::handleServerFirstStep(int r)
error(ErrAuth);
}
-void SASL::putStep(const QByteArray &stepData)
+void SASL::putStep(const TQByteArray &stepData)
{
d->stepData = stepData.copy();
tryAgain();
}
-void SASL::setUsername(const QString &user)
+void SASL::setUsername(const TQString &user)
{
d->c->setClientParams(&user, 0, 0, 0);
}
-void SASL::setAuthzid(const QString &authzid)
+void SASL::setAuthzid(const TQString &authzid)
{
d->c->setClientParams(0, &authzid, 0, 0);
}
-void SASL::setPassword(const QString &pass)
+void SASL::setPassword(const TQString &pass)
{
d->c->setClientParams(0, 0, &pass, 0);
}
-void SASL::setRealm(const QString &realm)
+void SASL::setRealm(const TQString &realm)
{
d->c->setClientParams(0, 0, 0, &realm);
}
@@ -1399,8 +1399,8 @@ void SASL::tryAgain()
return;
}
- QString mech = d->c->mech();
- const QByteArray *clientInit = d->c->clientInit();
+ TQString mech = d->c->mech();
+ const TQByteArray *clientInit = d->c->clientInit();
d->first = false;
d->tried = false;
@@ -1443,9 +1443,9 @@ int SASL::ssf() const
return d->c->security();
}
-void SASL::write(const QByteArray &a)
+void SASL::write(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->encode(a, &b)) {
error(ErrCrypt);
return;
@@ -1456,16 +1456,16 @@ void SASL::write(const QByteArray &a)
readyReadOutgoing(a.size());
}
-QByteArray SASL::read()
+TQByteArray SASL::read()
{
- QByteArray a = d->inbuf.copy();
+ TQByteArray a = d->inbuf.copy();
d->inbuf.resize(0);
return a;
}
-void SASL::writeIncoming(const QByteArray &a)
+void SASL::writeIncoming(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->decode(a, &b)) {
error(ErrCrypt);
return;
@@ -1476,9 +1476,9 @@ void SASL::writeIncoming(const QByteArray &a)
readyRead();
}
-QByteArray SASL::readOutgoing()
+TQByteArray SASL::readOutgoing()
{
- QByteArray a = d->outbuf.copy();
+ TQByteArray a = d->outbuf.copy();
d->outbuf.resize(0);
return a;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h
index 1a52a826..46b25cc9 100644
--- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h
+++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h
@@ -21,12 +21,12 @@
#ifndef QCA_H
#define QCA_H
-#include<qstring.h>
-#include<qcstring.h>
-#include<qdatetime.h>
-#include<qmap.h>
-#include<qptrlist.h>
-#include<qobject.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqdatetime.h>
+#include<tqmap.h>
+#include<tqptrlist.h>
+#include<tqobject.h>
#ifdef Q_OS_WIN32
# ifndef QCA_STATIC
@@ -91,8 +91,8 @@ namespace QCA
QCA_EXPORT void insertProvider(QCAProvider *);
QCA_EXPORT void unloadAllPlugins();
- QCA_EXPORT QString arrayToHex(const QByteArray &);
- QCA_EXPORT QByteArray hexToArray(const QString &);
+ QCA_EXPORT TQString arrayToHex(const TQByteArray &);
+ QCA_EXPORT TQByteArray hexToArray(const TQString &);
class QCA_EXPORT Hash
{
@@ -102,8 +102,8 @@ namespace QCA
~Hash();
void clear();
- void update(const QByteArray &a);
- QByteArray final();
+ void update(const TQByteArray &a);
+ TQByteArray final();
protected:
Hash(QCA_HashContext *);
@@ -119,26 +119,26 @@ namespace QCA
public:
HashStatic<T>() {}
- static QByteArray hash(const QByteArray &a)
+ static TQByteArray hash(const TQByteArray &a)
{
T obj;
obj.update(a);
return obj.final();
}
- static QByteArray hash(const QCString &cs)
+ static TQByteArray hash(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return hash(a);
}
- static QString hashToString(const QByteArray &a)
+ static TQString hashToString(const TQByteArray &a)
{
return arrayToHex(hash(a));
}
- static QString hashToString(const QCString &cs)
+ static TQString hashToString(const TQCString &cs)
{
return arrayToHex(hash(cs));
}
@@ -151,14 +151,14 @@ namespace QCA
Cipher & operator=(const Cipher &);
~Cipher();
- QByteArray dyn_generateKey(int size=-1) const;
- QByteArray dyn_generateIV() const;
- void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true);
- bool update(const QByteArray &a);
- QByteArray final(bool *ok=0);
+ TQByteArray dyn_generateKey(int size=-1) const;
+ TQByteArray dyn_generateIV() const;
+ void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true);
+ bool update(const TQByteArray &a);
+ TQByteArray final(bool *ok=0);
protected:
- Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad);
+ Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad);
private:
class Private;
@@ -171,13 +171,13 @@ namespace QCA
public:
CipherStatic<T>() {}
- static QByteArray generateKey(int size=-1)
+ static TQByteArray generateKey(int size=-1)
{
T obj;
return obj.dyn_generateKey(size);
}
- static QByteArray generateIV()
+ static TQByteArray generateIV()
{
T obj;
return obj.dyn_generateIV();
@@ -205,25 +205,25 @@ namespace QCA
class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish>
{
public:
- BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES>
{
public:
- TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128>
{
public:
- AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256>
{
public:
- AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class RSA;
@@ -239,11 +239,11 @@ namespace QCA
bool havePublic() const;
bool havePrivate() const;
- QByteArray toDER(bool publicOnly=false) const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER(bool publicOnly=false) const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM(bool publicOnly=false) const;
- bool fromPEM(const QString &);
+ TQString toPEM(bool publicOnly=false) const;
+ bool fromPEM(const TQString &);
// only call if you know what you are doing
bool fromNative(void *);
@@ -254,8 +254,8 @@ namespace QCA
friend class RSA;
friend class TLS;
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
bool generate(unsigned int bits);
};
@@ -268,8 +268,8 @@ namespace QCA
RSAKey key() const;
void setKey(const RSAKey &);
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
static RSAKey generateKey(unsigned int bits);
@@ -277,7 +277,7 @@ namespace QCA
RSAKey v_key;
};
- typedef QMap<QString, QString> CertProperties;
+ typedef TQMap<TQString, TQString> CertProperties;
class QCA_EXPORT Cert
{
public:
@@ -288,20 +288,20 @@ namespace QCA
bool isNull() const;
- QString commonName() const;
- QString serialNumber() const;
- QString subjectString() const;
- QString issuerString() const;
+ TQString commonName() const;
+ TQString serialNumber() const;
+ TQString subjectString() const;
+ TQString issuerString() const;
CertProperties subject() const;
CertProperties issuer() const;
- QDateTime notBefore() const;
- QDateTime notAfter() const;
+ TQDateTime notBefore() const;
+ TQDateTime notAfter() const;
- QByteArray toDER() const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER() const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM() const;
- bool fromPEM(const QString &);
+ TQString toPEM() const;
+ bool fromPEM(const TQString &);
private:
class Private;
@@ -332,26 +332,26 @@ namespace QCA
};
enum Error { ErrHandshake, ErrCrypt };
- TLS(QObject *parent=0);
+ TLS(TQObject *parent=0);
~TLS();
void setCertificate(const Cert &cert, const RSAKey &key);
- void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist
+ void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist
void reset();
- bool startClient(const QString &host="");
+ bool startClient(const TQString &host="");
bool startServer();
void close();
bool isHandshaken() const;
// plain (application side)
- void write(const QByteArray &a);
- QByteArray read();
+ void write(const TQByteArray &a);
+ TQByteArray read();
// encoded (socket side)
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
- QByteArray readUnprocessed();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
+ TQByteArray readUnprocessed();
// cert related
const Cert & peerCertificate() const;
@@ -390,10 +390,10 @@ namespace QCA
NoUser,
RemoteUnavail
};
- SASL(QObject *parent=0);
+ SASL(TQObject *parent=0);
~SASL();
- static void setAppName(const QString &name);
+ static void setAppName(const TQString &name);
void reset();
int errorCondition() const;
@@ -409,40 +409,40 @@ namespace QCA
void setMinimumSSF(int);
void setMaximumSSF(int);
- void setExternalAuthID(const QString &authid);
+ void setExternalAuthID(const TQString &authid);
void setExternalSSF(int);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
- void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
+ void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port);
// initialize
- bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true);
- bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist);
+ bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true);
+ bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist);
// authentication
- void putStep(const QByteArray &stepData);
- void putServerFirstStep(const QString &mech);
- void putServerFirstStep(const QString &mech, const QByteArray &clientInit);
- void setUsername(const QString &user);
- void setAuthzid(const QString &auth);
- void setPassword(const QString &pass);
- void setRealm(const QString &realm);
+ void putStep(const TQByteArray &stepData);
+ void putServerFirstStep(const TQString &mech);
+ void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit);
+ void setUsername(const TQString &user);
+ void setAuthzid(const TQString &auth);
+ void setPassword(const TQString &pass);
+ void setRealm(const TQString &realm);
void continueAfterParams();
void continueAfterAuthCheck();
// security layer
int ssf() const;
- void write(const QByteArray &a);
- QByteArray read();
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
+ void write(const TQByteArray &a);
+ TQByteArray read();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
signals:
// for authentication
- void clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void nextStep(const QByteArray &stepData);
+ void clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void nextStep(const TQByteArray &stepData);
void needParams(bool user, bool authzid, bool pass, bool realm);
- void authCheck(const QString &user, const QString &authzid);
+ void authCheck(const TQString &user, const TQString &authzid);
void authenticated();
// for security layer
diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h
+++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp
index 366f2afa..0cf55684 100644
--- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include "qca.h"
@@ -35,11 +35,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent)
{
d = new Private;
d->tls = parent;
- connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(d->tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
d->state = 0;
d->err = -1;
}
@@ -65,20 +65,20 @@ void QCATLSHandler::reset()
d->state = 0;
}
-void QCATLSHandler::startClient(const QString &host)
+void QCATLSHandler::startClient(const TQString &host)
{
d->state = 0;
d->err = -1;
if(!d->tls->startClient(host))
- QTimer::singleShot(0, this, SIGNAL(fail()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(fail()));
}
-void QCATLSHandler::write(const QByteArray &a)
+void QCATLSHandler::write(const TQByteArray &a)
{
d->tls->write(a);
}
-void QCATLSHandler::writeIncoming(const QByteArray &a)
+void QCATLSHandler::writeIncoming(const TQByteArray &a)
{
d->tls->writeIncoming(a);
}
diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h
index a550d54b..e7ac398e 100644
--- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h
+++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h
@@ -20,7 +20,7 @@
#ifndef GWQCATLSHANDLER_H
#define GWQCATLSHANDLER_H
-//#include <qtimer.h>
+//#include <tqtimer.h>
#include "tlshandler.h"
class QCA::TLS;
@@ -36,9 +36,9 @@ public:
int tlsError() const;
void reset();
- void startClient(const QString &host);
- void write(const QByteArray &a);
- void writeIncoming(const QByteArray &a);
+ void startClient(const TQString &host);
+ void write(const TQByteArray &a);
+ void writeIncoming(const TQByteArray &a);
signals:
void tlsHandshaken();
diff --git a/kopete/protocols/groupwise/libgroupwise/request.cpp b/kopete/protocols/groupwise/libgroupwise/request.cpp
index 508bf6a0..5a0782f5 100644
--- a/kopete/protocols/groupwise/libgroupwise/request.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/request.cpp
@@ -17,7 +17,7 @@
#include "request.h"
-Request::Request( const int transactionId, const QString &command )
+Request::Request( const int transactionId, const TQString &command )
: UserTransfer(transactionId), m_command( command )
{
}
@@ -26,7 +26,7 @@ Request::~Request()
{
}
-QString Request::command()
+TQString Request::command()
{
return m_command;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/request.h b/kopete/protocols/groupwise/libgroupwise/request.h
index 85a55e8a..21ef71f9 100644
--- a/kopete/protocols/groupwise/libgroupwise/request.h
+++ b/kopete/protocols/groupwise/libgroupwise/request.h
@@ -30,11 +30,11 @@ friend class RequestFactory;
public:
~Request( );
- QString command();
+ TQString command();
TransferType type() { return Transfer::RequestTransfer; }
private:
- Request( const int transactionId, const QString &command );
- QString m_command;
+ Request( const int transactionId, const TQString &command );
+ TQString m_command;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp
index 6387370f..2449f3fe 100644
--- a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp
@@ -29,7 +29,7 @@ RequestFactory::~RequestFactory()
{
}
-Request* RequestFactory::request( const QString &command )
+Request* RequestFactory::request( const TQString &command )
{
return new Request( m_nextTransaction++, command );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.h b/kopete/protocols/groupwise/libgroupwise/requestfactory.h
index e4ec073e..d2de78de 100644
--- a/kopete/protocols/groupwise/libgroupwise/requestfactory.h
+++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.h
@@ -18,7 +18,7 @@
#ifndef REQUESTFACTORY_H
#define REQUESTFACTORY_H
-#include <qstring.h>
+#include <tqstring.h>
class Request;
@@ -36,7 +36,7 @@ public:
* The consumer is responsible for deleting this
* TODO: Allow the user to provide the fields for the request in this call
*/
- Request * request( const QString &request);
+ Request * request( const TQString &request);
private:
int m_nextTransaction;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/response.cpp b/kopete/protocols/groupwise/libgroupwise/response.cpp
index 837c7810..79d61a1e 100644
--- a/kopete/protocols/groupwise/libgroupwise/response.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/response.cpp
@@ -14,7 +14,7 @@
* *
*************************************************************************
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "response.h"
diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp
index 6784fd15..48ee8b88 100644
--- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp
@@ -16,13 +16,13 @@
*************************************************************************
*/
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include "response.h"
#include "responseprotocol.h"
-ResponseProtocol::ResponseProtocol(QObject* parent, const char* name): InputProtocolBase(parent, name)
+ResponseProtocol::ResponseProtocol(TQObject* parent, const char* name): InputProtocolBase(parent, name)
{
}
@@ -31,15 +31,15 @@ ResponseProtocol::~ResponseProtocol()
{
}
-Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
+Transfer * ResponseProtocol::parse( const TQByteArray & wire, uint & bytes )
{
m_bytes = 0;
m_collatingFields.clear();
- //m_din = new QDataStream( wire, IO_ReadOnly );
- QBuffer inBuf( wire );
+ //m_din = new TQDataStream( wire, IO_ReadOnly );
+ TQBuffer inBuf( wire );
inBuf.open( IO_ReadOnly);
m_din.setDevice( &inBuf );
- m_din.setByteOrder( QDataStream::LittleEndian );
+ m_din.setByteOrder( TQDataStream::LittleEndian );
// check that this begins with a HTTP (is a response)
Q_UINT32 val;
@@ -49,20 +49,20 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
Q_ASSERT( qstrncmp( (const char *)&val, "HTTP", strlen( "HTTP" ) ) == 0 );
// read rest of HTTP header and look for a 301 redirect.
- QCString headerFirst;
+ TQCString headerFirst;
if ( !readGroupWiseLine( headerFirst ) )
return 0;
// pull out the HTTP return code
int firstSpace = headerFirst.find( ' ' );
- QString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) );
+ TQString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) );
bool ok = true;
int rtnCode;
int packetState = -1;
rtnCode = rtnField.toInt( &ok );
debug( "CoreProtocol::readResponse() got HTTP return code " );
// read rest of header
- QStringList headerRest;
- QCString line;
+ TQStringList headerRest;
+ TQCString line;
while ( line != "\r\n" )
{
if ( !readGroupWiseLine( line ) )
@@ -71,7 +71,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
return 0;
}
headerRest.append( line );
- debug( QString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) );
+ debug( TQString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) );
}
debug( "ResponseProtocol::readResponse() header finished" );
// if it's a redirect, set flag
@@ -85,14 +85,14 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
// other header processing ( 500! )
if ( ok && rtnCode == 500 )
{
- debug( QString( "- server error %1" ).arg( rtnCode ) );
+ debug( TQString( "- server error %1" ).arg( rtnCode ) );
packetState = ServerError;
m_din.unsetDevice();
return 0;
}
if ( ok && rtnCode == 404 )
{
- debug( QString( "- server error %1" ).arg( rtnCode ) );
+ debug( TQString( "- server error %1" ).arg( rtnCode ) );
packetState = ServerError;
m_din.unsetDevice();
return 0;
@@ -123,7 +123,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
if ( sf )
{
tId = sf->value().toInt();
- debug( QString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) );
+ debug( TQString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) );
m_collatingFields.remove( it );
delete sf;
}
@@ -135,7 +135,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
if ( sf )
{
resultCode = sf->value().toInt();
- debug( QString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) );
+ debug( TQString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) );
m_collatingFields.remove( it );
delete sf;
}
@@ -143,7 +143,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes )
// append to inQueue
if ( tId )
{
- debug( QString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) );
+ debug( TQString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) );
packetState = Available;
bytes = m_bytes;
m_din.unsetDevice();
@@ -169,7 +169,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
// if we find the beginning of a new nested list, push the current list onto m_collatingFields
debug( "ResponseProtocol::readFields()" );
if ( fieldCount > 0 )
- debug( QString( "reading %1 fields" ).arg( fieldCount ) );
+ debug( TQString( "reading %1 fields" ).arg( fieldCount ) );
Field::FieldList currentList;
while ( fieldCount != 0 ) // prevents bad input data from ruining our day
{
@@ -177,7 +177,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
// read field
Q_UINT8 type, method;
Q_UINT32 val;
- QCString tag;
+ TQCString tag;
// read uint8 type
if ( !okToProceed() )
{
@@ -209,7 +209,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
return false;
}
- debug( QString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) );
+ debug( TQString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) );
// if multivalue or array
if ( type == NMFIELD_TYPE_MV || type == NMFIELD_TYPE_ARRAY )
{
@@ -223,7 +223,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
m_bytes += sizeof( Q_UINT32 );
// create multifield
- debug( QString( " multi field containing: %1" ).arg( val ) );
+ debug( TQString( " multi field containing: %1" ).arg( val ) );
Field::MultiField* m = new Field::MultiField( tag, method, 0, type );
currentList.append( m );
if ( !readFields( val, &currentList) )
@@ -237,7 +237,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
if ( type == NMFIELD_TYPE_UTF8 || type == NMFIELD_TYPE_DN )
{
- QCString rawData;
+ TQCString rawData;
if( !safeReadBytes( rawData, val ) )
{
currentList.purge();
@@ -249,8 +249,8 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
break;
}
// convert to unicode - ignore the terminating NUL, because Qt<3.3.2 doesn't sanity check val.
- QString fieldValue = QString::fromUtf8( rawData.data(), val - 1 );
- debug( QString( "- utf/dn single field: %1" ).arg( fieldValue ) );
+ TQString fieldValue = TQString::fromUtf8( rawData.data(), val - 1 );
+ debug( TQString( "- utf/dn single field: %1" ).arg( fieldValue ) );
// create singlefield
Field::SingleField* s = new Field::SingleField( tag, method, 0, type, fieldValue );
currentList.append( s );
@@ -266,7 +266,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
}
m_din >> val;
m_bytes += sizeof( Q_UINT32 );
- debug( QString( "- numeric field: %1" ).arg( val ) );
+ debug( TQString( "- numeric field: %1" ).arg( val ) );
Field::SingleField* s = new Field::SingleField( tag, method, 0, type, val );
currentList.append( s );
}
@@ -293,9 +293,9 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list )
return true;
}
-bool ResponseProtocol::readGroupWiseLine( QCString & line )
+bool ResponseProtocol::readGroupWiseLine( TQCString & line )
{
- line = QCString();
+ line = TQCString();
while ( true )
{
Q_UINT8 c;
@@ -304,7 +304,7 @@ bool ResponseProtocol::readGroupWiseLine( QCString & line )
return false;
m_din >> c;
m_bytes++;
- line += QChar(c);
+ line += TQChar(c);
if ( c == '\n' )
break;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h
index 5957ad19..f64aee7d 100644
--- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h
+++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h
@@ -43,7 +43,7 @@ public:
*/
enum PacketState { FieldsRead, ProtocolError };
- ResponseProtocol(QObject* parent, const char* name);
+ ResponseProtocol(TQObject* parent, const char* name);
~ResponseProtocol();
/**
* Attempt to parse the supplied data into an @ref Response object.
@@ -52,12 +52,12 @@ public:
* @param bytes An integer used to return the number of bytes read.
* @return A pointer to an Response 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 );
protected:
/**
* read a line ending in \r\n, including the \r\n
*/
- bool readGroupWiseLine( QCString & );
+ bool readGroupWiseLine( TQCString & );
/**
* Read in a response
*/
@@ -68,7 +68,7 @@ protected:
bool readFields( int fieldCount, Field::FieldList * list = 0 );
private:
// fields from a packet being parsed, before it has been completely received
- //QValueStack<Field::FieldList> m_collatingFields;
+ //TQValueStack<Field::FieldList> m_collatingFields;
Field::FieldList m_collatingFields;
int m_packetState; // represents the state of the parsing of the last incoming data received
};
diff --git a/kopete/protocols/groupwise/libgroupwise/rtf.cc b/kopete/protocols/groupwise/libgroupwise/rtf.cc
index 14a3005a..9a691ec9 100644
--- a/kopete/protocols/groupwise/libgroupwise/rtf.cc
+++ b/kopete/protocols/groupwise/libgroupwise/rtf.cc
@@ -1729,25 +1729,25 @@ void ParStyle::clearFormatting()
// dir is not a formatting item.
}
-QString RTF2HTML::quoteString(const QString &_str, quoteMode mode)
-{
- QString str = _str;
- str.replace(QRegExp("&"), "&amp;");
- str.replace(QRegExp("<"), "&lt;");
- str.replace(QRegExp(">"), "&gt;");
- str.replace(QRegExp("\""), "&quot;");
- str.replace(QRegExp("\r"), "");
+TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode)
+{
+ TQString str = _str;
+ str.replace(TQRegExp("&"), "&amp;");
+ str.replace(TQRegExp("<"), "&lt;");
+ str.replace(TQRegExp(">"), "&gt;");
+ str.replace(TQRegExp("\""), "&quot;");
+ str.replace(TQRegExp("\r"), "");
switch (mode){
case quoteHTML:
- str.replace(QRegExp("\n"), "<br>\n");
+ str.replace(TQRegExp("\n"), "<br>\n");
break;
case quoteXML:
- str.replace(QRegExp("\n"), "<br/>\n");
+ str.replace(TQRegExp("\n"), "<br/>\n");
break;
default:
break;
}
- QRegExp re(" +");
+ TQRegExp re(" +");
int len;
int pos = 0;
@@ -1756,7 +1756,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 += "&nbsp;";
str.replace(pos, len, s);
@@ -1792,7 +1792,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("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue());
}
break;
@@ -1811,7 +1811,7 @@ void RTF2HTML::FlushOutTags()
case TAG_BG_COLOR:{
if (t.param > colors.size() || t.param == 0)
break;
- QColor &c = colors[t.param-1];
+ TQColor &c = colors[t.param-1];
PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue());
break;
}
@@ -1982,7 +1982,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...)
sParagraph += buff;
}
-void RTF2HTML::PrintQuoted(const QString &str)
+void RTF2HTML::PrintQuoted(const TQString &str)
{
sParagraph += quoteString(str);
}
@@ -2214,7 +2214,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();
}
@@ -2285,7 +2285,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());
@@ -2349,7 +2349,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 = rtf_scan_string(rtf);
@@ -2417,7 +2417,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding)
break;
case UNICODE_CHAR:{
cur_level.flush();
- sParagraph += QChar((unsigned short)(atol(rtftext + 2)));
+ sParagraph += TQChar((unsigned short)(atol(rtftext + 2)));
break;
}
case HEX:{
@@ -2516,7 +2516,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))){
@@ -2524,7 +2524,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/groupwise/libgroupwise/rtf2html.h b/kopete/protocols/groupwise/libgroupwise/rtf2html.h
index a305b89d..5685e4a1 100644
--- a/kopete/protocols/groupwise/libgroupwise/rtf2html.h
+++ b/kopete/protocols/groupwise/libgroupwise/rtf2html.h
@@ -18,12 +18,12 @@
#ifndef RTF2HTML_H
#define RTF2HTML_H
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
-#include <qtextcodec.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <vector>
@@ -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<FontDef> fonts;
// Colors table.
- vector<QColor> colors;
+ vector<TQColor> colors;
// Stack of tags (across all levels, not just current level)
stack<TagEnum> tags;
diff --git a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp
index 703e8ed3..5dde3725 100644
--- a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp
@@ -19,7 +19,7 @@
#include "safedelete.h"
-#include <qtimer.h>
+#include <tqtimer.h>
//----------------------------------------------------------------------------
// 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/groupwise/libgroupwise/safedelete.h b/kopete/protocols/groupwise/libgroupwise/safedelete.h
index e8215c06..0d4150d9 100644
--- a/kopete/protocols/groupwise/libgroupwise/safedelete.h
+++ b/kopete/protocols/groupwise/libgroupwise/safedelete.h
@@ -20,8 +20,8 @@
#ifndef SAFEDELETE_H
#define SAFEDELETE_H
-#include<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
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/groupwise/libgroupwise/securestream.cpp b/kopete/protocols/groupwise/libgroupwise/securestream.cpp
index 583be03e..6898c18e 100644
--- a/kopete/protocols/groupwise/libgroupwise/securestream.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/securestream.cpp
@@ -26,9 +26,9 @@
but future layers might not.
*/
-#include<qguardedptr.h>
-#include<qvaluelist.h>
-#include<qtimer.h>
+#include<tqguardedptr.h>
+#include<tqvaluelist.h>
+#include<tqtimer.h>
#include"securestream.h"
@@ -66,7 +66,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain)
int LayerTracker::finished(int encoded)
{
int plain = 0;
- for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) {
+ for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) {
Item &i = *it;
// not enough?
@@ -91,11 +91,11 @@ SecureLayer::SecureLayer(QCA::TLS *t)
type = TLS;
p.tls = t;
init();
- connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(p.tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
}
SecureLayer::SecureLayer(QCA::SASL *s)
@@ -103,9 +103,9 @@ SecureLayer::SecureLayer(QCA::SASL *s)
type = SASL;
p.sasl = s;
init();
- connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
- connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
- connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead()));
+ connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int)));
+ connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
}
#ifdef USE_TLSHANDLER
@@ -114,11 +114,11 @@ SecureLayer::SecureLayer(TLSHandler *t)
type = TLSH;
p.tlsHandler = t;
init();
- connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success()));
- connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail()));
- connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed()));
- connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &)));
- connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int)));
+ connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success()));
+ connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail()));
+ connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed()));
+ connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &)));
+ connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int)));
}
#endif
@@ -128,7 +128,7 @@ void SecureLayer::init()
prebytes = 0;
}
-void SecureLayer::write(const QByteArray &a)
+void SecureLayer::write(const TQByteArray &a)
{
layer.addPlain(a.size());
switch(type) {
@@ -140,7 +140,7 @@ void SecureLayer::write(const QByteArray &a)
}
}
-void SecureLayer::writeIncoming(const QByteArray &a)
+void SecureLayer::writeIncoming(const TQByteArray &a)
{
switch(type) {
case TLS: { p.tls->writeIncoming(a); break; }
@@ -184,13 +184,13 @@ void SecureLayer::tls_handshaken()
void SecureLayer::tls_readyRead()
{
- QByteArray a = p.tls->read();
+ TQByteArray a = p.tls->read();
readyRead(a);
}
void SecureLayer::tls_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.tls->readOutgoing();
+ TQByteArray a = p.tls->readOutgoing();
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
@@ -198,7 +198,7 @@ void SecureLayer::tls_readyReadOutgoing(int plainBytes)
void SecureLayer::tls_closed()
{
- QByteArray a = p.tls->readUnprocessed();
+ TQByteArray a = p.tls->readUnprocessed();
tlsClosed(a);
}
@@ -209,13 +209,13 @@ void SecureLayer::tls_error(int x)
void SecureLayer::sasl_readyRead()
{
- QByteArray a = p.sasl->read();
+ TQByteArray a = p.sasl->read();
readyRead(a);
}
void SecureLayer::sasl_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.sasl->readOutgoing();
+ TQByteArray a = p.sasl->readOutgoing();
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
}
@@ -239,15 +239,15 @@ void SecureLayer::tlsHandler_fail()
void SecureLayer::tlsHandler_closed()
{
- tlsClosed(QByteArray());
+ tlsClosed(TQByteArray());
}
-void SecureLayer::tlsHandler_readyRead(const QByteArray &a)
+void SecureLayer::tlsHandler_readyRead(const TQByteArray &a)
{
readyRead(a);
}
-void SecureLayer::tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes)
+void SecureLayer::tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes)
{
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
@@ -259,7 +259,7 @@ class SecureStream::Private
{
public:
ByteStream *bs;
- QPtrList<SecureLayer> layers;
+ TQPtrList<SecureLayer> layers;
int pending;
int errorCode;
bool active;
@@ -267,7 +267,7 @@ public:
bool haveTLS() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::TLS
#ifdef USE_TLSHANDLER
@@ -282,7 +282,7 @@ public:
bool haveSASL() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::SASL)
return true;
@@ -297,8 +297,8 @@ SecureStream::SecureStream(ByteStream *s)
d = new Private;
d->bs = s;
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
d->layers.setAutoDelete(true);
d->pending = 0;
@@ -311,25 +311,25 @@ SecureStream::~SecureStream()
delete d;
}
-void SecureStream::linkLayer(QObject *s)
+void SecureStream::linkLayer(TQObject *s)
{
- connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken()));
- connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &)));
- connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &)));
- connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &)));
- connect(s, SIGNAL(error(int)), SLOT(layer_error(int)));
+ connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken()));
+ connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int)));
}
int SecureStream::calcPrebytes() const
{
int x = 0;
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
x += s->prebytes;
return (d->pending - x);
}
-void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -343,7 +343,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -357,7 +357,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
+void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveSASL())
return;
@@ -371,7 +371,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
}
#ifdef USE_TLSHANDLER
-void SecureStream::startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare)
+void SecureStream::startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -408,7 +408,7 @@ bool SecureStream::isOpen() const
return d->active;
}
-void SecureStream::write(const QByteArray &a)
+void SecureStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -430,7 +430,7 @@ int SecureStream::bytesToWrite() const
void SecureStream::bs_readyRead()
{
- QByteArray a = d->bs->read();
+ TQByteArray a = d->bs->read();
// send to the first layer
SecureLayer *s = d->layers.getFirst();
@@ -442,7 +442,7 @@ void SecureStream::bs_readyRead()
void SecureStream::bs_bytesWritten(int bytes)
{
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
bytes = s->finished(bytes);
@@ -458,17 +458,17 @@ void SecureStream::layer_tlsHandshaken()
tlsHandshaken();
}
-void SecureStream::layer_tlsClosed(const QByteArray &)
+void SecureStream::layer_tlsClosed(const TQByteArray &)
{
d->active = false;
d->layers.clear();
tlsClosed();
}
-void SecureStream::layer_readyRead(const QByteArray &a)
+void SecureStream::layer_readyRead(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -481,10 +481,10 @@ void SecureStream::layer_readyRead(const QByteArray &a)
incomingData(a);
}
-void SecureStream::layer_needWrite(const QByteArray &a)
+void SecureStream::layer_needWrite(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -514,7 +514,7 @@ void SecureStream::layer_error(int x)
#endif
}
-void SecureStream::insertData(const QByteArray &a)
+void SecureStream::insertData(const TQByteArray &a)
{
if(!a.isEmpty()) {
SecureLayer *s = d->layers.getLast();
@@ -525,12 +525,12 @@ void SecureStream::insertData(const QByteArray &a)
}
}
-void SecureStream::writeRawData(const QByteArray &a)
+void SecureStream::writeRawData(const TQByteArray &a)
{
d->bs->write(a);
}
-void SecureStream::incomingData(const QByteArray &a)
+void SecureStream::incomingData(const TQByteArray &a)
{
appendRead(a);
//qDebug( "SecureStream::incomingData() got %i bytes ", a.size() );
diff --git a/kopete/protocols/groupwise/libgroupwise/securestream.h b/kopete/protocols/groupwise/libgroupwise/securestream.h
index 36999b14..82752cea 100644
--- a/kopete/protocols/groupwise/libgroupwise/securestream.h
+++ b/kopete/protocols/groupwise/libgroupwise/securestream.h
@@ -39,11 +39,11 @@ public:
SecureStream(ByteStream *s);
~SecureStream();
- void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray());
+ void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray());
#ifdef USE_TLSHANDLER
- void startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray());
+ void startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray());
#endif
void closeTLS();
@@ -51,7 +51,7 @@ public:
// reimplemented
bool isOpen() const;
- void write(const QByteArray &);
+ void write(const TQByteArray &);
int bytesToWrite() const;
signals:
@@ -63,17 +63,17 @@ private slots:
void bs_bytesWritten(int);
void layer_tlsHandshaken();
- void layer_tlsClosed(const QByteArray &);
- void layer_readyRead(const QByteArray &);
- void layer_needWrite(const QByteArray &);
+ void layer_tlsClosed(const TQByteArray &);
+ void layer_readyRead(const TQByteArray &);
+ void layer_needWrite(const TQByteArray &);
void layer_error(int);
private:
- void linkLayer(QObject *);
+ void linkLayer(TQObject *);
int calcPrebytes() const;
- void insertData(const QByteArray &a);
- void writeRawData(const QByteArray &a);
- void incomingData(const QByteArray &a);
+ void insertData(const TQByteArray &a);
+ void writeRawData(const TQByteArray &a);
+ void incomingData(const TQByteArray &a);
class Private;
Private *d;
@@ -96,7 +96,7 @@ USE_TLSHANDLER
int finished(int encoded);
int p;
- QValueList<Item> list;
+ TQValueList<Item> list;
};
@@ -110,8 +110,8 @@ public:
SecureLayer(TLSHandler *t);
#endif
void init();
- void write(const QByteArray &a);
- void writeIncoming(const QByteArray &a);
+ void write(const TQByteArray &a);
+ void writeIncoming(const TQByteArray &a);
int finished(int plain);
enum { TLS, SASL, TLSH };
@@ -129,9 +129,9 @@ public:
signals:
void tlsHandshaken();
- void tlsClosed(const QByteArray &);
- void readyRead(const QByteArray &);
- void needWrite(const QByteArray &);
+ void tlsClosed(const TQByteArray &);
+ void readyRead(const TQByteArray &);
+ void needWrite(const TQByteArray &);
void error(int);
private slots:
@@ -147,8 +147,8 @@ private slots:
void tlsHandler_success();
void tlsHandler_fail();
void tlsHandler_closed();
- void tlsHandler_readyRead(const QByteArray &a);
- void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes);
+ void tlsHandler_readyRead(const TQByteArray &a);
+ void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes);
#endif
};
diff --git a/kopete/protocols/groupwise/libgroupwise/stream.cpp b/kopete/protocols/groupwise/libgroupwise/stream.cpp
index 5817f4c3..d3410578 100644
--- a/kopete/protocols/groupwise/libgroupwise/stream.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/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/groupwise/libgroupwise/stream.h b/kopete/protocols/groupwise/libgroupwise/stream.h
index 37a63652..c06649fd 100644
--- a/kopete/protocols/groupwise/libgroupwise/stream.h
+++ b/kopete/protocols/groupwise/libgroupwise/stream.h
@@ -17,8 +17,8 @@
*************************************************************************
*/
-#include <qdom.h>
-#include "qobject.h"
+#include <tqdom.h>
+#include "tqobject.h"
#include "gwerror.h"
#include "gwfield.h"
@@ -45,13 +45,13 @@ 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 QDomElement errorAppSpec() const=0;
+ virtual TQString errorText() const=0;
+ //virtual TQDomElement errorAppSpec() const=0;
/**
* Are there any messages waiting to be read
@@ -71,15 +71,15 @@ public:
// # virtual Stanza read()=0;
// # virtual void write(const Stanza &s)=0;
-// # virtual QDomDocument & doc() const=0;
-// # virtual QString baseNS() const=0;
+// # virtual TQDomDocument & doc() const=0;
+// # virtual TQString baseNS() const=0;
// # virtual bool old() const=0;
-// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id="");
-// # Stanza createStanza(const QDomElement &e);
+// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id="");
+// # Stanza createStanza(const TQDomElement &e);
-// static QString xmlToString(const static XmlProtocol *foo = 0;
-//QDomElement &e, bool clip=false);
+// static TQString xmlToString(const static XmlProtocol *foo = 0;
+//TQDomElement &e, bool clip=false);
signals:
void connectionClosed();
diff --git a/kopete/protocols/groupwise/libgroupwise/task.cpp b/kopete/protocols/groupwise/libgroupwise/task.cpp
index 786bf36b..96259254 100644
--- a/kopete/protocols/groupwise/libgroupwise/task.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/task.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include "client.h"
#include "gwfield.h"
@@ -31,10 +31,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;
@@ -42,22 +42,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()
@@ -79,7 +79,7 @@ void Task::init()
Task *Task::parent() const
{
- return (Task *)QObject::parent();
+ return (Task *)TQObject::parent();
}
Client *Task::client() const
@@ -97,7 +97,7 @@ void Task::setTransfer( Transfer * transfer )
d->transfer = transfer;
}
-QString Task::id() const
+TQString Task::id() const
{
return d->id;
}
@@ -112,7 +112,7 @@ int Task::statusCode() const
return d->statusCode;
}
-const QString & Task::statusString() const
+const TQString & Task::statusString() const
{
return d->statusString;
}
@@ -126,15 +126,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;
@@ -142,7 +142,7 @@ bool Task::take( Transfer * transfer)
if(t->take( transfer ))
{
- client()->debug( QString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) );
+ client()->debug( TQString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) );
return true;
}
}
@@ -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( Request * 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;
@@ -232,7 +232,7 @@ void Task::clientDisconnected()
// void Task::debug(const char *fmt, ...)
// {
// char *buf;
-// QString str;
+// TQString str;
// int size = 1024;
// int r;
//
@@ -244,7 +244,7 @@ void Task::clientDisconnected()
// va_end(ap);
//
// if(r != -1)
-// str = QString(buf);
+// str = TQString(buf);
//
// delete [] buf;
//
@@ -254,9 +254,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/groupwise/libgroupwise/task.h b/kopete/protocols/groupwise/libgroupwise/task.h
index 0a34cafa..b0b623d2 100644
--- a/kopete/protocols/groupwise/libgroupwise/task.h
+++ b/kopete/protocols/groupwise/libgroupwise/task.h
@@ -20,7 +20,7 @@
#ifndef GW_TASK_H
#define GW_TASK_H
-#include <qobject.h>
+#include <tqobject.h>
#include "gwerror.h"
#include "gwfield.h"
@@ -42,11 +42,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 );
/**
@@ -63,13 +63,13 @@ protected:
virtual void onGo();
virtual void onDisconnect();
void send( Request * request );
- void setSuccess( int code=0, const QString &str="" );
+ void setSuccess( int code=0, const TQString &str="" );
/**
* If an empty string is passed, this sets the error string based on the error code using GroupWise::errorCodeToString
*/
- void setError( int code=0, const QString &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.
@@ -78,7 +78,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/groupwise/libgroupwise/tasks/chatcountstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp
index 9e9837f7..fb028c44 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qmap.h>
+#include <tqmap.h>
#include <kdebug.h>
#include "gwfield.h"
@@ -65,7 +65,7 @@ bool ChatCountsTask::take( Transfer * transfer )
{
Field::MultiField * mf = static_cast<Field::MultiField *>( *it );
Field::FieldList chat = mf->fields();
- QString roomName;
+ TQString roomName;
int participants;
// read the supplied fields, set metadata and status.
Field::SingleField * sf;
@@ -79,7 +79,7 @@ bool ChatCountsTask::take( Transfer * transfer )
return true;
}
-QMap< QString, int > ChatCountsTask::results()
+TQMap< TQString, int > ChatCountsTask::results()
{
return m_results;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h
index c80a219a..6197352d 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h
@@ -19,7 +19,7 @@
#ifndef CHATCOUNTSTASK_H
#define CHATCOUNTSTASK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "gwerror.h"
#include "gwfield.h"
@@ -41,9 +41,9 @@ class ChatCountsTask : public RequestTask
/**
* Contains a list of all the chatrooms that have participants on the server. If a chatroom exists but is empty, this task does not return a result, so update the participants count to 0.
*/
- QMap< QString, int > results();
+ TQMap< TQString, int > results();
private:
- QMap< QString, int > m_results;
+ TQMap< TQString, int > m_results;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp
index 66b2da42..7f60f3c5 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp
@@ -34,7 +34,7 @@ ChatPropertiesTask::~ChatPropertiesTask()
{
}
-void ChatPropertiesTask::setChat( const QString &displayName )
+void ChatPropertiesTask::setChat( const TQString &displayName )
{
Field::FieldList lst;
m_chat = displayName;
@@ -131,7 +131,7 @@ bool ChatPropertiesTask::take( Transfer * transfer )
return true;
}
-QValueList< ChatContact > ChatPropertiesTask::aclEntries()
+TQValueList< ChatContact > ChatPropertiesTask::aclEntries()
{
return m_aclEntries;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h
index c9f890dd..d52661f3 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h
@@ -19,8 +19,8 @@
#ifndef CHATPROPERTIESTASK_H
#define CHATPROPERTIESTASK_H
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include "gwchatrooms.h"
#include "gwerror.h"
#include "gwfield.h"
@@ -41,24 +41,24 @@ class ChatPropertiesTask : public RequestTask
/**
* Specify which chatroom to get properties for
*/
- void setChat( const QString & );
+ void setChat( const TQString & );
bool take( Transfer * transfer );
/**
* Contains a list of the ACL entries for the specified chatroom
*/
- QValueList< GroupWise::ChatContact > aclEntries();
- QString m_chat;
- QString m_ownerDn;
- QString m_description;
- QString m_disclaimer;
- QString m_query;
- QString m_archive;
- QString m_maxUsers;
- QString m_topic;
- QString m_creatorDn;
- QDateTime m_creationTime;
+ TQValueList< GroupWise::ChatContact > aclEntries();
+ TQString m_chat;
+ TQString m_ownerDn;
+ TQString m_description;
+ TQString m_disclaimer;
+ TQString m_query;
+ TQString m_archive;
+ TQString m_maxUsers;
+ TQString m_topic;
+ TQString m_creatorDn;
+ TQDateTime m_creationTime;
uint m_rights;
- QValueList< GroupWise::ChatContact > m_aclEntries;
+ TQValueList< GroupWise::ChatContact > m_aclEntries;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp
index 9773a622..c88e22b4 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp
@@ -42,8 +42,8 @@ ConferenceTask::ConferenceTask( Task* parent )
registerEvent( GroupWise::ReceivedSystemBroadcast );
// listen to the UserDetailsManager telling us that user details are available
- connect( client()->userDetailsManager(), SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ),
- SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) );
+ connect( client()->userDetailsManager(), TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ),
+ TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) );
}
@@ -53,10 +53,10 @@ ConferenceTask::~ConferenceTask()
void ConferenceTask::dumpConferenceEvent( ConferenceEvent & evt )
{
- client()->debug( QString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg
+ client()->debug( TQString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg
( evt.guid ).arg( evt.user.ascii() ).arg( evt.timeStamp.time().hour() ).arg
( evt.timeStamp.time().minute() ).arg( evt.timeStamp.time().second() ) );
- client()->debug( QString( " flags: %1" ).arg( evt.flags, 8 ) );
+ client()->debug( TQString( " flags: %1" ).arg( evt.flags, 8 ) );
}
bool ConferenceTask::take( Transfer * transfer )
@@ -103,7 +103,7 @@ bool ConferenceTask::take( Transfer * transfer )
Q_ASSERT( incomingEvent->hasMessage() );
event.message = incomingEvent->message();
client()->debug( "ReceiveMessage" );
- client()->debug( QString( "message: %1" ).arg( event.message ) );
+ client()->debug( TQString( "message: %1" ).arg( event.message ) );
if ( !queueWhileAwaitingData( event ) )
emit message( event );
break;
@@ -119,7 +119,7 @@ bool ConferenceTask::take( Transfer * transfer )
Q_ASSERT( incomingEvent->hasMessage() );
event.message = incomingEvent->message();
client()->debug( "ConferenceInvite" );
- client()->debug( QString( "message: %1" ).arg( event.message ) );
+ client()->debug( TQString( "message: %1" ).arg( event.message ) );
if ( !queueWhileAwaitingData( event ) )
emit invited( event );
break;
@@ -139,14 +139,14 @@ bool ConferenceTask::take( Transfer * transfer )
Q_ASSERT( incomingEvent->hasMessage() );
event.message = incomingEvent->message();
client()->debug( "ReceiveAutoReply" );
- client()->debug( QString( "message: %1" ).arg( event.message.ascii() ) );
+ client()->debug( TQString( "message: %1" ).arg( event.message.ascii() ) );
emit autoReply( event );
break;
case GroupWise::ReceivedBroadcast:
Q_ASSERT( incomingEvent->hasMessage() );
event.message = incomingEvent->message();
client()->debug( "ReceivedBroadCast" );
- client()->debug( QString( "message: %1" ).arg( event.message ) );
+ client()->debug( TQString( "message: %1" ).arg( event.message ) );
if ( !queueWhileAwaitingData( event ) )
emit broadcast( event );
break;
@@ -154,11 +154,11 @@ bool ConferenceTask::take( Transfer * transfer )
Q_ASSERT( incomingEvent->hasMessage() );
event.message = incomingEvent->message();
client()->debug( "ReceivedSystemBroadCast" );
- client()->debug( QString( "message: %1" ).arg( event.message ) );
+ client()->debug( TQString( "message: %1" ).arg( event.message ) );
emit systemBroadcast( event );
break;
default:
- client()->debug( QString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) );
+ client()->debug( TQString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) );
}
dumpConferenceEvent( event );
@@ -172,16 +172,16 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d
client()->debug( "ConferenceTask::slotReceiveUserDetails()" );
// dequeue any events which are deliverable now we have these details
- QValueListIterator< ConferenceEvent > end = m_pendingEvents.end();
- QValueListIterator< ConferenceEvent > it = m_pendingEvents.begin();
+ TQValueListIterator< ConferenceEvent > end = m_pendingEvents.end();
+ TQValueListIterator< ConferenceEvent > it = m_pendingEvents.begin();
while ( it != end )
{
- QValueListIterator< ConferenceEvent > current = it;
+ TQValueListIterator< ConferenceEvent > current = it;
++it;
// if the details relate to event, try again to handle it
if ( details.dn == (*current).user )
{
- client()->debug( QString( " - got details for event involving %1" ).arg( (*current).user ) );
+ client()->debug( TQString( " - got details for event involving %1" ).arg( (*current).user ) );
switch ( (*current).type )
{
case GroupWise::ConferenceJoined:
@@ -204,7 +204,7 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d
client()->debug( "Queued an event while waiting for more data, but didn't write a handler for the dequeue!" );
}
m_pendingEvents.remove( current );
- client()->debug( QString( "Event handled - now %1 pending events" ).arg
+ client()->debug( TQString( "Event handled - now %1 pending events" ).arg
( (uint)m_pendingEvents.count() ) );
}
}
@@ -220,7 +220,7 @@ bool ConferenceTask::queueWhileAwaitingData( const ConferenceEvent & event )
}
else
{
- client()->debug( QString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) );
+ client()->debug( TQString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) );
client()->userDetailsManager()->requestDetails( event.user );
m_pendingEvents.append( event );
return true;
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h
index 42f4fc2b..7f35d08b 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h
@@ -57,8 +57,8 @@ signals:
protected slots:
void slotReceiveUserDetails( const GroupWise::ContactDetails & );
protected:
- Q_UINT32 readFlags( QDataStream & din );
- QString readMessage( QDataStream & din );
+ Q_UINT32 readFlags( TQDataStream & din );
+ TQString readMessage( TQDataStream & din );
/**
* Checks to see if we need more data from the client before we can propagate this event
* and queues the event if so
@@ -68,7 +68,7 @@ protected:
void dumpConferenceEvent( ConferenceEvent & evt );
private:
// A list of events which are waiting for more data from the server before they can be exposed to the client
- QValueList< ConferenceEvent > m_pendingEvents;
+ TQValueList< ConferenceEvent > m_pendingEvents;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp
index 8be16888..01d2fa05 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp
@@ -33,7 +33,7 @@ CreateConferenceTask::~CreateConferenceTask()
{
}
-void CreateConferenceTask::conference( const int confId, const QStringList &participants )
+void CreateConferenceTask::conference( const int confId, const TQStringList &participants )
{
m_confId = confId;
Field::FieldList lst, tmp;
@@ -41,8 +41,8 @@ void CreateConferenceTask::conference( const int confId, const QStringList &part
tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_guid ) );
lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) );
// series of participants (may be empty )
- QValueListConstIterator<QString> end = participants.end();
- for ( QValueListConstIterator<QString> it = participants.begin(); it != end; ++it )
+ TQValueListConstIterator<TQString> end = participants.end();
+ for ( TQValueListConstIterator<TQString> it = participants.begin(); it != end; ++it )
lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) );
lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, client()->userDN() ) );
createTransfer( "createconf", lst );
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h
index 48d5702e..de66f734 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h
@@ -39,7 +39,7 @@ public:
* @param confId The client-unique conference Id.
* @param participants A list of Novell DNs of the people taking part in the conference.
*/
- void conference( const int confId, const QStringList &participants );
+ void conference( const int confId, const TQStringList &participants );
bool take( Transfer * transfer );
int clientConfId() const;
GroupWise::ConferenceGuid conferenceGUID() const;
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp
index 832b5900..d41db4a9 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp
@@ -24,19 +24,19 @@
CreateContactInstanceTask::CreateContactInstanceTask(Task* parent) : NeedFolderTask(parent)
{
// make the client tell the client app (Kopete) when we receive a contact
- connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) );
+ connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) );
}
CreateContactInstanceTask::~CreateContactInstanceTask()
{
}
-void CreateContactInstanceTask::contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder )
+void CreateContactInstanceTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder )
{
contact( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, userId ), displayName, parentFolder );
}
-void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName )
+void CreateContactInstanceTask::contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName )
{
// record the user details
m_userId = userId;
@@ -46,12 +46,12 @@ void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & user
m_folderDisplayName = folderDisplayName;
}
-void CreateContactInstanceTask::contactFromDN( const QString & dn, const QString & displayName, const int parentFolder )
+void CreateContactInstanceTask::contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder )
{
contact( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, dn ), displayName, parentFolder );
}
-void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName )
+void CreateContactInstanceTask::contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName )
{
// record the user details
m_dn = dn;
@@ -61,10 +61,10 @@ void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, cons
m_folderDisplayName = folderDisplayName;
}
-void CreateContactInstanceTask::contact( Field::SingleField * id, const QString & displayName, const int parentFolder )
+void CreateContactInstanceTask::contact( Field::SingleField * id, const TQString & displayName, const int parentFolder )
{
Field::FieldList lst;
- lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) );
// this is either a user Id or a DN
lst.append( id );
if ( displayName.isEmpty() ) // fallback so that the contact is created
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h
index d6be5933..6c960a4c 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h
@@ -37,18 +37,18 @@ public:
/**
* Sets up the request message.
*/
- void contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder );
- void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder );
- void contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName );
- void contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName );
+ void contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder );
+ void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder );
+ void contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName );
+ void contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName );
void onGo();
protected:
- void contact( Field::SingleField * id, const QString & displayName, const int parentFolder );
+ void contact( Field::SingleField * id, const TQString & displayName, const int parentFolder );
void onFolderCreated();
private:
- QString m_userId;
- QString m_dn;
- QString m_displayName;
+ TQString m_userId;
+ TQString m_dn;
+ TQString m_displayName;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp
index aac16042..0d167236 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp
@@ -32,17 +32,17 @@ CreateContactTask::~CreateContactTask()
{
}
-QString CreateContactTask::userId()
+TQString CreateContactTask::userId()
{
return m_userId;
}
-QString CreateContactTask::dn()
+TQString CreateContactTask::dn()
{
return m_dn;
}
-QString CreateContactTask::displayName()
+TQString CreateContactTask::displayName()
{
return m_displayName;
}
@@ -53,7 +53,7 @@ bool CreateContactTask::take( Transfer * transfer )
return false;
}
-void CreateContactTask::contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel )
+void CreateContactTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel )
{
m_userId = userId;
m_displayName = displayName;
@@ -65,19 +65,19 @@ void CreateContactTask::contactFromUserId( const QString & userId, const QString
void CreateContactTask::onGo()
{
client()->debug( "CreateContactTask::onGo() - Welcome to the Create Contact Task Show!");
- QValueList<FolderItem>::ConstIterator it = m_folders.begin();
- const QValueList<FolderItem>::ConstIterator end = m_folders.end();
+ TQValueList<FolderItem>::ConstIterator it = m_folders.begin();
+ const TQValueList<FolderItem>::ConstIterator end = m_folders.end();
// create contacts on the server
for ( ; it != end; ++it )
{
- client()->debug( QString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) );
+ client()->debug( TQString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) );
CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() );
// the add contact action may cause other contacts' sequence numbers to change
// CreateContactInstanceTask signals these changes, so we propagate the signal via the Client, to the GroupWiseAccount
// This updates our local versions of those contacts using the same mechanism by which they are updated at login.
- connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) );
- connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) );
+ connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) );
+ connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) );
if ( (*it).id == 0 ) // caller asserts that this isn't on the server...
{
ccit->contactFromDNAndFolder( m_userId, m_displayName, m_firstSequenceNumber++, ( *it ).name );
@@ -92,8 +92,8 @@ void CreateContactTask::onGo()
{
client()->debug( " - contact is in top level folder " );
CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() );
- connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) );
- connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) );
+ connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) );
+ connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) );
ccit->contactFromDN( m_userId, m_displayName, 0 );
ccit->go( true );
}
@@ -112,7 +112,7 @@ void CreateContactTask::slotContactAdded( const ContactItem & addedContact )
client()->debug( " - addedContact is not the one we were trying to add, ignoring it ( Account will update it )" );
return;
}
- client()->debug( QString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg
+ client()->debug( TQString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg
( addedContact.displayName ).arg( addedContact.id ).arg( addedContact.parentId ) );
if ( m_dn.isEmpty() )
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h
index a9e4ab06..2a46a51c 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h
@@ -21,7 +21,7 @@
#ifndef CREATECONTACTTASK_H
#define CREATECONTACTTASK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "gwerror.h"
@@ -48,12 +48,12 @@ public:
/**
* Get the userId of the contact just created
*/
- QString userId();
+ TQString userId();
/**
* Get the DN of the contact just created
*/
- QString dn();
- QString displayName();
+ TQString dn();
+ TQString displayName();
/**
* Sets up the task.
@@ -63,8 +63,8 @@ public:
* @param folders A list of folders that the contact should belong to - any folders that do not exist on the server should have a objectId of 0, and will be created
* @param topLevel is the folder also in the top level folder?
*/
- void contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel );
- //void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder );
+ void contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel );
+ //void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder );
/**
* This task doesn't do any I/O itself, so this take prints an error and returns false;
*/
@@ -78,10 +78,10 @@ protected slots:
void slotCheckContactInstanceCreated();
private:
int m_firstSequenceNumber;
- QString m_userId;
- QString m_dn;
- QString m_displayName;
- QValueList< FolderItem > m_folders;
+ TQString m_userId;
+ TQString m_dn;
+ TQString m_displayName;
+ TQValueList< FolderItem > m_folders;
bool m_topLevel;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp
index c7e9933b..c6e6a78a 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp
@@ -29,12 +29,12 @@ CreateFolderTask::~CreateFolderTask()
{
}
-void CreateFolderTask::folder( const int parentId, const int sequence, const QString & displayName )
+void CreateFolderTask::folder( const int parentId, const int sequence, const TQString & displayName )
{
Field::FieldList lst;
- lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentId ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentId ) ) );
lst.append( new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, displayName ) );
- lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, QString::number( sequence ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, TQString::number( sequence ) ) );
createTransfer( "createfolder", lst );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h
index f3c6ebb9..cac19900 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h
@@ -34,7 +34,7 @@ Q_OBJECT
public:
CreateFolderTask(Task* parent);
~CreateFolderTask();
- void folder( const int parentId, const int sequence, const QString & displayName );
+ void folder( const int parentId, const int sequence, const TQString & displayName );
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp
index 89480d10..04ce1fb4 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp
@@ -37,9 +37,9 @@ void DeleteItemTask::item( const int parentFolder, const int objectId )
return;
}
Field::FieldList lst;
- lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) );
// this is either a user Id or a DN
- lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( objectId ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( objectId ) ) );
createTransfer( "deletecontact", lst );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h
index 50b84ac5..609728a4 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h
@@ -21,7 +21,7 @@
#ifndef GW_EVENTTASK_H
#define GW_EVENTTASK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "eventtransfer.h"
#include "task.h"
@@ -37,7 +37,7 @@ Q_OBJECT
bool forMe( Transfer * transfer, EventTransfer *& event ) const;
void registerEvent( GroupWise::Event e );
private:
- QValueList<int> m_eventCodes;
+ TQValueList<int> m_eventCodes;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp
index fe1d61f9..8104ec24 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp
@@ -92,7 +92,7 @@ bool GetChatSearchResultsTask::take( Transfer * transfer )
return true;
}
-QValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results()
+TQValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results()
{
return m_results;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h
index 31db19ed..e85c1e74 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h
@@ -21,7 +21,7 @@
#ifndef CHATSEARCHRESULTSTASK_H
#define CHATSEARCHRESULTSTASK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "gwchatrooms.h"
@@ -42,11 +42,11 @@ class GetChatSearchResultsTask : public RequestTask
void poll( int queryHandle);
bool take( Transfer * transfer );
int queryStatus();
- QValueList< GroupWise::ChatroomSearchResult > results();
+ TQValueList< GroupWise::ChatroomSearchResult > results();
private:
GroupWise::ChatroomSearchResult extractChatDetails( Field::FieldList & fields );
SearchResultCode m_queryStatus;
- QValueList< GroupWise::ChatroomSearchResult > m_results;
+ TQValueList< GroupWise::ChatroomSearchResult > m_results;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp
index 0b37efb4..61753d84 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp
@@ -36,10 +36,10 @@ GetDetailsTask::~GetDetailsTask()
{
}
-void GetDetailsTask::userDNs( const QStringList & userDNs )
+void GetDetailsTask::userDNs( const TQStringList & userDNs )
{
Field::FieldList lst;
- for ( QStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it )
+ for ( TQStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it )
{
lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, *it ) );
}
@@ -97,7 +97,7 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details )
if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) )
cd.awayMessage = sf->value().toString();
Field::MultiField * mf;
- QMap< QString, QString > propMap;
+ TQMap< TQString, TQString > propMap;
if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) )
{
Field::FieldList fl = mf->fields();
@@ -106,8 +106,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details )
{
Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it );
if ( propField ) {
- QString propName = propField->tag();
- QString propValue = propField->value().toString();
+ TQString propName = propField->tag();
+ TQString propValue = propField->value().toString();
propMap.insert( propName, propValue );
} else {
Field::MultiField * mf2;
@@ -118,8 +118,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details )
{
propField = dynamic_cast<Field::SingleField *>( *it2 );
if ( propField ) {
- QString propName = propField->tag();
- QString propValue = propField->value().toString();
+ TQString propName = propField->tag();
+ TQString propValue = propField->value().toString();
propMap.insert( propName, propValue );
}
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h
index d263f50b..747b494f 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h
@@ -38,7 +38,7 @@ public:
GetDetailsTask( Task * parent );
~GetDetailsTask();
bool take( Transfer * transfer );
- void userDNs( const QStringList & userDNs );
+ void userDNs( const TQStringList & userDNs );
signals:
void gotContactUserDetails( const GroupWise::ContactDetails & );
protected:
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp
index dde055a6..153746ea 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp
@@ -30,7 +30,7 @@ GetStatusTask::~GetStatusTask()
{
}
-void GetStatusTask::userDN( const QString & dn )
+void GetStatusTask::userDN( const TQString & dn )
{
m_userDN = dn;
// set up Transfer
@@ -60,8 +60,8 @@ bool GetStatusTask::take( Transfer * transfer )
// This must be because the sender is not on our contact list but has sent us a message.
// TODO: Check that the change to sending DNs above has fixed this problem.
status = sf->value().toInt();
- // unfortunately getstatus doesn't give us an away message so we pass QString::null here
- emit gotStatus( m_userDN, status, QString::null );
+ // unfortunately getstatus doesn't give us an away message so we pass TQString::null here
+ emit gotStatus( m_userDN, status, TQString::null );
setSuccess();
}
else
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h
index 59422342..6294f053 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h
@@ -33,12 +33,12 @@ Q_OBJECT
public:
GetStatusTask(Task* parent);
~GetStatusTask();
- void userDN( const QString & dn );
+ void userDN( const TQString & dn );
bool take( Transfer * transfer );
signals:
- void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText );
+ void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText );
private:
- QString m_userDN;
+ TQString m_userDN;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp
index 4e9e4f57..a14d6eec 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp
@@ -33,7 +33,7 @@ JoinChatTask::~JoinChatTask()
{
}
-void JoinChatTask::join( const QString & displayName )
+void JoinChatTask::join( const TQString & displayName )
{
m_displayName = displayName;
Field::FieldList lst, tmp;
@@ -67,7 +67,7 @@ bool JoinChatTask::take( Transfer * transfer )
if ( contact )
{
// HACK: lowercased DN
- QString dn = contact->value().toString().lower();
+ TQString dn = contact->value().toString().lower();
m_participants.append( dn );
// need to ask for details for these contacts
}
@@ -91,7 +91,7 @@ bool JoinChatTask::take( Transfer * transfer )
if ( contact )
{
// HACK: lowercased DN
- QString dn = contact->value().toString().lower();
+ TQString dn = contact->value().toString().lower();
m_invitees.append( dn );
// need to ask for details for these contacts
if ( !client()->userDetailsManager()->known( dn ) )
@@ -113,17 +113,17 @@ bool JoinChatTask::take( Transfer * transfer )
return false;
}
-QStringList JoinChatTask::participants() const
+TQStringList JoinChatTask::participants() const
{
return m_participants;
}
-QStringList JoinChatTask::invitees() const
+TQStringList JoinChatTask::invitees() const
{
return m_invitees;
}
-QString JoinChatTask::displayName() const
+TQString JoinChatTask::displayName() const
{
return m_displayName;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h
index a7cc4119..9d6babe5 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h
@@ -37,16 +37,16 @@ class JoinChatTask : public RequestTask
public:
JoinChatTask(Task* parent);
~JoinChatTask();
- void join( const QString & displayName );
+ void join( const TQString & displayName );
bool take( Transfer * transfer );
- QStringList participants() const;
- QStringList invitees() const;
- QString displayName() const;
+ TQStringList participants() const;
+ TQStringList invitees() const;
+ TQString displayName() const;
private:
ConferenceGuid m_displayName;
- QStringList m_participants;
- QStringList m_invitees;
- QStringList m_unknowns;
+ TQStringList m_participants;
+ TQStringList m_invitees;
+ TQStringList m_unknowns;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp
index c2cf0f02..b7b1f1cc 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp
@@ -67,7 +67,7 @@ bool JoinConferenceTask::take( Transfer * transfer )
if ( contact )
{
// HACK: lowercased DN
- QString dn = contact->value().toString().lower();
+ TQString dn = contact->value().toString().lower();
m_participants.append( dn );
// need to ask for details for these contacts
if ( !client()->userDetailsManager()->known( dn ) )
@@ -93,7 +93,7 @@ bool JoinConferenceTask::take( Transfer * transfer )
if ( contact )
{
// HACK: lowercased DN
- QString dn = contact->value().toString().lower();
+ TQString dn = contact->value().toString().lower();
m_invitees.append( dn );
// need to ask for details for these contacts
if ( !client()->userDetailsManager()->known( dn ) )
@@ -113,8 +113,8 @@ bool JoinConferenceTask::take( Transfer * transfer )
{
client()->debug( "JoinConferenceTask::slotReceiveUserDetails(), requesting details" );
connect( client()->userDetailsManager(),
- SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ),
- SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) );
+ TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ),
+ TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) );
client()->userDetailsManager()->requestDetails( m_unknowns );
}
}
@@ -128,14 +128,14 @@ bool JoinConferenceTask::take( Transfer * transfer )
void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details )
{
- client()->debug( QString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) );
- QStringList::Iterator it = m_unknowns.begin();
- QStringList::Iterator end = m_unknowns.end();
+ client()->debug( TQString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) );
+ TQStringList::Iterator it = m_unknowns.begin();
+ TQStringList::Iterator end = m_unknowns.end();
while( it != end )
{
- QString current = *it;
+ TQString current = *it;
++it;
- client()->debug( QString( " - can we remove %1?" ).arg(current ) );
+ client()->debug( TQString( " - can we remove %1?" ).arg(current ) );
if ( current == details.dn )
{
client()->debug( " - it's gone!" );
@@ -143,7 +143,7 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details
break;
}
}
- client()->debug( QString( " - now %1 unknowns").arg( m_unknowns.count() ) );
+ client()->debug( TQString( " - now %1 unknowns").arg( m_unknowns.count() ) );
if ( m_unknowns.empty() )
{
client()->debug( " - finished()" );
@@ -157,12 +157,12 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details
// }
}
-QStringList JoinConferenceTask::participants() const
+TQStringList JoinConferenceTask::participants() const
{
return m_participants;
}
-QStringList JoinConferenceTask::invitees() const
+TQStringList JoinConferenceTask::invitees() const
{
return m_invitees;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h
index 68316147..d95e5084 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h
@@ -39,16 +39,16 @@ public:
~JoinConferenceTask();
void join( const ConferenceGuid & guid );
bool take( Transfer * transfer );
- QStringList participants() const;
- QStringList invitees() const;
+ TQStringList participants() const;
+ TQStringList invitees() const;
ConferenceGuid guid() const;
public slots:
void slotReceiveUserDetails( const GroupWise::ContactDetails & details );
private:
ConferenceGuid m_guid;
- QStringList m_participants;
- QStringList m_invitees;
- QStringList m_unknowns;
+ TQStringList m_participants;
+ TQStringList m_invitees;
+ TQStringList m_unknowns;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp
index 1f679a6c..6a28124f 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp
@@ -36,7 +36,7 @@ LoginTask::~LoginTask()
void LoginTask::initialise()
{
- QString command = QString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() );
+ TQString command = TQString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() );
Field::FieldList lst;
lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, client()->userId() ) );
@@ -123,7 +123,7 @@ void LoginTask::extractFolder( Field::MultiField * folderContainer )
current = fl.findSingleField( NM_A_SZ_PARENT_ID );
folder.parentId = current->value().toInt();
- client()->debug( QString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) );
+ client()->debug( TQString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) );
// tell the world about it
emit gotFolder( folder );
}
@@ -186,7 +186,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields )
if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) )
cd.awayMessage = sf->value().toString();
Field::MultiField * mf;
- QMap< QString, QString > propMap;
+ TQMap< TQString, TQString > propMap;
if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) )
{
Field::FieldList fl = mf->fields();
@@ -196,8 +196,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields )
Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it );
if ( propField )
{
- QString propName = propField->tag();
- QString propValue = propField->value().toString();
+ TQString propName = propField->tag();
+ TQString propValue = propField->value().toString();
propMap.insert( propName, propValue );
}
else
@@ -206,7 +206,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields )
if ( propList )
{
// Hello A Nagappan. GW gave us a multiple field where we previously got a single field
- QString parentName = propList->tag();
+ TQString parentName = propList->tag();
Field::FieldList propFields = propList->fields();
const Field::FieldListIterator end = propFields.end();
for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it )
@@ -214,8 +214,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields )
propField = dynamic_cast<Field::SingleField *>( *it );
if ( propField /*&& propField->tag() == parentName */)
{
- QString propValue = propField->value().toString();
- QString contents = propMap[ propField->tag() ];
+ TQString propValue = propField->value().toString();
+ TQString contents = propMap[ propField->tag() ];
if ( !contents.isEmpty() )
contents.append( ", " );
contents.append( propField->value().toString());
@@ -237,8 +237,8 @@ void LoginTask::extractPrivacy( Field::FieldList & fields )
{
bool privacyLocked = false;
bool defaultDeny = false;
- QStringList allowList;
- QStringList denyList;
+ TQStringList allowList;
+ TQStringList denyList;
// read blocking
// may be a single field or may be an array
Field::FieldListIterator it = fields.find( NM_A_LOCKED_ATTR_LIST );
@@ -280,9 +280,9 @@ void LoginTask::extractPrivacy( Field::FieldList & fields )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "locked is " << privacyLocked << ", default is " << defaultDeny << "\nallow list is: " << allowList << "\ndeny list is: " << denyList << endl;
}
-QStringList LoginTask::readPrivacyItems( const QCString & tag, Field::FieldList & fields )
+TQStringList LoginTask::readPrivacyItems( const TQCString & tag, Field::FieldList & fields )
{
- QStringList items;
+ TQStringList items;
Field::FieldListIterator it = fields.find( tag );
if ( it != fields.end() )
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h
index 0b2acdfd..3d745bf9 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h
@@ -48,7 +48,7 @@ protected:
void extractContact( Field::MultiField * contactContainer );
ContactDetails extractUserDetails( Field::FieldList & fields );
void extractPrivacy( Field::FieldList & fields );
- QStringList readPrivacyItems( const QCString & tag, Field::FieldList & fields );
+ TQStringList readPrivacyItems( const TQCString & tag, Field::FieldList & fields );
void extractCustomStatuses( Field::FieldList & fields );
void extractKeepalivePeriod( Field::FieldList & fields );
signals:
@@ -56,7 +56,7 @@ signals:
void gotFolder( const FolderItem & );
void gotContact( const ContactItem & );
void gotContactUserDetails( const GroupWise::ContactDetails & );
- void gotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList );
+ void gotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList );
void gotCustomStatus( const GroupWise::CustomStatus & );
void gotKeepalivePeriod( int );
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp
index 713315ee..4a24f44f 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp
@@ -25,7 +25,7 @@
MoveContactTask::MoveContactTask(Task* parent): NeedFolderTask(parent)
{
// make the client tell the client app (Kopete) when we receive a contact
- connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) );
+ connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) );
}
@@ -52,11 +52,11 @@ void MoveContactTask::moveContact( const ContactItem & contact, const int newPar
lst.append( new Field::MultiField( NM_A_FA_CONTACT_LIST, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, contactList ) );
lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, "-1" ) );
- lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( newParent ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( newParent ) ) );
createTransfer( "movecontact", lst );
}
-void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName )
+void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName )
{
client()->debug("MoveContactTask::moveContactToNewFolder()" );
m_folderSequence = newSequenceNumber;
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h
index f423981a..ad3bce44 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h
@@ -35,14 +35,14 @@ public:
MoveContactTask(Task* parent);
~MoveContactTask();
void moveContact( const ContactItem & contact, const int newParent );
- void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName );
+ void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName );
void onGo();
protected:
void onFolderCreated();
private:
int m_targetFolder;
- QString m_dn;
- QString m_displayName;
+ TQString m_dn;
+ TQString m_displayName;
ContactItem m_contactToMove;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp
index 810326ee..12c7382a 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp
@@ -27,9 +27,9 @@ void NeedFolderTask::createFolder()
{
CreateFolderTask * cct = new CreateFolderTask( client()->rootTask() );
cct->folder( 0, m_folderSequence, m_folderDisplayName );
- connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), SIGNAL( folderReceived( const FolderItem & ) ) );
- connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), SLOT( slotFolderAdded( const FolderItem & ) ) );
- connect( cct, SIGNAL( finished() ), SLOT( slotFolderTaskFinished() ) );
+ connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), TQT_SIGNAL( folderReceived( const FolderItem & ) ) );
+ connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), TQT_SLOT( slotFolderAdded( const FolderItem & ) ) );
+ connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotFolderTaskFinished() ) );
cct->go( true );
}
@@ -38,7 +38,7 @@ void NeedFolderTask::slotFolderAdded( const FolderItem & addedFolder )
// if this is the folder we were trying to create
if ( m_folderDisplayName == addedFolder.name )
{
- client()->debug( QString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) );
+ client()->debug( TQString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) );
m_folderId = addedFolder.id;
}
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h
index 8d6278df..d1ad1a1e 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h
@@ -33,7 +33,7 @@ protected slots:
protected:
int m_folderSequence;
int m_folderId;
- QString m_folderDisplayName;
+ TQString m_folderDisplayName;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp
index 772a0888..d65a5a20 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp
@@ -36,7 +36,7 @@ PollSearchResultsTask::~PollSearchResultsTask()
{
}
-void PollSearchResultsTask::poll( const QString & queryHandle )
+void PollSearchResultsTask::poll( const TQString & queryHandle )
{
Field::FieldList lst;
lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, queryHandle ) );
@@ -97,7 +97,7 @@ bool PollSearchResultsTask::take( Transfer * transfer )
return true;
}
-QValueList< GroupWise::ContactDetails > PollSearchResultsTask::results()
+TQValueList< GroupWise::ContactDetails > PollSearchResultsTask::results()
{
return m_results;
}
@@ -133,7 +133,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel
if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) )
cd.awayMessage = sf->value().toString();
Field::MultiField * mf;
- QMap< QString, QString > propMap;
+ TQMap< TQString, TQString > propMap;
if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) )
{
Field::FieldList fl = mf->fields();
@@ -146,8 +146,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel
Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it );
if ( propField )
{
- QString propName = propField->tag();
- QString propValue = propField->value().toString();
+ TQString propName = propField->tag();
+ TQString propValue = propField->value().toString();
propMap.insert( propName, propValue );
}
else
@@ -155,7 +155,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel
Field::MultiField * propList = dynamic_cast<Field::MultiField*>( *it );
if ( propList )
{
- QString parentName = propList->tag();
+ TQString parentName = propList->tag();
Field::FieldList propFields = propList->fields();
const Field::FieldListIterator end = propFields.end();
for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it )
@@ -163,8 +163,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel
propField = dynamic_cast<Field::SingleField *>( *it );
if ( propField )
{
- QString propValue = propField->value().toString();
- QString contents = propMap[ propField->tag() ];
+ TQString propValue = propField->value().toString();
+ TQString contents = propMap[ propField->tag() ];
if ( !contents.isEmpty() )
contents.append( ", " );
contents.append( propField->value().toString());
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h
index 11f810c0..c03f75bb 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h
@@ -21,7 +21,7 @@
#ifndef POLLSEARCHRESULTSTASK_H
#define POLLSEARCHRESULTSTASK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "gwerror.h"
@@ -39,14 +39,14 @@ public:
enum SearchResultCode { Pending=0, InProgess=1, Completed=2, TimeOut=3, Cancelled=4, Error=5 };
PollSearchResultsTask(Task* parent);
~PollSearchResultsTask();
- void poll( const QString & queryHandle);
+ void poll( const TQString & queryHandle);
bool take( Transfer * transfer );
int queryStatus();
- QValueList< GroupWise::ContactDetails > results();
+ TQValueList< GroupWise::ContactDetails > results();
GroupWise::ContactDetails extractUserDetails( Field::FieldList & fields );
private:
int m_queryStatus;
- QValueList< GroupWise::ContactDetails > m_results;
+ TQValueList< GroupWise::ContactDetails > m_results;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp
index 003a6d60..508b3306 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp
@@ -28,7 +28,7 @@ PrivacyItemTask::~PrivacyItemTask()
{
}
-QString PrivacyItemTask::dn() const
+TQString PrivacyItemTask::dn() const
{
return m_dn;
}
@@ -38,7 +38,7 @@ bool PrivacyItemTask::defaultDeny() const
return m_default;
}
-void PrivacyItemTask::allow( const QString & dn )
+void PrivacyItemTask::allow( const TQString & dn )
{
m_dn = dn;
Field::FieldList lst;
@@ -46,7 +46,7 @@ void PrivacyItemTask::allow( const QString & dn )
createTransfer( "createblock", lst );
}
-void PrivacyItemTask::deny( const QString & dn )
+void PrivacyItemTask::deny( const TQString & dn )
{
m_dn = dn;
Field::FieldList lst;
@@ -54,7 +54,7 @@ void PrivacyItemTask::deny( const QString & dn )
createTransfer( "createblock", lst );
}
-void PrivacyItemTask::removeAllow( const QString & dn )
+void PrivacyItemTask::removeAllow( const TQString & dn )
{
m_dn = dn;
Field::FieldList lst;
@@ -63,7 +63,7 @@ void PrivacyItemTask::removeAllow( const QString & dn )
}
-void PrivacyItemTask::removeDeny( const QString & dn )
+void PrivacyItemTask::removeDeny( const TQString & dn )
{
m_dn = dn;
Field::FieldList lst;
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h
index 809cb7a4..401dc765 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h
@@ -34,17 +34,17 @@ Q_OBJECT
public:
PrivacyItemTask( Task* parent);
~PrivacyItemTask();
- void allow( const QString & dn );
- void deny( const QString & dn );
- void removeAllow( const QString & dn );
- void removeDeny( const QString & dn );
+ void allow( const TQString & dn );
+ void deny( const TQString & dn );
+ void removeAllow( const TQString & dn );
+ void removeDeny( const TQString & dn );
void defaultPolicy( bool defaultDeny );
- QString dn() const;
+ TQString dn() const;
bool defaultDeny() const;
- // void contacts( const QStringList & contacts );
+ // void contacts( const TQStringList & contacts );
private:
bool m_default;
- QString m_dn;
+ TQString m_dn;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp
index 3788bb6e..44f54124 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp
@@ -38,7 +38,7 @@ bool RequestTask::forMe( Transfer * transfer ) const
return (theResponse && theResponse->transactionId() == m_transactionId );
}
-void RequestTask::createTransfer( const QString & command, const Field::FieldList & fields )
+void RequestTask::createTransfer( const TQString & command, const Field::FieldList & fields )
{
Request * request = client()->requestFactory()->request( command );
m_transactionId = request->transactionId();
@@ -50,7 +50,7 @@ void RequestTask::onGo()
{
if ( transfer() )
{
- client()->debug( QString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) );
+ client()->debug( TQString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) );
send( static_cast<Request *>( transfer() ) );
}
else
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h
index 30ee57ed..71101fab 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h
@@ -34,7 +34,7 @@ Q_OBJECT
virtual void onGo();
protected:
bool forMe( Transfer * transfer ) const;
- void createTransfer( const QString & command, const Field::FieldList & fields );
+ void createTransfer( const TQString & command, const Field::FieldList & fields );
private:
int m_transactionId;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp
index 4ee35549..87694eb4 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp
@@ -18,8 +18,8 @@
*************************************************************************
*/
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include "client.h"
#include "gwerror.h"
@@ -75,7 +75,7 @@ bool SearchChatTask::take( Transfer * transfer )
m_objectId = sf->value().toInt();
// now start the results poll timer
- QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) );
+ TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) );
return true;
}
@@ -84,7 +84,7 @@ void SearchChatTask::slotPollForResults()
//create a PollSearchResultsTask
GetChatSearchResultsTask * gcsrt = new GetChatSearchResultsTask( client()->rootTask() );
gcsrt->poll( m_objectId );
- connect( gcsrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) );
+ connect( gcsrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) );
gcsrt->go( true );
}
@@ -97,14 +97,14 @@ void SearchChatTask::slotGotPollResults()
{
case GetChatSearchResultsTask::GettingData:
if ( m_polls < GW_POLL_MAXIMUM ) // restart timer
- QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) );
+ TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) );
else
setSuccess( gcsrt->statusCode() );
break;
case GetChatSearchResultsTask::DataRetrieved:
// got some results, there may be more.
m_results += gcsrt->results();
- QTimer::singleShot( 0, this, SLOT( slotPollForResults() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPollForResults() ) );
break;
case GetChatSearchResultsTask::Completed:
m_results += gcsrt->results();
@@ -119,7 +119,7 @@ void SearchChatTask::slotGotPollResults()
}
}
-QValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results()
+TQValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results()
{
return m_results;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h
index 2f24e075..fe8df7f4 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h
@@ -52,13 +52,13 @@ class SearchChatTask : public RequestTask
/**
* Access the results of the search
*/
- QValueList< GroupWise::ChatroomSearchResult > results();
+ TQValueList< GroupWise::ChatroomSearchResult > results();
protected slots:
void slotPollForResults();
void slotGotPollResults();
private:
- QTimer * m_resultsPollTimer;
- QValueList< GroupWise::ChatroomSearchResult > m_results;
+ TQTimer * m_resultsPollTimer;
+ TQValueList< GroupWise::ChatroomSearchResult > m_results;
int m_polls;
int m_objectId; // used to identify our query to the server, so we can poll for its results
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp
index cd199ad8..1b64c47d 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp
@@ -18,8 +18,8 @@
*************************************************************************
*/
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include "client.h"
#include "gwerror.h"
@@ -48,9 +48,9 @@ SearchUserTask::~SearchUserTask()
{
}
-void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query )
+void SearchUserTask::search( const TQValueList<UserSearchQueryTerm> & query )
{
- m_queryHandle = QString::number( QDateTime::currentDateTime().toTime_t () );
+ m_queryHandle = TQString::number( TQDateTime::currentDateTime().toTime_t () );
Field::FieldList lst;
if ( query.isEmpty() )
{
@@ -59,8 +59,8 @@ void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query )
}
// object Id identifies the search for later reference
lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_queryHandle ) );
- QValueList<UserSearchQueryTerm>::ConstIterator it = query.begin();
- const QValueList<UserSearchQueryTerm>::ConstIterator end = query.end();
+ TQValueList<UserSearchQueryTerm>::ConstIterator it = query.begin();
+ const TQValueList<UserSearchQueryTerm>::ConstIterator end = query.end();
for ( ; it != end; ++it )
{
Field::SingleField * fld = new Field::SingleField( (*it).field.ascii(), (*it).operation, 0, NMFIELD_TYPE_UTF8, (*it).argument );
@@ -86,7 +86,7 @@ bool SearchUserTask::take( Transfer * transfer )
return true;
}
// now start the results poll timer
- QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) );
+ TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) );
return true;
}
@@ -95,7 +95,7 @@ void SearchUserTask::slotPollForResults()
//create a PollSearchResultsTask
PollSearchResultsTask * psrt = new PollSearchResultsTask( client()->rootTask() );
psrt->poll( m_queryHandle );
- connect( psrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) );
+ connect( psrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) );
psrt->go( true );
}
@@ -109,7 +109,7 @@ void SearchUserTask::slotGotPollResults()
case PollSearchResultsTask::Pending:
case PollSearchResultsTask::InProgess:
if ( m_polls < GW_POLL_MAXIMUM ) // restart timer
- QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) );
+ TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) );
else
setSuccess( psrt->statusCode() );
break;
@@ -129,7 +129,7 @@ void SearchUserTask::slotGotPollResults()
}
}
-QValueList< GroupWise::ContactDetails > SearchUserTask::results()
+TQValueList< GroupWise::ContactDetails > SearchUserTask::results()
{
return m_results;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h
index 28c09b02..e99a1236 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h
@@ -41,7 +41,7 @@ public:
* Create the search query
* @param query a list of search terms
*/
- void search( const QValueList<GroupWise::UserSearchQueryTerm> & query);
+ void search( const TQValueList<GroupWise::UserSearchQueryTerm> & query);
/**
* If the query was accepted, start a timer to poll for results using PollSearchResultsTask
*/
@@ -49,14 +49,14 @@ public:
/**
* Access the results of the search
*/
- QValueList< GroupWise::ContactDetails > results();
+ TQValueList< GroupWise::ContactDetails > results();
protected slots:
void slotPollForResults();
void slotGotPollResults();
private:
- QString m_queryHandle; // used to identify our query to the server, so we can poll for its results
- QTimer * m_resultsPollTimer;
- QValueList< GroupWise::ContactDetails > m_results;
+ TQString m_queryHandle; // used to identify our query to the server, so we can poll for its results
+ TQTimer * m_resultsPollTimer;
+ TQValueList< GroupWise::ContactDetails > m_results;
int m_polls;
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp
index b3a9614f..9fa7d65e 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp
@@ -28,13 +28,13 @@ SendInviteTask::~SendInviteTask()
{
}
-void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg)
+void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg)
{
Field::FieldList lst, tmp;
tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, guid ) );
lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) );
- QValueListConstIterator<QString> end = invitees.end();
- for ( QValueListConstIterator<QString> it = invitees.begin(); it != end; ++it )
+ TQValueListConstIterator<TQString> end = invitees.end();
+ for ( TQValueListConstIterator<TQString> it = invitees.begin(); it != end; ++it )
lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) );
if ( !msg.message.isEmpty() )
lst.append( new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, msg.message ) );
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h
index c8cf1d9b..b08c7259 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h
@@ -35,9 +35,9 @@ class SendInviteTask : public RequestTask
public:
SendInviteTask(Task* parent);
~SendInviteTask();
- void invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg );
+ void invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg );
private:
- QString m_confId;
+ TQString m_confId;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp
index 290b9d9b..fdf1173f 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp
@@ -29,7 +29,7 @@ SendMessageTask::~SendMessageTask()
{
}
-void SendMessageTask::message( const QStringList & recipientDNList, const OutgoingMessage & msg )
+void SendMessageTask::message( const TQStringList & recipientDNList, const OutgoingMessage & msg )
{
// Assumes the conference is instantiated, unlike Gaim's nm_send_message
Field::FieldList lst, tmp, msgBodies;
@@ -44,8 +44,8 @@ void SendMessageTask::message( const QStringList & recipientDNList, const Outgoi
// list containing message bodies
lst.append( new Field::MultiField( NM_A_FA_MESSAGE, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, msgBodies ) );
// series of participants (may be empty )
- QValueListConstIterator<QString> end = recipientDNList.end();
- for ( QValueListConstIterator<QString> it = recipientDNList.begin(); it != end; ++it )
+ TQValueListConstIterator<TQString> end = recipientDNList.end();
+ for ( TQValueListConstIterator<TQString> it = recipientDNList.begin(); it != end; ++it )
lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) );
createTransfer( "sendmessage", lst );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h
index f45e491f..44559e15 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h
@@ -35,7 +35,7 @@ public:
SendMessageTask(Task* parent);
~SendMessageTask();
- void message( const QStringList & recipientDNList, const OutgoingMessage & msg );
+ void message( const TQStringList & recipientDNList, const OutgoingMessage & msg );
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp
index 0744ff8a..bf463407 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp
@@ -30,7 +30,7 @@ SetStatusTask::~SetStatusTask()
{
}
-void SetStatusTask::status( Status newStatus, const QString &awayMessage, const QString &autoReply )
+void SetStatusTask::status( Status newStatus, const TQString &awayMessage, const TQString &autoReply )
{
if ( newStatus > GroupWise::Invalid )
{
@@ -43,7 +43,7 @@ void SetStatusTask::status( Status newStatus, const QString &awayMessage, const
m_autoReply = autoReply;
Field::FieldList lst;
- lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, QString::number( newStatus ) ) );
+ lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, TQString::number( newStatus ) ) );
if ( !awayMessage.isNull() )
lst.append( new Field::SingleField( NM_A_SZ_STATUS_TEXT, 0, NMFIELD_TYPE_UTF8, awayMessage ) );
if ( !autoReply.isNull() )
@@ -56,12 +56,12 @@ Status SetStatusTask::requestedStatus() const
return m_status;
}
-QString SetStatusTask::awayMessage() const
+TQString SetStatusTask::awayMessage() const
{
return m_awayMessage;
}
-QString SetStatusTask::autoReply() const
+TQString SetStatusTask::autoReply() const
{
return m_autoReply;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h
index 2d3c53d7..4e41e681 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h
@@ -33,14 +33,14 @@ Q_OBJECT
public:
SetStatusTask(Task* parent);
~SetStatusTask();
- void status( GroupWise::Status newStatus, const QString &awayMessage, const QString &autoReply );
+ void status( GroupWise::Status newStatus, const TQString &awayMessage, const TQString &autoReply );
GroupWise::Status requestedStatus() const;
- QString awayMessage() const;
- QString autoReply() const;
+ TQString awayMessage() const;
+ TQString autoReply() const;
private:
GroupWise::Status m_status;
- QString m_awayMessage;
- QString m_autoReply;
+ TQString m_awayMessage;
+ TQString m_autoReply;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp
index 8f8eccd4..e7272402 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp
@@ -37,7 +37,7 @@ bool StatusTask::take( Transfer * transfer )
if ( forMe( transfer, event ) )
{
client()->debug( "Got a status change!" );
- client()->debug( QString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) );
+ client()->debug( TQString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) );
emit gotStatus( event->source().lower(), event->status(), event->statusText() );
return true;
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h
index 8e4994ff..2a57cd04 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h
@@ -34,7 +34,7 @@ public:
~StatusTask();
bool take( Transfer * transfer );
signals:
- void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText );
+ void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText );
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp
index b835c525..2a421752 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp
@@ -36,7 +36,7 @@ void TypingTask::typing( const GroupWise::ConferenceGuid & conferenceGuid, const
Field::FieldList typingNotification, outgoingList;
typingNotification.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, conferenceGuid ) );
typingNotification.append( new Field::SingleField( NM_A_SZ_TYPE, 0, NMFIELD_TYPE_UTF8,
- QString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) );
+ TQString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) );
outgoingList.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, typingNotification ) );
createTransfer( "sendtyping", outgoingList );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp
index d8c1a68a..aa75441d 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp
@@ -33,18 +33,18 @@ UpdateContactTask::~UpdateContactTask()
{
}
-QString UpdateContactTask::displayName()
+TQString UpdateContactTask::displayName()
{
return m_name;
}
-void UpdateContactTask::renameContact( const QString & newName, const QValueList<ContactItem> & contactInstances )
+void UpdateContactTask::renameContact( const TQString & newName, const TQValueList<ContactItem> & contactInstances )
{
m_name = newName;
// build a list of delete, add fields that removes each instance on the server and then readds it with the new name
Field::FieldList lst;
- const QValueList<ContactItem>::ConstIterator end = contactInstances.end();
- for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it )
+ const TQValueList<ContactItem>::ConstIterator end = contactInstances.end();
+ for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it )
{
Field::FieldList contactFields;
contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) );
@@ -57,7 +57,7 @@ void UpdateContactTask::renameContact( const QString & newName, const QValueList
lst.append(
new Field::MultiField( NM_A_FA_CONTACT, NMFIELD_METHOD_DELETE, 0, NMFIELD_TYPE_ARRAY, contactFields ) );
}
- for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it )
+ for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it )
{
Field::FieldList contactFields;
contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) );
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h
index 7e6ac899..4126658e 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h
@@ -35,10 +35,10 @@ Q_OBJECT
public:
UpdateContactTask(Task* parent);
~UpdateContactTask();
- void renameContact( const QString& newName, const QValueList<GroupWise::ContactItem> & contactInstances );
- QString displayName();
+ void renameContact( const TQString& newName, const TQValueList<GroupWise::ContactItem> & contactInstances );
+ TQString displayName();
private:
- QString m_name;
+ TQString m_name;
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp
index fef5d2fe..3f8ff7bf 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp
@@ -29,7 +29,7 @@ UpdateFolderTask::~UpdateFolderTask()
{
}
-void UpdateFolderTask::renameFolder( const QString & newName, const GroupWise::FolderItem & existing )
+void UpdateFolderTask::renameFolder( const TQString & newName, const GroupWise::FolderItem & existing )
{
Field::FieldList lst;
// add the old version of the folder, marked delete
diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h
index 230bd563..479a6bdd 100644
--- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h
+++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h
@@ -34,7 +34,7 @@ Q_OBJECT
public:
UpdateFolderTask(Task* parent);
~UpdateFolderTask();
- void renameFolder( const QString & newName, const GroupWise::FolderItem & existing );
+ void renameFolder( const TQString & newName, const GroupWise::FolderItem & existing );
protected:
Field::FieldList folderToFields( const GroupWise::FolderItem & folder );
};
diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp
index bbd10ee8..4272d956 100644
--- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp
@@ -1,6 +1,6 @@
#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 );
@@ -12,15 +12,15 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc,
myTLSHandler = new QCATLSHandler( myTLS );
myTestObject = new ClientStream( myConnector, myTLSHandler, 0);
// notify when the transport layer is connected
- connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) );
+ connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) );
// it's necessary to catch this signal and tell the TLS handler to proceed, even if we don't check cert validity
- connect( myTLSHandler, SIGNAL(tlsHandshaken()), SLOT(slotTLSHandshaken()) );
+ connect( myTLSHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(slotTLSHandshaken()) );
// notify and start sending
- connect( myTestObject, SIGNAL( securityLayerActivated(int) ), SLOT( slotSend(int) ) );
- connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) );
+ connect( myTestObject, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotSend(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() ) );
}
ClientStreamTest::~ClientStreamTest()
@@ -58,7 +58,7 @@ void ClientStreamTest::slotsend(int layer)
// we're not connecting...
qDebug( "sending request" );
// send a request
- QCString command("login");
+ TQCString command("login");
Request * firstRequest = testFactory.request( command );
Field::FieldList lst;
lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, "maeuschen" ) );
diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h
index 2c77f4e1..fcd540fc 100644
--- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h
+++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h
@@ -13,9 +13,9 @@
#ifndef clientstream_test_h
#define clientstream_test_h
-#include <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include "gwclientstream.h"
#include "gwconnector.h"
diff --git a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp
index d1de6084..cb8b292e 100644
--- a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp
@@ -20,7 +20,7 @@ int main()
{
CoreProtocol testObject;
RequestFactory testFactory;
- QCString command("login");
+ TQCString command("login");
Request * firstRequest = testFactory.request( command );
Field::FieldList lst;
lst.append( new Field::SingleField( NM_A_SZ_USERID, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_UTF8, "blah@fasel.org" ) );
diff --git a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp
index eec3f1f2..2dace60b 100644
--- a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp
@@ -62,15 +62,15 @@ void buildList()
// sf - contactlist (empty field array)
// sf - message body
- Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) );
+ Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) );
fl.append( sf );
- sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "maeuschen" ) );
+ sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "maeuschen" ) );
fl.append( sf );
// nested list
Field::FieldList nl;
sf = new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UDWORD, 123 );
nl.append( sf );
- sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "bla bla" ) );
+ sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "bla bla" ) );
nl.append( sf );
Field::MultiField* mf = new Field::MultiField( NM_A_FA_PARTICIPANTS, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY );
mf->setFields( nl );
@@ -91,7 +91,7 @@ void buildFakeContactList()
for ( int i = 0; i < 6; i ++ )
{
FieldList contact;
- Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) );
+ Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) );
contact.append( sf );
sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] );
contact.append( sf );
@@ -102,7 +102,7 @@ void buildFakeContactList()
// add a folder
{
FieldList folder;
- Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( 1 ) );
+ Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( 1 ) );
folder.append( sf );
sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, "buddies" );
folder.append( sf );
@@ -115,7 +115,7 @@ void buildFakeContactList()
for ( int i = 0; i < 3; i ++ )
{
FieldList contact;
- Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) );
+ Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) );
contact.append( sf );
sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] );
contact.append( sf );
diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp
index 290dba36..16527bba 100644
--- a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp
@@ -19,8 +19,8 @@
#include "tlshandler.h"
-TLSHandler::TLSHandler(QObject *parent)
-:QObject(parent)
+TLSHandler::TLSHandler(TQObject *parent)
+:TQObject(parent)
{
}
diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.h b/kopete/protocols/groupwise/libgroupwise/tlshandler.h
index 61c8fe7d..ede9d4e3 100644
--- a/kopete/protocols/groupwise/libgroupwise/tlshandler.h
+++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.h
@@ -20,32 +20,32 @@
#ifndef GWTLSHANDLER_H
#define GWTLSHANDLER_H
-#include <qobject.h>
-//#include<qstring.h>
-//#include<qhostaddress.h>
-//#include<qstring.h>
-//#include<qcstring.h>
-//#include<qxml.h>
-//#include<qdom.h>
+#include <tqobject.h>
+//#include<tqstring.h>
+//#include<tqhostaddress.h>
+//#include<tqstring.h>
+//#include<tqcstring.h>
+//#include<tqxml.h>
+//#include<tqdom.h>
class TLSHandler : public QObject
{
Q_OBJECT
public:
- TLSHandler(QObject *parent=0);
+ TLSHandler(TQObject *parent=0);
virtual ~TLSHandler();
virtual void reset()=0;
- virtual void startClient(const QString &host)=0;
- virtual void write(const QByteArray &a)=0;
- virtual void writeIncoming(const QByteArray &a)=0;
+ virtual void startClient(const TQString &host)=0;
+ virtual void write(const TQByteArray &a)=0;
+ virtual void writeIncoming(const TQByteArray &a)=0;
signals:
void success();
void fail();
void closed();
- void readyRead(const QByteArray &a);
- void readyReadOutgoing(const QByteArray &a, int plainBytes);
+ void readyRead(const TQByteArray &a);
+ void readyReadOutgoing(const TQByteArray &a, int plainBytes);
};
#endif
diff --git a/kopete/protocols/groupwise/libgroupwise/transfer.cpp b/kopete/protocols/groupwise/libgroupwise/transfer.cpp
index 366deed0..68eb97b3 100644
--- a/kopete/protocols/groupwise/libgroupwise/transfer.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/transfer.cpp
@@ -14,7 +14,7 @@
* *
*************************************************************************
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "transfer.h"
diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp
index 2527968e..ceb29632 100644
--- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp
+++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp
@@ -21,7 +21,7 @@
#include "userdetailsmanager.h"
UserDetailsManager::UserDetailsManager( Client * parent, const char *name)
- : QObject(parent, name), m_client( parent )
+ : TQObject(parent, name), m_client( parent )
{
}
@@ -29,30 +29,30 @@ UserDetailsManager::~UserDetailsManager()
{
}
-void UserDetailsManager::dump( const QStringList & list )
+void UserDetailsManager::dump( const TQStringList & list )
{
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
- m_client->debug( QString( " - %1" ).arg (*it) );
+ m_client->debug( TQString( " - %1" ).arg (*it) );
}
}
-bool UserDetailsManager::known( const QString & dn )
+bool UserDetailsManager::known( const TQString & dn )
{
if ( dn == m_client->userDN() )
return true;
// TODO: replace with m_detailsMap.contains( dn );
- QStringList::Iterator found = m_detailsMap.keys().find( dn );
+ TQStringList::Iterator found = m_detailsMap.keys().find( dn );
// we always know the local user's details, so don't look them up
return ( found !=m_detailsMap.keys().end() );
}
-ContactDetails UserDetailsManager::details( const QString & dn )
+ContactDetails UserDetailsManager::details( const TQString & dn )
{
return m_detailsMap[ dn ];
}
-QStringList UserDetailsManager::knownDNs()
+TQStringList UserDetailsManager::knownDNs()
{
return m_detailsMap.keys();
}
@@ -61,23 +61,23 @@ void UserDetailsManager::addDetails( const ContactDetails & details )
{
//qDebug( "UserDetailsManager::addContact, got %s, we now know: ", details.dn.ascii() );
m_detailsMap.insert( details.dn, details );
-/* QStringList keys = m_detailsMap.keys();
+/* TQStringList keys = m_detailsMap.keys();
dump( keys );
qDebug( "UserDetailsManager::addContact, pending: " );
dump( m_pendingDNs );*/
}
-void UserDetailsManager::removeContact( const QString & dn )
+void UserDetailsManager::removeContact( const TQString & dn )
{
m_detailsMap.remove( dn );
}
-void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUnknown )
+void UserDetailsManager::requestDetails( const TQStringList & dnList, bool onlyUnknown )
{
// build a list of DNs that are not already subject to a pending request
- QStringList requestList;
- QValueListConstIterator<QString> end = dnList.end();
- for ( QValueListConstIterator<QString> it = dnList.begin(); it != end; ++it )
+ TQStringList requestList;
+ TQValueListConstIterator<TQString> end = dnList.end();
+ for ( TQValueListConstIterator<TQString> it = dnList.begin(); it != end; ++it )
{
// don't request our own details
if ( *it == m_client->userDN() )
@@ -85,10 +85,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn
// don't request details we already have unless the caller specified this
if ( onlyUnknown && known( *it ) )
break;
- QStringList::Iterator found = m_pendingDNs.find( *it );
+ TQStringList::Iterator found = m_pendingDNs.find( *it );
if ( found == m_pendingDNs.end() )
{
- m_client->debug( QString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) );
+ m_client->debug( TQString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) );
requestList.append( *it );
m_pendingDNs.append( *it );
}
@@ -97,8 +97,8 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn
{
GetDetailsTask * gdt = new GetDetailsTask( m_client->rootTask() );
gdt->userDNs( requestList );
- connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
- SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) );
+ connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ),
+ TQT_SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) );
// TODO: connect to gdt's finished() signal, check for failures, expand gdt to maintain a list of not found DNs?
gdt->go( true );
}
@@ -108,10 +108,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn
}
}
-void UserDetailsManager::requestDetails( const QString & dn, bool onlyUnknown )
+void UserDetailsManager::requestDetails( const TQString & dn, bool onlyUnknown )
{
- m_client->debug( QString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) );
- QStringList list;
+ m_client->debug( TQString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) );
+ TQStringList list;
list.append( dn );
requestDetails( list, onlyUnknown );
}
diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h
index 4e9b6022..f5a5ff6c 100644
--- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h
+++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h
@@ -18,9 +18,9 @@
#ifndef USERDETAILSMANAGER_H
#define USERDETAILSMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "gwerror.h"
class Client;
@@ -40,15 +40,15 @@ public:
/**
* List of DNs that we have already received details for
*/
- QStringList knownDNs();
+ TQStringList knownDNs();
/**
* Check if we have details for a single DN
*/
- bool known( const QString &dn );
+ bool known( const TQString &dn );
/**
* Get details for a given DN
*/
- ContactDetails details( const QString &dn );
+ ContactDetails details( const TQString &dn );
/**
* Add a ContactDetails object to our cache.
* This SHOULD be called when receiving details in contactlist receive and manipulation, to prevent unnecessary additional requests.
@@ -58,27 +58,27 @@ public:
* Remove a contact from the list of known DNs. This MUST be performed when a client removes a DN from its local contact list,
* otherwise new events from this DN will not receive user details.
*/
- void removeContact( const QString & dn );
+ void removeContact( const TQString & dn );
/**
* Explicitly request details for a set of contacts from the server.
* Will signal @ref gotContactUserDetails for each one when they are available.
*/
- void requestDetails( const QStringList & dnList, bool onlyUnknown = true );
+ void requestDetails( const TQStringList & dnList, bool onlyUnknown = true );
/**
* Explicitly request a contact's details from the server. Will signal @ref gotContactUserDetails when they are available.
*/
- void requestDetails( const QString & dn, bool onlyUnknown = true );
+ void requestDetails( const TQString & dn, bool onlyUnknown = true );
signals:
void gotContactDetails( const GroupWise::ContactDetails & );
protected slots:
void slotReceiveContactDetails( const GroupWise::ContactDetails & );
protected:
- void dump( const QStringList & list );
+ void dump( const TQStringList & list );
private:
- QStringList m_pendingDNs; // a list of DNs that have pending requests
+ TQStringList m_pendingDNs; // a list of DNs that have pending requests
Client * m_client;
- QMap< QString, GroupWise::ContactDetails > m_detailsMap;
+ TQMap< TQString, GroupWise::ContactDetails > m_detailsMap;
};
#endif
diff --git a/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp b/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp
index 93616f95..5ece3882 100644
--- a/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp
+++ b/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp
@@ -21,15 +21,15 @@
#include "gwaddcontactpage.h"
-//#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qvaluelist.h>
+//#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -45,23 +45,23 @@
#include "gwaddui.h"
#include "userdetailsmanager.h"
-GroupWiseAddContactPage::GroupWiseAddContactPage( Kopete::Account * owner, QWidget* parent, const char* name )
+GroupWiseAddContactPage::GroupWiseAddContactPage( Kopete::Account * owner, TQWidget* parent, const char* name )
: AddContactPage(parent, name)
{
m_account = static_cast<GroupWiseAccount *>( owner );
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
if (owner->isConnected ())
{
- m_searchUI = new GroupWiseContactSearch( m_account, QListView::Single, false,
+ m_searchUI = new GroupWiseContactSearch( m_account, TQListView::Single, false,
this, "acwsearchwidget" );
show();
m_canadd = true;
}
else
{
- m_noaddMsg1 = new QLabel (i18n ("You need to be connected to be able to add contacts."), this);
- m_noaddMsg2 = new QLabel (i18n ("Connect to GroupWise Messenger and try again."), this);
+ m_noaddMsg1 = new TQLabel (i18n ("You need to be connected to be able to add contacts."), this);
+ m_noaddMsg2 = new TQLabel (i18n ("Connect to GroupWise Messenger and try again."), this);
m_canadd = false;
}
}
@@ -77,10 +77,10 @@ bool GroupWiseAddContactPage::apply( Kopete::Account* account, Kopete::MetaConta
{
if ( validateData() )
{
- QString contactId;
- QString displayName;
+ TQString contactId;
+ TQString displayName;
- QValueList< ContactDetails > selected = m_searchUI->selectedResults();
+ TQValueList< ContactDetails > selected = m_searchUI->selectedResults();
if ( selected.count() == 1 )
{
ContactDetails dt = selected.first();
diff --git a/kopete/protocols/groupwise/ui/gwaddcontactpage.h b/kopete/protocols/groupwise/ui/gwaddcontactpage.h
index aa195edd..0b34d5c8 100644
--- a/kopete/protocols/groupwise/ui/gwaddcontactpage.h
+++ b/kopete/protocols/groupwise/ui/gwaddcontactpage.h
@@ -42,7 +42,7 @@ class GroupWiseAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- GroupWiseAddContactPage( Kopete::Account * owner, QWidget* parent = 0, const char* name = 0 );
+ GroupWiseAddContactPage( Kopete::Account * owner, TQWidget* parent = 0, const char* name = 0 );
~GroupWiseAddContactPage();
/**
@@ -54,14 +54,14 @@ public:
*/
virtual bool validateData();
protected:
- QValueList< GroupWise::ContactDetails > m_searchResults;
+ TQValueList< GroupWise::ContactDetails > m_searchResults;
unsigned char searchOperation( int comboIndex );
GroupWiseAccount * m_account;
GroupWiseAddUI * m_gwAddUI;
//TODO: make wrapper
GroupWiseContactSearch * m_searchUI;
- QLabel *m_noaddMsg1;
- QLabel *m_noaddMsg2;
+ TQLabel *m_noaddMsg1;
+ TQLabel *m_noaddMsg2;
bool m_canadd;
};
diff --git a/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp b/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp
index eabb75ab..1cfee7ee 100644
--- a/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp
+++ b/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp
@@ -16,10 +16,10 @@
*************************************************************************
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistview.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
#include <kdebug.h>
#include <kpushbutton.h>
@@ -29,7 +29,7 @@
#include "gwchatpropsdialog.h"
-GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( QWidget * parent, const char * name )
+GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( TQWidget * parent, const char * name )
: KDialogBase( parent, name, false, i18n( "Chatroom properties" ),
KDialogBase::Ok|KDialogBase::Cancel, Ok, true ), m_dirty( false )
{
@@ -37,7 +37,7 @@ GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( QWidget * parent, const char
}
GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( const GroupWise::Chatroom & room, bool readOnly,
- QWidget * parent, const char * name )
+ TQWidget * parent, const char * name )
: KDialogBase( parent, name, false, i18n( "Chatroom properties" ),
KDialogBase::Ok|KDialogBase::Cancel, Ok, true ), m_dirty( false )
{
@@ -49,7 +49,7 @@ GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( const GroupWise::Chatroom &
m_widget->m_query->setText( room.query );
m_widget->m_topic->setText( room.topic );
m_widget->m_archive->setChecked( room.archive );
- m_widget->m_maxUsers->setText( QString::number( room.maxUsers ) );
+ m_widget->m_maxUsers->setText( TQString::number( room.maxUsers ) );
m_widget->m_createdOn->setText( room.createdOn.toString() );
m_widget->m_creator->setText( room.creatorDN );
@@ -82,18 +82,18 @@ void GroupWiseChatPropsDialog::initialise()
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
m_widget = new GroupWiseChatPropsWidget( this );
- connect( m_widget->m_topic, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_owner, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_createdOn, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_creator, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_description, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_disclaimer, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_query, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_archive, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_maxUsers, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_btnAddAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_btnEditAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) );
- connect( m_widget->m_btnDeleteAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_topic, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_owner, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_createdOn, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_creator, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_description, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_disclaimer, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_query, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_archive, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_maxUsers, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_btnAddAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_btnEditAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) );
+ connect( m_widget->m_btnDeleteAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) );
setMainWidget( m_widget );
show();
}
diff --git a/kopete/protocols/groupwise/ui/gwchatpropsdialog.h b/kopete/protocols/groupwise/ui/gwchatpropsdialog.h
index 058d6b20..7228bb57 100644
--- a/kopete/protocols/groupwise/ui/gwchatpropsdialog.h
+++ b/kopete/protocols/groupwise/ui/gwchatpropsdialog.h
@@ -45,12 +45,12 @@ class GroupWiseChatPropsDialog : public KDialogBase
/**
* Construct an empty dialog
*/
- GroupWiseChatPropsDialog( QWidget * parent, const char * name );
+ GroupWiseChatPropsDialog( TQWidget * parent, const char * name );
/**
* Construct a populated dialog
*/
GroupWiseChatPropsDialog( const GroupWise::Chatroom & room, bool readOnly,
- QWidget * parent, const char * name );
+ TQWidget * parent, const char * name );
~GroupWiseChatPropsDialog() {}
diff --git a/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp b/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp
index fb67a03e..b9021b1f 100644
--- a/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp
+++ b/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qmap.h>
+#include <tqmap.h>
#include <klistview.h>
#include <klistviewsearchline.h>
@@ -34,7 +34,7 @@
#include "gwchatsearchdialog.h"
-GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account, QWidget *parent, const char *name )
+GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account, TQWidget *parent, const char *name )
: KDialogBase( parent, name, false, i18n( "Search Chatrooms" ),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, Ok, true ), m_account( account )
{
@@ -44,12 +44,12 @@ GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account
m_manager = m_account->client()->chatroomManager();
- connect ( m_manager, SIGNAL( updated() ), SLOT( slotManagerUpdated() ) );
- connect ( m_manager, SIGNAL( gotProperties( const GroupWise::Chatroom & ) ),
- SLOT( slotGotProperties( const GroupWise::Chatroom & ) ) );
+ connect ( m_manager, TQT_SIGNAL( updated() ), TQT_SLOT( slotManagerUpdated() ) );
+ connect ( m_manager, TQT_SIGNAL( gotProperties( const GroupWise::Chatroom & ) ),
+ TQT_SLOT( slotGotProperties( const GroupWise::Chatroom & ) ) );
- connect( m_widget->m_btnRefresh, SIGNAL( clicked() ), SLOT( slotUpdateClicked() ) );
- connect( m_widget->m_btnProperties, SIGNAL( clicked() ), SLOT( slotPropertiesClicked() ) );
+ connect( m_widget->m_btnRefresh, TQT_SIGNAL( clicked() ), TQT_SLOT( slotUpdateClicked() ) );
+ connect( m_widget->m_btnProperties, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPropertiesClicked() ) );
m_manager->updateRooms();
show();
@@ -63,12 +63,12 @@ void GroupWiseChatSearchDialog::slotUpdateClicked()
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << "updating chatroom list " << endl;
m_widget->m_chatrooms->clear();
- QListViewItem * first = m_widget->m_chatrooms->firstChild();
- QString updateMessage = i18n("Updating chatroom list..." );
+ TQListViewItem * first = m_widget->m_chatrooms->firstChild();
+ TQString updateMessage = i18n("Updating chatroom list..." );
/* if ( first )
- new QListViewItem( first, updateMessage );
+ new TQListViewItem( first, updateMessage );
else*/
- new QListViewItem( m_widget->m_chatrooms, updateMessage );
+ new TQListViewItem( m_widget->m_chatrooms, updateMessage );
m_manager->updateRooms();
}
@@ -80,17 +80,17 @@ void GroupWiseChatSearchDialog::slotManagerUpdated()
const ChatroomMap::iterator end = rooms.end();
while ( it != end )
{
- new QListViewItem( m_widget->m_chatrooms,
+ new TQListViewItem( m_widget->m_chatrooms,
it.data().displayName,
m_account->protocol()->dnToDotted( it.data().ownerDN ),
- QString::number( it.data().participantsCount ) );
+ TQString::number( it.data().participantsCount ) );
++it;
}
}
void GroupWiseChatSearchDialog::slotPropertiesClicked()
{
- QListViewItem * selected = m_widget->m_chatrooms->selectedItem();
+ TQListViewItem * selected = m_widget->m_chatrooms->selectedItem();
if ( selected )
{
m_manager->requestProperties( selected->text( 0 ) );
diff --git a/kopete/protocols/groupwise/ui/gwchatsearchdialog.h b/kopete/protocols/groupwise/ui/gwchatsearchdialog.h
index 667e6394..c65cfa43 100644
--- a/kopete/protocols/groupwise/ui/gwchatsearchdialog.h
+++ b/kopete/protocols/groupwise/ui/gwchatsearchdialog.h
@@ -30,7 +30,7 @@ class GroupWiseChatSearchDialog : public KDialogBase
{
Q_OBJECT
public:
- GroupWiseChatSearchDialog( GroupWiseAccount * account, QWidget * parent, const char * name );
+ GroupWiseChatSearchDialog( GroupWiseAccount * account, TQWidget * parent, const char * name );
~GroupWiseChatSearchDialog();
protected:
void populateWidget();
diff --git a/kopete/protocols/groupwise/ui/gwcontactproperties.cpp b/kopete/protocols/groupwise/ui/gwcontactproperties.cpp
index 120296ce..92f4da11 100644
--- a/kopete/protocols/groupwise/ui/gwcontactproperties.cpp
+++ b/kopete/protocols/groupwise/ui/gwcontactproperties.cpp
@@ -16,13 +16,13 @@
*************************************************************************
*/
-#include <qclipboard.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqclipboard.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klistview.h>
-#include <qmap.h>
-#include <qpopupmenu.h>
+#include <tqmap.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -41,8 +41,8 @@
#include "gwcontactproperties.h"
-GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * contact, QWidget *parent, const char *name)
- : QObject(parent, name)
+GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * contact, TQWidget *parent, const char *name)
+ : TQObject(parent, name)
{
init();
// set up the contents of the props widget
@@ -56,8 +56,8 @@ GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * conta
m_dialog->show();
}
-GroupWiseContactProperties::GroupWiseContactProperties( GroupWise::ContactDetails cd, QWidget *parent, const char *name )
- : QObject(parent, name)
+GroupWiseContactProperties::GroupWiseContactProperties( GroupWise::ContactDetails cd, TQWidget *parent, const char *name )
+ : TQObject(parent, name)
{
init();
// set up the contents of the props widget
@@ -78,28 +78,28 @@ GroupWiseContactProperties::~GroupWiseContactProperties()
void GroupWiseContactProperties::init()
{
- m_dialog = new KDialogBase( ::qt_cast<QWidget*>( parent() ), "gwcontactpropsdialog", false, i18n( "Contact Properties" ), KDialogBase::Ok );
+ m_dialog = new KDialogBase( ::qt_cast<TQWidget*>( parent() ), "gwcontactpropsdialog", false, i18n( "Contact Properties" ), KDialogBase::Ok );
m_propsWidget = new GroupWiseContactPropsWidget( m_dialog );
// set up the context menu and copy action
- m_copyAction = KStdAction::copy( this, SLOT( slotCopy() ), 0 );
+ m_copyAction = KStdAction::copy( this, TQT_SLOT( slotCopy() ), 0 );
connect( m_propsWidget->m_propsView,
- SIGNAL( contextMenuRequested( QListViewItem *, const QPoint & , int) ),
- SLOT( slotShowContextMenu( QListViewItem *, const QPoint & ) ) );
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint & , int) ),
+ TQT_SLOT( slotShowContextMenu( TQListViewItem *, const TQPoint & ) ) );
// insert the props widget into the dialog
m_dialog->setMainWidget( m_propsWidget );
}
-void GroupWiseContactProperties::setupProperties( QMap< QString, QString > serverProps )
+void GroupWiseContactProperties::setupProperties( TQMap< TQString, TQString > serverProps )
{
m_propsWidget->m_propsView->header()->hide();
- QMap< QString, QString >::Iterator it;
- QMap< QString, QString >::Iterator end = serverProps.end();
+ TQMap< TQString, TQString >::Iterator it;
+ TQMap< TQString, TQString >::Iterator end = serverProps.end();
for ( it = serverProps.begin(); it != end; ++it )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " adding property: " << it.key() << ", " << it.data() << endl;
- QString key = it.key();
- QString localised;
+ TQString key = it.key();
+ TQString localised;
if ( key == "telephoneNumber" )
localised = i18n( "Telephone Number" );
else if ( key == "OU" )
@@ -121,13 +121,13 @@ void GroupWiseContactProperties::setupProperties( QMap< QString, QString > serve
}
}
-void GroupWiseContactProperties::slotShowContextMenu( QListViewItem * item, const QPoint & pos )
+void GroupWiseContactProperties::slotShowContextMenu( TQListViewItem * item, const TQPoint & pos )
{
if ( item )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "for item " << item->text(0) << ", " << item->text(1) << endl;
else
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "no selected item" << endl;
- QPopupMenu * popupMenu = new QPopupMenu( m_propsWidget->m_propsView );
+ TQPopupMenu * popupMenu = new TQPopupMenu( m_propsWidget->m_propsView );
m_copyAction->plug( popupMenu );
popupMenu->exec( pos );
}
diff --git a/kopete/protocols/groupwise/ui/gwcontactproperties.h b/kopete/protocols/groupwise/ui/gwcontactproperties.h
index 5684cf2a..4538644e 100644
--- a/kopete/protocols/groupwise/ui/gwcontactproperties.h
+++ b/kopete/protocols/groupwise/ui/gwcontactproperties.h
@@ -20,7 +20,7 @@
#define GROUPWISECONTACTPROPERTIES_H
-#include <qobject.h>
+#include <tqobject.h>
class GroupWiseContactPropsWidget;
class KDialogBase;
@@ -39,17 +39,17 @@ public:
/**
* Display properties given a GroupWiseContact
*/
- GroupWiseContactProperties( GroupWiseContact * contact, QWidget *parent, const char *name );
+ GroupWiseContactProperties( GroupWiseContact * contact, TQWidget *parent, const char *name );
/**
* Display properties given a GroupWise::ContactDetails
*/
- GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, QWidget *parent = 0, const char *name = 0 );
+ GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, TQWidget *parent = 0, const char *name = 0 );
~GroupWiseContactProperties();
protected:
- void setupProperties( QMap< QString, QString > serverProps );
+ void setupProperties( TQMap< TQString, TQString > serverProps );
void init();
protected slots:
- void slotShowContextMenu( QListViewItem *, const QPoint & );
+ void slotShowContextMenu( TQListViewItem *, const TQPoint & );
void slotCopy();
private:
GroupWiseContactPropsWidget * m_propsWidget;
diff --git a/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp b/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp
index 87468ccf..7f049d7c 100644
--- a/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp
+++ b/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp
@@ -19,10 +19,10 @@
*************************************************************************
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -40,16 +40,16 @@
#include "gweditaccountwidget.h"
-GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( QWidget* parent, Kopete::Account* theAccount)
-: QWidget( parent ), KopeteEditAccountWidget( theAccount )
+GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( TQWidget* parent, Kopete::Account* theAccount)
+: TQWidget( parent ), KopeteEditAccountWidget( theAccount )
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- m_layout = new QVBoxLayout( this );
+ m_layout = new TQVBoxLayout( this );
m_preferencesDialog = new GroupWiseAccountPreferences( this );
m_layout->addWidget( m_preferencesDialog );
- connect( m_preferencesDialog->m_password, SIGNAL( changed() ), this, SLOT( configChanged() ) );
- connect( m_preferencesDialog->m_server, SIGNAL( textChanged( const QString & ) ), this, SLOT( configChanged() ) );
- connect( m_preferencesDialog->m_port, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
+ connect( m_preferencesDialog->m_password, TQT_SIGNAL( changed() ), this, TQT_SLOT( configChanged() ) );
+ connect( m_preferencesDialog->m_server, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_preferencesDialog->m_port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) );
if ( account() )
reOpen();
else
@@ -60,9 +60,9 @@ GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( QWidget* parent, Kopete:
m_preferencesDialog->m_server->setText( config->readEntry( "DefaultServer" ) );
m_preferencesDialog->m_port->setValue( config->readNumEntry( "DefaultPort", 8300 ) );
}
- QWidget::setTabOrder( m_preferencesDialog->m_userId, m_preferencesDialog->m_password->mRemembered );
- QWidget::setTabOrder( m_preferencesDialog->m_password->mRemembered, m_preferencesDialog->m_password->mPassword );
- QWidget::setTabOrder( m_preferencesDialog->m_password->mPassword, m_preferencesDialog->m_autoConnect );
+ TQWidget::setTabOrder( m_preferencesDialog->m_userId, m_preferencesDialog->m_password->mRemembered );
+ TQWidget::setTabOrder( m_preferencesDialog->m_password->mRemembered, m_preferencesDialog->m_password->mPassword );
+ TQWidget::setTabOrder( m_preferencesDialog->m_password->mPassword, m_preferencesDialog->m_autoConnect );
}
@@ -119,7 +119,7 @@ void GroupWiseEditAccountWidget::writeConfig()
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
account()->configGroup()->writeEntry( "Server", m_preferencesDialog->m_server->text() );
- account()->configGroup()->writeEntry( "Port", QString::number( m_preferencesDialog->m_port->value() ) );
+ account()->configGroup()->writeEntry( "Port", TQString::number( m_preferencesDialog->m_port->value() ) );
account()->configGroup()->writeEntry( "AlwaysAcceptInvitations",
m_preferencesDialog->m_alwaysAccept->isChecked() ? "true" : "false" );
diff --git a/kopete/protocols/groupwise/ui/gweditaccountwidget.h b/kopete/protocols/groupwise/ui/gweditaccountwidget.h
index 27c54ee2..038adb40 100644
--- a/kopete/protocols/groupwise/ui/gweditaccountwidget.h
+++ b/kopete/protocols/groupwise/ui/gweditaccountwidget.h
@@ -22,7 +22,7 @@
#ifndef TESTBEDEDITACCOUNTWIDGET_H
#define TESTBEDEDITACCOUNTWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <editaccountwidget.h>
class QVBoxLayout;
@@ -33,11 +33,11 @@ class GroupWiseAccountPreferences;
* A widget for editing this protocol's accounts
* @author Will Stephenson
*/
-class GroupWiseEditAccountWidget : public QWidget, public KopeteEditAccountWidget
+class GroupWiseEditAccountWidget : public TQWidget, public KopeteEditAccountWidget
{
Q_OBJECT
public:
- GroupWiseEditAccountWidget( QWidget* parent, Kopete::Account* account);
+ GroupWiseEditAccountWidget( TQWidget* parent, Kopete::Account* account);
~GroupWiseEditAccountWidget();
@@ -57,7 +57,7 @@ protected:
void reOpen();
void writeConfig();
Kopete::Account *m_account;
- QVBoxLayout *m_layout;
+ TQVBoxLayout *m_layout;
GroupWiseAccountPreferences *m_preferencesDialog;
};
diff --git a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp
index d46daf4a..f18d6737 100644
--- a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp
+++ b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp
@@ -16,11 +16,11 @@
*************************************************************************
*/
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qlistview.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -39,16 +39,16 @@
class PrivacyLBI : public QListBoxPixmap
{
public:
- PrivacyLBI( QListBox * listBox, const QPixmap & pixmap, const QString & text, const QString & dn )
- : QListBoxPixmap( listBox, pixmap, text ), m_dn( dn )
+ PrivacyLBI( TQListBox * listBox, const TQPixmap & pixmap, const TQString & text, const TQString & dn )
+ : TQListBoxPixmap( listBox, pixmap, text ), m_dn( dn )
{
}
- QString dn() { return m_dn; }
+ TQString dn() { return m_dn; }
private:
- QString m_dn;
+ TQString m_dn;
};
-GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWidget *parent, const char *name )
+GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, TQWidget *parent, const char *name )
: KDialogBase( parent, name, false, i18n( "Account specific privacy settings", "Manage Privacy for %1" ).arg( account->accountId() ),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, Ok, true ), m_account( account ), m_dirty( false ), m_searchDlg(0)
{
@@ -65,16 +65,16 @@ GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWid
populateWidgets();
- m_privacy->m_allowList->setSelectionMode( QListBox::Extended );
- m_privacy->m_denyList->setSelectionMode( QListBox::Extended );
+ m_privacy->m_allowList->setSelectionMode( TQListBox::Extended );
+ m_privacy->m_denyList->setSelectionMode( TQListBox::Extended );
- connect( m_privacy->m_btnAllow, SIGNAL( clicked() ), SLOT( slotAllowClicked() ) );
- connect( m_privacy->m_btnBlock, SIGNAL( clicked() ), SLOT( slotBlockClicked() ) );
- connect( m_privacy->m_btnAdd, SIGNAL( clicked() ), SLOT( slotAddClicked() ) );
- connect( m_privacy->m_btnRemove, SIGNAL( clicked() ), SLOT( slotRemoveClicked() ) );
- connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) );
- connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) );
- connect( mgr, SIGNAL( privacyChanged( const QString &, bool ) ), SLOT( slotPrivacyChanged() ) );
+ connect( m_privacy->m_btnAllow, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAllowClicked() ) );
+ connect( m_privacy->m_btnBlock, TQT_SIGNAL( clicked() ), TQT_SLOT( slotBlockClicked() ) );
+ connect( m_privacy->m_btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddClicked() ) );
+ connect( m_privacy->m_btnRemove, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveClicked() ) );
+ connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) );
+ connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) );
+ connect( mgr, TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SLOT( slotPrivacyChanged() ) );
m_privacy->m_btnAdd->setEnabled( true );
m_privacy->m_btnAllow->setEnabled( false );
m_privacy->m_btnBlock->setEnabled( false );
@@ -97,18 +97,18 @@ void GroupWisePrivacyDialog::populateWidgets()
PrivacyManager * mgr = m_account->client()->privacyManager();
// default policy
- QString defaultPolicyText = i18n( "<Everyone Else>" );
+ TQString defaultPolicyText = i18n( "<Everyone Else>" );
if ( mgr->defaultAllow() )
- m_defaultPolicy = new QListBoxText( m_privacy->m_allowList, defaultPolicyText );
+ m_defaultPolicy = new TQListBoxText( m_privacy->m_allowList, defaultPolicyText );
else
- m_defaultPolicy = new QListBoxText( m_privacy->m_denyList, defaultPolicyText );
+ m_defaultPolicy = new TQListBoxText( m_privacy->m_denyList, defaultPolicyText );
- QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account );
+ TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account );
// allow list
- QStringList allowList = mgr->allowList();
- QStringList::Iterator end = allowList.end();
- for ( QStringList::Iterator it = allowList.begin(); it != end; ++it )
+ TQStringList allowList = mgr->allowList();
+ TQStringList::Iterator end = allowList.end();
+ for ( TQStringList::Iterator it = allowList.begin(); it != end; ++it )
{
GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it );
if ( cd.fullName.isEmpty() )
@@ -116,9 +116,9 @@ void GroupWisePrivacyDialog::populateWidgets()
new PrivacyLBI( m_privacy->m_allowList, icon, cd.fullName, *it );
}
// deny list
- QStringList denyList = mgr->denyList();
+ TQStringList denyList = mgr->denyList();
end = denyList.end();
- for ( QStringList::Iterator it = denyList.begin(); it != end; ++it )
+ for ( TQStringList::Iterator it = denyList.begin(); it != end; ++it )
{
GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it );
if ( cd.fullName.isEmpty() )
@@ -148,7 +148,7 @@ void GroupWisePrivacyDialog::slotBlockClicked()
if ( m_privacy->m_allowList->isSelected( i ) )
{
m_dirty = true;
- QListBoxItem * lbi = m_privacy->m_allowList->item( i );
+ TQListBoxItem * lbi = m_privacy->m_allowList->item( i );
m_privacy->m_allowList->takeItem( lbi );
m_privacy->m_denyList->insertItem( lbi );
}
@@ -164,7 +164,7 @@ void GroupWisePrivacyDialog::slotAllowClicked()
if ( m_privacy->m_denyList->isSelected( i ) )
{
m_dirty = true;
- QListBoxItem * lbi = m_privacy->m_denyList->item( i );
+ TQListBoxItem * lbi = m_privacy->m_denyList->item( i );
m_privacy->m_denyList->takeItem( lbi );
m_privacy->m_allowList->insertItem( lbi );
}
@@ -179,10 +179,10 @@ void GroupWisePrivacyDialog::slotAddClicked()
m_searchDlg = new KDialogBase( this, "privacysearchdialog", false,
i18n( "Search for Contact to Block" ),
KDialogBase::Ok|KDialogBase::Cancel );
- m_search = new GroupWiseContactSearch( m_account, QListView::Multi, false, m_searchDlg, "privacysearchwidget" );
+ m_search = new GroupWiseContactSearch( m_account, TQListView::Multi, false, m_searchDlg, "privacysearchwidget" );
m_searchDlg->setMainWidget( m_search );
- connect( m_searchDlg, SIGNAL( okClicked() ), SLOT( slotSearchedForUsers() ) );
- connect( m_search, SIGNAL( selectionValidates( bool ) ), m_searchDlg, SLOT( enableButtonOK( bool ) ) );
+ connect( m_searchDlg, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotSearchedForUsers() ) );
+ connect( m_search, TQT_SIGNAL( selectionValidates( bool ) ), m_searchDlg, TQT_SLOT( enableButtonOK( bool ) ) );
m_searchDlg->enableButtonOK( false );
}
m_searchDlg->show();
@@ -191,10 +191,10 @@ void GroupWisePrivacyDialog::slotAddClicked()
void GroupWisePrivacyDialog::slotSearchedForUsers()
{
// create an item for each result, in the block list
- QValueList< ContactDetails > selected = m_search->selectedResults();
- QValueList< ContactDetails >::Iterator it = selected.begin();
- const QValueList< ContactDetails >::Iterator end = selected.end();
- QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account );
+ TQValueList< ContactDetails > selected = m_search->selectedResults();
+ TQValueList< ContactDetails >::Iterator it = selected.begin();
+ const TQValueList< ContactDetails >::Iterator end = selected.end();
+ TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account );
for ( ; it != end; ++it )
{
m_dirty = true;
@@ -213,7 +213,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked()
if ( m_privacy->m_denyList->isSelected( i ) )
{
m_dirty = true;
- QListBoxItem * lbi = m_privacy->m_denyList->item( i );
+ TQListBoxItem * lbi = m_privacy->m_denyList->item( i );
// can't remove the default policy
if ( lbi == m_defaultPolicy )
continue;
@@ -225,7 +225,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked()
if ( m_privacy->m_allowList->isSelected( i ) )
{
m_dirty = true;
- QListBoxItem * lbi = m_privacy->m_allowList->item( i );
+ TQListBoxItem * lbi = m_privacy->m_allowList->item( i );
// can't remove the default policy
if ( lbi == m_defaultPolicy )
continue;
@@ -238,9 +238,9 @@ void GroupWisePrivacyDialog::slotRemoveClicked()
void GroupWisePrivacyDialog::slotAllowListClicked()
{
// don't get into feedback
- disconnect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), this, SLOT( slotDenyListClicked() ) );
+ disconnect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDenyListClicked() ) );
m_privacy->m_denyList->clearSelection();
- connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) );
+ connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) );
bool selected = false;
for( int i = m_privacy->m_allowList->count() - 1; i >= 0 ; --i )
{
@@ -258,9 +258,9 @@ void GroupWisePrivacyDialog::slotAllowListClicked()
void GroupWisePrivacyDialog::slotDenyListClicked()
{
// don't get into feedback
- disconnect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), this, SLOT( slotAllowListClicked() ) );
+ disconnect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotAllowListClicked() ) );
m_privacy->m_allowList->clearSelection();
- connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) );
+ connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) );
bool selected = false;
for( int i = m_privacy->m_denyList->count() - 1; i >= 0 ; --i )
{
@@ -310,8 +310,8 @@ void GroupWisePrivacyDialog::commitChanges()
if ( m_account->isConnected() )
{
bool defaultDeny = false;
- QStringList denyList;
- QStringList allowList;
+ TQStringList denyList;
+ TQStringList allowList;
// pass on our current allow, deny and default policy to the PrivacyManager
for( int i = 0; i < (int)m_privacy->m_denyList->count(); ++i )
{
diff --git a/kopete/protocols/groupwise/ui/gwprivacydialog.h b/kopete/protocols/groupwise/ui/gwprivacydialog.h
index a5467e47..e296e5b2 100644
--- a/kopete/protocols/groupwise/ui/gwprivacydialog.h
+++ b/kopete/protocols/groupwise/ui/gwprivacydialog.h
@@ -35,7 +35,7 @@ class GroupWisePrivacyDialog : public KDialogBase
{
Q_OBJECT
public:
- GroupWisePrivacyDialog( GroupWiseAccount * account, QWidget * parent, const char * name );
+ GroupWisePrivacyDialog( GroupWiseAccount * account, TQWidget * parent, const char * name );
~GroupWisePrivacyDialog();
protected:
void commitChanges();
@@ -59,7 +59,7 @@ private:
GroupWiseAccount * m_account;
GroupWisePrivacyWidget * m_privacy;
GroupWiseContactSearch * m_search;
- QListBoxItem * m_defaultPolicy;
+ TQListBoxItem * m_defaultPolicy;
bool m_dirty;
KDialogBase * m_searchDlg;
};
diff --git a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp
index 5b0b4014..6005f61a 100644
--- a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp
+++ b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp
@@ -16,8 +16,8 @@
*************************************************************************
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <klocale.h>
@@ -33,13 +33,13 @@
#include "gwreceiveinvitationdialog.h"
-ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, QWidget *parent, const char *name)
+ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, TQWidget *parent, const char *name)
: KDialogBase( i18n("Invitation to Conversation"), KDialogBase::Yes|KDialogBase::No, KDialogBase::Yes, KDialogBase::No, parent, name, false )
{
m_account = account;
m_guid = event.guid;
- connect( this, SIGNAL( yesClicked() ), SLOT( slotYesClicked() ) );
- connect( this, SIGNAL( noClicked() ), SLOT( slotNoClicked() ) );
+ connect( this, TQT_SIGNAL( yesClicked() ), TQT_SLOT( slotYesClicked() ) );
+ connect( this, TQT_SIGNAL( noClicked() ), TQT_SLOT( slotNoClicked() ) );
GroupWiseContact * c = account->contactForDN( event.user );
@@ -50,7 +50,7 @@ ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, co
m_wid->m_contactName->setText( event.user );
m_wid->m_dateTime->setText( KGlobal::locale()->formatDateTime( event.timeStamp ) );
- m_wid->m_message->setText( QString("<b>%1</b>").arg( event.message ) );
+ m_wid->m_message->setText( TQString("<b>%1</b>").arg( event.message ) );
setMainWidget( m_wid );
}
@@ -63,7 +63,7 @@ void ReceiveInvitationDialog::slotYesClicked()
{
m_account->client()->joinConference( m_guid );
// save the state of always accept invitations
- QString alwaysAccept = m_wid->cb_dontShowAgain->isChecked() ? "true" : "false";
+ TQString alwaysAccept = m_wid->cb_dontShowAgain->isChecked() ? "true" : "false";
m_account->configGroup()->writeEntry( "AlwaysAcceptInvitations", alwaysAccept );
deleteLater();
}
diff --git a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h
index 0486c964..529ceaa3 100644
--- a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h
+++ b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h
@@ -32,7 +32,7 @@ class ReceiveInvitationDialog : public KDialogBase
{
Q_OBJECT
public:
- ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, QWidget *parent, const char *name );
+ ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, TQWidget *parent, const char *name );
~ReceiveInvitationDialog();
signals:
void invitationAccepted( bool, const GroupWise::ConferenceGuid & guid );
diff --git a/kopete/protocols/groupwise/ui/gwsearch.cpp b/kopete/protocols/groupwise/ui/gwsearch.cpp
index 1c80e3eb..885b6192 100644
--- a/kopete/protocols/groupwise/ui/gwsearch.cpp
+++ b/kopete/protocols/groupwise/ui/gwsearch.cpp
@@ -16,12 +16,12 @@
*************************************************************************
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-//#include <qvaluelist.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+//#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -40,31 +40,31 @@
class GWSearchResultsLVI : public QListViewItem
{
public:
- GWSearchResultsLVI( QListView * parent, GroupWise::ContactDetails details, int status, const QPixmap & statusPM/*, const QString & userId */)
- : QListViewItem( parent, QString::null, details.givenName, details.surname, GroupWiseProtocol::protocol()->dnToDotted( details.dn ) ), m_details( details ), m_status( status )
+ GWSearchResultsLVI( TQListView * parent, GroupWise::ContactDetails details, int status, const TQPixmap & statusPM/*, const TQString & userId */)
+ : TQListViewItem( parent, TQString::null, details.givenName, details.surname, GroupWiseProtocol::protocol()->dnToDotted( details.dn ) ), m_details( details ), m_status( status )
{
setPixmap( 0, statusPM );
}
- QString key( int column, bool ascending ) const
+ TQString key( int column, bool ascending ) const
{
if ( column == 0 )
- return QString::number( 99 - m_status );
+ return TQString::number( 99 - m_status );
else
- return QListViewItem::key( column, ascending );
+ return TQListViewItem::key( column, ascending );
}
GroupWise::ContactDetails m_details;
int m_status;
};
-GroupWiseContactSearch::GroupWiseContactSearch( GroupWiseAccount * account, QListView::SelectionMode mode, bool onlineOnly, QWidget *parent, const char *name)
+GroupWiseContactSearch::GroupWiseContactSearch( GroupWiseAccount * account, TQListView::SelectionMode mode, bool onlineOnly, TQWidget *parent, const char *name)
: GroupWiseContactSearchWidget(parent, name), m_account( account ), m_onlineOnly( onlineOnly )
{
m_results->setSelectionMode( mode );
m_results->setAllColumnsShowFocus( true );
- connect( m_details, SIGNAL( clicked() ), SLOT( slotShowDetails() ) );
- connect( m_results, SIGNAL( selectionChanged() ), SLOT( slotValidateSelection() ) );
- connect( m_search, SIGNAL( clicked() ), SLOT( slotDoSearch() ) );
- connect( m_clear, SIGNAL( clicked() ), SLOT( slotClear() ) );
+ connect( m_details, TQT_SIGNAL( clicked() ), TQT_SLOT( slotShowDetails() ) );
+ connect( m_results, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotValidateSelection() ) );
+ connect( m_search, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDoSearch() ) );
+ connect( m_clear, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) );
}
@@ -84,7 +84,7 @@ void GroupWiseContactSearch::slotClear()
void GroupWiseContactSearch::slotDoSearch()
{
// build a query
- QValueList< GroupWise::UserSearchQueryTerm > searchTerms;
+ TQValueList< GroupWise::UserSearchQueryTerm > searchTerms;
if ( !m_firstName->text().isEmpty() )
{
GroupWise::UserSearchQueryTerm arg;
@@ -130,7 +130,7 @@ void GroupWiseContactSearch::slotDoSearch()
// start a search task
SearchUserTask * st = new SearchUserTask( m_account->client()->rootTask() );
st->search( searchTerms );
- connect( st, SIGNAL( finished() ), SLOT( slotGotSearchResults() ) );
+ connect( st, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotSearchResults() ) );
st->go( true );
m_matchCount->setText( i18n( "Searching" ) );
}
@@ -145,7 +145,7 @@ void GroupWiseContactSearch::slotShowDetails()
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// get the first selected result
- QValueList< ContactDetails > selected = selectedResults();
+ TQValueList< ContactDetails > selected = selectedResults();
if ( selected.count() )
{
// if they are already in our contact list, show that version
@@ -167,8 +167,8 @@ void GroupWiseContactSearch::slotGotSearchResults()
m_matchCount->setText( i18n( "1 matching user found", "%n matching users found", m_searchResults.count() ) );
m_results->clear();
- QValueList< GroupWise::ContactDetails >::Iterator it = m_searchResults.begin();
- QValueList< GroupWise::ContactDetails >::Iterator end = m_searchResults.end();
+ TQValueList< GroupWise::ContactDetails >::Iterator it = m_searchResults.begin();
+ TQValueList< GroupWise::ContactDetails >::Iterator end = m_searchResults.end();
for ( ; it != end; ++it )
{
// it's necessary to change the status used for the LVIs,
@@ -210,10 +210,10 @@ void GroupWiseContactSearch::slotGotSearchResults()
slotValidateSelection();
}
-QValueList< GroupWise::ContactDetails > GroupWiseContactSearch::selectedResults()
+TQValueList< GroupWise::ContactDetails > GroupWiseContactSearch::selectedResults()
{
- QValueList< GroupWise::ContactDetails > lst;
- QListViewItemIterator it( m_results );
+ TQValueList< GroupWise::ContactDetails > lst;
+ TQListViewItemIterator it( m_results );
while ( it.current() ) {
if ( it.current()->isSelected() )
lst.append( static_cast< GWSearchResultsLVI * >( it.current() )->m_details );
@@ -248,7 +248,7 @@ void GroupWiseContactSearch::slotValidateSelection()
if ( m_onlineOnly )
{
// check that one of the selected items is online
- QListViewItemIterator it( m_results );
+ TQListViewItemIterator it( m_results );
while ( it.current() )
{
if ( it.current()->isSelected() &&
@@ -263,7 +263,7 @@ void GroupWiseContactSearch::slotValidateSelection()
else
{
// check that at least one item is selected
- QListViewItemIterator it( m_results );
+ TQListViewItemIterator it( m_results );
while ( it.current() )
{
if ( it.current()->isSelected() )
diff --git a/kopete/protocols/groupwise/ui/gwsearch.h b/kopete/protocols/groupwise/ui/gwsearch.h
index 83ee205e..ec57cfb1 100644
--- a/kopete/protocols/groupwise/ui/gwsearch.h
+++ b/kopete/protocols/groupwise/ui/gwsearch.h
@@ -18,7 +18,7 @@
#ifndef GWSEARCH_H
#define GWSEARCH_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "gwcontactsearch.h"
class GroupWiseAccount;
@@ -34,10 +34,10 @@ class GroupWiseContactSearch : public GroupWiseContactSearchWidget
{
Q_OBJECT
public:
- GroupWiseContactSearch( GroupWiseAccount * account, QListView::SelectionMode mode, bool onlineOnly,
- QWidget *parent = 0, const char *name = 0);
+ GroupWiseContactSearch( GroupWiseAccount * account, TQListView::SelectionMode mode, bool onlineOnly,
+ TQWidget *parent = 0, const char *name = 0);
~GroupWiseContactSearch();
- QValueList< GroupWise::ContactDetails > selectedResults();
+ TQValueList< GroupWise::ContactDetails > selectedResults();
signals:
void selectionValidates( bool );
protected:
@@ -50,7 +50,7 @@ protected slots:
void slotShowDetails();
void slotValidateSelection();
private:
- QValueList< GroupWise::ContactDetails > m_searchResults;
+ TQValueList< GroupWise::ContactDetails > m_searchResults;
GroupWiseAccount * m_account;
bool m_onlineOnly;
};
diff --git a/kopete/protocols/irc/ircaccount.cpp b/kopete/protocols/irc/ircaccount.cpp
index 1a1bf75f..09d0db3c 100644
--- a/kopete/protocols/irc/ircaccount.cpp
+++ b/kopete/protocols/irc/ircaccount.cpp
@@ -54,16 +54,16 @@
#include <knotifyclient.h>
#include <kpopupmenu.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
-const QString IRCAccount::CONFIG_CODECMIB = QString::fromLatin1("Codec");
-const QString IRCAccount::CONFIG_NETWORKNAME = QString::fromLatin1("NetworkName");
-const QString IRCAccount::CONFIG_NICKNAME = QString::fromLatin1("NickName");
-const QString IRCAccount::CONFIG_USERNAME = QString::fromLatin1("UserName");
-const QString IRCAccount::CONFIG_REALNAME = QString::fromLatin1("RealName");
+const TQString IRCAccount::CONFIG_CODECMIB = TQString::fromLatin1("Codec");
+const TQString IRCAccount::CONFIG_NETWORKNAME = TQString::fromLatin1("NetworkName");
+const TQString IRCAccount::CONFIG_NICKNAME = TQString::fromLatin1("NickName");
+const TQString IRCAccount::CONFIG_USERNAME = TQString::fromLatin1("UserName");
+const TQString IRCAccount::CONFIG_REALNAME = TQString::fromLatin1("RealName");
-IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QString &autoChan, const QString& netName, const QString &nickName)
+IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const TQString &autoChan, const TQString& netName, const TQString &nickName)
: Kopete::PasswordedAccount(protocol, accountId, 0, true), autoConnect( autoChan ), commandSource(0)
{
m_manager = 0L;
@@ -75,49 +75,49 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
m_contactManager = 0;
m_engine = new KIRC::Engine(this);
- QMap< QString, QString> replies = customCtcpReplies();
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ TQMap< TQString, TQString> replies = customCtcpReplies();
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
m_engine->addCustomCtcp( it.key(), it.data() );
- QString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version());
+ TQString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version());
m_engine->setVersionString( version );
- QObject::connect(m_engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT(successfullyChangedNick(const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT(successfullyChangedNick(const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingFailedServerPassword()),
- this, SLOT(slotFailedServerPassword()));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedServerPassword()),
+ this, TQT_SLOT(slotFailedServerPassword()));
- QObject::connect(m_engine, SIGNAL(incomingNickInUse(const QString &)),
- this, SLOT(slotNickInUseAlert( const QString &)) );
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNickInUse(const TQString &)),
+ this, TQT_SLOT(slotNickInUseAlert( const TQString &)) );
- QObject::connect(m_engine, SIGNAL(incomingFailedNickOnLogin(const QString &)),
- this, SLOT(slotNickInUse( const QString &)) );
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedNickOnLogin(const TQString &)),
+ this, TQT_SLOT(slotNickInUse( const TQString &)) );
- QObject::connect(m_engine, SIGNAL(incomingJoinedChannel(const QString &, const QString &)),
- this, SLOT(slotJoinedUnknownChannel(const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotJoinedUnknownChannel(const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingCtcpReply(const QString &, const QString &, const QString &)),
- this, SLOT( slotNewCtcpReply(const QString&, const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingCtcpReply(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewCtcpReply(const TQString&, const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, SLOT(engineStatusChanged(KIRC::Engine::Status)));
+ TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
+ this, TQT_SLOT(engineStatusChanged(KIRC::Engine::Status)));
- QObject::connect(m_engine, SIGNAL(incomingServerLoadTooHigh()),
- this, SLOT(slotServerBusy()));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingServerLoadTooHigh()),
+ this, TQT_SLOT(slotServerBusy()));
- QObject::connect(m_engine, SIGNAL(incomingNoSuchNickname(const QString &)),
- this, SLOT(slotNoSuchNickname(const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNoSuchNickname(const TQString &)),
+ this, TQT_SLOT(slotNoSuchNickname(const TQString &)));
mAwayAction = new Kopete::AwayAction ( i18n("Set Away"),
m_protocol->m_UserStatusAway.iconFor( this ), 0, this,
- SLOT(slotGoAway( const QString & )), this );
+ TQT_SLOT(slotGoAway( const TQString & )), this );
currentHost = 0;
KConfigGroup *config = configGroup();
- QString networkName = netName;
+ TQString networkName = netName;
if (networkName.isNull())
networkName = config->readEntry(CONFIG_NETWORKNAME);
@@ -126,7 +126,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
else
mNickName = config->readEntry(CONFIG_NICKNAME);
- QString codecMib = config->readEntry(CONFIG_CODECMIB);
+ TQString codecMib = config->readEntry(CONFIG_CODECMIB);
// int codecMib = config->readNumEntry(CONFIG_CODECMIB, UTF-8);
m_serverNotices = (MessageDestination)config->readNumEntry( "ServerNotices", ServerWindow );
@@ -137,25 +137,25 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
if( !codecMib.isEmpty() )
{
- mCodec = QTextCodec::codecForMib( codecMib.toInt() );
+ mCodec = TQTextCodec::codecForMib( codecMib.toInt() );
m_engine->setDefaultCodec( mCodec );
}
else
mCodec = 0;
- QString m_accountId = this->accountId();
- if( networkName.isEmpty() && QRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) )
+ TQString m_accountId = this->accountId();
+ if( networkName.isEmpty() && TQRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) )
{
kdDebug(14120) << "Creating account from " << m_accountId << endl;
mNickName = m_accountId.section('@',0,0);
- QString serverInfo = m_accountId.section('@',1);
- QString hostName = serverInfo.section(':',0,0);
+ TQString serverInfo = m_accountId.section('@',1);
+ TQString hostName = serverInfo.section(':',0,0);
- for( QDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it )
{
IRCNetwork *net = it.current();
- for( QValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
+ for( TQValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
{
if( (*it2)->host == hostName )
{
@@ -204,13 +204,13 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
m_contactManager = new IRCContactManager(mNickName, this);
setMyself( m_contactManager->mySelf() );
- setAccountLabel( QString::fromLatin1("%1@%2").arg(mNickName,networkName) );
+ setAccountLabel( TQString::fromLatin1("%1@%2").arg(mNickName,networkName) );
m_myServer = m_contactManager->myServer();
- m_joinChannelAction = new KAction ( i18n("Join Channel..."), QString::null, 0, this,
- SLOT(slotJoinChannel()), this);
- m_searchChannelAction = new KAction ( i18n("Search Channels..."), QString::null, 0, this,
- SLOT(slotSearchChannels()), this);
+ m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString::null, 0, this,
+ TQT_SLOT(slotJoinChannel()), this);
+ m_searchChannelAction = new KAction ( i18n("Search Channels..."), TQString::null, 0, this,
+ TQT_SLOT(slotSearchChannels()), this);
}
IRCAccount::~IRCAccount()
@@ -219,12 +219,12 @@ IRCAccount::~IRCAccount()
m_engine->quit(i18n("Plugin Unloaded"), true);
}
-void IRCAccount::slotNickInUse( const QString &nick )
+void IRCAccount::slotNickInUse( const TQString &nick )
{
- QString altNickName = altNick();
+ TQString altNickName = altNick();
if( triedAltNick || altNickName.isEmpty() )
{
- QString newNick = KInputDialog::getText(
+ TQString newNick = KInputDialog::getText(
i18n("IRC Plugin"),
i18n("The nickname %1 is already in use. Please enter an alternate nickname:").arg(nick),
nick);
@@ -241,28 +241,28 @@ void IRCAccount::slotNickInUse( const QString &nick )
}
}
-void IRCAccount::slotNickInUseAlert( const QString &nick )
+void IRCAccount::slotNickInUseAlert( const TQString &nick )
{
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("The nickname %1 is already in use").arg(nick), i18n("IRC Plugin"));
}
-void IRCAccount::setAltNick( const QString &altNick )
+void IRCAccount::setAltNick( const TQString &altNick )
{
- configGroup()->writeEntry(QString::fromLatin1( "altNick" ), altNick);
+ configGroup()->writeEntry(TQString::fromLatin1( "altNick" ), altNick);
}
-const QString IRCAccount::altNick() const
+const TQString IRCAccount::altNick() const
{
- return configGroup()->readEntry(QString::fromLatin1("altNick"));
+ return configGroup()->readEntry(TQString::fromLatin1("altNick"));
}
void IRCAccount::setAutoShowServerWindow( bool show )
{
autoShowServerWindow = show;
- configGroup()->writeEntry(QString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
+ configGroup()->writeEntry(TQString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
}
-const QString IRCAccount::networkName() const
+const TQString IRCAccount::networkName() const
{
if( m_network )
return m_network->name;
@@ -270,29 +270,29 @@ const QString IRCAccount::networkName() const
return i18n("Unknown");
}
-void IRCAccount::setUserName( const QString &userName )
+void IRCAccount::setUserName( const TQString &userName )
{
m_engine->setUserName(userName);
configGroup()->writeEntry(CONFIG_USERNAME, userName);
}
-const QString IRCAccount::userName() const
+const TQString IRCAccount::userName() const
{
return configGroup()->readEntry(CONFIG_USERNAME);
}
-void IRCAccount::setRealName( const QString &userName )
+void IRCAccount::setRealName( const TQString &userName )
{
m_engine->setRealName(userName);
configGroup()->writeEntry(CONFIG_REALNAME, userName);
}
-const QString IRCAccount::realName() const
+const TQString IRCAccount::realName() const
{
return configGroup()->readEntry(CONFIG_REALNAME);
}
-void IRCAccount::setNetwork( const QString &network )
+void IRCAccount::setNetwork( const TQString &network )
{
IRCNetwork *net = m_protocol->networks()[ network ];
if( net )
@@ -311,7 +311,7 @@ void IRCAccount::setNetwork( const QString &network )
}
}
-void IRCAccount::setNickName( const QString &nick )
+void IRCAccount::setNickName( const TQString &nick )
{
mNickName = nick;
configGroup()->writeEntry(CONFIG_NICKNAME, mNickName);
@@ -321,7 +321,7 @@ void IRCAccount::setNickName( const QString &nick )
}
// FIXME: Possible null pointer usage here
-void IRCAccount::setCodec( QTextCodec *codec )
+void IRCAccount::setCodec( TQTextCodec *codec )
{
mCodec = codec;
configGroup()->writeEntry(CONFIG_CODECMIB, codec->mibEnum());
@@ -330,71 +330,71 @@ void IRCAccount::setCodec( QTextCodec *codec )
m_engine->setDefaultCodec( mCodec );
}
-QTextCodec *IRCAccount::codec() const
+TQTextCodec *IRCAccount::codec() const
{
return mCodec;
}
// FIXME: Move this to a dictionnary
-void IRCAccount::setDefaultPart( const QString &defaultPart )
+void IRCAccount::setDefaultPart( const TQString &defaultPart )
{
- configGroup()->writeEntry( QString::fromLatin1( "defaultPart" ), defaultPart );
+ configGroup()->writeEntry( TQString::fromLatin1( "defaultPart" ), defaultPart );
}
// FIXME: Move this to a dictionnary
-void IRCAccount::setDefaultQuit( const QString &defaultQuit )
+void IRCAccount::setDefaultQuit( const TQString &defaultQuit )
{
- configGroup()->writeEntry( QString::fromLatin1( "defaultQuit" ), defaultQuit );
+ configGroup()->writeEntry( TQString::fromLatin1( "defaultQuit" ), defaultQuit );
}
// FIXME: Move this to a dictionnary
-const QString IRCAccount::defaultPart() const
+const TQString IRCAccount::defaultPart() const
{
- QString partMsg = configGroup()->readEntry(QString::fromLatin1("defaultPart"));
+ TQString partMsg = configGroup()->readEntry(TQString::fromLatin1("defaultPart"));
if( partMsg.isEmpty() )
- return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() );
+ return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() );
return partMsg;
}
-const QString IRCAccount::defaultQuit() const
+const TQString IRCAccount::defaultQuit() const
{
- QString quitMsg = configGroup()->readEntry(QString::fromLatin1("defaultQuit"));
+ TQString quitMsg = configGroup()->readEntry(TQString::fromLatin1("defaultQuit"));
if( quitMsg.isEmpty() )
- return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version());
+ return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version());
return quitMsg;
}
-void IRCAccount::setCustomCtcpReplies( const QMap< QString, QString > &replies ) const
+void IRCAccount::setCustomCtcpReplies( const TQMap< TQString, TQString > &replies ) const
{
- QStringList val;
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ TQStringList val;
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
{
m_engine->addCustomCtcp( it.key(), it.data() );
- val.append( QString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) );
+ val.append( TQString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) );
}
configGroup()->writeEntry( "CustomCtcp", val );
}
-const QMap< QString, QString > IRCAccount::customCtcpReplies() const
+const TQMap< TQString, TQString > IRCAccount::customCtcpReplies() const
{
- QMap< QString, QString > replies;
- QStringList replyList;
+ TQMap< TQString, TQString > replies;
+ TQStringList replyList;
replyList = configGroup()->readListEntry( "CustomCtcp" );
- for( QStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it )
+ for( TQStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it )
replies[ (*it).section('=', 0, 0 ) ] = (*it).section('=', 1 );
return replies;
}
-void IRCAccount::setConnectCommands( const QStringList &commands ) const
+void IRCAccount::setConnectCommands( const TQStringList &commands ) const
{
configGroup()->writeEntry( "ConnectCommands", commands );
}
-const QStringList IRCAccount::connectCommands() const
+const TQStringList IRCAccount::connectCommands() const
{
return configGroup()->readListEntry( "ConnectCommands" );
}
@@ -416,7 +416,7 @@ void IRCAccount::setMessageDestinations( int serverNotices, int serverMessages,
KActionMenu *IRCAccount::actionMenu()
{
- QString menuTitle = QString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() );
+ TQString menuTitle = TQString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() );
KActionMenu *mActionMenu = Kopete::Account::actionMenu();
@@ -426,18 +426,18 @@ KActionMenu *IRCAccount::actionMenu()
mActionMenu->popupMenu()->insertSeparator();
mActionMenu->insert(m_joinChannelAction);
mActionMenu->insert(m_searchChannelAction);
- mActionMenu->insert( new KAction ( i18n("Show Server Window"), QString::null, 0, this, SLOT(slotShowServerWindow()), mActionMenu ) );
+ mActionMenu->insert( new KAction ( i18n("Show Server Window"), TQString::null, 0, this, TQT_SLOT(slotShowServerWindow()), mActionMenu ) );
if( m_engine->isConnected() && m_engine->useSSL() )
{
mActionMenu->insert( new KAction ( i18n("Show Security Information"), "", 0, m_engine,
- SLOT(showInfoDialog()), mActionMenu ) );
+ TQT_SLOT(showInfoDialog()), mActionMenu ) );
}
return mActionMenu;
}
-void IRCAccount::connectWithPassword(const QString &password)
+void IRCAccount::connectWithPassword(const TQString &password)
{
//TODO: honor the initial status
@@ -450,7 +450,7 @@ void IRCAccount::connectWithPassword(const QString &password)
{
if( m_network )
{
- QValueList<IRCHost*> &hosts = m_network->hosts;
+ TQValueList<IRCHost*> &hosts = m_network->hosts;
if( hosts.count() == 0 )
{
KMessageBox::queuedMessageBox(
@@ -472,7 +472,7 @@ void IRCAccount::connectWithPassword(const QString &password)
// if prefer SSL is set, sort by SSL first
if (configGroup()->readBoolEntry("PreferSSL"))
{
- typedef QValueList<IRCHost*> IRCHostList;
+ typedef TQValueList<IRCHost*> IRCHostList;
IRCHostList sslFirst;
IRCHostList::iterator it;
for ( it = hosts.begin(); it != hosts.end(); ++it )
@@ -534,7 +534,7 @@ void IRCAccount::engineStatusChanged(KIRC::Engine::Status newStatus)
// after the 001 is sent, you need to wait until all the init junk is done.
// Unfortunatly, there is no way for us to know when it is done (it could be
// spewing out any number of replies), so just try delaying it
- QTimer::singleShot( 250, this, SLOT( slotPerformOnConnectCommands() ) );
+ TQTimer::singleShot( 250, this, TQT_SLOT( slotPerformOnConnectCommands() ) );
}
break;
case KIRC::Engine::Closing:
@@ -563,14 +563,14 @@ void IRCAccount::slotPerformOnConnectCommands()
return;
if (!autoConnect.isEmpty())
- Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/join %1").arg(autoConnect), manager);
+ Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/join %1").arg(autoConnect), manager);
- QStringList commands(connectCommands());
- for (QStringList::Iterator it=commands.begin(); it != commands.end(); ++it)
+ TQStringList commands(connectCommands());
+ for (TQStringList::Iterator it=commands.begin(); it != commands.end(); ++it)
Kopete::CommandHandler::commandHandler()->processMessage(*it, manager);
}
-void IRCAccount::slotJoinedUnknownChannel(const QString &channel, const QString &nick)
+void IRCAccount::slotJoinedUnknownChannel(const TQString &channel, const TQString &nick)
{
if ( nick.lower() == m_contactManager->mySelf()->nickName().lower() )
{
@@ -598,7 +598,7 @@ void IRCAccount::slotSearchChannels()
{
m_channelList = new ChannelListDialog( m_engine,
i18n("Channel List for %1").arg( m_engine->currentHost() ), this,
- SLOT( slotJoinNamedChannel( const QString & ) ) );
+ TQT_SLOT( slotJoinNamedChannel( const TQString & ) ) );
}
else
m_channelList->clear();
@@ -612,7 +612,7 @@ void IRCAccount::listChannels()
m_channelList->search();
}
-void IRCAccount::quit( const QString &quitMessage )
+void IRCAccount::quit( const TQString &quitMessage )
{
kdDebug(14120) << "Quitting IRC: " << quitMessage << endl;
@@ -622,7 +622,7 @@ void IRCAccount::quit( const QString &quitMessage )
m_engine->quit( quitMessage );
}
-void IRCAccount::setAway(bool isAway, const QString &awayMessage)
+void IRCAccount::setAway(bool isAway, const TQString &awayMessage)
{
kdDebug(14120) << k_funcinfo << isAway << " " << awayMessage << endl;
if(m_engine->isConnected())
@@ -641,7 +641,7 @@ void IRCAccount::slotFailedServerPassword()
password().setWrong();
connect();
}
-void IRCAccount::slotGoAway( const QString &reason )
+void IRCAccount::slotGoAway( const TQString &reason )
{
setAway( true, reason );
}
@@ -657,7 +657,7 @@ bool IRCAccount::isConnected()
return m_engine->isConnected();
}
-void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason )
+void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason )
{
if ( status.status() == Kopete::OnlineStatus::Online &&
myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline )
@@ -672,7 +672,7 @@ void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QSt
}
-void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString &newnick)
+void IRCAccount::successfullyChangedNick(const TQString &oldnick, const TQString &newnick)
{
kdDebug(14120) << k_funcinfo << "Changing nick to " << newnick << endl;
mNickName = newnick;
@@ -681,7 +681,7 @@ void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString &
m_contactManager->addToNotifyList( newnick );
}
-bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m )
+bool IRCAccount::createContact( const TQString &contactId, Kopete::MetaContact *m )
{
kdDebug(14120) << k_funcinfo << contactManager() << endl;
IRCContact *c;
@@ -700,7 +700,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m
return false;
}
- else if (contactId.startsWith(QString::fromLatin1("#")))
+ else if (contactId.startsWith(TQString::fromLatin1("#")))
{
c = static_cast<IRCContact*>(contactManager()->findChannel(contactId, m));
}
@@ -724,7 +724,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m
return true;
}
-void IRCAccount::slotJoinNamedChannel(const QString &chan)
+void IRCAccount::slotJoinNamedChannel(const TQString &chan)
{
contactManager()->findChannel(chan)->startChat();
}
@@ -744,12 +744,12 @@ void IRCAccount::slotJoinChannel()
if (!isConnected())
return;
- QStringList chans = configGroup()->readListEntry( "Recent Channel list" );
+ TQStringList chans = configGroup()->readListEntry( "Recent Channel list" );
//kdDebug(14120) << "Recent channel list from config: " << chans << endl;
KLineEditDlg dlg(
i18n("Please enter name of the channel you want to join:"),
- QString::null,
+ TQString::null,
Kopete::UI::Global::mainWidget()
);
@@ -761,10 +761,10 @@ void IRCAccount::slotJoinChannel()
while( true )
{
- if( dlg.exec() != QDialog::Accepted )
+ if( dlg.exec() != TQDialog::Accepted )
break;
- QString chan = dlg.text();
+ TQString chan = dlg.text();
if( chan.isNull() )
break;
@@ -787,12 +787,12 @@ void IRCAccount::slotJoinChannel()
}
}
-void IRCAccount::slotNewCtcpReply(const QString &type, const QString &/*target*/, const QString &messageReceived)
+void IRCAccount::slotNewCtcpReply(const TQString &type, const TQString &/*target*/, const TQString &messageReceived)
{
appendMessage( i18n("CTCP %1 REPLY: %2").arg(type).arg(messageReceived), InfoReply );
}
-void IRCAccount::slotNoSuchNickname( const QString &nick )
+void IRCAccount::slotNoSuchNickname( const TQString &nick )
{
if( KIRC::Entity::isChannel(nick) )
appendMessage( i18n("The channel \"%1\" does not exist").arg(nick), UnknownReply );
@@ -800,7 +800,7 @@ void IRCAccount::slotNoSuchNickname( const QString &nick )
appendMessage( i18n("The nickname \"%1\" does not exist").arg(nick), UnknownReply );
}
-void IRCAccount::appendMessage( const QString &message, MessageType type )
+void IRCAccount::appendMessage( const TQString &message, MessageType type )
{
// TODO: Impliment a UI where people can pick multiple destinations
// for a message type, and make codethis handle it
@@ -852,7 +852,7 @@ void IRCAccount::appendMessage( const QString &message, MessageType type )
if( destination == KNotify )
{
KNotifyClient::event(
- Kopete::UI::Global::mainWidget()->winId(), QString::fromLatin1("irc_event"), message
+ Kopete::UI::Global::mainWidget()->winId(), TQString::fromLatin1("irc_event"), message
);
}
}
@@ -867,7 +867,7 @@ IRCServerContact *IRCAccount::myServer() const
return m_myServer;
}
-IRCContact *IRCAccount::getContact(const QString &name, Kopete::MetaContact *metac)
+IRCContact *IRCAccount::getContact(const TQString &name, Kopete::MetaContact *metac)
{
return getContact(m_engine->getEntity(name), metac);
}
@@ -889,7 +889,7 @@ IRCContact *IRCAccount::getContact(KIRC::EntityPtr entity, Kopete::MetaContact *
m_contacts.append(contact);
}
- QObject::connect(contact, SIGNAL(destroyed(IRCContact *)), SLOT(destroyed(IRCContact *)));
+ TQObject::connect(contact, TQT_SIGNAL(destroyed(IRCContact *)), TQT_SLOT(destroyed(IRCContact *)));
return contact;
}
diff --git a/kopete/protocols/irc/ircaccount.h b/kopete/protocols/irc/ircaccount.h
index e5917360..1aa4072e 100644
--- a/kopete/protocols/irc/ircaccount.h
+++ b/kopete/protocols/irc/ircaccount.h
@@ -27,8 +27,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class ChannelListDialog;
@@ -53,17 +53,17 @@ class KActionMenu;
struct IRCHost
{
- QString host;
+ TQString host;
uint port;
- QString password;
+ TQString password;
bool ssl;
};
struct IRCNetwork
{
- QString name;
- QString description;
- QValueList<IRCHost*> hosts;
+ TQString name;
+ TQString description;
+ TQValueList<IRCHost*> hosts;
};
class IRCAccount
@@ -75,11 +75,11 @@ class IRCAccount
Q_OBJECT
public:
- static const QString CONFIG_CODECMIB;
- static const QString CONFIG_NETWORKNAME;
- static const QString CONFIG_NICKNAME;
- static const QString CONFIG_USERNAME;
- static const QString CONFIG_REALNAME;
+ static const TQString CONFIG_CODECMIB;
+ static const TQString CONFIG_NETWORKNAME;
+ static const TQString CONFIG_NICKNAME;
+ static const TQString CONFIG_USERNAME;
+ static const TQString CONFIG_REALNAME;
enum MessageType
{
@@ -100,69 +100,69 @@ public:
Ignore = 5
};
- IRCAccount(IRCProtocol *p, const QString &accountid, const QString &autoConnect = QString::null,
- const QString& networkName = QString::null, const QString &nickName = QString::null);
+ IRCAccount(IRCProtocol *p, const TQString &accountid, const TQString &autoConnect = TQString::null,
+ const TQString& networkName = TQString::null, const TQString &nickName = TQString::null);
virtual ~IRCAccount();
- void setNickName( const QString & );
+ void setNickName( const TQString & );
void setAutoShowServerWindow( bool show );
- void setAltNick( const QString & );
- const QString altNick() const;
+ void setAltNick( const TQString & );
+ const TQString altNick() const;
- void setUserName( const QString & );
- const QString userName() const;
+ void setUserName( const TQString & );
+ const TQString userName() const;
- void setRealName( const QString & );
- const QString realName() const;
+ void setRealName( const TQString & );
+ const TQString realName() const;
- const QStringList connectCommands() const;
+ const TQStringList connectCommands() const;
- void setConnectCommands( const QStringList & ) const;
+ void setConnectCommands( const TQStringList & ) const;
- void setDefaultPart( const QString & );
+ void setDefaultPart( const TQString & );
- void setNetwork( const QString & );
+ void setNetwork( const TQString & );
- void setDefaultQuit( const QString & );
+ void setDefaultQuit( const TQString & );
- void setCodec( QTextCodec *codec );
+ void setCodec( TQTextCodec *codec );
void setMessageDestinations( int serverNotices, int serverMessages,
int informationReplies, int errorMessages );
- QTextCodec *codec() const;
+ TQTextCodec *codec() const;
- const QString defaultPart() const;
+ const TQString defaultPart() const;
- const QString defaultQuit() const;
+ const TQString defaultQuit() const;
- const QString networkName() const;
+ const TQString networkName() const;
- QMap< QString, QString > customCtcp() const;
+ TQMap< TQString, TQString > customCtcp() const;
- void setCustomCtcpReplies( const QMap< QString, QString > &replys ) const;
+ void setCustomCtcpReplies( const TQMap< TQString, TQString > &replys ) const;
- const QMap<QString, QString> customCtcpReplies() const;
+ const TQMap<TQString, TQString> customCtcpReplies() const;
void setCurrentCommandSource( Kopete::ChatSession *session );
Kopete::ChatSession *currentCommandSource();
- IRCContact *getContact(const QString &name, Kopete::MetaContact *metac=0);
+ IRCContact *getContact(const TQString &name, Kopete::MetaContact *metac=0);
IRCContact *getContact(KIRC::EntityPtr entity, Kopete::MetaContact *metac=0);
public slots:
virtual KActionMenu *actionMenu();
- virtual void setAway( bool isAway, const QString &awayMessage = QString::null );
+ virtual void setAway( bool isAway, const TQString &awayMessage = TQString::null );
virtual bool isConnected();
/** 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);
// Returns the KIRC engine instance
KIRC::Engine *engine() const { return m_engine; }
@@ -178,19 +178,19 @@ public slots:
// Returns the Kopete::Contact of the server of the user
IRCServerContact *myServer() const;
- void successfullyChangedNick(const QString &, const QString &);
+ void successfullyChangedNick(const TQString &, const TQString &);
- virtual void connectWithPassword( const QString & );
+ virtual void connectWithPassword( const TQString & );
virtual void disconnect();
- void quit( const QString &quitMessage = QString::null );
+ void quit( const TQString &quitMessage = TQString::null );
void listChannels();
- void appendMessage( const QString &message, MessageType type = Default );
+ void appendMessage( const TQString &message, MessageType type = Default );
protected:
- virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact ) ;
+ virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) ;
private slots:
void engineStatusChanged(KIRC::Engine::Status newStatus);
@@ -198,31 +198,31 @@ private slots:
void destroyed(IRCContact *contact);
void slotFailedServerPassword();
- void slotGoAway( const QString &reason );
- void slotJoinNamedChannel( const QString &channel );
+ void slotGoAway( const TQString &reason );
+ void slotJoinNamedChannel( const TQString &channel );
void slotJoinChannel();
void slotShowServerWindow();
- void slotNickInUse( const QString &nick );
- void slotNickInUseAlert( const QString &nick );
+ void slotNickInUse( const TQString &nick );
+ void slotNickInUseAlert( const TQString &nick );
void slotServerBusy();
- void slotNoSuchNickname( const QString &nick );
+ void slotNoSuchNickname( const TQString &nick );
void slotSearchChannels();
- void slotNewCtcpReply(const QString &type, const QString &target, const QString &messageReceived);
- void slotJoinedUnknownChannel( const QString &channel, const QString &nick );
+ void slotNewCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived);
+ void slotJoinedUnknownChannel( const TQString &channel, const TQString &nick );
void slotPerformOnConnectCommands();
private:
Kopete::ChatSession *m_manager;
- QString mNickName;
+ TQString mNickName;
Kopete::AwayAction *mAwayAction;
bool triedAltNick;
bool autoShowServerWindow;
- QString autoConnect;
+ TQString autoConnect;
KIRC::Engine *m_engine;
IRCNetwork *m_network;
uint currentHost;
- QTextCodec *mCodec;
+ TQTextCodec *mCodec;
MessageDestination m_serverNotices;
MessageDestination m_serverMessages;
@@ -231,11 +231,11 @@ private:
ChannelListDialog *m_channelList;
- QValueList<IRCContact *> m_contacts;
+ TQValueList<IRCContact *> m_contacts;
IRCContactManager *m_contactManager;
IRCServerContact *m_myServer;
- QMap< QString, QString > m_customCtcp;
+ TQMap< TQString, TQString > m_customCtcp;
Kopete::ChatSession *commandSource;
KAction *m_joinChannelAction;
diff --git a/kopete/protocols/irc/ircaddcontactpage.cpp b/kopete/protocols/irc/ircaddcontactpage.cpp
index db4ca3b2..6b19721c 100644
--- a/kopete/protocols/irc/ircaddcontactpage.cpp
+++ b/kopete/protocols/irc/ircaddcontactpage.cpp
@@ -23,38 +23,38 @@
#include "ircaccount.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qframe.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqframe.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-IRCAddContactPage::IRCAddContactPage( QWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0)
+IRCAddContactPage::IRCAddContactPage( TQWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
ircdata = new ircAddUI(this);
- mSearch = new ChannelList( (QWidget*)ircdata->hbox, a->engine() );
+ mSearch = new ChannelList( (TQWidget*)ircdata->hbox, a->engine() );
mAccount = a;
- connect( mSearch, SIGNAL( channelSelected( const QString & ) ),
- this, SLOT( slotChannelSelected( const QString & ) ) );
+ connect( mSearch, TQT_SIGNAL( channelSelected( const TQString & ) ),
+ this, TQT_SLOT( slotChannelSelected( const TQString & ) ) );
- connect( mSearch, SIGNAL( channelDoubleClicked( const QString & ) ),
- this, SLOT( slotChannelDoubleClicked( const QString & ) ) );
+ connect( mSearch, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
+ this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) );
}
IRCAddContactPage::~IRCAddContactPage()
{
}
-void IRCAddContactPage::slotChannelSelected( const QString &channel )
+void IRCAddContactPage::slotChannelSelected( const TQString &channel )
{
ircdata->addID->setText( channel );
}
-void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel )
+void IRCAddContactPage::slotChannelDoubleClicked( const TQString &channel )
{
ircdata->addID->setText( channel );
ircdata->tabWidget3->setCurrentPage(0);
@@ -62,13 +62,13 @@ void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel )
bool IRCAddContactPage::apply(Kopete::Account *account , Kopete::MetaContact *m)
{
- QString name = ircdata->addID->text();
+ TQString name = ircdata->addID->text();
return account->addContact(name, m, Kopete::Account::ChangeKABC );
}
bool IRCAddContactPage::validateData()
{
- QString name = ircdata->addID->text();
+ TQString name = ircdata->addID->text();
if (name.isEmpty() == true)
{
KMessageBox::sorry(this, i18n("<qt>You need to specify a channel to join, or query to open.</qt>"), i18n("You Must Specify a Channel"));
diff --git a/kopete/protocols/irc/ircaddcontactpage.h b/kopete/protocols/irc/ircaddcontactpage.h
index c6b897ff..8f5a0bec 100644
--- a/kopete/protocols/irc/ircaddcontactpage.h
+++ b/kopete/protocols/irc/ircaddcontactpage.h
@@ -33,7 +33,7 @@ class IRCAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- IRCAddContactPage(QWidget *parent=0, IRCAccount* account = 0);
+ IRCAddContactPage(TQWidget *parent=0, IRCAccount* account = 0);
~IRCAddContactPage();
ircAddUI *ircdata;
@@ -42,8 +42,8 @@ public slots:
private slots:
virtual bool validateData();
- void slotChannelSelected( const QString &channel );
- void slotChannelDoubleClicked( const QString &channel );
+ void slotChannelSelected( const TQString &channel );
+ void slotChannelDoubleClicked( const TQString &channel );
private:
IRCAccount *mAccount;
ChannelList *mSearch;
diff --git a/kopete/protocols/irc/ircchannelcontact.cpp b/kopete/protocols/irc/ircchannelcontact.cpp
index cc99acf3..cab2748b 100644
--- a/kopete/protocols/irc/ircchannelcontact.cpp
+++ b/kopete/protocols/irc/ircchannelcontact.cpp
@@ -37,33 +37,33 @@
#include <kglobal.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
//This is the number of nicknames we will process concurrently when joining a channel
//Lower numbers ensure less GUI blocking, but take marginally longer to complete.
//Higher numbers are absolute fastest, but block GUI until all members are added
#define NICK_BATCH_LENGTH 1
-IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const QString &channel, Kopete::MetaContact *metac)
+IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const TQString &channel, Kopete::MetaContact *metac)
: IRCContact(contactManager, channel, metac, "irc_channel")
{
KIRC::Engine *engine = kircEngine();
- mInfoTimer = new QTimer( this );
- QObject::connect(mInfoTimer, SIGNAL(timeout()), this, SLOT( slotUpdateInfo() ) );
+ mInfoTimer = new TQTimer( this );
+ TQObject::connect(mInfoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUpdateInfo() ) );
- QObject::connect(engine, SIGNAL(incomingUserIsAway(const QString &, const QString &)),
- this, SLOT(slotIncomingUserIsAway(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingUserIsAway(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotIncomingUserIsAway(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingListedChan(const QString &, uint, const QString &)),
- this, SLOT(slotChannelListed(const QString &, uint, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingListedChan(const TQString &, uint, const TQString &)),
+ this, TQT_SLOT(slotChannelListed(const TQString &, uint, const TQString &)));
actionJoin = 0L;
- actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, SLOT(slotModeChanged()), this );
- actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, SLOT(slotModeChanged()), this );
- actionModeS = new KToggleAction(i18n("&Secret"), 0, this, SLOT(slotModeChanged()), this );
- actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, SLOT(slotModeChanged()), this );
- actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, SLOT(slotModeChanged()), this );
+ actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeS = new KToggleAction(i18n("&Secret"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, TQT_SLOT(slotModeChanged()), this );
actionHomePage = 0L;
updateStatus();
@@ -78,9 +78,9 @@ void IRCChannelContact::slotUpdateInfo()
/** This woudl be nice, but it generates server errors too often
if( !manager(Kopete::Contact::CannotCreate) && onlineStatus() == m_protocol->m_ChannelStatusOnline )
- kircEngine()->writeMessage( QString::fromLatin1("LIST %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("LIST %1").arg(m_nickName) );
else
- setProperty( QString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() );
+ setProperty( TQString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() );
*/
KIRC::Engine *engine = kircEngine();
@@ -88,7 +88,7 @@ void IRCChannelContact::slotUpdateInfo()
if (manager(Kopete::Contact::CannotCreate))
{
setProperty(m_protocol->propChannelMembers, manager()->members().count());
- engine->writeMessage(QString::fromLatin1("WHO %1").arg(m_nickName));
+ engine->writeMessage(TQString::fromLatin1("WHO %1").arg(m_nickName));
}
else
{
@@ -99,7 +99,7 @@ void IRCChannelContact::slotUpdateInfo()
mInfoTimer->start( 45000, true );
}
-void IRCChannelContact::slotChannelListed( const QString &channel, uint members, const QString &topic )
+void IRCChannelContact::slotChannelListed( const TQString &channel, uint members, const TQString &topic )
{
if (!manager(Kopete::Contact::CannotCreate) &&
onlineStatus() == m_protocol->m_ChannelStatusOnline &&
@@ -191,7 +191,7 @@ void IRCChannelContact::slotConnectedToServer()
kircEngine()->join(m_nickName, password());
}
-void IRCChannelContact::namesList(const QStringList &nicknames)
+void IRCChannelContact::namesList(const TQStringList &nicknames)
{
mInfoTimer->stop();
mJoinedNicks += nicknames;
@@ -200,7 +200,7 @@ void IRCChannelContact::namesList(const QStringList &nicknames)
void IRCChannelContact::endOfNames()
{
- setMode(QString::null);
+ setMode(TQString::null);
slotUpdateInfo();
}
@@ -217,8 +217,8 @@ void IRCChannelContact::slotAddNicknames()
{
// Pick a nick from the front of the list.
- QString nickToAdd = mJoinedNicks.front();
- QChar firstChar = nickToAdd[0];
+ TQString nickToAdd = mJoinedNicks.front();
+ TQChar firstChar = nickToAdd[0];
if( firstChar == '@' || firstChar == '%' || firstChar == '+' )
nickToAdd = nickToAdd.remove(0, 1);
@@ -261,10 +261,10 @@ void IRCChannelContact::slotAddNicknames()
mJoinedNicks.pop_front();
}
- QTimer::singleShot( 0, this, SLOT( slotAddNicknames() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAddNicknames() ) );
}
-void IRCChannelContact::channelTopic(const QString &topic)
+void IRCChannelContact::channelTopic(const TQString &topic)
{
mTopic = topic;
setProperty( m_protocol->propChannelTopic, mTopic );
@@ -283,7 +283,7 @@ void IRCChannelContact::channelTopic(const QString &topic)
}
}
-void IRCChannelContact::channelHomePage(const QString &url)
+void IRCChannelContact::channelHomePage(const TQString &url)
{
kdDebug(14120) << k_funcinfo << endl;
setProperty( m_protocol->propHomepage, url );
@@ -303,9 +303,9 @@ void IRCChannelContact::join()
if (manager()) {
connect(manager(),
- SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
+ TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
const Kopete::OnlineStatus &)),
- SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
+ TQT_SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
const Kopete::OnlineStatus &)));
}
}
@@ -322,7 +322,7 @@ void IRCChannelContact::part()
kircEngine()->part(m_nickName, ircAccount()->defaultPart());
}
-void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QString & )
+void IRCChannelContact::slotIncomingUserIsAway( const TQString &nick, const TQString & )
{
IRCAccount *account = ircAccount();
@@ -348,7 +348,7 @@ void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QStri
}
}
-void IRCChannelContact::userJoinedChannel(const QString &nickname)
+void IRCChannelContact::userJoinedChannel(const TQString &nickname)
{
IRCAccount *account = ircAccount();
@@ -385,7 +385,7 @@ void IRCChannelContact::userJoinedChannel(const QString &nickname)
}
}
-void IRCChannelContact::userPartedChannel(const QString &nickname,const QString &reason)
+void IRCChannelContact::userPartedChannel(const TQString &nickname,const TQString &reason)
{
IRCAccount *account = ircAccount();
@@ -401,7 +401,7 @@ void IRCChannelContact::userPartedChannel(const QString &nickname,const QString
}
}
-void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicked, const QString &reason)
+void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason)
{
IRCAccount *account = ircAccount();
@@ -410,7 +410,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
Kopete::Contact *c = locateUser( nickKicked );
if (c)
{
- QString r;
+ TQString r;
if ((reason != nick) && (reason != nickKicked)) {
r = i18n( "%1 was kicked by %2. Reason: %3" ).arg(nickKicked, nick, reason);
@@ -431,7 +431,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
}
else
{
- QString r;
+ TQString r;
if ((reason != nick) && (reason != nickKicked)) {
r = i18n( "You were kicked from %1 by %2. Reason: %3" ).arg(m_nickName, nickKicked, reason);
@@ -444,7 +444,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
}
}
-void IRCChannelContact::setTopic(const QString &topic)
+void IRCChannelContact::setTopic(const TQString &topic)
{
IRCAccount *account = ircAccount();
@@ -454,7 +454,7 @@ void IRCChannelContact::setTopic(const QString &topic)
m_protocol->m_UserStatusOp || !modeEnabled('t') )
{
bool okPressed = true;
- QString newTopic = topic;
+ TQString newTopic = topic;
if( newTopic.isNull() )
newTopic = KInputDialog::getText( i18n("New Topic"), i18n("Enter the new topic:"),
Kopete::Message::unescape(mTopic), &okPressed, 0L );
@@ -475,7 +475,7 @@ void IRCChannelContact::setTopic(const QString &topic)
}
}
-void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopic)
+void IRCChannelContact::topicChanged(const TQString &nick, const TQString &newtopic)
{
IRCAccount *account = ircAccount();
@@ -489,7 +489,7 @@ void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopi
appendMessage(msg);
}
-void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time)
+void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time)
{
IRCAccount *account = ircAccount();
@@ -501,7 +501,7 @@ void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time)
appendMessage(msg);
}
-void IRCChannelContact::incomingModeChange( const QString &nick, const QString &mode )
+void IRCChannelContact::incomingModeChange( const TQString &nick, const TQString &mode )
{
Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").arg(nick).arg(mode).arg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW);
msg.setImportance( Kopete::Message::Low); //set the importance manualy to low
@@ -509,7 +509,7 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString &
bool inParams = false;
bool modeEnabled = false;
- QString params = QString::null;
+ TQString params = TQString::null;
for( uint i=0; i < mode.length(); i++ )
{
switch( mode[i] )
@@ -535,8 +535,8 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString &
}
}
-void IRCChannelContact::incomingChannelMode( const QString &mode,
- const QString &/*params*/ )
+void IRCChannelContact::incomingChannelMode( const TQString &mode,
+ const TQString &/*params*/ )
{
for( uint i=1; i < mode.length(); i++ )
{
@@ -545,7 +545,7 @@ void IRCChannelContact::incomingChannelMode( const QString &mode,
}
}
-void IRCChannelContact::setMode(const QString &mode)
+void IRCChannelContact::setMode(const TQString &mode)
{
if (manager(Kopete::Contact::CannotCreate))
kircEngine()->mode(m_nickName, mode);
@@ -586,9 +586,9 @@ void IRCChannelContact::failedChanFull()
void IRCChannelContact::failedChankey()
{
bool ok;
- QString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ),
+ TQString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ),
i18n( "Please enter key for channel %1: ").arg(m_nickName),
- QString::null,
+ TQString::null,
&ok );
if ( !ok )
@@ -600,7 +600,7 @@ void IRCChannelContact::failedChankey()
}
}
-void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update )
+void IRCChannelContact::toggleMode( TQChar mode, bool enabled, bool update )
{
if( manager(Kopete::Contact::CannotCreate) )
{
@@ -636,16 +636,16 @@ void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update )
if( modeMap[mode] != enabled )
{
if( enabled )
- setMode( QString::fromLatin1("+") + mode );
+ setMode( TQString::fromLatin1("+") + mode );
else
- setMode( QString::fromLatin1("-") + mode );
+ setMode( TQString::fromLatin1("-") + mode );
}
}
modeMap[mode] = enabled;
}
-bool IRCChannelContact::modeEnabled( QChar mode, QString *value )
+bool IRCChannelContact::modeEnabled( TQChar mode, TQString *value )
{
if( !value )
return modeMap[mode];
@@ -653,20 +653,20 @@ bool IRCChannelContact::modeEnabled( QChar mode, QString *value )
return false;
}
-QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
+TQPtrList<KAction> *IRCChannelContact::customContextMenuActions()
{
- QPtrList<KAction> *mCustomActions = new QPtrList<KAction>();
+ TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction>();
if( !actionJoin )
{
- actionJoin = new KAction(i18n("&Join"), 0, this, SLOT(join()), this, "actionJoin");
- actionPart = new KAction(i18n("&Part"), 0, this, SLOT(partAction()), this, "actionPart");
- actionTopic = new KAction(i18n("Change &Topic..."), 0, this, SLOT(setTopic()), this, "actionTopic");
+ actionJoin = new KAction(i18n("&Join"), 0, this, TQT_SLOT(join()), this, "actionJoin");
+ actionPart = new KAction(i18n("&Part"), 0, this, TQT_SLOT(partAction()), this, "actionPart");
+ actionTopic = new KAction(i18n("Change &Topic..."), 0, this, TQT_SLOT(setTopic()), this, "actionTopic");
actionModeMenu = new KActionMenu(i18n("Channel Modes"), 0, this, "actionModeMenu");
if( !property(m_protocol->propHomepage).value().isNull() )
{
actionHomePage = new KAction( i18n("Visit &Homepage"), 0, this,
- SLOT(slotHomepage()), this, "actionHomepage");
+ TQT_SLOT(slotHomepage()), this, "actionHomepage");
}
else if( actionHomePage )
{
@@ -681,8 +681,8 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
actionModeMenu->setEnabled( true );
codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" );
- connect( codecAction, SIGNAL( activated( const QTextCodec * ) ),
- this, SLOT( setCodec( const QTextCodec *) ) );
+ connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ),
+ this, TQT_SLOT( setCodec( const TQTextCodec *) ) );
codecAction->setCodec( codec() );
}
@@ -708,23 +708,23 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
void IRCChannelContact::slotHomepage()
{
- QString homePage = property(m_protocol->propHomepage).value().toString();
+ TQString homePage = property(m_protocol->propHomepage).value().toString();
if( !homePage.isEmpty() )
{
new KRun( KURL( homePage ), 0, false);
}
}
-const QString IRCChannelContact::caption() const
+const TQString IRCChannelContact::caption() const
{
- QString cap = QString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
+ TQString cap = TQString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
if(!mTopic.isEmpty())
- cap.append( QString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) );
+ cap.append( TQString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) );
return cap;
}
-void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message)
+void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
{
if(to == this)
{
@@ -734,7 +734,7 @@ void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const Q
}
}
-void IRCChannelContact::newAction(const QString &from, const QString &action)
+void IRCChannelContact::newAction(const TQString &from, const TQString &action)
{
IRCAccount *account = ircAccount();
diff --git a/kopete/protocols/irc/ircchannelcontact.h b/kopete/protocols/irc/ircchannelcontact.h
index 15a72e17..0febd30b 100644
--- a/kopete/protocols/irc/ircchannelcontact.h
+++ b/kopete/protocols/irc/ircchannelcontact.h
@@ -49,50 +49,50 @@ class IRCChannelContact
Q_OBJECT
public:
- IRCChannelContact(IRCContactManager *, const QString &channel, Kopete::MetaContact *metac);
+ IRCChannelContact(IRCContactManager *, const TQString &channel, Kopete::MetaContact *metac);
~IRCChannelContact();
/**
* Returns the current topic for this channel.
*/
- const QString &topic() const { return mTopic; };
+ const TQString &topic() const { return mTopic; };
/* Set password for a channel */
- void setPassword(const QString &password) { mPassword = password; }
+ void setPassword(const TQString &password) { mPassword = password; }
/* Get password for a channel */
- const QString &password() const { return mPassword; }
+ const TQString &password() const { return mPassword; }
/**
* Returns if a mode is enabled for this channel.
* @param mode The mode you want to check ( 't', 'n', etc. )
- * @param value This is a pointer to a QString which is set to
+ * @param value This is a pointer to a TQString which is set to
* the value of the mode if it has one. Example, the mode 'l' or
* the mode 'k'. If the mode has no such value then the pointer
* is always returned null.
*/
- bool modeEnabled( QChar mode, QString *value = 0 );
+ bool modeEnabled( TQChar mode, TQString *value = 0 );
// Kopete::Contact stuff
- virtual QPtrList<KAction> *customContextMenuActions();
- virtual const QString caption() const;
+ virtual TQPtrList<KAction> *customContextMenuActions();
+ virtual const TQString caption() const;
//Methods handled by the signal mapper
- void userJoinedChannel(const QString &user);
- void userPartedChannel(const QString &user, const QString &reason);
- void userKicked(const QString &nick, const QString &nickKicked, const QString &reason);
- void channelTopic(const QString &topic);
- void channelHomePage(const QString &url);
- void topicChanged(const QString &nick, const QString &newtopic);
- void topicUser(const QString &nick, const QDateTime &time);
- void namesList(const QStringList &nicknames);
+ void userJoinedChannel(const TQString &user);
+ void userPartedChannel(const TQString &user, const TQString &reason);
+ void userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason);
+ void channelTopic(const TQString &topic);
+ void channelHomePage(const TQString &url);
+ void topicChanged(const TQString &nick, const TQString &newtopic);
+ void topicUser(const TQString &nick, const TQDateTime &time);
+ void namesList(const TQStringList &nicknames);
void endOfNames();
- void incomingModeChange(const QString &nick, const QString &mode);
- void incomingChannelMode(const QString &mode, const QString &params );
+ void incomingModeChange(const TQString &nick, const TQString &mode);
+ void incomingChannelMode(const TQString &mode, const TQString &params );
void failedChankey();
void failedChanBanned();
void failedChanInvite();
void failedChanFull();
- void newAction(const QString &from, const QString &action);
+ void newAction(const TQString &from, const TQString &action);
public slots:
void updateStatus();
@@ -101,13 +101,13 @@ public slots:
* Sets the topic of this channel
* @param topic The topic you want set
*/
- void setTopic( const QString &topic = QString::null );
+ void setTopic( const TQString &topic = TQString::null );
/**
* Sets or unsets a mode on this channel
* @param mode The full text of the mode change you want performed
*/
- void setMode( const QString &mode = QString::null );
+ void setMode( const TQString &mode = TQString::null );
void part();
void partAction();
@@ -116,17 +116,17 @@ public slots:
protected slots:
void chatSessionDestroyed();
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
virtual void initConversation();
private slots:
- void slotIncomingUserIsAway( const QString &nick, const QString &reason );
+ void slotIncomingUserIsAway( const TQString &nick, const TQString &reason );
void slotModeChanged();
void slotAddNicknames();
void slotConnectedToServer();
void slotUpdateInfo();
void slotHomepage();
- void slotChannelListed(const QString &channel, uint members, const QString &topic);
+ void slotChannelListed(const TQString &channel, uint members, const TQString &topic);
void slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus);
private:
@@ -143,13 +143,13 @@ private:
KToggleAction *actionModeI; // Invite Only
KToggleAction *actionModeM; // Moderated
- QString mTopic;
- QString mPassword;
- QStringList mJoinedNicks;
- QMap<QString, bool> modeMap;
- QTimer *mInfoTimer;
+ TQString mTopic;
+ TQString mPassword;
+ TQStringList mJoinedNicks;
+ TQMap<TQString, bool> modeMap;
+ TQTimer *mInfoTimer;
- void toggleMode( QChar mode, bool enabled, bool update );
+ void toggleMode( TQChar mode, bool enabled, bool update );
void toggleOperatorActions( bool enabled );
};
diff --git a/kopete/protocols/irc/irccontact.cpp b/kopete/protocols/irc/irccontact.cpp
index 64f89322..349fba60 100644
--- a/kopete/protocols/irc/irccontact.cpp
+++ b/kopete/protocols/irc/irccontact.cpp
@@ -19,10 +19,10 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#include "ircaccount.h"
#include "kopeteglobal.h"
@@ -36,13 +36,13 @@
#include "irccontactmanager.h"
#include "ksparser.h"
-IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon)
+IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon)
: Kopete::Contact(account, entity->name(), metac, icon),
m_chatSession(0)
{
}
-IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon)
+IRCContact::IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon)
: Kopete::Contact(contactManager->account(), nick, metac, icon),
m_nickName(nick),
m_chatSession(0)
@@ -53,22 +53,22 @@ IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, K
setProperty( Kopete::Global::Properties::self()->nickName(), m_nickName );
// IRCContactManager stuff
- QObject::connect(contactManager, SIGNAL(privateMessage(IRCContact *, IRCContact *, const QString &)),
- this, SLOT(privateMessage(IRCContact *, IRCContact *, const QString &)));
+ TQObject::connect(contactManager, TQT_SIGNAL(privateMessage(IRCContact *, IRCContact *, const TQString &)),
+ this, TQT_SLOT(privateMessage(IRCContact *, IRCContact *, const TQString &)));
// Kopete::ChatSessionManager stuff
mMyself.append( static_cast<Kopete::Contact*>( this ) );
// KIRC stuff
- QObject::connect(engine, SIGNAL(incomingNickChange(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString&, const QString&)));
- QObject::connect(engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT(slotNewNickChange(const QString &, const QString &)));
- QObject::connect(engine, SIGNAL(incomingQuitIRC(const QString &, const QString &)),
- this, SLOT( slotUserDisconnected(const QString&, const QString&)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&)));
+ TQObject::connect(engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewNickChange(const TQString &, const TQString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingQuitIRC(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotUserDisconnected(const TQString&, const TQString&)));
- QObject::connect(engine, SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, SLOT(updateStatus()));
+ TQObject::connect(engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
+ this, TQT_SLOT(updateStatus()));
engine->setCodec( m_nickName, codec() );
}
@@ -101,43 +101,43 @@ bool IRCContact::isReachable()
return false;
}
-const QString IRCContact::caption() const
+const TQString IRCContact::caption() const
{
- return QString::null;
+ return TQString::null;
}
/*
-const QString IRCContact::formatedName() const
+const TQString IRCContact::formatedName() const
{
- return QString::null;
+ return TQString::null;
}
*/
void IRCContact::updateStatus()
{
}
-void IRCContact::privateMessage(IRCContact *, IRCContact *, const QString &)
+void IRCContact::privateMessage(IRCContact *, IRCContact *, const TQString &)
{
}
-void IRCContact::setCodec(const QTextCodec *codec)
+void IRCContact::setCodec(const TQTextCodec *codec)
{
kircEngine()->setCodec(m_nickName, codec);
- metaContact()->setPluginData(m_protocol, QString::fromLatin1("Codec"), QString::number(codec->mibEnum()));
+ metaContact()->setPluginData(m_protocol, TQString::fromLatin1("Codec"), TQString::number(codec->mibEnum()));
}
-const QTextCodec *IRCContact::codec()
+const TQTextCodec *IRCContact::codec()
{
- QString codecId = metaContact()->pluginData(m_protocol, QString::fromLatin1("Codec"));
- QTextCodec *codec = ircAccount()->codec();
+ TQString codecId = metaContact()->pluginData(m_protocol, TQString::fromLatin1("Codec"));
+ TQTextCodec *codec = ircAccount()->codec();
if( !codecId.isEmpty() )
{
bool test = true;
uint mib = codecId.toInt(&test);
if (test)
- codec = QTextCodec::codecForMib(mib);
+ codec = TQTextCodec::codecForMib(mib);
else
- codec = QTextCodec::codecForName(codecId.latin1());
+ codec = TQTextCodec::codecForName(codecId.latin1());
}
if( !codec )
@@ -159,10 +159,10 @@ Kopete::ChatSession *IRCContact::manager(Kopete::Contact::CanCreateFlags canCrea
m_chatSession = Kopete::ChatSessionManager::self()->create(account->myself(), mMyself, account->protocol());
m_chatSession->setDisplayName(caption());
- QObject::connect(m_chatSession, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)),
- this, SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *)));
- QObject::connect(m_chatSession, SIGNAL(closing(Kopete::ChatSession *)),
- this, SLOT(chatSessionDestroyed()));
+ TQObject::connect(m_chatSession, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)),
+ this, TQT_SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *)));
+ TQObject::connect(m_chatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)),
+ this, TQT_SLOT(chatSessionDestroyed()));
initConversation();
}
@@ -178,11 +178,11 @@ void IRCContact::chatSessionDestroyed()
deleteLater();
}
-void IRCContact::slotUserDisconnected(const QString &user, const QString &reason)
+void IRCContact::slotUserDisconnected(const TQString &user, const TQString &reason)
{
if (m_chatSession)
{
- QString nickname = user.section('!', 0, 0);
+ TQString nickname = user.section('!', 0, 0);
Kopete::Contact *c = locateUser( nickname );
if ( c )
{
@@ -192,14 +192,14 @@ void IRCContact::slotUserDisconnected(const QString &user, const QString &reason
}
}
-void IRCContact::setNickName( const QString &nickname )
+void IRCContact::setNickName( const TQString &nickname )
{
kdDebug(14120) << k_funcinfo << m_nickName << " changed to " << nickname << endl;
m_nickName = nickname;
Kopete::Contact::setNickName( nickname );
}
-void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &newnickname)
+void IRCContact::slotNewNickChange(const TQString &oldnickname, const TQString &newnickname)
{
IRCAccount *account = ircAccount();
@@ -219,7 +219,7 @@ void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &ne
void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
{
- QString htmlString = message.escapedBody();
+ TQString htmlString = message.escapedBody();
// Messages we get with RichText enabled:
//
@@ -229,9 +229,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
// Two-liner in color:
// <span style="color:#403897">Hello<br />World</span>
- if (htmlString.find(QString::fromLatin1("</span")) > -1)
+ if (htmlString.find(TQString::fromLatin1("</span")) > -1)
{
- QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
+ TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
findTags.setMinimal( true );
int pos = 0;
@@ -240,29 +240,29 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
pos = findTags.search(htmlString);
if (pos > -1)
{
- QString styleHTML = findTags.cap(1);
- QString replacement = findTags.cap(2);
- QStringList styleAttrs = QStringList::split(';', styleHTML);
+ TQString styleHTML = findTags.cap(1);
+ TQString replacement = findTags.cap(2);
+ TQStringList styleAttrs = TQStringList::split(';', styleHTML);
- for (QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair)
+ for (TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair)
{
- QString attribute = (*attrPair).section(':',0,0);
- QString value = (*attrPair).section(':',1);
+ TQString attribute = (*attrPair).section(':',0,0);
+ TQString value = (*attrPair).section(':',1);
- if( attribute == QString::fromLatin1("color") )
+ if( attribute == TQString::fromLatin1("color") )
{
int ircColor = KSParser::colorForHTML( value );
if( ircColor > -1 )
- replacement.prepend( QString( QChar(0x03) ).append( QString::number(ircColor) ) ).append( QChar( 0x03 ) );
+ replacement.prepend( TQString( TQChar(0x03) ).append( TQString::number(ircColor) ) ).append( TQChar( 0x03 ) );
}
- else if( attribute == QString::fromLatin1("font-weight") &&
- value == QString::fromLatin1("600") ) {
+ else if( attribute == TQString::fromLatin1("font-weight") &&
+ value == TQString::fromLatin1("600") ) {
// Bolding
- replacement.prepend( QChar(0x02) ).append( QChar(0x02) );
+ replacement.prepend( TQChar(0x02) ).append( TQChar(0x02) );
}
- else if( attribute == QString::fromLatin1("text-decoration") &&
- value == QString::fromLatin1("underline") ) {
- replacement.prepend( QChar(31) ).append( QChar(31) );
+ else if( attribute == TQString::fromLatin1("text-decoration") &&
+ value == TQString::fromLatin1("underline") ) {
+ replacement.prepend( TQChar(31) ).append( TQChar(31) );
}
}
@@ -273,9 +273,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
htmlString = Kopete::Message::unescape(htmlString);
- QStringList messages = QStringList::split( '\n', htmlString );
+ TQStringList messages = TQStringList::split( '\n', htmlString );
- for( QStringList::Iterator it = messages.begin(); it != messages.end(); ++it )
+ for( TQStringList::Iterator it = messages.begin(); it != messages.end(); ++it )
{
// Dont use the resulting string(s). The problem is that we'd have to parse them
// back to format that would be suitable for appendMessage().
@@ -290,25 +290,25 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
Kopete::Message msg(message.from(), message.to(), message.escapedBody(), message.direction(),
Kopete::Message::RichText, CHAT_VIEW, message.type());
- msg.setBg(QColor());
- msg.setFg(QColor());
+ msg.setBg(TQColor());
+ msg.setFg(TQColor());
appendMessage(msg);
} else {
// Lets not modify the given message object.
Kopete::Message msg = message;
- msg.setBg(QColor());
+ msg.setBg(TQColor());
appendMessage(msg);
}
manager(Kopete::Contact::CanCreate)->messageSucceeded();
}
-QStringList IRCContact::sendMessage( const QString &msg )
+TQStringList IRCContact::sendMessage( const TQString &msg )
{
- QStringList messages;
+ TQStringList messages;
- QString newMessage = msg;
+ TQString newMessage = msg;
// IRC limits the message size to 512 characters. So split the given
// message into pieces.
@@ -324,14 +324,14 @@ QStringList IRCContact::sendMessage( const QString &msg )
newMessage.remove(0, l);
} while (!newMessage.isEmpty());
- for (QStringList::const_iterator it = messages.begin();
+ for (TQStringList::const_iterator it = messages.begin();
it != messages.end(); ++it)
kircEngine()->privmsg(m_nickName, *it);
return messages;
}
-Kopete::Contact *IRCContact::locateUser(const QString &nick)
+Kopete::Contact *IRCContact::locateUser(const TQString &nick)
{
IRCAccount *account = ircAccount();
@@ -359,8 +359,8 @@ bool IRCContact::isChatting(const Kopete::ChatSession *avoid) const
if (!account)
return false;
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it)
{
if( (*it) != avoid && (*it)->account() == account &&
(*it)->members().contains(this) )
@@ -402,16 +402,16 @@ KopeteView *IRCContact::view()
return m_chatSession->view(false);
return 0L;
}
-void IRCContact::serialize(QMap<QString, QString> & /*serializedData*/, QMap<QString, QString> &addressBookData)
+void IRCContact::serialize(TQMap<TQString, TQString> & /*serializedData*/, TQMap<TQString, TQString> &addressBookData)
{
// write the
- addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + QChar(0xE120) + account()->accountId() );
+ addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + TQChar(0xE120) + account()->accountId() );
}
void IRCContact::receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg)
+ const TQString &msg)
{
if (to.contains(m_entity))
{
diff --git a/kopete/protocols/irc/irccontact.h b/kopete/protocols/irc/irccontact.h
index 058315fb..9005f015 100644
--- a/kopete/protocols/irc/irccontact.h
+++ b/kopete/protocols/irc/irccontact.h
@@ -27,8 +27,8 @@
#include "kopetecontact.h"
#include "kopetemessage.h"
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class IRCProtocol;
class IRCAccount;
@@ -63,8 +63,8 @@ class IRCContact
Q_OBJECT
public:
- IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon = QString::null);
- IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon = QString::null);
+ IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon = TQString::null);
+ IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon = TQString::null);
virtual ~IRCContact();
IRCAccount *ircAccount() const;
@@ -74,12 +74,12 @@ public:
* Sets the nickname of this contact. The nickname is distinct from the displayName
* in case trackNameChanges is disabled.
*/
- void setNickName(const QString &nickname);
+ void setNickName(const TQString &nickname);
/**
* Returns the nickname / channel name
*/
- const QString &nickName() const { return m_nickName; }
+ const TQString &nickName() const { return m_nickName; }
/**
* This function attempts to find the nickname specified within the current chat
@@ -87,7 +87,7 @@ public:
* exist in this session. More useful for channels. Calling IRCChannelContact::locateUser()
* for example tells you if a user is in a certain channel.
*/
- Kopete::Contact *locateUser( const QString &nickName );
+ Kopete::Contact *locateUser( const TQString &nickName );
virtual bool isReachable();
@@ -97,14 +97,14 @@ public:
*/
bool isChatting( const Kopete::ChatSession *avoid = 0L ) const;
- virtual const QString caption() const;
-// virtual const QString formatedName() const;
+ virtual const TQString caption() const;
+// virtual const TQString formatedName() const;
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate);
virtual void appendMessage( Kopete::Message & );
- const QTextCodec *codec();
+ const TQTextCodec *codec();
KopeteView *view();
@@ -113,40 +113,40 @@ public:
* so that other IRC programs reading this from KAddressBook have a chance of figuring
* which server the contact relates to
*/
- virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData );
signals:
void destroyed(IRCContact *self);
public slots:
- void setCodec( const QTextCodec *codec );
+ void setCodec( const TQTextCodec *codec );
virtual void updateStatus();
protected slots:
virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *);
- QStringList sendMessage( const QString &msg );
+ TQStringList sendMessage( const TQString &msg );
virtual void chatSessionDestroyed();
- void slotNewNickChange( const QString &oldnickname, const QString &newnickname);
- void slotUserDisconnected( const QString &nickname, const QString &reason);
+ void slotNewNickChange( const TQString &oldnickname, const TQString &newnickname);
+ void slotUserDisconnected( const TQString &nickname, const TQString &reason);
virtual void deleteContact();
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
virtual void initConversation() {};
void receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg);
+ const TQString &msg);
protected:
KIRC::EntityPtr m_entity;
- QString m_nickName;
+ TQString m_nickName;
Kopete::ChatSession *m_chatSession;
- QPtrList<Kopete::Contact> mMyself;
+ TQPtrList<Kopete::Contact> mMyself;
Kopete::Message::MessageDirection execDir;
};
diff --git a/kopete/protocols/irc/irccontactmanager.cpp b/kopete/protocols/irc/irccontactmanager.cpp
index 7808668b..fb49e08e 100644
--- a/kopete/protocols/irc/irccontactmanager.cpp
+++ b/kopete/protocols/irc/irccontactmanager.cpp
@@ -34,12 +34,12 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *account, const char *name)
- : QObject(account, name),
- m_channels( QDict<IRCChannelContact>( 17, false ) ),
- m_users( QDict<IRCUserContact>( 577, false ) ),
+IRCContactManager::IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name)
+ : TQObject(account, name),
+ m_channels( TQDict<IRCChannelContact>( 17, false ) ),
+ m_users( TQDict<IRCUserContact>( 577, false ) ),
m_account( account )
{
m_mySelf = findUser(nickName);
@@ -48,41 +48,41 @@ IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *accoun
// m->setTemporary( true );
m_myServer = new IRCServerContact(this, account->networkName(), m);
- QObject::connect(account->engine(), SIGNAL(incomingMessage(const QString &, const QString &, const QString &)),
- this, SLOT(slotNewMessage(const QString &, const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingMessage(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewMessage(const TQString &, const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingPrivMessage(const QString &, const QString &, const QString &)),
- this, SLOT(slotNewPrivMessage(const QString &, const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingPrivMessage(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewPrivMessage(const TQString &, const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingNickChange(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString&, const QString&)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&)));
- QObject::connect(account->engine(), SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingUserOnline(const QString &)),
- this, SLOT( slotIsonRecieved()));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingUserOnline(const TQString &)),
+ this, TQT_SLOT( slotIsonRecieved()));
- QObject::connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded( Kopete::MetaContact * )),
- this, SLOT( slotContactAdded( Kopete::MetaContact* )));
+ TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded( Kopete::MetaContact * )),
+ this, TQT_SLOT( slotContactAdded( Kopete::MetaContact* )));
socketTimeout = 15000;
- QString timeoutPath = locate( "config", "kioslaverc" );
+ TQString timeoutPath = locate( "config", "kioslaverc" );
if( !timeoutPath.isEmpty() )
{
KConfig config( timeoutPath );
socketTimeout = config.readNumEntry( "ReadTimeout", 15 ) * 1000;
}
- m_NotifyTimer = new QTimer(this);
- QObject::connect(m_NotifyTimer, SIGNAL(timeout()),
- this, SLOT(checkOnlineNotifyList()));
+ m_NotifyTimer = new TQTimer(this);
+ TQObject::connect(m_NotifyTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(checkOnlineNotifyList()));
m_NotifyTimer->start(30000); // check online every 30sec
new IRCSignalHandler(this);
}
-void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString &newnick)
+void IRCContactManager::slotNewNickChange(const TQString &oldnick, const TQString &newnick)
{
IRCUserContact *c = m_users[ oldnick ];
if( c )
@@ -92,14 +92,14 @@ void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString
}
}
-void IRCContactManager::slotNewMessage(const QString &originating, const QString &channel, const QString &message)
+void IRCContactManager::slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message)
{
IRCContact *from = findUser(originating);
IRCChannelContact *to = findChannel(channel);
emit privateMessage(from, to, message);
}
-void IRCContactManager::slotNewPrivMessage(const QString &originating, const QString &user, const QString &message)
+void IRCContactManager::slotNewPrivMessage(const TQString &originating, const TQString &user, const TQString &message)
{
IRCContact *from = findUser(originating);
IRCUserContact *to = findUser(user);
@@ -112,10 +112,10 @@ void IRCContactManager::unregister(Kopete::Contact *contact)
unregisterUser(contact, true);
}
-QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact )
+TQValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact )
{
- QValueList<IRCChannelContact*> retVal;
- for( QDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it )
+ TQValueList<IRCChannelContact*> retVal;
+ for( TQDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it )
{
if( it.current()->manager(Kopete::Contact::CannotCreate) )
{
@@ -126,7 +126,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC
bool c = true;
Kopete::ContactPtrList members = it.current()->manager()->members();
- for( QPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 )
+ for( TQPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 )
{
if( it2.current() == contact )
{
@@ -141,7 +141,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC
return retVal;
}
-IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::MetaContact *m)
+IRCChannelContact *IRCContactManager::findChannel(const TQString &name, Kopete::MetaContact *m)
{
IRCChannelContact *channel = m_channels[ name ];
@@ -155,14 +155,14 @@ IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::M
channel = new IRCChannelContact(this, name, m);
m_channels.insert( name, channel );
- QObject::connect(channel, SIGNAL(contactDestroyed(Kopete::Contact *)),
- this, SLOT(unregister(Kopete::Contact *)));
+ TQObject::connect(channel, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)),
+ this, TQT_SLOT(unregister(Kopete::Contact *)));
}
return channel;
}
-IRCChannelContact *IRCContactManager::existChannel( const QString &channel ) const
+IRCChannelContact *IRCContactManager::existChannel( const TQString &channel ) const
{
return m_channels[ channel ];
}
@@ -179,7 +179,7 @@ void IRCContactManager::unregisterChannel(Kopete::Contact *contact, bool force )
}
}
-IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaContact *m)
+IRCUserContact *IRCContactManager::findUser(const TQString &name, Kopete::MetaContact *m)
{
IRCUserContact *user = m_users[name.section('!', 0, 0)];
@@ -193,19 +193,19 @@ IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaCon
user = new IRCUserContact(this, name, m);
m_users.insert( name, user );
- QObject::connect(user, SIGNAL(contactDestroyed(Kopete::Contact *)),
- this, SLOT(unregister(Kopete::Contact *)));
+ TQObject::connect(user, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)),
+ this, TQT_SLOT(unregister(Kopete::Contact *)));
}
return user;
}
-IRCUserContact *IRCContactManager::existUser( const QString &user ) const
+IRCUserContact *IRCContactManager::existUser( const TQString &user ) const
{
return m_users[user];
}
-IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaContact *m )
+IRCContact *IRCContactManager::findContact( const TQString &id, Kopete::MetaContact *m )
{
if( KIRC::Entity::isChannel(id) )
return findChannel( id, m );
@@ -213,10 +213,10 @@ IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaConta
return findUser( id, m );
}
-IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const QString &id )
+IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const TQString &id )
{
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() );
- QDictIterator<Kopete::Account> it(accounts);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() );
+ TQDictIterator<Kopete::Account> it(accounts);
for( ; it.current(); ++it )
{
IRCAccount *account = (IRCAccount *)it.current();
@@ -226,7 +226,7 @@ IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const Q
return 0L;
}
-IRCContact *IRCContactManager::existContact( const QString &id ) const
+IRCContact *IRCContactManager::existContact( const TQString &id ) const
{
if( KIRC::Entity::isChannel(id) )
return existChannel( id );
@@ -249,7 +249,7 @@ void IRCContactManager::unregisterUser(Kopete::Contact *contact, bool force )
void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact )
{
- for( QPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it )
+ for( TQPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it )
{
if( it.current()->account() == m_account )
{
@@ -258,7 +258,7 @@ void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact )
}
}
-void IRCContactManager::addToNotifyList(const QString &nick)
+void IRCContactManager::addToNotifyList(const TQString &nick)
{
if (!m_NotifyList.contains(nick.lower()))
{
@@ -267,7 +267,7 @@ void IRCContactManager::addToNotifyList(const QString &nick)
}
}
-void IRCContactManager::removeFromNotifyList(const QString &nick)
+void IRCContactManager::removeFromNotifyList(const TQString &nick)
{
if (m_NotifyList.contains(nick.lower()))
m_NotifyList.remove(nick.lower());
@@ -279,7 +279,7 @@ void IRCContactManager::checkOnlineNotifyList()
{
isonRecieved = false;
m_account->engine()->ison( m_NotifyList );
- //QTimer::singleShot( socketTimeout, this, SLOT( slotIsonTimeout() ) );
+ //TQTimer::singleShot( socketTimeout, this, TQT_SLOT( slotIsonTimeout() ) );
}
}
diff --git a/kopete/protocols/irc/irccontactmanager.h b/kopete/protocols/irc/irccontactmanager.h
index 4a8ae05f..18a30111 100644
--- a/kopete/protocols/irc/irccontactmanager.h
+++ b/kopete/protocols/irc/irccontactmanager.h
@@ -18,10 +18,10 @@
#ifndef IRCCONTACTMANAGER_H
#define IRCCONTACTMANAGER_H
-#include <qdict.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class IRCContact;
class IRCAccount;
@@ -57,60 +57,60 @@ class IRCContactManager
Q_OBJECT
public:
- IRCContactManager(const QString &nickName, IRCAccount *account, const char *name=0);
+ IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name=0);
IRCAccount *account() const { return m_account; }
IRCServerContact *myServer() const { return m_myServer; }
IRCUserContact *mySelf() const { return m_mySelf; }
- IRCChannelContact *findChannel(const QString &channel, Kopete::MetaContact *m=0);
- IRCChannelContact *existChannel(const QString &channel) const;
+ IRCChannelContact *findChannel(const TQString &channel, Kopete::MetaContact *m=0);
+ IRCChannelContact *existChannel(const TQString &channel) const;
- IRCUserContact *findUser(const QString &nick, Kopete::MetaContact *m=0);
- IRCUserContact *existUser(const QString &nick) const;
+ IRCUserContact *findUser(const TQString &nick, Kopete::MetaContact *m=0);
+ IRCUserContact *existUser(const TQString &nick) const;
- IRCContact *findContact(const QString &nick, Kopete::MetaContact *m=0);
- IRCContact *existContact( const QString &id ) const;
+ IRCContact *findContact(const TQString &nick, Kopete::MetaContact *m=0);
+ IRCContact *existContact( const TQString &id ) const;
- QValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact );
+ TQValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact );
- static IRCContact *existContact(const KIRC::Engine *engine, const QString &nick);
+ static IRCContact *existContact(const KIRC::Engine *engine, const TQString &nick);
public slots:
void unregister(Kopete::Contact *contact);
void unregisterUser(Kopete::Contact *contact, bool force = false );
void unregisterChannel(Kopete::Contact *contact, bool force = false );
- void addToNotifyList(const QString &nick);
- void removeFromNotifyList(const QString &nick);
+ void addToNotifyList(const TQString &nick);
+ void removeFromNotifyList(const TQString &nick);
void checkOnlineNotifyList();
signals:
- void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
private slots:
- void slotNewMessage(const QString &originating, const QString &channel, const QString &message);
- void slotNewPrivMessage(const QString &originating, const QString &, const QString &message);
+ void slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message);
+ void slotNewPrivMessage(const TQString &originating, const TQString &, const TQString &message);
void slotIsonRecieved();
void slotIsonTimeout();
- void slotNewNickChange(const QString &oldnick, const QString &newnick);
+ void slotNewNickChange(const TQString &oldnick, const TQString &newnick);
void slotContactAdded( Kopete::MetaContact *contact );
private:
- QDict<IRCChannelContact> m_channels;
- QDict<IRCUserContact> m_users;
+ TQDict<IRCChannelContact> m_channels;
+ TQDict<IRCUserContact> m_users;
IRCAccount *m_account;
IRCServerContact *m_myServer;
IRCUserContact *m_mySelf;
- QStringList m_NotifyList;
- QTimer *m_NotifyTimer;
+ TQStringList m_NotifyList;
+ TQTimer *m_NotifyTimer;
bool isonRecieved;
int socketTimeout;
- static const QRegExp isChannel;
+ static const TQRegExp isChannel;
};
#endif
diff --git a/kopete/protocols/irc/ircguiclient.cpp b/kopete/protocols/irc/ircguiclient.cpp
index b4c36973..d9d5f8e2 100644
--- a/kopete/protocols/irc/ircguiclient.cpp
+++ b/kopete/protocols/irc/ircguiclient.cpp
@@ -30,9 +30,9 @@
// ------------------------------------------------------------
#endif
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "kopetechatsession.h"
#include "kcodecaction.h"
@@ -40,7 +40,7 @@
#include "ircaccount.h"
#include "irccontact.h"
-IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KXMLGUIClient(parent)
+IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , KXMLGUIClient(parent)
{
Kopete::ContactPtrList members = parent->members();
if( members.count() > 0 )
@@ -53,22 +53,22 @@ IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KX
setXMLFile("ircchatui.rc");
unplugActionList( "irccontactactionlist" );
- QPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
plugActionList( "irccontactactionlist", *actions );
delete actions;
*/
setXMLFile("ircchatui.rc");
- QDomDocument doc = domDocument();
- QDomNode menu = doc.documentElement().firstChild().firstChild();
- QPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQDomDocument doc = domDocument();
+ TQDomNode menu = doc.documentElement().firstChild().firstChild();
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
if( actions )
{
for( KAction *a = actions->first(); a; a = actions->next() )
{
actionCollection()->insert( a );
- QDomElement newNode = doc.createElement( "Action" );
+ TQDomElement newNode = doc.createElement( "Action" );
newNode.setAttribute( "name", a->name() );
menu.appendChild( newNode );
}
@@ -92,7 +92,7 @@ IRCGUIClient::~IRCGUIClient()
{
}
-void IRCGUIClient::slotSelectCodec( const QTextCodec *codec )
+void IRCGUIClient::slotSelectCodec( const TQTextCodec *codec )
{
m_user->setCodec( codec );
}
diff --git a/kopete/protocols/irc/ircguiclient.h b/kopete/protocols/irc/ircguiclient.h
index b81aa632..fed65dd4 100644
--- a/kopete/protocols/irc/ircguiclient.h
+++ b/kopete/protocols/irc/ircguiclient.h
@@ -16,7 +16,7 @@
#ifndef IRCGUICLIENT_H
#define IRCGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -25,7 +25,7 @@ class IRCContact;
/**
*@author Jason Keirstead
*/
-class IRCGUIClient : public QObject , public KXMLGUIClient
+class IRCGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
public:
@@ -33,7 +33,7 @@ class IRCGUIClient : public QObject , public KXMLGUIClient
~IRCGUIClient();
private slots:
- void slotSelectCodec( const QTextCodec *codec );
+ void slotSelectCodec( const TQTextCodec *codec );
private:
IRCContact *m_user;
diff --git a/kopete/protocols/irc/ircprotocol.cpp b/kopete/protocols/irc/ircprotocol.cpp
index 176c74d7..6112429b 100644
--- a/kopete/protocols/irc/ircprotocol.cpp
+++ b/kopete/protocols/irc/ircprotocol.cpp
@@ -53,14 +53,14 @@
#include <kstandarddirs.h>
#include <kuser.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qspinbox.h>
-#include <qvalidator.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
+#include <tqvalidator.h>
#include <dom/html_element.h>
#include <unistd.h>
@@ -72,7 +72,7 @@ IRCProtocol *IRCProtocol::s_protocol = 0L;
IRCProtocolHandler::IRCProtocolHandler() : Kopete::MimeTypeHandler( false )
{
- registerAsProtocolHandler( QString::fromLatin1("irc") );
+ registerAsProtocolHandler( TQString::fromLatin1("irc") );
}
void IRCProtocolHandler::handleURL( const KURL &url ) const
@@ -85,15 +85,15 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
if( port == 0 )
port = 6667;
- QString chan = url.url().section('/',3);
+ TQString chan = url.url().section('/',3);
if( chan.isEmpty() )
return;
KUser user( getuid() );
- QString accountId = QString::fromLatin1("%1@%2:%3").arg(
+ TQString accountId = TQString::fromLatin1("%1@%2:%3").arg(
user.loginName(),
url.host(),
- QString::number(port)
+ TQString::number(port)
);
kdDebug(14120) << accountId << endl;
@@ -104,39 +104,39 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
newAccount->connect();
}
-IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList & /* args */ )
+IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Protocol( IRCProtocolFactory::instance(), parent, name ),
m_ServerStatusOnline(Kopete::OnlineStatus::Online,
- 100, this, OnlineServer, QString::null, i18n("Online")),
+ 100, this, OnlineServer, TQString::null, i18n("Online")),
m_ServerStatusOffline(Kopete::OnlineStatus::Offline,
- 90, this, OfflineServer, QString::null, i18n("Offline")),
+ 90, this, OfflineServer, TQString::null, i18n("Offline")),
m_ChannelStatusOnline(Kopete::OnlineStatus::Online,
- 80, this, OnlineChannel, QString::null, i18n("Online")),
+ 80, this, OnlineChannel, TQString::null, i18n("Online")),
m_ChannelStatusOffline(Kopete::OnlineStatus::Offline,
- 70, this, OfflineChannel, QString::null, i18n("Offline")),
+ 70, this, OfflineChannel, TQString::null, i18n("Offline")),
m_UserStatusOpVoice(Kopete::OnlineStatus::Online,
- 60, this, Online | Operator | Voiced, QStringList::split(' ',"irc_voice irc_op"), i18n("Op")),
+ 60, this, Online | Operator | Voiced, TQStringList::split(' ',"irc_voice irc_op"), i18n("Op")),
m_UserStatusOpVoiceAway(Kopete::OnlineStatus::Away,
55, this, Online | Operator | Voiced | Away,
- QStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")),
m_UserStatusOp(Kopete::OnlineStatus::Online,
50, this, Online | Operator, "irc_op", i18n("Op")),
m_UserStatusOpAway(Kopete::OnlineStatus::Away,
45, this, Online | Operator | Away,
- QStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")),
m_UserStatusVoice(Kopete::OnlineStatus::Online,
40, this, Online | Voiced, "irc_voice", i18n("Voice")),
m_UserStatusVoiceAway(Kopete::OnlineStatus::Away,
35, this, Online | Voiced | Away,
- QStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")),
m_UserStatusOnline(Kopete::OnlineStatus::Online,
- 25, this, Online, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
+ 25, this, Online, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
m_UserStatusAway(Kopete::OnlineStatus::Away,
2, this, Online | Away, "contact_away_overlay",
@@ -144,21 +144,21 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList &
m_UserStatusConnecting(Kopete::OnlineStatus::Connecting,
1, this, Connecting, "irc_connecting", i18n("Connecting")),
m_UserStatusOffline(Kopete::OnlineStatus::Offline,
- 0, this, Offline, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
+ 0, this, Offline, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
m_StatusUnknown(Kopete::OnlineStatus::Unknown,
999, this, 999, "status_unknown", i18n("Status not available")),
- propChannelTopic(QString::fromLatin1("channelTopic"), i18n("Topic"), QString::null, false, true ),
- propChannelMembers(QString::fromLatin1("channelMembers"), i18n("Members")),
- propHomepage(QString::fromLatin1("homePage"), i18n("Home Page")),
+ propChannelTopic(TQString::fromLatin1("channelTopic"), i18n("Topic"), TQString::null, false, true ),
+ propChannelMembers(TQString::fromLatin1("channelMembers"), i18n("Members")),
+ propHomepage(TQString::fromLatin1("homePage"), i18n("Home Page")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
- propUserInfo(QString::fromLatin1("userInfo"), i18n("IRC User")),
- propServer(QString::fromLatin1("ircServer"), i18n("IRC Server")),
- propChannels( QString::fromLatin1("ircChannels"), i18n("IRC Channels")),
- propHops(QString::fromLatin1("ircHops"), i18n("IRC Hops")),
- propFullName(QString::fromLatin1("FormattedName"), i18n("Full Name")),
- propIsIdentified(QString::fromLatin1("identifiedUser"), i18n("User Is Authenticated"))
+ propUserInfo(TQString::fromLatin1("userInfo"), i18n("IRC User")),
+ propServer(TQString::fromLatin1("ircServer"), i18n("IRC Server")),
+ propChannels( TQString::fromLatin1("ircChannels"), i18n("IRC Channels")),
+ propHops(TQString::fromLatin1("ircHops"), i18n("IRC Hops")),
+ propFullName(TQString::fromLatin1("FormattedName"), i18n("Full Name")),
+ propIsIdentified(TQString::fromLatin1("identifiedUser"), i18n("User Is Authenticated"))
{
// kdDebug(14120) << k_funcinfo << endl;
@@ -168,129 +168,129 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList &
addAddressBookField("messaging/irc", Kopete::Plugin::MakeIndexField);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("raw"),
- SLOT( slotRawCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("raw"),
+ TQT_SLOT( slotRawCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /raw <text> - Sends the text in raw form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("quote"),
- SLOT( slotQuoteCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quote"),
+ TQT_SLOT( slotQuoteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quote <text> - Sends the text in quoted form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ctcp"),
- SLOT( slotCtcpCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ctcp"),
+ TQT_SLOT( slotCtcpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ctcp <nick> <message> - Send the CTCP message to nick<action>."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ping"),
- SLOT( slotPingCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ping"),
+ TQT_SLOT( slotPingCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ping <nickname> - Alias for /CTCP <nickname> PING."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("motd"),
- SLOT( slotMotdCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("motd"),
+ TQT_SLOT( slotMotdCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /motd [<server>] - Shows the message of the day for the current or the given server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("list"),
- SLOT( slotListCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("list"),
+ TQT_SLOT( slotListCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /list - List the public channels on the server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("join"),
- SLOT( slotJoinCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("join"),
+ TQT_SLOT( slotJoinCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /join <#channel 1> [<password>] - Joins the specified channel."), 1, 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("topic"),
- SLOT( slotTopicCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("topic"),
+ TQT_SLOT( slotTopicCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /topic [<topic>] - Sets and/or displays the topic for the active channel.") );
//FIXME: Update help text
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("whois"),
- SLOT( slotWhoisCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whois"),
+ TQT_SLOT( slotWhoisCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whois <nickname> - Display whois info on this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("whowas"),
- SLOT( slotWhoWasCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whowas"),
+ TQT_SLOT( slotWhoWasCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whowas <nickname> - Display whowas info on this user."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("who"),
- SLOT( slotWhoCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("who"),
+ TQT_SLOT( slotWhoCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /who <nickname|channel> - Display who info on this user/channel."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("query"),
- SLOT( slotQueryCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("query"),
+ TQT_SLOT( slotQueryCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /query <nickname> [<message>] - Open a private chat with this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("mode"),
- SLOT( slotModeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("mode"),
+ TQT_SLOT( slotModeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /mode <channel> <modes> - Set modes on the given channel."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("nick"),
- SLOT( slotNickCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("nick"),
+ TQT_SLOT( slotNickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /nick <nickname> - Change your nickname to the given one."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("me"),
- SLOT( slotMeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("me"),
+ TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /me <action> - Do something."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ame"),
- SLOT( slotAllMeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ame"),
+ TQT_SLOT( slotAllMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ame <action> - Do something in every open chat."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("kick"),
- SLOT( slotKickCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("kick"),
+ TQT_SLOT( slotKickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /kick <nickname> [<reason>] - Kick someone from the channel (requires operator status).")
, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ban"),
- SLOT( slotBanCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ban"),
+ TQT_SLOT( slotBanCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ban <mask> - Add someone to this channel's ban list. (requires operator status)."),
1, 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("bannick"),
- QString::fromLatin1("ban %1!*@*"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("bannick"),
+ TQString::fromLatin1("ban %1!*@*"),
i18n("USAGE: /bannick <nickname> - Add someone to this channel's ban list. Uses the hostmask nickname!*@* (requires operator status)."), Kopete::CommandHandler::SystemAlias, 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("op"),
- SLOT( slotOpCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("op"),
+ TQT_SLOT( slotOpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /op <nickname 1> [<nickname 2> <...>] - Give channel operator status to someone (requires operator status)."),
1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("deop"),
- SLOT( slotDeopCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("deop"),
+ TQT_SLOT( slotDeopCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /deop <nickname> [<nickname 2> <...>]- Remove channel operator status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("voice"),
- SLOT( slotVoiceCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("voice"),
+ TQT_SLOT( slotVoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /voice <nickname> [<nickname 2> <...>]- Give channel voice status to someone (requires operator status)."),
1);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("devoice"),
- SLOT( slotDevoiceCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("devoice"),
+ TQT_SLOT( slotDevoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /devoice <nickname> [<nickname 2> <...>]- Remove channel voice status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("quit"),
- SLOT( slotQuitCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quit"),
+ TQT_SLOT( slotQuitCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quit [<reason>] - Disconnect from IRC, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("part"),
- SLOT( slotPartCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("part"),
+ TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /part [<reason>] - Part from a channel, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("invite"),
- SLOT( slotInviteCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("invite"),
+ TQT_SLOT( slotInviteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /invite <nickname> [<channel>] - Invite a user to join a channel."), 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("j"),
- QString::fromLatin1("join %1"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("j"),
+ TQString::fromLatin1("join %1"),
i18n("USAGE: /j <#channel 1> [<password>] - Alias for JOIN."), Kopete::CommandHandler::SystemAlias,
1, 2 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("msg"),
- QString::fromLatin1("query %s"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("msg"),
+ TQString::fromLatin1("query %s"),
i18n("USAGE: /msg <nickname> [<message>] - Alias for QUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 );
- QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL(aboutToDisplay(Kopete::Message &)),
- this, SLOT(slotMessageFilter(Kopete::Message &)) );
+ TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(aboutToDisplay(Kopete::Message &)),
+ this, TQT_SLOT(slotMessageFilter(Kopete::Message &)) );
- QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView* ) ),
- this, SLOT( slotViewCreated( KopeteView* ) ) );
+ TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView* ) ),
+ this, TQT_SLOT( slotViewCreated( KopeteView* ) ) );
setCapabilities( Kopete::Protocol::RichBFormatting | Kopete::Protocol::RichUFormatting | Kopete::Protocol::RichColor );
@@ -373,16 +373,16 @@ void IRCProtocol::slotMessageFilter( Kopete::Message &msg )
{
if( msg.from()->protocol() == this )
{
- QString messageText = msg.escapedBody();
+ TQString messageText = msg.escapedBody();
//Add right click for channels, only replace text not in HTML tags
- messageText.replace( QRegExp( QString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), QString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
+ messageText.replace( TQRegExp( TQString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
msg.setBody( messageText, Kopete::Message::RichText );
}
}
-QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n )
+TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n )
{
DOM::HTMLElement e = n;
@@ -391,7 +391,7 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess
{
activeNode = n;
activeAccount = static_cast<IRCAccount*>( m.from()->account() );
- if( e.getAttribute( QString::fromLatin1("type") ) == QString::fromLatin1("IRCChannel") )
+ if( e.getAttribute( TQString::fromLatin1("type") ) == TQString::fromLatin1("IRCChannel") )
return activeAccount->contactManager()->findChannel(
e.innerText().string() )->customContextMenuActions();
}
@@ -399,33 +399,33 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess
return 0L;
}
-AddContactPage *IRCProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account)
+AddContactPage *IRCProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account)
{
return new IRCAddContactPage(parent,static_cast<IRCAccount*>(account));
}
-KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent)
+KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
{
return new IRCEditAccountWidget(this, static_cast<IRCAccount*>(account),parent);
}
-Kopete::Account *IRCProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *IRCProtocol::createNewAccount(const TQString &accountId)
{
return new IRCAccount( this, accountId );
}
-Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
kdDebug(14120) << k_funcinfo << endl;
- QString contactId = serializedData[ "contactId" ];
- QString displayName = serializedData[ "displayName" ];
+ TQString contactId = serializedData[ "contactId" ];
+ TQString displayName = serializedData[ "displayName" ];
if( displayName.isEmpty() )
displayName = contactId;
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
if( !accounts.isEmpty() )
{
Kopete::Account *a = accounts[ serializedData[ "accountId" ] ];
@@ -444,7 +444,7 @@ Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaConta
return 0;
}
-void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotRawCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCAccount *account = static_cast<IRCAccount*>( manager->account() );
@@ -459,7 +459,7 @@ void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCAccount *account = static_cast<IRCAccount*>( manager->account() );
@@ -474,34 +474,34 @@ void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotCtcpCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager )
{
if( !args.isEmpty() )
{
- QString user = args.section( ' ', 0, 0 );
- QString message = args.section( ' ', 1 );
- static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, QString::null, message );
+ TQString user = args.section( ' ', 0, 0 );
+ TQString message = args.section( ' ', 1 );
+ static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, TQString::null, message );
}
}
-void IRCProtocol::slotMotdCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotMotdCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->motd(argsList.front());
}
-void IRCProtocol::slotPingCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotPingCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments(args);
+ TQStringList argsList = Kopete::CommandHandler::parseArguments(args);
static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_ping(argsList.front());
}
-void IRCProtocol::slotListCommand( const QString &/*args*/, Kopete::ChatSession *manager )
+void IRCProtocol::slotListCommand( const TQString &/*args*/, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->listChannels();
}
-void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotTopicCommand( const TQString &args, Kopete::ChatSession *manager )
{
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = dynamic_cast<IRCChannelContact*>( members.first() );
@@ -512,7 +512,7 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma
else
{
static_cast<IRCAccount*>(manager->account())->engine()->
- writeRawMessage(QString::fromLatin1("TOPIC %1").arg(chan->nickName()));
+ writeRawMessage(TQString::fromLatin1("TOPIC %1").arg(chan->nickName()));
}
}
else
@@ -522,9 +522,9 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *manager )
+void IRCProtocol::slotJoinCommand( const TQString &arg, Kopete::ChatSession *manager )
{
- QStringList args = Kopete::CommandHandler::parseArguments( arg );
+ TQStringList args = Kopete::CommandHandler::parseArguments( arg );
if( KIRC::Entity::isChannel(args[0]) )
{
IRCChannelContact *chan = static_cast<IRCAccount*>( manager->account() )->contactManager()->findChannel( args[0] );
@@ -540,10 +540,10 @@ void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCChannelContact *c = 0L;
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
if( argsList.count() > 1 )
{
@@ -568,7 +568,7 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m
if( c && c->manager()->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
+ TQString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
arg( c->nickName() )
);
}
@@ -579,10 +579,10 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m
}
}
-void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQueryCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QString user = args.section( ' ', 0, 0 );
- QString rest = args.section( ' ', 1 );
+ TQString user = args.section( ' ', 0, 0 );
+ TQString rest = args.section( ' ', 1 );
if( !KIRC::Entity::isChannel(user) )
{
@@ -604,47 +604,47 @@ void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotWhoisCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->engine()->whois( args );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotWhoCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("WHO %1").arg( argsList.first() ) );
+ TQString::fromLatin1("WHO %1").arg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
+ TQString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotQuitCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQuitCommand( const TQString &args, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->quit( args );
}
-void IRCProtocol::slotNickCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotNickCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->nick( argsList.front() );
}
-void IRCProtocol::slotModeCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotModeCommand(const TQString &args, Kopete::ChatSession *manager)
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->mode( argsList.front(),
- args.section( QRegExp(QString::fromLatin1("\\s+")), 1 ) );
+ args.section( TQRegExp(TQString::fromLatin1("\\s+")), 1 ) );
}
-void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotMeCommand(const TQString &args, Kopete::ChatSession *manager)
{
Kopete::ContactPtrList members = manager->members();
static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_action(
@@ -652,11 +652,11 @@ void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manage
);
}
-void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *)
+void IRCProtocol::slotAllMeCommand(const TQString &args, Kopete::ChatSession *)
{
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for( QValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it )
+ for( TQValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it )
{
Kopete::ChatSession *session = *it;
if( session->protocol() == this )
@@ -664,15 +664,15 @@ void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *)
}
}
-void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotKickCommand(const TQString &args, Kopete::ChatSession *manager)
{
if (manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp)
{
- QRegExp spaces(QString::fromLatin1("\\s+"));
- QString nick = args.section( spaces, 0, 0);
- QString reason = args.section( spaces, 1);
+ TQRegExp spaces(TQString::fromLatin1("\\s+"));
+ TQString nick = args.section( spaces, 0, 0);
+ TQString reason = args.section( spaces, 1);
Kopete::ContactPtrList members = manager->members();
- QString channel = static_cast<IRCContact*>( members.first() )->nickName();
+ TQString channel = static_cast<IRCContact*>( members.first() )->nickName();
if (KIRC::Entity::isChannel(channel))
static_cast<IRCAccount*>(manager->account())->engine()->kick(nick, channel, reason);
}
@@ -683,15 +683,15 @@ void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotBanCommand( const TQString &args, Kopete::ChatSession *manager )
{
if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan && chan->locateUser( argsList.front() ) )
- chan->setMode( QString::fromLatin1("+b %1").arg( argsList.front() ) );
+ chan->setMode( TQString::fromLatin1("+b %1").arg( argsList.front() ) );
}
else
{
@@ -700,9 +700,9 @@ void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotPartCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments(args);
+ TQStringList argsList = Kopete::CommandHandler::parseArguments(args);
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>(members.first());
@@ -722,39 +722,39 @@ void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *man
}
}
-void IRCProtocol::slotOpCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotOpCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("+o") );
+ simpleModeChange( args, manager, TQString::fromLatin1("+o") );
}
-void IRCProtocol::slotDeopCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotDeopCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("-o") );
+ simpleModeChange( args, manager, TQString::fromLatin1("-o") );
}
-void IRCProtocol::slotVoiceCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("+v") );
+ simpleModeChange( args, manager, TQString::fromLatin1("+v") );
}
-void IRCProtocol::slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("-v") );
+ simpleModeChange( args, manager, TQString::fromLatin1("-v") );
}
-void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *manager, const QString &mode )
+void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *manager, const TQString &mode )
{
if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan )
{
- for( QStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
+ for( TQStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
{
if( chan->locateUser( *it ) )
- chan->setMode( QString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
+ chan->setMode( TQString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
}
}
}
@@ -765,37 +765,37 @@ void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::editNetworks( const QString &networkName )
+void IRCProtocol::editNetworks( const TQString &networkName )
{
if( !netConf )
{
netConf = new NetworkConfig( Kopete::UI::Global::mainWidget(), "network_config", true );
- netConf->host->setValidator( new QRegExpValidator( QString::fromLatin1("^[\\w-\\.]*$"), netConf ) );
+ netConf->host->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[\\w-\\.]*$"), netConf ) );
netConf->upButton->setIconSet( SmallIconSet( "up" ) );
netConf->downButton->setIconSet( SmallIconSet( "down" ) );
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
- connect( netConf, SIGNAL( accepted() ), this, SLOT( slotSaveNetworkConfig() ) );
- connect( netConf, SIGNAL( rejected() ), this, SLOT( slotReadNetworks() ) );
- connect( netConf->upButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerUp() ) );
- connect( netConf->downButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerDown() ) );
- connect( netConf->removeNetwork, SIGNAL( clicked() ), this, SLOT( slotDeleteNetwork() ) );
- connect( netConf->removeHost, SIGNAL( clicked() ), this, SLOT( slotDeleteHost() ) );
- connect( netConf->newHost, SIGNAL( clicked() ), this, SLOT( slotNewHost() ) );
- connect( netConf->newNetwork, SIGNAL( clicked() ), this, SLOT( slotNewNetwork() ) );
- connect( netConf->renameNetwork, SIGNAL( clicked() ), this, SLOT( slotRenameNetwork() ) );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
- connect( netConf->networkList, SIGNAL( doubleClicked ( QListBoxItem * )), SLOT(slotRenameNetwork()));
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf, TQT_SIGNAL( accepted() ), this, TQT_SLOT( slotSaveNetworkConfig() ) );
+ connect( netConf, TQT_SIGNAL( rejected() ), this, TQT_SLOT( slotReadNetworks() ) );
+ connect( netConf->upButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerUp() ) );
+ connect( netConf->downButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerDown() ) );
+ connect( netConf->removeNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteNetwork() ) );
+ connect( netConf->removeHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteHost() ) );
+ connect( netConf->newHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewHost() ) );
+ connect( netConf->newNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewNetwork() ) );
+ connect( netConf->renameNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRenameNetwork() ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->networkList, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )), TQT_SLOT(slotRenameNetwork()));
}
- disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->networkList->clear();
- for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
{
IRCNetwork *net = it.current();
netConf->networkList->insertItem( net->name );
@@ -803,8 +803,8 @@ void IRCProtocol::editNetworks( const QString &networkName )
netConf->networkList->sort();
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
if( !networkName.isEmpty() )
netConf->networkList->setSelected( netConf->networkList->findItem( networkName ), true );
@@ -826,14 +826,14 @@ void IRCProtocol::slotUpdateNetworkConfig()
netConf->description->setText( net->description );
netConf->hostList->clear();
- for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
- netConf->hostList->insertItem( (*it)->host + QString::fromLatin1(":") + QString::number((*it)->port) );
+ for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
+ netConf->hostList->insertItem( (*it)->host + TQString::fromLatin1(":") + TQString::number((*it)->port) );
// prevent nested event loop crash
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->setSelected( 0, true );
slotUpdateNetworkHostConfig();
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
}
// record the current selection
@@ -871,11 +871,11 @@ void IRCProtocol::storeCurrentHost()
void IRCProtocol::slotHostPortChanged( int value )
{
- QString entryText = m_uiCurrentHostSelection + QString::fromLatin1(":") + QString::number( value );
+ TQString entryText = m_uiCurrentHostSelection + TQString::fromLatin1(":") + TQString::number( value );
// changeItem causes a take() and insert, and we don't want a selectionChanged() signal that sets all this off again.
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->changeItem( entryText, netConf->hostList->currentItem() );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
}
void IRCProtocol::slotUpdateNetworkHostConfig()
@@ -891,9 +891,9 @@ void IRCProtocol::slotUpdateNetworkHostConfig()
{
netConf->host->setText( host->host );
netConf->password->setText( host->password );
- disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->port->setValue( host->port );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->useSSL->setChecked( host->ssl );
netConf->upButton->setEnabled( netConf->hostList->currentItem() > 0 );
@@ -902,29 +902,29 @@ void IRCProtocol::slotUpdateNetworkHostConfig()
}
else
{
- m_uiCurrentHostSelection = QString();
- disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ m_uiCurrentHostSelection = TQString();
+ disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->host->clear();
netConf->password->clear();
netConf->port->setValue( 6667 );
netConf->useSSL->setChecked( false );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
}
}
void IRCProtocol::slotDeleteNetwork()
{
- QString network = netConf->networkList->currentText();
+ TQString network = netConf->networkList->currentText();
if( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the network <b>%1</b>?<br>"
"Any accounts which use this network will have to be modified.</qt>")
.arg(network), i18n("Deleting Network"),
- KGuiItem(i18n("&Delete Network"),"editdelete"), QString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
+ KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
{
- disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
IRCNetwork *net = m_networks[ network ];
- for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
+ for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
{
m_hosts.remove( (*it)->host );
delete (*it);
@@ -932,8 +932,8 @@ void IRCProtocol::slotDeleteNetwork()
m_networks.remove( network );
delete net;
netConf->networkList->removeItem( netConf->networkList->currentItem() );
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
slotUpdateNetworkHostConfig();
}
@@ -941,20 +941,20 @@ void IRCProtocol::slotDeleteNetwork()
void IRCProtocol::slotDeleteHost()
{
- QString hostName = netConf->host->text();
+ TQString hostName = netConf->host->text();
if ( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the host <b>%1</b>?</qt>")
.arg(hostName), i18n("Deleting Host"),
- KGuiItem(i18n("&Delete Host"),"editdelete"), QString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
+ KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
{
IRCHost *host = m_hosts[ hostName ];
if ( host )
{
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
- QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port);
- QListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
+ TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
+ TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
netConf->hostList->removeItem( netConf->hostList->index( justAdded ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
// remove from network as well
IRCNetwork *net = m_networks[ m_uiCurrentNetworkSelection ];
@@ -971,12 +971,12 @@ void IRCProtocol::slotNewNetwork()
// create a new network struct
IRCNetwork *net = new IRCNetwork;
// give it the name of 'New Network' (incrementing number if needed)
- QString netName = QString::fromLatin1( "New Network" );
+ TQString netName = TQString::fromLatin1( "New Network" );
if ( m_networks.find( netName ) )
{
int newIdx = 1;
do {
- netName = QString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
+ netName = TQString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
}
while ( m_networks.find( netName ) && newIdx < 100 );
if ( newIdx == 100 ) // pathological case
@@ -986,7 +986,7 @@ void IRCProtocol::slotNewNetwork()
// and add it to the networks dict and list
m_networks.insert( net->name, net );
netConf->networkList->insertItem( net->name );
- QListBoxItem * justAdded = netConf->networkList->findItem( net->name );
+ TQListBoxItem * justAdded = netConf->networkList->findItem( net->name );
netConf->networkList->setSelected( justAdded, true );
netConf->networkList->setBottomItem( netConf->networkList->index( justAdded ) );
}
@@ -997,10 +997,10 @@ void IRCProtocol::slotNewHost()
IRCHost *host = new IRCHost;
// prompt for a name
bool ok;
- QString name = KInputDialog::getText(
+ TQString name = KInputDialog::getText(
i18n("New Host"),
i18n("Enter the hostname of the new server:"),
- QString::null, &ok, Kopete::UI::Global::mainWidget() );
+ TQString::null, &ok, Kopete::UI::Global::mainWidget() );
if ( ok )
{
// dupe check
@@ -1019,10 +1019,10 @@ void IRCProtocol::slotNewHost()
IRCNetwork *net = m_networks[ netConf->networkList->currentText() ];
net->hosts.append( host );
// add it to the gui
- QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port);
+ TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
netConf->hostList->insertItem( entryText );
// select it in the gui
- QListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
netConf->hostList->setSelected( justAdded, true );
//netConf->hostList->setBottomItem( netConf->hostList->index( justAdded ) );
}
@@ -1035,7 +1035,7 @@ void IRCProtocol::slotRenameNetwork()
{
bool ok;
// popup up a dialog containing the current name
- QString name = KInputDialog::getText(
+ TQString name = KInputDialog::getText(
i18n("Rename Network"),
i18n("Enter the new name for this network:"),
m_uiCurrentNetworkSelection, &ok,
@@ -1078,43 +1078,43 @@ void IRCProtocol::slotSaveNetworkConfig()
kdDebug( 14120 ) << k_funcinfo << m_uiCurrentHostSelection << endl;
storeCurrentHost();
- QDomDocument doc("irc-networks");
- QDomNode root = doc.appendChild( doc.createElement("networks") );
+ TQDomDocument doc("irc-networks");
+ TQDomNode root = doc.appendChild( doc.createElement("networks") );
- for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
{
IRCNetwork *net = it.current();
- QDomNode networkNode = root.appendChild( doc.createElement("network") );
- QDomNode nameNode = networkNode.appendChild( doc.createElement("name") );
+ TQDomNode networkNode = root.appendChild( doc.createElement("network") );
+ TQDomNode nameNode = networkNode.appendChild( doc.createElement("name") );
nameNode.appendChild( doc.createTextNode( net->name ) );
- QDomNode descNode = networkNode.appendChild( doc.createElement("description") );
+ TQDomNode descNode = networkNode.appendChild( doc.createElement("description") );
descNode.appendChild( doc.createTextNode( net->description ) );
- QDomNode serversNode = networkNode.appendChild( doc.createElement("servers") );
+ TQDomNode serversNode = networkNode.appendChild( doc.createElement("servers") );
- for( QValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
+ for( TQValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
{
- QDomNode serverNode = serversNode.appendChild( doc.createElement("server") );
+ TQDomNode serverNode = serversNode.appendChild( doc.createElement("server") );
- QDomNode hostNode = serverNode.appendChild( doc.createElement("host") );
+ TQDomNode hostNode = serverNode.appendChild( doc.createElement("host") );
hostNode.appendChild( doc.createTextNode( (*it2)->host ) );
- QDomNode portNode = serverNode.appendChild( doc.createElement("port" ) );
- portNode.appendChild( doc.createTextNode( QString::number( (*it2)->port ) ) );
+ TQDomNode portNode = serverNode.appendChild( doc.createElement("port" ) );
+ portNode.appendChild( doc.createTextNode( TQString::number( (*it2)->port ) ) );
- QDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") );
+ TQDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") );
sslNode.appendChild( doc.createTextNode( (*it2)->ssl ? "true" : "false" ) );
}
}
// kdDebug(14121) << k_funcinfo << doc.toString(4) << endl;
- QFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) );
+ TQFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) );
if (xmlFile.open(IO_WriteOnly))
{
- QTextStream stream(&xmlFile);
+ TQTextStream stream(&xmlFile);
stream << doc.toString(4);
xmlFile.close();
}
@@ -1130,17 +1130,17 @@ void IRCProtocol::slotReadNetworks()
m_networks.clear();
m_hosts.clear();
- QFile xmlFile( locate( "appdata", "ircnetworks.xml" ) );
+ TQFile xmlFile( locate( "appdata", "ircnetworks.xml" ) );
xmlFile.open( IO_ReadOnly );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &xmlFile );
- QDomElement networkNode = doc.documentElement().firstChild().toElement();
+ TQDomElement networkNode = doc.documentElement().firstChild().toElement();
while( !networkNode.isNull () )
{
IRCNetwork *net = new IRCNetwork;
- QDomElement networkChild = networkNode.firstChild().toElement();
+ TQDomElement networkChild = networkNode.firstChild().toElement();
while( !networkChild.isNull() )
{
if( networkChild.tagName() == "name" )
@@ -1149,12 +1149,12 @@ void IRCProtocol::slotReadNetworks()
net->description = networkChild.text();
else if( networkChild.tagName() == "servers" )
{
- QDomElement server = networkChild.firstChild().toElement();
+ TQDomElement server = networkChild.firstChild().toElement();
while( !server.isNull() )
{
IRCHost *host = new IRCHost;
- QDomElement serverChild = server.firstChild().toElement();
+ TQDomElement serverChild = server.firstChild().toElement();
while( !serverChild.isNull() )
{
if( serverChild.tagName() == "host" )
@@ -1190,10 +1190,10 @@ void IRCProtocol::slotMoveServerUp()
if( !selectedNetwork || !selectedHost )
return;
- QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
if( pos != selectedNetwork->hosts.begin() )
{
- QValueList<IRCHost*>::iterator lastPos = pos;
+ TQValueList<IRCHost*>::iterator lastPos = pos;
lastPos--;
selectedNetwork->hosts.insert( lastPos, selectedHost );
selectedNetwork->hosts.remove( pos );
@@ -1203,7 +1203,7 @@ void IRCProtocol::slotMoveServerUp()
if( currentPos > 0 )
{
netConf->hostList->removeItem( currentPos );
- QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, --currentPos );
netConf->hostList->setSelected( currentPos, true );
}
@@ -1217,10 +1217,10 @@ void IRCProtocol::slotMoveServerDown()
if( !selectedNetwork || !selectedHost )
return;
- QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
if( *pos != selectedNetwork->hosts.back() )
{
- QValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos );
+ TQValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos );
selectedNetwork->hosts.insert( ++nextPos, selectedHost );
}
@@ -1228,7 +1228,7 @@ void IRCProtocol::slotMoveServerDown()
if( currentPos < ( netConf->hostList->count() - 1 ) )
{
netConf->hostList->removeItem( currentPos );
- QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, ++currentPos );
netConf->hostList->setSelected( currentPos, true );
}
diff --git a/kopete/protocols/irc/ircprotocol.h b/kopete/protocols/irc/ircprotocol.h
index 2a1700e5..0028e60b 100644
--- a/kopete/protocols/irc/ircprotocol.h
+++ b/kopete/protocols/irc/ircprotocol.h
@@ -24,7 +24,7 @@
#include "kopetemimetypehandler.h"
#include <dom/dom_node.h>
-#include <qdict.h>
+#include <tqdict.h>
#define m_protocol (IRCProtocol::protocol())
@@ -56,7 +56,7 @@ class IRCProtocolHandler : public Kopete::MimeTypeHandler
void handleURL( const KURL &url ) const;
};
-static const QString CHAT_VIEW( QString::fromLatin1("kopete_chatwindow") );
+static const TQString CHAT_VIEW( TQString::fromLatin1("kopete_chatwindow") );
/**
* @author Nick Betcher <nbetcher@kde.org>
@@ -81,23 +81,23 @@ public:
OnlineServer = 32768 //! This server is online.
};
- IRCProtocol( QObject *parent, const char *name, const QStringList &args );
+ IRCProtocol( TQObject *parent, const char *name, const TQStringList &args );
~IRCProtocol();
/** Kopete::Protocol reimplementation */
- virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account);
+ virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account);
/**
* Deserialize contact data
*/
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 );
- virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, QWidget *parent);
+ virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, TQWidget *parent);
- virtual Kopete::Account* createNewAccount(const QString &accountId);
+ virtual Kopete::Account* createNewAccount(const TQString &accountId);
- virtual QPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & );
+ virtual TQPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & );
static IRCProtocol *protocol();
@@ -142,13 +142,13 @@ public:
bool commandInProgress(){ return m_commandInProgress; }
void setCommandInProgress( bool ip ) { m_commandInProgress = ip; }
- QDict<IRCNetwork> &networks(){ return m_networks; }
+ TQDict<IRCNetwork> &networks(){ return m_networks; }
void addNetwork( IRCNetwork *network );
- void editNetworks( const QString &networkName = QString::null );
+ void editNetworks( const TQString &networkName = TQString::null );
signals:
- void networkConfigUpdated( const QString &selectedNetwork );
+ void networkConfigUpdated( const TQString &selectedNetwork );
private slots:
// FIXME: All the code for managing the networks list should be in another class - Will
@@ -168,48 +168,48 @@ private slots:
void slotMessageFilter( Kopete::Message &msg );
- void slotRawCommand( const QString &args, Kopete::ChatSession *manager );
- void slotQuoteCommand( const QString &args, Kopete::ChatSession *manager );
- void slotCtcpCommand( const QString &args, Kopete::ChatSession *manager );
- void slotPingCommand( const QString &args, Kopete::ChatSession *manager );
-
- void slotMotdCommand( const QString &args, Kopete::ChatSession *manager);
- void slotListCommand( const QString &args, Kopete::ChatSession *manager);
- void slotTopicCommand( const QString &args, Kopete::ChatSession *manager);
- void slotJoinCommand( const QString &args, Kopete::ChatSession *manager);
- void slotNickCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoisCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoCommand( const QString &args, Kopete::ChatSession *manager);
- void slotMeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotAllMeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotModeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotQueryCommand( const QString &args, Kopete::ChatSession *manager);
-
- void slotKickCommand( const QString &args, Kopete::ChatSession *manager);
- void slotBanCommand( const QString &args, Kopete::ChatSession *manager);
- void slotOpCommand( const QString &args, Kopete::ChatSession *manager);
- void slotDeopCommand( const QString &args, Kopete::ChatSession *manager);
- void slotVoiceCommand( const QString &args, Kopete::ChatSession *manager);
- void slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager);
- void slotQuitCommand( const QString &args, Kopete::ChatSession *manager);
- void slotPartCommand( const QString &args, Kopete::ChatSession *manager);
- void slotInviteCommand( const QString &args, Kopete::ChatSession *manager);
+ void slotRawCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotPingCommand( const TQString &args, Kopete::ChatSession *manager );
+
+ void slotMotdCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotListCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotTopicCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotJoinCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotNickCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotMeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotAllMeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotModeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotQueryCommand( const TQString &args, Kopete::ChatSession *manager);
+
+ void slotKickCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotBanCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotOpCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotDeopCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotQuitCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotPartCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotInviteCommand( const TQString &args, Kopete::ChatSession *manager);
void slotViewCreated( KopeteView * );
private:
static IRCProtocol *s_protocol;
- void simpleModeChange( const QString &, Kopete::ChatSession *, const QString &mode );
+ void simpleModeChange( const TQString &, Kopete::ChatSession *, const TQString &mode );
// FIXME: All the code for managing the networks list should be in another class - Will
void storeCurrentNetwork();
void storeCurrentHost();
NetworkConfig *netConf;
- QString m_uiCurrentNetworkSelection;
- QString m_uiCurrentHostSelection;
+ TQString m_uiCurrentNetworkSelection;
+ TQString m_uiCurrentHostSelection;
// end of network list specific code
DOM::Node activeNode;
@@ -217,8 +217,8 @@ private:
bool m_commandInProgress;
- QDict<IRCNetwork> m_networks;
- QDict<IRCHost> m_hosts;
+ TQDict<IRCNetwork> m_networks;
+ TQDict<IRCHost> m_hosts;
IRCProtocolHandler *m_protocolHandler;
};
diff --git a/kopete/protocols/irc/ircservercontact.cpp b/kopete/protocols/irc/ircservercontact.cpp
index 3ca21643..5be40dff 100644
--- a/kopete/protocols/irc/ircservercontact.cpp
+++ b/kopete/protocols/irc/ircservercontact.cpp
@@ -28,40 +28,40 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const QString &servername, Kopete::MetaContact *m)
+IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const TQString &servername, Kopete::MetaContact *m)
: IRCContact(contactManager, servername, m, "irc_server")
{
KIRC::Engine *engine = kircEngine();
- QObject::connect(engine, SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)),
- this, SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)),
+ this, TQT_SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &)));
/*
//FIXME: Have some kind of a debug option for raw input/ouput display??
- QObject::connect(engine, SIGNAL(sentMessage(KIRC::Message &)),
- this, SLOT(engineSentMessage(KIRC::Message &)));
- QObject::connect(engine, SIGNAL(receivedMessage(KIRC::Message &)),
- this, SLOT(engineReceivedMessage(KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(sentMessage(KIRC::Message &)),
+ this, TQT_SLOT(engineSentMessage(KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(receivedMessage(KIRC::Message &)),
+ this, TQT_SLOT(engineReceivedMessage(KIRC::Message &)));
*/
- QObject::connect(engine, SIGNAL(incomingNotice(const QString &, const QString &)),
- this, SLOT(slotIncomingNotice(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingNotice(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotIncomingNotice(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingCannotSendToChannel(const QString &, const QString &)),
- this, SLOT(slotCannotSendToChannel(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingCannotSendToChannel(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotCannotSendToChannel(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingUnknown(const QString &)),
- this, SLOT(slotIncomingUnknown(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingUnknown(const TQString &)),
+ this, TQT_SLOT(slotIncomingUnknown(const TQString &)));
- QObject::connect(engine, SIGNAL(incomingConnectString(const QString &)),
- this, SLOT(slotIncomingConnect(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingConnectString(const TQString &)),
+ this, TQT_SLOT(slotIncomingConnect(const TQString &)));
- QObject::connect(engine, SIGNAL(incomingMotd(const QString &)),
- this, SLOT(slotIncomingMotd(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingMotd(const TQString &)),
+ this, TQT_SLOT(slotIncomingMotd(const TQString &)));
- QObject::connect(Kopete::ChatSessionManager::self(), SIGNAL(viewCreated(KopeteView*)),
- this, SLOT(slotViewCreated(KopeteView*)) );
+ TQObject::connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)),
+ this, TQT_SLOT(slotViewCreated(KopeteView*)) );
updateStatus();
}
@@ -90,7 +90,7 @@ void IRCServerContact::updateStatus()
}
}
-const QString IRCServerContact::caption() const
+const TQString IRCServerContact::caption() const
{
return i18n("%1 @ %2").arg(ircAccount()->mySelf()->nickName() ).arg(
kircEngine()->currentHost().isEmpty() ? ircAccount()->networkName() : kircEngine()->currentHost()
@@ -99,7 +99,7 @@ const QString IRCServerContact::caption() const
void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC::Message &ircmsg)
{
- QString error;
+ TQString error;
switch (engineError)
{
case KIRC::Engine::ParsingFailed:
@@ -121,7 +121,7 @@ void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC
error = i18n("KIRC Error - Unknown error: ");
}
- ircAccount()->appendMessage(error + QString(ircmsg.raw()), IRCAccount::ErrorReply);
+ ircAccount()->appendMessage(error + TQString(ircmsg.raw()), IRCAccount::ErrorReply);
}
void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manager)
@@ -132,7 +132,7 @@ void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manag
manager->appendMessage(msg);
}
-void IRCServerContact::appendMessage( const QString &message )
+void IRCServerContact::appendMessage( const TQString &message )
{
Kopete::ContactPtrList members;
members.append( this );
@@ -141,7 +141,7 @@ void IRCServerContact::appendMessage( const QString &message )
appendMessage(msg);
}
-void IRCServerContact::slotIncomingNotice( const QString &orig, const QString &notice )
+void IRCServerContact::slotIncomingNotice( const TQString &orig, const TQString &notice )
{
if (orig.isEmpty()) {
// Prefix missing.
@@ -167,24 +167,24 @@ void IRCServerContact::slotIncomingNotice( const QString &orig, const QString &n
}
}
-void IRCServerContact::slotIncomingUnknown(const QString &message)
+void IRCServerContact::slotIncomingUnknown(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::UnknownReply);
}
-void IRCServerContact::slotIncomingConnect(const QString &message)
+void IRCServerContact::slotIncomingConnect(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::ConnectReply);
}
-void IRCServerContact::slotIncomingMotd(const QString &message)
+void IRCServerContact::slotIncomingMotd(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::InfoReply);
}
-void IRCServerContact::slotCannotSendToChannel(const QString &channel, const QString &message)
+void IRCServerContact::slotCannotSendToChannel(const TQString &channel, const TQString &message)
{
- ircAccount()->appendMessage(QString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply);
+ ircAccount()->appendMessage(TQString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply);
}
void IRCServerContact::appendMessage(Kopete::Message &msg)
@@ -206,7 +206,7 @@ void IRCServerContact::slotDumpMessages()
{
manager()->appendMessage( mMsgBuffer.front() );
mMsgBuffer.pop_front();
- QTimer::singleShot( 0, this, SLOT( slotDumpMessages() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDumpMessages() ) );
}
}
@@ -214,7 +214,7 @@ void IRCServerContact::slotViewCreated( KopeteView *v )
{
kdDebug(14121) << k_funcinfo << "Created: " << v << ", mgr: " << v->msgManager() << ", Mine: " << m_chatSession << endl;
if (m_chatSession && v->msgManager() == m_chatSession)
- QTimer::singleShot(500, this, SLOT(slotDumpMessages()));
+ TQTimer::singleShot(500, this, TQT_SLOT(slotDumpMessages()));
}
#include "ircservercontact.moc"
diff --git a/kopete/protocols/irc/ircservercontact.h b/kopete/protocols/irc/ircservercontact.h
index 1ca1475b..4d9e378d 100644
--- a/kopete/protocols/irc/ircservercontact.h
+++ b/kopete/protocols/irc/ircservercontact.h
@@ -24,8 +24,8 @@
#include "kopetechatsessionmanager.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
class KActionCollection;
class KAction;
@@ -48,12 +48,12 @@ class IRCServerContact
public:
// This class provides a Kopete::Contact for each server of a given IRC connection.
- IRCServerContact(IRCContactManager *, const QString &servername, Kopete::MetaContact *mc);
+ IRCServerContact(IRCContactManager *, const TQString &servername, Kopete::MetaContact *mc);
- virtual const QString caption() const;
+ virtual const TQString caption() const;
virtual void appendMessage(Kopete::Message &);
- void appendMessage( const QString &message );
+ void appendMessage( const TQString &message );
protected slots:
void engineInternalError(KIRC::Engine::Error error, KIRC::Message &ircmsg);
@@ -64,14 +64,14 @@ class IRCServerContact
void slotViewCreated( KopeteView* );
void slotDumpMessages();
- void slotIncomingUnknown( const QString &message );
- void slotIncomingConnect( const QString &message );
- void slotIncomingMotd( const QString &motd );
- void slotIncomingNotice( const QString &orig, const QString &notice );
- void slotCannotSendToChannel( const QString &channel, const QString &msg );
+ void slotIncomingUnknown( const TQString &message );
+ void slotIncomingConnect( const TQString &message );
+ void slotIncomingMotd( const TQString &motd );
+ void slotIncomingNotice( const TQString &orig, const TQString &notice );
+ void slotCannotSendToChannel( const TQString &channel, const TQString &msg );
private:
- QValueList<Kopete::Message> mMsgBuffer;
+ TQValueList<Kopete::Message> mMsgBuffer;
};
#endif
diff --git a/kopete/protocols/irc/ircsignalhandler.cpp b/kopete/protocols/irc/ircsignalhandler.cpp
index 5bfab0cc..db0acec2 100644
--- a/kopete/protocols/irc/ircsignalhandler.cpp
+++ b/kopete/protocols/irc/ircsignalhandler.cpp
@@ -23,147 +23,147 @@
#include "kircengine.h"
IRCSignalHandler::IRCSignalHandler(IRCContactManager *m)
- : QObject(m),
+ : TQObject(m),
manager(m)
{
KIRC::Engine *m_engine = static_cast<IRCAccount*>( manager->mySelf()->account() )->engine();
//Channel Connections to ourself
- QObject::connect(m_engine, SIGNAL(incomingNamesList(const QString &, const QStringList &)),
- this, SLOT(slotNamesList(const QString &, const QStringList &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNamesList(const TQString &, const TQStringList &)),
+ this, TQT_SLOT(slotNamesList(const TQString &, const TQStringList &)));
- QObject::connect(m_engine, SIGNAL(incomingEndOfNames(const QString &)),
- this, SLOT(slotEndOfNames(const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingEndOfNames(const TQString &)),
+ this, TQT_SLOT(slotEndOfNames(const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingTopicUser(const QString &, const QString &, const QDateTime &)),
- this, SLOT(slotTopicUser(const QString&,const QString&,const QDateTime&)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingTopicUser(const TQString &, const TQString &, const TQDateTime &)),
+ this, TQT_SLOT(slotTopicUser(const TQString&,const TQString&,const TQDateTime&)));
//Channel String mappings
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChankey(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChankey(const TQString &)),
&IRCChannelContact::failedChankey );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanFull(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanFull(const TQString &)),
&IRCChannelContact::failedChanInvite );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanInvite(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanInvite(const TQString &)),
&IRCChannelContact::failedChanInvite );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanBanned(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanBanned(const TQString &)),
&IRCChannelContact::failedChanBanned );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingJoinedChannel(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)),
&IRCChannelContact::userJoinedChannel );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingExistingTopic(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingExistingTopic(const TQString &, const TQString &)),
&IRCChannelContact::channelTopic );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingChannelHomePage(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingChannelHomePage(const TQString &, const TQString &)),
&IRCChannelContact::channelHomePage );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingPartedChannel(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingPartedChannel(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::userPartedChannel );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingTopicChange(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingTopicChange(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::topicChanged );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingChannelModeChange(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingChannelModeChange(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::incomingModeChange );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingChannelMode(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingChannelMode(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::incomingChannelMode );
mapTriple<IRCChannelContact>( m,
- SIGNAL(incomingKick(const QString &, const QString &,const QString &,const QString &)),
+ TQT_SIGNAL(incomingKick(const TQString &, const TQString &,const TQString &,const TQString &)),
&IRCChannelContact::userKicked );
//User connections to ourself
- QObject::connect(m_engine, SIGNAL(incomingWhoIsIdle(const QString &, unsigned long )),
- this, SLOT(slotNewWhoIsIdle(const QString &, unsigned long )));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoIsIdle(const TQString &, unsigned long )),
+ this, TQT_SLOT(slotNewWhoIsIdle(const TQString &, unsigned long )));
- QObject::connect(m_engine, SIGNAL(incomingWhoReply(const QString &, const QString &, const QString &,
- const QString &, const QString &, bool, const QString &, uint, const QString & )),
- this, SLOT( slotNewWhoReply(const QString &, const QString &, const QString &, const QString &,
- const QString &, bool, const QString &, uint, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoReply(const TQString &, const TQString &, const TQString &,
+ const TQString &, const TQString &, bool, const TQString &, uint, const TQString & )),
+ this, TQT_SLOT( slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &,
+ const TQString &, bool, const TQString &, uint, const TQString &)));
//User signal mappings
- map<IRCUserContact>( m, SIGNAL(incomingUserOnline( const QString & )), &IRCUserContact::userOnline );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingUserOnline( const TQString & )), &IRCUserContact::userOnline );
- map<IRCUserContact>( m, SIGNAL(incomingWhoIsOperator( const QString & )), &IRCUserContact::newWhoIsOperator );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsOperator( const TQString & )), &IRCUserContact::newWhoIsOperator );
- map<IRCUserContact>( m, SIGNAL(incomingWhoIsIdentified( const QString & )), &IRCUserContact::newWhoIsIdentified );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsIdentified( const TQString & )), &IRCUserContact::newWhoIsIdentified );
- map<IRCUserContact>( m, SIGNAL(incomingEndOfWhois( const QString & )), &IRCUserContact::whoIsComplete );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhois( const TQString & )), &IRCUserContact::whoIsComplete );
- map<IRCUserContact>( m, SIGNAL(incomingEndOfWhoWas( const QString & )), &IRCUserContact::whoWasComplete );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhoWas( const TQString & )), &IRCUserContact::whoWasComplete );
- mapSingle<IRCUserContact>( m, SIGNAL(incomingUserIsAway( const QString &, const QString & )),
+ mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingUserIsAway( const TQString &, const TQString & )),
&IRCUserContact::incomingUserIsAway );
- mapSingle<IRCUserContact>( m, SIGNAL(incomingWhoIsChannels( const QString &, const QString & )),
+ mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsChannels( const TQString &, const TQString & )),
&IRCUserContact::newWhoIsChannels );
mapDouble<IRCUserContact>( m,
- SIGNAL(incomingWhoIsServer(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoIsServer(const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsServer );
mapDouble<IRCUserContact>( m,
- SIGNAL(incomingPrivAction(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingPrivAction(const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newAction );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingAction(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingAction(const TQString &, const TQString &, const TQString &)),
&IRCChannelContact::newAction );
mapTriple<IRCUserContact>( m,
- SIGNAL(incomingWhoIsUser(const QString &, const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoIsUser(const TQString &, const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsUser );
mapTriple<IRCUserContact>( m,
- SIGNAL(incomingWhoWasUser(const QString &, const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoWasUser(const TQString &, const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsUser );
}
IRCSignalHandler::~IRCSignalHandler()
{
//Delete our mapping pointers
- for( QValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it )
+ for( TQValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it )
delete *it;
}
-void IRCSignalHandler::slotNamesList( const QString &chan, const QStringList &list )
+void IRCSignalHandler::slotNamesList( const TQString &chan, const TQStringList &list )
{
IRCChannelContact *c = manager->existChannel( chan );
if( c )
c->namesList( list );
}
-void IRCSignalHandler::slotEndOfNames( const QString &chan )
+void IRCSignalHandler::slotEndOfNames( const TQString &chan )
{
IRCChannelContact *c = manager->existChannel( chan );
if ( c )
c->endOfNames();
}
-void IRCSignalHandler::slotTopicUser(const QString &chan, const QString &user,const QDateTime &time)
+void IRCSignalHandler::slotTopicUser(const TQString &chan, const TQString &user,const TQDateTime &time)
{
IRCChannelContact *c = manager->existChannel( chan );
if( c )
c->topicUser( user, time );
}
-void IRCSignalHandler::slotNewWhoIsIdle(const QString &nick, unsigned long val )
+void IRCSignalHandler::slotNewWhoIsIdle(const TQString &nick, unsigned long val )
{
IRCUserContact *c = manager->findUser( nick );
if( c )
c->newWhoIsIdle( val );
}
-void IRCSignalHandler::slotNewWhoReply(const QString &nick, const QString &arg1, const QString &arg2,
- const QString &arg3, const QString &arg4, bool arg5, const QString &arg6, uint arg7, const QString &arg8 )
+void IRCSignalHandler::slotNewWhoReply(const TQString &nick, const TQString &arg1, const TQString &arg2,
+ const TQString &arg3, const TQString &arg4, bool arg5, const TQString &arg6, uint arg7, const TQString &arg8 )
{
IRCUserContact *c = manager->findUser( nick );
if( c )
diff --git a/kopete/protocols/irc/ircsignalhandler.h b/kopete/protocols/irc/ircsignalhandler.h
index a87f814c..57732e07 100644
--- a/kopete/protocols/irc/ircsignalhandler.h
+++ b/kopete/protocols/irc/ircsignalhandler.h
@@ -19,9 +19,9 @@
#ifndef _IRC_SIGNAL_HANDLER_H
#define _IRC_SIGNAL_HANDLER_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <kdebug.h>
@@ -54,30 +54,30 @@ struct IRCSignalMappingBase{};
struct IRCSignalMappingT : IRCSignalMappingBase
{
- virtual void exec( const QString & ) = 0;
+ virtual void exec( const TQString & ) = 0;
virtual ~IRCSignalMappingT() {};
};
struct IRCSignalMappingSingleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingSingleT() {};
};
struct IRCSignalMappingDoubleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingDoubleT() {};
};
struct IRCSignalMappingTripleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString &, const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString &, const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingTripleT() {};
};
/***
-QObject members, these connect to the KIRC signals and call
+TQObject members, these connect to the KIRC signals and call
the Mapping functions when they emit.
**/
@@ -86,10 +86,10 @@ class QMember : public QObject
Q_OBJECT
public:
- QMember( IRCSignalMappingT *m, QObject *p ) : QObject( p ), mapping( m ){};
+ QMember( IRCSignalMappingT *m, TQObject *p ) : TQObject( p ), mapping( m ){};
public slots:
- void slotEmit( const QString &id )
+ void slotEmit( const TQString &id )
{
//kdDebug(14120) << k_funcinfo << id << endl;
mapping->exec(id);
@@ -104,10 +104,10 @@ class QMemberSingle : public QObject
Q_OBJECT
public:
- QMemberSingle( IRCSignalMappingSingleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberSingle( IRCSignalMappingSingleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg )
+ void slotEmit( const TQString &id, const TQString &arg )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << endl;
mapping->exec(id,arg);
@@ -122,10 +122,10 @@ class QMemberDouble : public QObject
Q_OBJECT
public:
- QMemberDouble( IRCSignalMappingDoubleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberDouble( IRCSignalMappingDoubleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg, const QString &arg2 )
+ void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2 )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << endl;
mapping->exec(id,arg,arg2);
@@ -140,10 +140,10 @@ class QMemberTriple : public QObject
Q_OBJECT
public:
- QMemberTriple( IRCSignalMappingTripleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberTriple( IRCSignalMappingTripleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg, const QString &arg2, const QString &arg3 )
+ void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2, const TQString &arg3 )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << " : " << arg3 << endl;
mapping->exec(id,arg,arg2,arg3);
@@ -166,7 +166,7 @@ class IRCSignalMapping : public IRCSignalMappingT
IRCSignalMapping( IRCContactManager *mgr, const char * /*signal*/,
void (TClass::*m)() ) : manager(mgr), method(m){}
- void exec( const QString &id )
+ void exec( const TQString &id )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
@@ -186,21 +186,21 @@ class IRCSignalMappingSingle : public IRCSignalMappingSingleT
{
public:
IRCSignalMappingSingle<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&) ) : manager(mgr), method(m){}
+ void (TClass::*m)(const TQString&) ) : manager(mgr), method(m){}
- void exec( const QString &id, const QString &arg )
+ void exec( const TQString &id, const TQString &arg )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&) = (void (TClass::*)(const QString&))method;
+ void (TClass::*tmp)(const TQString&) = (void (TClass::*)(const TQString&))method;
(*c.*tmp)( arg );
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &);
+ void (TClass::*method)(const TQString &);
};
template <class TClass>
@@ -208,22 +208,22 @@ class IRCSignalMappingDouble : public IRCSignalMappingDoubleT
{
public:
IRCSignalMappingDouble<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&,const QString&) ) : manager(mgr), method(m){}
+ void (TClass::*m)(const TQString&,const TQString&) ) : manager(mgr), method(m){}
- void exec( const QString &id,const QString &arg, const QString &arg2 )
+ void exec( const TQString &id,const TQString &arg, const TQString &arg2 )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&,const QString&) =
- (void (TClass::*)(const QString&,const QString&))method;
+ void (TClass::*tmp)(const TQString&,const TQString&) =
+ (void (TClass::*)(const TQString&,const TQString&))method;
(*c.*tmp)(arg,arg2);
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &,const QString &);
+ void (TClass::*method)(const TQString &,const TQString &);
};
template <class TClass>
@@ -231,23 +231,23 @@ class IRCSignalMappingTriple : public IRCSignalMappingTripleT
{
public:
IRCSignalMappingTriple<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&,const QString&,const QString&) )
+ void (TClass::*m)(const TQString&,const TQString&,const TQString&) )
: manager(mgr), method(m){}
- void exec( const QString &id,const QString&arg, const QString &arg2, const QString &arg3 )
+ void exec( const TQString &id,const TQString&arg, const TQString &arg2, const TQString &arg3 )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&,const QString&,const QString&) =
- (void (TClass::*)(const QString&,const QString&,const QString&))method;
+ void (TClass::*tmp)(const TQString&,const TQString&,const TQString&) =
+ (void (TClass::*)(const TQString&,const TQString&,const TQString&))method;
(*c.*tmp)(arg,arg2,arg3);
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &,const QString &,const QString &);
+ void (TClass::*method)(const TQString &,const TQString &,const TQString &);
};
class IRCSignalHandler : public QObject
@@ -261,22 +261,22 @@ class IRCSignalHandler : public QObject
private slots:
/****
- Slots for signals with non-QString types
+ Slots for signals with non-TQString types
*/
//Channel contact slots
- void slotNamesList( const QString &, const QStringList & );
- void slotEndOfNames( const QString & );
- void slotTopicUser( const QString &, const QString&, const QDateTime &);
+ void slotNamesList( const TQString &, const TQStringList & );
+ void slotEndOfNames( const TQString & );
+ void slotTopicUser( const TQString &, const TQString&, const TQDateTime &);
//User contact slots
- void slotNewWhoIsIdle(const QString &, unsigned long );
- void slotNewWhoReply(const QString &, const QString &, const QString &, const QString &,
- const QString &, bool , const QString &, uint , const QString & );
+ void slotNewWhoIsIdle(const TQString &, unsigned long );
+ void slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &,
+ const TQString &, bool , const TQString &, uint , const TQString & );
private:
IRCContactManager *manager;
- QValueList<IRCSignalMappingBase*> mappings;
+ TQValueList<IRCSignalMappingBase*> mappings;
/****
Signal mapping functions
@@ -287,46 +287,46 @@ class IRCSignalHandler : public QObject
{
IRCSignalMappingT *mapping = new IRCSignalMapping<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMember( mapping, this),
- SLOT( slotEmit( const QString &) )
+ TQT_SLOT( slotEmit( const TQString &) )
);
}
template <class TClass>
inline void mapSingle( IRCContactManager *m,
- const char* signal, void (TClass::*method)(const QString&) )
+ const char* signal, void (TClass::*method)(const TQString&) )
{
IRCSignalMappingSingleT *mapping = new IRCSignalMappingSingle<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberSingle( mapping, this),
- SLOT( slotEmit( const QString &, const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &) )
);
}
template <class TClass>
inline void mapDouble( IRCContactManager *m,
- const char* signal, void (TClass::*method)(const QString&,const QString&) )
+ const char* signal, void (TClass::*method)(const TQString&,const TQString&) )
{
IRCSignalMappingDoubleT *mapping = new IRCSignalMappingDouble<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberDouble( mapping, this),
- SLOT( slotEmit( const QString &, const QString &,const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &) )
);
}
template <class TClass>
inline void mapTriple( IRCContactManager *m,
const char* signal,
- void (TClass::*method)(const QString&,const QString &, const QString &) )
+ void (TClass::*method)(const TQString&,const TQString &, const TQString &) )
{
IRCSignalMappingTripleT *mapping = new IRCSignalMappingTriple<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberTriple( mapping, this),
- SLOT( slotEmit( const QString &, const QString &,const QString &,const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &,const TQString &) )
);
}
};
diff --git a/kopete/protocols/irc/irctransferhandler.cpp b/kopete/protocols/irc/irctransferhandler.cpp
index 4715679e..e579e94a 100644
--- a/kopete/protocols/irc/irctransferhandler.cpp
+++ b/kopete/protocols/irc/irctransferhandler.cpp
@@ -41,13 +41,13 @@ KIRC::TransferHandler *IRCTransferHandler::handler()
IRCTransferHandler::IRCTransferHandler()
{
- connect(handler(), SIGNAL(transferCreated(KIRC::Transfer *)),
- this, SLOT(transferCreated(KIRC::Transfer *)));
+ connect(handler(), TQT_SIGNAL(transferCreated(KIRC::Transfer *)),
+ this, TQT_SLOT(transferCreated(KIRC::Transfer *)));
- connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer *, const QString &)),
- this, SLOT(transferAccepted(Kopete::Transfer *, const QString&)));
- connect( Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo &)),
- this, SLOT(transferRefused(const Kopete::FileTransferInfo &)));
+ connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer *, const TQString &)),
+ this, TQT_SLOT(transferAccepted(Kopete::Transfer *, const TQString&)));
+ connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo &)),
+ this, TQT_SLOT(transferRefused(const Kopete::FileTransferInfo &)));
}
void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
@@ -55,7 +55,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
kdDebug(14120) << k_funcinfo << endl;
IRCContact *contact = IRCContactManager::existContact(t->engine(), t->nick());
- QString fileName = t->fileName();
+ TQString fileName = t->fileName();
unsigned long fileSize = t->fileSize();
if(!contact)
@@ -88,7 +88,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
}
}
-void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const QString &file)
+void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const TQString &file)
{
kdDebug(14120) << k_funcinfo << endl;
@@ -121,8 +121,8 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans
// case KIRC::Transfer::Chat:
case KIRC::Transfer::FileOutgoing:
case KIRC::Transfer::FileIncoming:
- connect(t , SIGNAL(fileSizeAcknowledge(unsigned int)),
- kt, SLOT(slotProcessed(unsigned int)));
+ connect(t , TQT_SIGNAL(fileSizeAcknowledge(unsigned int)),
+ kt, TQT_SLOT(slotProcessed(unsigned int)));
break;
default:
kdDebug(14120) << k_funcinfo << "Unknown transfer connections for type" << endl;
@@ -130,16 +130,16 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans
return;
}
- connect(t , SIGNAL(complete()),
- kt, SLOT(slotComplete()));
+ connect(t , TQT_SIGNAL(complete()),
+ kt, TQT_SLOT(slotComplete()));
-// connect(kt , SIGNAL(transferCanceled()),
-// t, SLOT(abort()));
-// connect(kt, SIGNAL(destroyed()),
-// t, SLOT(slotKopeteTransferDestroyed()));
+// connect(kt , TQT_SIGNAL(transferCanceled()),
+// t, TQT_SLOT(abort()));
+// connect(kt, TQT_SIGNAL(destroyed()),
+// t, TQT_SLOT(slotKopeteTransferDestroyed()));
- connect(kt, SIGNAL(result(KIO::Job *)),
- this , SLOT(kioresult(KIO::Job *)));
+ connect(kt, TQT_SIGNAL(result(KIO::Job *)),
+ this , TQT_SLOT(kioresult(KIO::Job *)));
t->initiate();
}
diff --git a/kopete/protocols/irc/irctransferhandler.h b/kopete/protocols/irc/irctransferhandler.h
index 17c419ae..7847464c 100644
--- a/kopete/protocols/irc/irctransferhandler.h
+++ b/kopete/protocols/irc/irctransferhandler.h
@@ -18,7 +18,7 @@
#ifndef IRCTRANSFERHANDLER_H
#define IRCTRANSFERHANDLER_H
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kopetetransfermanager.h>
@@ -43,7 +43,7 @@ public:
private slots:
void transferCreated(KIRC::Transfer *);
- void transferAccepted(Kopete::Transfer *kt, const QString&file);
+ void transferAccepted(Kopete::Transfer *kt, const TQString&file);
void transferRefused(const Kopete::FileTransferInfo &info);
void kioresult(KIO::Job *job);
@@ -59,7 +59,7 @@ private:
KIRC::TransferHandler *handler();
- QIntDict<KIRC::Transfer> m_idMap;
+ TQIntDict<KIRC::Transfer> m_idMap;
};
#endif
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp
index dc9dcbf2..24e46c57 100644
--- a/kopete/protocols/irc/ircusercontact.cpp
+++ b/kopete/protocols/irc/ircusercontact.cpp
@@ -31,20 +31,20 @@
#include <kfiledialog.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const QString &nickname, Kopete::MetaContact *m )
+IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString &nickname, Kopete::MetaContact *m )
: IRCContact(contactManager, nickname, m ),
actionCtcpMenu(0L)
{
setFileCapable(true);
- mOnlineTimer = new QTimer( this );
+ mOnlineTimer = new TQTimer( this );
- QObject::connect(mOnlineTimer, SIGNAL(timeout()), this, SLOT( slotUserOffline() ) );
+ TQObject::connect(mOnlineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUserOffline() ) );
- QObject::connect(kircEngine(), SIGNAL(incomingChannelModeChange(const QString&, const QString&, const QString&)),
- this, SLOT(slotIncomingModeChange(const QString&,const QString&, const QString&)));
+ TQObject::connect(kircEngine(), TQT_SIGNAL(incomingChannelModeChange(const TQString&, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotIncomingModeChange(const TQString&,const TQString&, const TQString&)));
mInfo.isOperator = false;
mInfo.isIdentified = false;
@@ -100,9 +100,9 @@ void IRCUserContact::updateStatus()
// This may not be created yet ( for myself() on startup )
if( ircAccount()->contactManager() )
{
- QValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
+ TQValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
- for( QValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
+ for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
{
IRCChannelContact *channel = *it;
Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
@@ -141,13 +141,13 @@ void IRCUserContact::updateStatus()
}
}
-void IRCUserContact::sendFile(const KURL &sourceURL, const QString&, unsigned int)
+void IRCUserContact::sendFile(const KURL &sourceURL, const TQString&, unsigned int)
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer"));
+ filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer"));
else
filePath = sourceURL.path(-1);
@@ -165,7 +165,7 @@ void IRCUserContact::slotUserOffline()
updateStatus();
if( !metaContact()->isTemporary() )
- kircEngine()->writeMessage( QString::fromLatin1("WHOWAS %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) );
removeProperty( m_protocol->propUserInfo );
removeProperty( m_protocol->propServer );
@@ -180,7 +180,7 @@ void IRCUserContact::setAway(bool isAway)
updateStatus();
}
-void IRCUserContact::incomingUserIsAway(const QString &reason)
+void IRCUserContact::incomingUserIsAway(const TQString &reason)
{
if( manager( Kopete::Contact::CannotCreate ) )
{
@@ -214,29 +214,29 @@ void IRCUserContact::slotUserInfo()
}
}
-const QString IRCUserContact::caption() const
+const TQString IRCUserContact::caption() const
{
return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
}
void IRCUserContact::slotOp()
{
- contactMode( QString::fromLatin1("+o") );
+ contactMode( TQString::fromLatin1("+o") );
}
void IRCUserContact::slotDeop()
{
- contactMode( QString::fromLatin1("-o") );
+ contactMode( TQString::fromLatin1("-o") );
}
void IRCUserContact::slotVoice()
{
- contactMode( QString::fromLatin1("+v") );
+ contactMode( TQString::fromLatin1("+v") );
}
void IRCUserContact::slotDevoice()
{
- contactMode( QString::fromLatin1("-v") );
+ contactMode( TQString::fromLatin1("-v") );
}
void IRCUserContact::slotBanHost()
@@ -246,7 +246,7 @@ void IRCUserContact::slotBanHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanHostOnce() ) );
}
} else {
slotBanHostOnce();
@@ -258,9 +258,9 @@ void IRCUserContact::slotBanHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
}
void IRCUserContact::slotBanUserHost()
@@ -270,7 +270,7 @@ void IRCUserContact::slotBanUserHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserHostOnce() ) );
}
} else {
slotBanUserHostOnce();
@@ -282,9 +282,9 @@ void IRCUserContact::slotBanUserHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
}
void IRCUserContact::slotBanDomain()
@@ -294,7 +294,7 @@ void IRCUserContact::slotBanDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanDomainOnce() ) );
}
} else {
slotBanDomainOnce();
@@ -306,11 +306,11 @@ void IRCUserContact::slotBanDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@*.%1").arg(domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain));
}
void IRCUserContact::slotBanUserDomain()
@@ -320,7 +320,7 @@ void IRCUserContact::slotBanUserDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserDomainOnce() ) );
}
} else {
slotBanUserDomainOnce();
@@ -332,25 +332,25 @@ void IRCUserContact::slotBanUserDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
}
void IRCUserContact::slotKick()
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->kick(m_nickName, channelName, QString::null);
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->kick(m_nickName, channelName, TQString::null);
}
-void IRCUserContact::contactMode(const QString &mode)
+void IRCUserContact::contactMode(const TQString &mode)
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
}
void IRCUserContact::slotCtcpPing()
@@ -363,7 +363,7 @@ void IRCUserContact::slotCtcpVersion()
kircEngine()->CtcpRequest_version(m_nickName);
}
-void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostname, const QString &realname)
+void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname)
{
mInfo.channels.clear();
mInfo.userName = username;
@@ -372,14 +372,14 @@ void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostna
if( onlineStatus().status() == Kopete::OnlineStatus::Offline )
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propFullName, mInfo.realName );
}
}
-void IRCUserContact::newWhoIsServer(const QString &servername, const QString &serverinfo)
+void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo)
{
mInfo.serverName = servername;
if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online
@@ -395,7 +395,7 @@ void IRCUserContact::newWhoIsServer(const QString &servername, const QString &se
// 312 mynick othernick localhost.localdomain :FooNet Server
// 312 mynick othernick localhost.localdomain :Thu Jun 16 21:00:36 2005
- QDateTime lastSeen = QDateTime::fromString( serverinfo );
+ TQDateTime lastSeen = TQDateTime::fromString( serverinfo );
if( lastSeen.isValid() )
setProperty( m_protocol->propLastSeen, lastSeen );
}
@@ -417,7 +417,7 @@ void IRCUserContact::newWhoIsIdentified()
setProperty( m_protocol->propIsIdentified, i18n("True") );
}
-void IRCUserContact::newWhoIsChannels(const QString &channel)
+void IRCUserContact::newWhoIsChannels(const TQString &channel)
{
mInfo.channels.append( channel );
}
@@ -432,7 +432,7 @@ void IRCUserContact::whoIsComplete()
commandSource == manager(Kopete::Contact::CannotCreate) )
{
//User info
- QString msg = i18n("%1 is (%2@%3): %4<br/>")
+ TQString msg = i18n("%1 is (%2@%3): %4<br/>")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -451,8 +451,8 @@ void IRCUserContact::whoIsComplete()
msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo);
//Idle
- QString idleTime = formattedIdleTime();
- msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? QString::number(0) : idleTime );
+ TQString idleTime = formattedIdleTime();
+ msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime );
//End
ircAccount()->appendMessage(msg, IRCAccount::InfoReply );
@@ -465,7 +465,7 @@ void IRCUserContact::whoWasComplete()
if( isChatting() && ircAccount()->currentCommandSource() == manager() )
{
//User info
- QString msg = i18n("%1 was (%2@%3): %4\n")
+ TQString msg = i18n("%1 was (%2@%3): %4\n")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -482,27 +482,27 @@ void IRCUserContact::whoWasComplete()
}
}
-QString IRCUserContact::formattedName() const
+TQString IRCUserContact::formattedName() const
{
return mInfo.realName;
}
void IRCUserContact::updateInfo()
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propChannels, mInfo.channels.join(" ") );
- setProperty( m_protocol->propHops, QString::number(mInfo.hops) );
+ setProperty( m_protocol->propHops, TQString::number(mInfo.hops) );
setProperty( m_protocol->propFullName, mInfo.realName );
setIdleTime( mInfo.idle );
- mInfo.lastUpdate = QTime::currentTime();
+ mInfo.lastUpdate = TQTime::currentTime();
}
-void IRCUserContact::newWhoReply( const QString &channel, const QString &user, const QString &host,
- const QString &server, bool away, const QString &flags, uint hops, const QString &realName )
+void IRCUserContact::newWhoReply( const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server, bool away, const TQString &flags, uint hops, const TQString &realName )
{
if( !mInfo.channels.contains( channel ) )
mInfo.channels.append( channel );
@@ -524,11 +524,11 @@ void IRCUserContact::newWhoReply( const QString &channel, const QString &user, c
}
}
-QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
+TQPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
{
if( manager )
{
- QPtrList<KAction> *mCustomActions = new QPtrList<KAction> ();
+ TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction> ();
mActiveManager = manager;
Kopete::ContactPtrList members = mActiveManager->members();
IRCChannelContact *isChannel = dynamic_cast<IRCChannelContact*>( members.first() );
@@ -537,38 +537,38 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
{
actionCtcpMenu = new KActionMenu(i18n("C&TCP"), 0, this );
actionCtcpMenu->insert( new KAction(i18n("&Version"), 0, this,
- SLOT(slotCtcpVersion()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpVersion()), actionCtcpMenu) );
actionCtcpMenu->insert( new KAction(i18n("&Ping"), 0, this,
- SLOT(slotCtcpPing()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpPing()), actionCtcpMenu) );
actionModeMenu = new KActionMenu(i18n("&Modes"), 0, this, "actionModeMenu");
actionModeMenu->insert( new KAction(i18n("&Op"), 0, this,
- SLOT(slotOp()), actionModeMenu, "actionOp") );
+ TQT_SLOT(slotOp()), actionModeMenu, "actionOp") );
actionModeMenu->insert( new KAction(i18n("&Deop"), 0, this,
- SLOT(slotDeop()), actionModeMenu, "actionDeop") );
+ TQT_SLOT(slotDeop()), actionModeMenu, "actionDeop") );
actionModeMenu->insert( new KAction(i18n("&Voice"), 0, this,
- SLOT(slotVoice()), actionModeMenu, "actionVoice") );
+ TQT_SLOT(slotVoice()), actionModeMenu, "actionVoice") );
actionModeMenu->insert( new KAction(i18n("Devoice"), 0, this,
- SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
+ TQT_SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
actionModeMenu->setEnabled( false );
- actionKick = new KAction(i18n("&Kick"), 0, this, SLOT(slotKick()), this);
+ actionKick = new KAction(i18n("&Kick"), 0, this, TQT_SLOT(slotKick()), this);
actionKick->setEnabled( false );
actionBanMenu = new KActionMenu(i18n("&Ban"), 0, this, "actionBanMenu");
actionBanMenu->insert( new KAction(i18n("Host (*!*@host.domain.net)"), 0, this,
- SLOT(slotBanHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("Domain (*!*@*.domain.net)"), 0, this,
- SLOT(slotBanDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanDomain()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Host (*!*user@host.domain.net)"), 0, this,
- SLOT(slotBanUserHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Domain (*!*user@*.domain.net)"), 0, this,
- SLOT(slotBanUserDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserDomain()), actionBanMenu ) );
actionBanMenu->setEnabled( false );
codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" );
- connect( codecAction, SIGNAL( activated( const QTextCodec * ) ),
- this, SLOT( setCodec( const QTextCodec *) ) );
+ connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ),
+ this, TQT_SLOT( setCodec( const TQTextCodec *) ) );
codecAction->setCodec( codec() );
}
@@ -594,7 +594,7 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
return 0L;
}
-void IRCUserContact::slotIncomingModeChange( const QString &channel, const QString &, const QString &mode_ )
+void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQString &, const TQString &mode_ )
{
kdDebug(14120) << k_funcinfo << "channel: " << channel << " mode: " << mode_ << endl;
@@ -610,13 +610,13 @@ void IRCUserContact::slotIncomingModeChange( const QString &channel, const QStri
//
// irssi manual example: /MODE #channel +nto-o+v nick1 nick2 nick3
- QStringList users = QStringList::split(' ', mode_);
+ TQStringList users = TQStringList::split(' ', mode_);
users.pop_front();
- const QString mode = mode_.section(' ', 0, 0);
+ const TQString mode = mode_.section(' ', 0, 0);
bitAdjustment adjMode = RemoveBits;
- QStringList::iterator user = users.begin();
+ TQStringList::iterator user = users.begin();
//kdDebug(14120) << "me: " << m_nickName << " users: " << users << " mode: " << mode << endl;
@@ -695,7 +695,7 @@ void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel,
channel->manager()->setContactOnlineStatus(this, newStatus);
}
-void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message)
+void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
{
if (to == this)
{
@@ -713,7 +713,7 @@ void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QStr
}
}
-void IRCUserContact::newAction(const QString &to, const QString &action)
+void IRCUserContact::newAction(const TQString &to, const TQString &action)
{
IRCAccount *account = ircAccount();
diff --git a/kopete/protocols/irc/ircusercontact.h b/kopete/protocols/irc/ircusercontact.h
index 3373fa9c..b1cafa11 100644
--- a/kopete/protocols/irc/ircusercontact.h
+++ b/kopete/protocols/irc/ircusercontact.h
@@ -35,21 +35,21 @@ class IRCChannelContact;
struct IRCUserInfo
{
- QString userName;
- QString hostName;
- QString realName;
- QString serverName;
- QString serverInfo;
- QString flags;
- QStringList channels;
+ TQString userName;
+ TQString hostName;
+ TQString realName;
+ TQString serverName;
+ TQString serverInfo;
+ TQString flags;
+ TQStringList channels;
unsigned long idle;
bool isOperator;
bool isIdentified;
bool away;
bool online;
uint hops;
- QDateTime lastOnline;
- QTime lastUpdate;
+ TQDateTime lastOnline;
+ TQTime lastUpdate;
};
/**
@@ -64,41 +64,41 @@ class IRCUserContact : public IRCContact
public:
// This class provides a Kopete::Contact for each user on the channel.
- IRCUserContact(IRCContactManager *, const QString &nickname, Kopete::MetaContact *mc);
+ IRCUserContact(IRCContactManager *, const TQString &nickname, Kopete::MetaContact *mc);
// Kopete::Contact stuff
- virtual QPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager );
- virtual const QString caption() const;
+ virtual TQPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager );
+ virtual const TQString caption() const;
void setAway(bool isAway);
- QString formattedName() const;
+ TQString formattedName() const;
//Methods handled by the signal mapper
- void incomingUserIsAway(const QString &message );
+ void incomingUserIsAway(const TQString &message );
void userOnline();
- void newAction( const QString &from, const QString &action );
- void newWhoIsUser(const QString &username, const QString &hostname, const QString &realname);
- void newWhoIsServer(const QString &server, const QString &serverInfo);
+ void newAction( const TQString &from, const TQString &action );
+ void newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname);
+ void newWhoIsServer(const TQString &server, const TQString &serverInfo);
void newWhoIsOperator();
void newWhoIsIdentified();
void newWhoIsIdle(unsigned long seconds);
- void newWhoIsChannels(const QString &channel);
+ void newWhoIsChannels(const TQString &channel);
void whoIsComplete();
void whoWasComplete();
- void newWhoReply( const QString &channel, const QString &user, const QString &host,
- const QString &server, bool away, const QString &flags, uint hops,
- const QString &realName );
+ void newWhoReply( const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server, bool away, const TQString &flags, uint hops,
+ const TQString &realName );
public slots:
/** \brief Updates online status for channels based on current internal status.
*/
virtual void updateStatus();
- virtual void sendFile(const KURL &sourceURL, const QString&, unsigned int);
+ virtual void sendFile(const KURL &sourceURL, const TQString&, unsigned int);
protected slots:
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
private slots:
void slotOp();
@@ -122,13 +122,13 @@ private slots:
virtual void slotUserInfo();
//This can't be handled by the contact manager since
- void slotIncomingModeChange(const QString &nick, const QString &channel, const QString &mode);
+ void slotIncomingModeChange(const TQString &nick, const TQString &channel, const TQString &mode);
private:
enum bitAdjustment { RemoveBits, AddBits };
void adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj);
- void contactMode(const QString &mode);
+ void contactMode(const TQString &mode);
void updateInfo();
KActionMenu *actionModeMenu;
@@ -137,7 +137,7 @@ private:
KActionMenu *actionBanMenu;
KCodecAction *codecAction;
Kopete::ChatSession *mActiveManager;
- QTimer *mOnlineTimer;
+ TQTimer *mOnlineTimer;
IRCUserInfo mInfo;
};
diff --git a/kopete/protocols/irc/kcodecaction.cpp b/kopete/protocols/irc/kcodecaction.cpp
index e32a1787..f7e4ee24 100644
--- a/kopete/protocols/irc/kcodecaction.cpp
+++ b/kopete/protocols/irc/kcodecaction.cpp
@@ -14,37 +14,37 @@
* *
*************************************************************************
*/
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include "kcodecaction.h"
-KCodecAction::KCodecAction( const QString &text, const KShortcut &cut,
- QObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name )
+KCodecAction::KCodecAction( const TQString &text, const KShortcut &cut,
+ TQObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name )
{
- QObject::connect( this, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotActivated( const QString & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotActivated( const TQString & ) ) );
setItems( KCodecAction::supportedEncodings() );
}
-void KCodecAction::slotActivated( const QString & text )
+void KCodecAction::slotActivated( const TQString & text )
{
/* text is something like "Western European ( iso-8859-1 )", but we must give
* codecForName() only the "iso-8859-1" part.
*/
- QString encoding = KGlobal::charsets()->encodingForName(text);
+ TQString encoding = KGlobal::charsets()->encodingForName(text);
emit activated( KGlobal::charsets()->codecForName(encoding) );
}
-void KCodecAction::setCodec( const QTextCodec *codec )
+void KCodecAction::setCodec( const TQTextCodec *codec )
{
- QStringList items = this->items();
+ TQStringList items = this->items();
int i = 0;
- for (QStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) {
- QString encoding = KGlobal::charsets()->encodingForName(*it);
+ for (TQStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) {
+ TQString encoding = KGlobal::charsets()->encodingForName(*it);
if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == codec->mibEnum()) {
setCurrentItem(i);
@@ -59,17 +59,17 @@ void KCodecAction::setCodec( const QTextCodec *codec )
* This piece of code from kdepim/kmail/kmmsgbase.cpp
*/
-QStringList KCodecAction::supportedEncodings(bool usAscii)
+TQStringList KCodecAction::supportedEncodings(bool usAscii)
{
- QStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
- QStringList encodings;
- QMap<QString, bool> mimeNames;
+ TQStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
+ TQStringList encodings;
+ TQMap<TQString, bool> mimeNames;
- for (QStringList::ConstIterator it = encodingNames.begin();
+ for (TQStringList::ConstIterator it = encodingNames.begin();
it != encodingNames.end(); ++it)
{
- QTextCodec *codec = KGlobal::charsets()->codecForName(*it);
- QString mimeName = (codec) ? QString(codec->mimeName()).lower() : (*it);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(*it);
+ TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it);
if (mimeNames.find(mimeName) == mimeNames.end())
{
encodings.append(KGlobal::charsets()->languageForEncoding(*it)
diff --git a/kopete/protocols/irc/kcodecaction.h b/kopete/protocols/irc/kcodecaction.h
index 93f9d6c1..3ebd5f4d 100644
--- a/kopete/protocols/irc/kcodecaction.h
+++ b/kopete/protocols/irc/kcodecaction.h
@@ -18,7 +18,7 @@
#define KCODECACTION_H
#include <kdeversion.h>
-#include <qintdict.h>
+#include <tqintdict.h>
#if KDE_IS_VERSION( 3, 1, 90 )
#include <kactionclasses.h>
@@ -30,18 +30,18 @@ class KCodecAction : public KSelectAction
{
Q_OBJECT
public:
- KCodecAction( const QString &text, const KShortcut &cut = KShortcut(),
- QObject *parent = 0, const char *name = 0 );
+ KCodecAction( const TQString &text, const KShortcut &cut = KShortcut(),
+ TQObject *parent = 0, const char *name = 0 );
- void setCodec( const QTextCodec *codec );
+ void setCodec( const TQTextCodec *codec );
- static QStringList supportedEncodings( bool usAscii = false );
+ static TQStringList supportedEncodings( bool usAscii = false );
signals:
- void activated( const QTextCodec * );
+ void activated( const TQTextCodec * );
private slots:
- void slotActivated( const QString & );
+ void slotActivated( const TQString & );
};
#endif
diff --git a/kopete/protocols/irc/ksparser.cpp b/kopete/protocols/irc/ksparser.cpp
index 66545688..f9029e84 100644
--- a/kopete/protocols/irc/ksparser.cpp
+++ b/kopete/protocols/irc/ksparser.cpp
@@ -23,15 +23,15 @@ Modified by Jason Keirstead <jason@keirstead.org>
#include <knotifyclient.h>
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qstylesheet.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqstylesheet.h>
#include "ksparser.h"
#include <stdlib.h>
KSParser KSParser::m_parser;
-const QColor KSParser::IRC_Colors[17]=
+const TQColor KSParser::IRC_Colors[17]=
{
Qt::white,
Qt::black,
@@ -49,10 +49,10 @@ const QColor KSParser::IRC_Colors[17]=
Qt::magenta,
Qt::darkGray,
Qt::gray,
- QColor() // default invalid color, must be the last
+ TQColor() // default invalid color, must be the last
};
-const QRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?");
+const TQRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?");
template <typename _TYPE_>
inline void swap(_TYPE_ &o1, _TYPE_ &o2)
@@ -73,31 +73,31 @@ KSParser::~KSParser()
}
/* NOTE: If thread corruption are seen simply ad a qlock here */
-QCString KSParser::parse(const QCString &message)
+TQCString KSParser::parse(const TQCString &message)
{
return m_parser._parse(message);
}
-QCString KSParser::_parse(const QCString &message)
+TQCString KSParser::_parse(const TQCString &message)
{
- QCString data( message.size() * 2 );
- QBuffer buff( data );
+ TQCString data( message.size() * 2 );
+ TQBuffer buff( data );
buff.open( IO_WriteOnly );
m_tags.clear();
m_attributes.clear();
- QRegExp colorsModeRegexp(sm_colorsModeRegexp);
+ TQRegExp colorsModeRegexp(sm_colorsModeRegexp);
// should be set to the current default colors ....
- QColor fgColor; /*KopeteMesage::fg().name()*/
- QColor bgColor; /*KopeteMesage::bg().name()*/
+ TQColor fgColor; /*KopeteMesage::fg().name()*/
+ TQColor bgColor; /*KopeteMesage::bg().name()*/
uint chars = 0;
for(uint i = 0; i < message.length(); ++i)
{
- const QChar &cur = message[i];
- QString toAppend;
+ const TQChar &cur = message[i];
+ TQString toAppend;
switch (cur)
{
@@ -108,7 +108,7 @@ QCString KSParser::_parse(const QCString &message)
if (colorsModeRegexp.search(message, i+1) == (int)i+1)
{
i += colorsModeRegexp.matchedLength(); // + 1 will be added by ++
- QString tagStyle;
+ TQString tagStyle;
fgColor = ircColor(colorsModeRegexp.cap(1));
bgColor = ircColor(colorsModeRegexp.cap(2));
@@ -117,17 +117,17 @@ QCString KSParser::_parse(const QCString &message)
}
else
{
- toAppend = popTag(QString::fromLatin1("span"));
+ toAppend = popTag(TQString::fromLatin1("span"));
}
break;
case 0x07: //System bell: ^G
- KNotifyClient::beep( QString::fromLatin1("IRC beep event received in a message") );
+ KNotifyClient::beep( TQString::fromLatin1("IRC beep event received in a message") );
break;
case '\t': // 0x09
- toAppend = QString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
+ toAppend = TQString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
case '\n': // 0x0D
- toAppend= QString::fromLatin1("<br/>");
+ toAppend= TQString::fromLatin1("<br/>");
break;
case 0x0D: // Italics: ^N
toAppend = toggleTag("i");
@@ -145,23 +145,23 @@ QCString KSParser::_parse(const QCString &message)
toAppend = toggleTag("u");
break;
case '<':
- toAppend = QString::fromLatin1("&lt;");
+ toAppend = TQString::fromLatin1("&lt;");
break;
case '>':
- toAppend = QString::fromLatin1("&gt;");
+ toAppend = TQString::fromLatin1("&gt;");
break;
default:
- if (cur < QChar(' ')) // search for control characters
- toAppend = QString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
+ if (cur < TQChar(' ')) // search for control characters
+ toAppend = TQString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
else
- toAppend = QStyleSheet::escape(cur);
+ toAppend = TQStyleSheet::escape(cur);
}
chars += toAppend.length();
buff.writeBlock( toAppend.latin1(), toAppend.length() );
}
- QString toAppend = popAll();
+ TQString toAppend = popAll();
chars += toAppend.length();
buff.writeBlock( toAppend.latin1(), toAppend.length() );
@@ -174,9 +174,9 @@ QCString KSParser::_parse(const QCString &message)
return data;
}
-QString KSParser::pushTag(const QString &tag, const QString &attributes)
+TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
- QString res;
+ TQString res;
m_tags.push(tag);
if(!m_attributes.contains(tag))
m_attributes.insert(tag, attributes);
@@ -188,28 +188,28 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes)
return res + ">";
}
-QString KSParser::pushColorTag(const QColor &fgColor, const QColor &bgColor)
+TQString KSParser::pushColorTag(const TQColor &fgColor, const TQColor &bgColor)
{
- QString tagStyle;
+ TQString tagStyle;
if (fgColor.isValid())
- tagStyle += QString::fromLatin1("color:%1;").arg(fgColor.name());
+ tagStyle += TQString::fromLatin1("color:%1;").arg(fgColor.name());
if (bgColor.isValid())
- tagStyle += QString::fromLatin1("background-color:%1;").arg(bgColor.name());
+ tagStyle += TQString::fromLatin1("background-color:%1;").arg(bgColor.name());
if(!tagStyle.isEmpty())
- tagStyle = QString::fromLatin1("style=\"%1\"").arg(tagStyle);
+ tagStyle = TQString::fromLatin1("style=\"%1\"").arg(tagStyle);
- return pushTag(QString::fromLatin1("span"), tagStyle);;
+ return pushTag(TQString::fromLatin1("span"), tagStyle);;
}
-QString KSParser::popTag(const QString &tag)
+TQString KSParser::popTag(const TQString &tag)
{
if (!m_tags.contains(tag))
- return QString::null;
+ return TQString::null;
- QString res;
- QValueStack<QString> savedTags;
+ TQString res;
+ TQValueStack<TQString> savedTags;
while(m_tags.top() != tag)
{
savedTags.push(m_tags.pop());
@@ -222,21 +222,21 @@ QString KSParser::popTag(const QString &tag)
return res;
}
-QString KSParser::toggleTag(const QString &tag)
+TQString KSParser::toggleTag(const TQString &tag)
{
return m_attributes.contains(tag)?popTag(tag):pushTag(tag);
}
-QString KSParser::popAll()
+TQString KSParser::popAll()
{
- QString res;
+ TQString res;
while(!m_tags.isEmpty())
res.append("</" + m_tags.pop() + ">");
m_attributes.clear();
return res;
}
-QColor KSParser::ircColor(const QString &color)
+TQColor KSParser::ircColor(const TQString &color)
{
bool success;
unsigned int intColor = color.toUInt(&success);
@@ -244,19 +244,19 @@ QColor KSParser::ircColor(const QString &color)
if (success)
return ircColor(intColor);
else
- return QColor();
+ return TQColor();
}
-QColor KSParser::ircColor(unsigned int color)
+TQColor KSParser::ircColor(unsigned int color)
{
- unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(QColor);
+ unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(TQColor);
return color<=maxcolor?IRC_Colors[color]:IRC_Colors[maxcolor];
}
-int KSParser::colorForHTML(const QString &html)
+int KSParser::colorForHTML(const TQString &html)
{
- QColor color(html);
- for(uint i=0; i<sizeof(IRC_Colors)/sizeof(QColor); i++)
+ TQColor color(html);
+ for(uint i=0; i<sizeof(IRC_Colors)/sizeof(TQColor); i++)
{
if(IRC_Colors[i] == color)
return i;
diff --git a/kopete/protocols/irc/ksparser.h b/kopete/protocols/irc/ksparser.h
index dda7b7c1..cc9d9dc4 100644
--- a/kopete/protocols/irc/ksparser.h
+++ b/kopete/protocols/irc/ksparser.h
@@ -7,11 +7,11 @@
#ifndef __ksparser_h__
#define __ksparser_h__
-#include <qcolor.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qvaluestack.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqvaluestack.h>
/*
* Helper class to parse IRC color/style codes and convert them to
@@ -25,30 +25,30 @@
class KSParser
{
public:
- static QCString parse(const QCString &);
- static int colorForHTML( const QString &html );
+ static TQCString parse(const TQCString &);
+ static int colorForHTML( const TQString &html );
- static QColor ircColor(const QString &color);
- static QColor ircColor(unsigned int color);
+ static TQColor ircColor(const TQString &color);
+ static TQColor ircColor(unsigned int color);
~KSParser();
private:
KSParser();
- QCString _parse(const QCString &);
- QString pushTag(const QString &, const QString & = QString::null);
- QString pushColorTag(const QColor &fgColor, const QColor &bgColor);
- QString popTag(const QString &);
- QString toggleTag(const QString &);
- QString popAll();
+ TQCString _parse(const TQCString &);
+ TQString pushTag(const TQString &, const TQString & = TQString::null);
+ TQString pushColorTag(const TQColor &fgColor, const TQColor &bgColor);
+ TQString popTag(const TQString &);
+ TQString toggleTag(const TQString &);
+ TQString popAll();
private:
static KSParser m_parser;
- static const QColor IRC_Colors[17];
- static const QRegExp sm_colorsModeRegexp;
+ static const TQColor IRC_Colors[17];
+ static const TQRegExp sm_colorsModeRegexp;
- QValueStack<QString> m_tags;
- QMap<QString, QString> m_attributes;
+ TQValueStack<TQString> m_tags;
+ TQMap<TQString, TQString> m_attributes;
};
#endif
diff --git a/kopete/protocols/irc/libkirc/kircengine.cpp b/kopete/protocols/irc/libkirc/kircengine.cpp
index 5b70d5fc..03936d5f 100644
--- a/kopete/protocols/irc/libkirc/kircengine.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine.cpp
@@ -30,8 +30,8 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
//Needed for getuid / getpwuid
#include <unistd.h>
@@ -48,13 +48,13 @@ using namespace KIRC;
// FIXME: Remove slotConnected() and error(int errCode) while going to KNetwork namespace
-/* Please note that the regular expression "[\\r\\n]*$" is used in a QString::replace statement many times.
+/* Please note that the regular expression "[\\r\\n]*$" is used in a TQString::replace statement many times.
* This gets rid of trailing \r\n, \r, \n, and \n\r characters.
*/
-const QRegExp Engine::m_RemoveLinefeeds( QString::fromLatin1("[\\r\\n]*$") );
+const TQRegExp Engine::m_RemoveLinefeeds( TQString::fromLatin1("[\\r\\n]*$") );
-Engine::Engine(QObject *parent, const char *name)
- : QObject(parent, QString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()),
+Engine::Engine(TQObject *parent, const char *name)
+ : TQObject(parent, TQString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()),
m_status(Idle),
m_FailedNickOnLogin(false),
m_useSSL(false),
@@ -64,7 +64,7 @@ Engine::Engine(QObject *parent, const char *name)
m_ctcpReplies(17, false),
codecs(577,false)
{
- setUserName(QString::null);
+ setUserName(TQString::null);
m_commands.setAutoDelete(true);
m_ctcpQueries.setAutoDelete(true);
@@ -74,11 +74,11 @@ Engine::Engine(QObject *parent, const char *name)
bindNumericReplies();
bindCtcp();
- m_VersionString = QString::fromLatin1("Anonymous client using the KIRC engine.");
- m_UserString = QString::fromLatin1("Response not supplied by user.");
- m_SourceString = QString::fromLatin1("Unknown client, known source.");
+ m_VersionString = TQString::fromLatin1("Anonymous client using the KIRC engine.");
+ m_UserString = TQString::fromLatin1("Response not supplied by user.");
+ m_SourceString = TQString::fromLatin1("Unknown client, known source.");
- defaultCodec = QTextCodec::codecForMib(106); // UTF8 mib is 106
+ defaultCodec = TQTextCodec::codecForMib(106); // UTF8 mib is 106
kdDebug(14120) << "Setting default engine codec, " << defaultCodec->name() << endl;
m_sock = 0L;
@@ -110,9 +110,9 @@ void Engine::setUseSSL( bool useSSL )
m_sock = new KSSLSocket;
m_sock->setSocketFlags( KExtendedSocket::inetSocket );
- connect(m_sock, SIGNAL(certificateAccepted()), SLOT(slotConnected()));
- connect(m_sock, SIGNAL(certificateRejected()), SLOT(slotConnectionClosed()));
- connect(m_sock, SIGNAL(sslFailure()), SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(certificateAccepted()), TQT_SLOT(slotConnected()));
+ connect(m_sock, TQT_SIGNAL(certificateRejected()), TQT_SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(sslFailure()), TQT_SLOT(slotConnectionClosed()));
}
else
#else
@@ -124,12 +124,12 @@ void Engine::setUseSSL( bool useSSL )
m_sock = new KExtendedSocket;
m_sock->setSocketFlags( KExtendedSocket::inputBufferedSocket | KExtendedSocket::inetSocket );
- connect(m_sock, SIGNAL(connectionSuccess()), SLOT(slotConnected()));
- connect(m_sock, SIGNAL(connectionFailed(int)), SLOT(error(int)));
+ connect(m_sock, TQT_SIGNAL(connectionSuccess()), TQT_SLOT(slotConnected()));
+ connect(m_sock, TQT_SIGNAL(connectionFailed(int)), TQT_SLOT(error(int)));
}
- connect(m_sock, SIGNAL(closed(int)), SLOT(slotConnectionClosed()));
- connect(m_sock, SIGNAL(readyRead()), SLOT(slotReadyRead()));
+ connect(m_sock, TQT_SIGNAL(closed(int)), TQT_SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotReadyRead()));
}
}
@@ -183,7 +183,7 @@ void Engine::setStatus(Engine::Status status)
}
}
-void Engine::connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL )
+void Engine::connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL )
{
setUseSSL(useSSL);
@@ -229,45 +229,45 @@ void Engine::error(int errCode)
}
}
-void Engine::setVersionString(const QString &newString)
+void Engine::setVersionString(const TQString &newString)
{
m_VersionString = newString;
m_VersionString.remove(m_RemoveLinefeeds);
}
-void Engine::setUserString(const QString &newString)
+void Engine::setUserString(const TQString &newString)
{
m_UserString = newString;
m_UserString.remove(m_RemoveLinefeeds);
}
-void Engine::setSourceString(const QString &newString)
+void Engine::setSourceString(const TQString &newString)
{
m_SourceString = newString;
m_SourceString.remove(m_RemoveLinefeeds);
}
-void Engine::setUserName(const QString &newName)
+void Engine::setUserName(const TQString &newName)
{
if(newName.isEmpty())
- m_Username = QString::fromLatin1(getpwuid(getuid())->pw_name);
+ m_Username = TQString::fromLatin1(getpwuid(getuid())->pw_name);
else
m_Username = newName;
m_Username.remove(m_RemoveLinefeeds);
}
-void Engine::setRealName(const QString &newName)
+void Engine::setRealName(const TQString &newName)
{
if(newName.isEmpty())
- m_realName = QString::fromLatin1(getpwuid(getuid())->pw_gecos);
+ m_realName = TQString::fromLatin1(getpwuid(getuid())->pw_gecos);
else
m_realName = newName;
m_realName.remove(m_RemoveLinefeeds);
}
-bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict,
- QString command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::_bind(TQDict<KIRC::MessageRedirector> &dict,
+ TQString command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
// FIXME: Force upper case.
// FIXME: Force number format.
@@ -283,29 +283,29 @@ bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict,
return mr->connect(object, member);
}
-bool Engine::bind(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bind(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_commands, command, object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bind(int id, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bind(int id, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
- return _bind(m_commands, QString::number(id), object, member,
+ return _bind(m_commands, TQString::number(id), object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bindCtcpQuery(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bindCtcpQuery(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_ctcpQueries, command, object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bindCtcpReply(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bindCtcpReply(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_ctcpReplies, command, object, member,
minArgs, maxArgs, helpMessage);
@@ -313,32 +313,32 @@ bool Engine::bindCtcpReply(const QString &command, QObject *object, const char *
/* Message will be send as passed.
*/
-void Engine::writeRawMessage(const QString &rawMsg)
+void Engine::writeRawMessage(const TQString &rawMsg)
{
Message::writeRawMessage(this, defaultCodec, rawMsg);
}
/* Message will be quoted before beeing send.
*/
-void Engine::writeMessage(const QString &msg, const QTextCodec *codec)
+void Engine::writeMessage(const TQString &msg, const TQTextCodec *codec)
{
Message::writeMessage(this, codec ? codec : defaultCodec, msg);
}
-void Engine::writeMessage(const QString &command, const QStringList &args, const QString &suffix, const QTextCodec *codec)
+void Engine::writeMessage(const TQString &command, const TQStringList &args, const TQString &suffix, const TQTextCodec *codec)
{
Message::writeMessage(this, codec ? codec : defaultCodec, command, args, suffix );
}
-void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage)
+void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage)
{
Message::writeCtcpMessage(this, defaultCodec, command, to, ctcpMessage);
}
-void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix, bool )
+void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix, bool )
{
- QString nick = Entity::userNick(to);
+ TQString nick = Entity::userNick(to);
Message::writeCtcpMessage(this, codecForNick( nick ), command, nick, suffix,
ctcpCommand, ctcpArgs, ctcpSuffix );
@@ -362,13 +362,13 @@ void Engine::slotReadyRead()
// mr = m_numericCommands[ msg.command().toInt() ];
// we do this conversion because some dummy servers sends 1 instead of 001
// numbers are stored as "1" instead of "001" to make convertion faster (no 0 pading).
- mr = m_commands[ QString::number(msg.command().toInt()) ];
+ mr = m_commands[ TQString::number(msg.command().toInt()) ];
else
mr = m_commands[ msg.command() ];
if (mr)
{
- QStringList errors = mr->operator()(msg);
+ TQStringList errors = mr->operator()(msg);
if (!errors.isEmpty())
{
@@ -393,19 +393,19 @@ void Engine::slotReadyRead()
emit internalError(ParsingFailed, msg);
}
- QTimer::singleShot( 0, this, SLOT( slotReadyRead() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadyRead() ) );
}
if(m_sock->socketStatus() != KExtendedSocket::connected)
error();
}
-const QTextCodec *Engine::codecForNick( const QString &nick ) const
+const TQTextCodec *Engine::codecForNick( const TQString &nick ) const
{
if( nick.isEmpty() )
return defaultCodec;
- QTextCodec *codec = codecs[ nick ];
+ TQTextCodec *codec = codecs[ nick ];
kdDebug(14120) << nick << " has codec " << codec << endl;
if( !codec )
@@ -427,7 +427,7 @@ void Engine::showInfoDialog()
* (Only missing the \n\r final characters)
* So applying the same parsing rules to the messages.
*/
-bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Message &msg)
+bool Engine::invokeCtcpCommandOfMessage(const TQDict<MessageRedirector> &map, Message &msg)
{
if(msg.hasCtcpMessage() && msg.ctcpMessage().isValid())
{
@@ -436,14 +436,14 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes
MessageRedirector *mr = map[ctcpMsg.command()];
if (mr)
{
- QStringList errors = mr->operator()(msg);
+ TQStringList errors = mr->operator()(msg);
if (errors.isEmpty())
return true;
kdDebug(14120) << "Method error for line:" << ctcpMsg.raw() << endl;
writeCtcpErrorMessage(msg.prefix(), msg.ctcpRaw(),
- QString::fromLatin1("%1 internal error(s)").arg(errors.size()));
+ TQString::fromLatin1("%1 internal error(s)").arg(errors.size()));
}
else
{
@@ -462,7 +462,7 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes
return false;
}
-EntityPtr Engine::getEntity(const QString &name)
+EntityPtr Engine::getEntity(const TQString &name)
{
Entity *entity = 0;
@@ -474,7 +474,7 @@ EntityPtr Engine::getEntity(const QString &name)
m_entities.append(entity);
}
- connect(entity, SIGNAL(destroyed(KIRC::Entity *)), SLOT(destroyed(KIRC::Entity *)));
+ connect(entity, TQT_SIGNAL(destroyed(KIRC::Entity *)), TQT_SLOT(destroyed(KIRC::Entity *)));
return EntityPtr(entity);
}
diff --git a/kopete/protocols/irc/libkirc/kircengine.h b/kopete/protocols/irc/libkirc/kircengine.h
index 50cb8f49..4fb381f1 100644
--- a/kopete/protocols/irc/libkirc/kircengine.h
+++ b/kopete/protocols/irc/libkirc/kircengine.h
@@ -33,12 +33,12 @@
#include <kdebugclasses.h>
#endif
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QRegExp;
@@ -55,21 +55,21 @@ class Engine
{
Q_OBJECT
-// Q_PROPERTY(QUrl serverURL READ serverURL WRITE setServerURL)
+// Q_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL)
// Extracted from the base of the serverURL.
// Q_PROPERTY(bool useSSL);
-// Q_PROPERTY(QString user READ user);
-// Q_PROPERTY(QString password);
-// Q_PROPERTY(QString host READ host);
+// Q_PROPERTY(TQString user READ user);
+// Q_PROPERTY(TQString password);
+// Q_PROPERTY(TQString host READ host);
// Q_PROPERTY(int port READ host);
// Extracted from the query of the serverURL.
// Q_PROPERTY(bool reqsPasswd);
-// Q_PROPERTY(QString name); // real name
-// Q_PROPERTY(QStringList nickList READ nickList WRITE setNickList)
-// Q_PROPERTY(QString nick READ nick)
-// Q_PROPERTY(QStringList portList)
+// Q_PROPERTY(TQString name); // real name
+// Q_PROPERTY(TQStringList nickList READ nickList WRITE setNickList)
+// Q_PROPERTY(TQString nick READ nick)
+// Q_PROPERTY(TQStringList portList)
Q_ENUMS(Status)
@@ -105,38 +105,38 @@ public:
MessageOfTheDayCondensedMessage
};
- Engine( QObject *parent = 0, const char* name = 0 );
+ Engine( TQObject *parent = 0, const char* name = 0 );
~Engine();
-// QString nick() const;
-// QStringList nickList() const;
-// void setNickList(const QStringList& nickList);
+// TQString nick() const;
+// TQStringList nickList() const;
+// void setNickList(const TQStringList& nickList);
-// QUrl serverURL() const;
-// bool setServerURL(const QUrl &url);
+// TQUrl serverURL() const;
+// bool setServerURL(const TQUrl &url);
- inline const QString &currentHost() const
+ inline const TQString &currentHost() const
{ return m_Host; };
inline Q_UINT16 currentPort()
{ return m_Port; }
- inline const QString &nickName() const
+ inline const TQString &nickName() const
{ return m_Nickname; };
- inline const QString &password() const
+ inline const TQString &password() const
{ return m_Passwd; }
- inline void setPassword(const QString &passwd)
+ inline void setPassword(const TQString &passwd)
{ m_Passwd = passwd; };
- inline const QString &userName() const
+ inline const TQString &userName() const
{ return m_Username; }
- void setUserName(const QString &newName);
+ void setUserName(const TQString &newName);
- void setRealName(const QString &newName);
- inline const QString &realName() const
+ void setRealName(const TQString &newName);
+ inline const TQString &realName() const
{ return m_realName; }
inline const bool reqsPassword() const
@@ -148,18 +148,18 @@ public:
const bool useSSL() const { return m_useSSL; };
void setUseSSL( bool useSSL );
- inline const QTextCodec *codec() const
+ inline const TQTextCodec *codec() const
{ return defaultCodec; };
- const QTextCodec *codecForNick( const QString &nick ) const;
+ const TQTextCodec *codecForNick( const TQString &nick ) const;
- inline void setDefaultCodec( QTextCodec* codec )
+ inline void setDefaultCodec( TQTextCodec* codec )
{ defaultCodec = codec; };
- void setVersionString(const QString &versionString);
- void setUserString(const QString &userString);
- void setSourceString(const QString &sourceString);
- void connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL = false);
+ void setVersionString(const TQString &versionString);
+ void setUserString(const TQString &userString);
+ void setSourceString(const TQString &sourceString);
+ void connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL = false);
KExtendedSocket *socket()
{ return m_sock; };
@@ -173,102 +173,102 @@ public:
inline bool isConnected() const
{ return m_status == Connected; }
- inline void setCodec( const QString &nick, const QTextCodec *codec )
+ inline void setCodec( const TQString &nick, const TQTextCodec *codec )
{ codecs.replace( nick, codec ); }
/* Custom CTCP replies handling */
- inline QString &customCtcp( const QString &s )
+ inline TQString &customCtcp( const TQString &s )
{ return customCtcpMap[s]; }
- inline void addCustomCtcp( const QString &ctcp, const QString &reply )
+ inline void addCustomCtcp( const TQString &ctcp, const TQString &reply )
{ customCtcpMap[ ctcp.lower() ] = reply; }
- KIRC::EntityPtr getEntity(const QString &name);
+ KIRC::EntityPtr getEntity(const TQString &name);
public slots:
//Message output
- void writeRawMessage(const QString &message);
+ void writeRawMessage(const TQString &message);
- void writeMessage(const QString &message, const QTextCodec *codec = 0 );
- void writeMessage(const QString &command, const QStringList &args,
- const QString &suffix = QString::null, const QTextCodec *codec = 0);
+ void writeMessage(const TQString &message, const TQTextCodec *codec = 0 );
+ void writeMessage(const TQString &command, const TQStringList &args,
+ const TQString &suffix = TQString::null, const TQTextCodec *codec = 0);
- void writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage);
+ void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage);
- void writeCtcpMessage(const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix = QString::null,
+ void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true);
- inline void writeCtcpQueryMessage(const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null,
+ inline void writeCtcpQueryMessage(const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("PRIVMSG", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
- inline void writeCtcpReplyMessage(const QString &to, const QString &ctcpMessage)
+ inline void writeCtcpReplyMessage(const TQString &to, const TQString &ctcpMessage)
{ writeCtcpMessage("NOTICE", to, ctcpMessage); }
- inline void writeCtcpReplyMessage(const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null,
+ inline void writeCtcpReplyMessage(const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("NOTICE", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
- inline void writeCtcpErrorMessage(const QString &to, const QString &ctcpLine, const QString &errorMsg,
+ inline void writeCtcpErrorMessage(const TQString &to, const TQString &ctcpLine, const TQString &errorMsg,
bool emitRepliedCtcp=true)
- { return writeCtcpReplyMessage(to, QString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
+ { return writeCtcpReplyMessage(to, TQString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
- bool bind(const QString &command, QObject *object, const char *member,
+ bool bind(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bind(int id, QObject *object, const char *member,
+ bool bind(int id, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bindCtcpQuery(const QString &command, QObject *object, const char *member,
+ bool bindCtcpQuery(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bindCtcpReply(const QString &command, QObject *object, const char *member,
+ bool bindCtcpReply(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- void away(bool isAway, const QString &awayMessage = QString::null);
- void ison(const QStringList &nickList);
- void join(const QString &name, const QString &key);
- void kick(const QString &user, const QString &channel, const QString &reason);
+ void away(bool isAway, const TQString &awayMessage = TQString::null);
+ void ison(const TQStringList &nickList);
+ void join(const TQString &name, const TQString &key);
+ void kick(const TQString &user, const TQString &channel, const TQString &reason);
void list();
- void mode(const QString &target, const QString &mode);
- void motd(const QString &server = QString::null);
- void nick(const QString &newNickname);
- void notice(const QString &target, const QString &message);
- void part(const QString &name, const QString &reason);
- void pass(const QString &password);
- void privmsg(const QString &contact, const QString &message);
+ void mode(const TQString &target, const TQString &mode);
+ void motd(const TQString &server = TQString::null);
+ void nick(const TQString &newNickname);
+ void notice(const TQString &target, const TQString &message);
+ void part(const TQString &name, const TQString &reason);
+ void pass(const TQString &password);
+ void privmsg(const TQString &contact, const TQString &message);
/**
* Send a quit message for the given reason.
* If now is set to true the connection is closed and no event message is sent.
* Therefore setting now to true should only be used while destroying the object.
*/
- void quit(const QString &reason, bool now=false);
+ void quit(const TQString &reason, bool now=false);
- void topic(const QString &channel, const QString &topic);
- void user(const QString &newUsername, const QString &hostname, const QString &newRealname);
- void user(const QString &newUsername, Q_UINT8 mode, const QString &newRealname);
- void whois(const QString &user);
+ void topic(const TQString &channel, const TQString &topic);
+ void user(const TQString &newUsername, const TQString &hostname, const TQString &newRealname);
+ void user(const TQString &newUsername, Q_UINT8 mode, const TQString &newRealname);
+ void whois(const TQString &user);
/* CTCP commands */
- void CtcpRequestCommand(const QString &contact, const QString &command);
- void CtcpRequest_action(const QString &contact, const QString &message);
- void CtcpRequest_dcc(const QString &, const QString &, unsigned int port, KIRC::Transfer::Type type);
- void CtcpRequest_ping(const QString &target);
- void CtcpRequest_version(const QString &target);
+ void CtcpRequestCommand(const TQString &contact, const TQString &command);
+ void CtcpRequest_action(const TQString &contact, const TQString &message);
+ void CtcpRequest_dcc(const TQString &, const TQString &, unsigned int port, KIRC::Transfer::Type type);
+ void CtcpRequest_ping(const TQString &target);
+ void CtcpRequest_version(const TQString &target);
public slots:
void showInfoDialog();
@@ -296,88 +296,88 @@ signals:
void receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg);
+ const TQString &msg);
- void successfullyChangedNick(const QString &, const QString &);
+ void successfullyChangedNick(const TQString &, const TQString &);
//ServerContact Signals
- void incomingMotd(const QString &motd);
- void incomingNotice(const QString &originating, const QString &message);
- void incomingHostInfo(const QString &servername, const QString &version,
- const QString &userModes, const QString &channelModes);
- void incomingYourHostInfo(const QString &servername, const QString &version,
- const QString &userModes, const QString &channelModes);
- void incomingConnectString(const QString &clients);
+ void incomingMotd(const TQString &motd);
+ void incomingNotice(const TQString &originating, const TQString &message);
+ void incomingHostInfo(const TQString &servername, const TQString &version,
+ const TQString &userModes, const TQString &channelModes);
+ void incomingYourHostInfo(const TQString &servername, const TQString &version,
+ const TQString &userModes, const TQString &channelModes);
+ void incomingConnectString(const TQString &clients);
//Channel Contact Signals
- void incomingMessage(const QString &originating, const QString &target, const QString &message);
- void incomingTopicChange(const QString &, const QString &, const QString &);
- void incomingExistingTopic(const QString &, const QString &);
- void incomingTopicUser(const QString &channel, const QString &user, const QDateTime &time);
- void incomingJoinedChannel(const QString &channel,const QString &nick);
- void incomingPartedChannel(const QString &channel,const QString &nick, const QString &reason);
- void incomingNamesList(const QString &channel, const QStringList &nicknames);
- void incomingEndOfNames(const QString &channel);
- void incomingChannelMode(const QString &channel, const QString &mode, const QString &params);
- void incomingCannotSendToChannel(const QString &channel, const QString &message);
- void incomingChannelModeChange(const QString &channel, const QString &nick, const QString &mode);
- void incomingChannelHomePage(const QString &channel, const QString &url);
+ void incomingMessage(const TQString &originating, const TQString &target, const TQString &message);
+ void incomingTopicChange(const TQString &, const TQString &, const TQString &);
+ void incomingExistingTopic(const TQString &, const TQString &);
+ void incomingTopicUser(const TQString &channel, const TQString &user, const TQDateTime &time);
+ void incomingJoinedChannel(const TQString &channel,const TQString &nick);
+ void incomingPartedChannel(const TQString &channel,const TQString &nick, const TQString &reason);
+ void incomingNamesList(const TQString &channel, const TQStringList &nicknames);
+ void incomingEndOfNames(const TQString &channel);
+ void incomingChannelMode(const TQString &channel, const TQString &mode, const TQString &params);
+ void incomingCannotSendToChannel(const TQString &channel, const TQString &message);
+ void incomingChannelModeChange(const TQString &channel, const TQString &nick, const TQString &mode);
+ void incomingChannelHomePage(const TQString &channel, const TQString &url);
//Contact Signals
- void incomingPrivMessage(const QString &, const QString &, const QString &);
- void incomingQuitIRC(const QString &user, const QString &reason);
- void incomingUserModeChange(const QString &nick, const QString &mode);
- void incomingNoSuchNickname(const QString &nick);
+ void incomingPrivMessage(const TQString &, const TQString &, const TQString &);
+ void incomingQuitIRC(const TQString &user, const TQString &reason);
+ void incomingUserModeChange(const TQString &nick, const TQString &mode);
+ void incomingNoSuchNickname(const TQString &nick);
// CTCP Signals
-// void action(const QString &from, const QString &to, const QString &message);
- void incomingAction(const QString &channel, const QString &originating, const QString &message);
- void incomingPrivAction(const QString &target, const QString &originating, const QString &message);
+// void action(const TQString &from, const TQString &to, const TQString &message);
+ void incomingAction(const TQString &channel, const TQString &originating, const TQString &message);
+ void incomingPrivAction(const TQString &target, const TQString &originating, const TQString &message);
//Response Signals
- void incomingUserOnline(const QString &nick);
- void incomingWhoIsUser(const QString &nickname, const QString &username,
- const QString &hostname, const QString &realname);
- void incomingWhoWasUser(const QString &nickname, const QString &username,
- const QString &hostname, const QString &realname);
- void incomingWhoIsServer(const QString &nickname, const QString &server, const QString &serverInfo);
- void incomingWhoIsOperator(const QString &nickname);
- void incomingWhoIsIdentified(const QString &nickname);
- void incomingWhoIsChannels(const QString &nickname, const QString &channel);
- void incomingWhoIsIdle(const QString &nickname, unsigned long seconds); /* 317 */
- void incomingSignOnTime(const QString &nickname, unsigned long seconds); /* 317 */
- void incomingEndOfWhois(const QString &nickname);
- void incomingEndOfWhoWas(const QString &nickname);
-
- void incomingWhoReply( const QString &nick, const QString &channel, const QString &user, const QString &host,
- const QString &server,bool away, const QString &flag, uint hops, const QString &realName );
-
- void incomingEndOfWho( const QString &query );
+ void incomingUserOnline(const TQString &nick);
+ void incomingWhoIsUser(const TQString &nickname, const TQString &username,
+ const TQString &hostname, const TQString &realname);
+ void incomingWhoWasUser(const TQString &nickname, const TQString &username,
+ const TQString &hostname, const TQString &realname);
+ void incomingWhoIsServer(const TQString &nickname, const TQString &server, const TQString &serverInfo);
+ void incomingWhoIsOperator(const TQString &nickname);
+ void incomingWhoIsIdentified(const TQString &nickname);
+ void incomingWhoIsChannels(const TQString &nickname, const TQString &channel);
+ void incomingWhoIsIdle(const TQString &nickname, unsigned long seconds); /* 317 */
+ void incomingSignOnTime(const TQString &nickname, unsigned long seconds); /* 317 */
+ void incomingEndOfWhois(const TQString &nickname);
+ void incomingEndOfWhoWas(const TQString &nickname);
+
+ void incomingWhoReply( const TQString &nick, const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server,bool away, const TQString &flag, uint hops, const TQString &realName );
+
+ void incomingEndOfWho( const TQString &query );
//Error Message Signals
void incomingServerLoadTooHigh();
- void incomingNickInUse(const QString &usingNick);
- void incomingNickChange(const QString &, const QString &);
+ void incomingNickInUse(const TQString &usingNick);
+ void incomingNickChange(const TQString &, const TQString &);
void incomingFailedServerPassword();
- void incomingFailedChankey(const QString &);
- void incomingFailedChanBanned(const QString &);
- void incomingFailedChanInvite(const QString &);
- void incomingFailedChanFull(const QString &);
- void incomingFailedNickOnLogin(const QString &);
- void incomingNoNickChan(const QString &);
- void incomingWasNoNick(const QString &);
+ void incomingFailedChankey(const TQString &);
+ void incomingFailedChanBanned(const TQString &);
+ void incomingFailedChanInvite(const TQString &);
+ void incomingFailedChanFull(const TQString &);
+ void incomingFailedNickOnLogin(const TQString &);
+ void incomingNoNickChan(const TQString &);
+ void incomingWasNoNick(const TQString &);
//General Signals
- void incomingUnknown(const QString &);
- void incomingUnknownCtcp(const QString &);
- void incomingKick(const QString &channel, const QString &nick,
- const QString &nickKicked, const QString &reason);
+ void incomingUnknown(const TQString &);
+ void incomingUnknownCtcp(const TQString &);
+ void incomingKick(const TQString &channel, const TQString &nick,
+ const TQString &nickKicked, const TQString &reason);
- void incomingUserIsAway(const QString &nick, const QString &awayMessage);
- void incomingListedChan(const QString &chan, uint users, const QString &topic);
+ void incomingUserIsAway(const TQString &nick, const TQString &awayMessage);
+ void incomingListedChan(const TQString &chan, uint users, const TQString &topic);
void incomingEndOfList();
- void incomingCtcpReply(const QString &type, const QString &target, const QString &messageReceived);
+ void incomingCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived);
private slots:
void destroyed(KIRC::Entity *entity);
@@ -479,50 +479,50 @@ private:
void bindCtcp();
void setStatus(KIRC::Engine::Status status);
- bool invokeCtcpCommandOfMessage(const QDict<KIRC::MessageRedirector> &map, KIRC::Message &message);
+ bool invokeCtcpCommandOfMessage(const TQDict<KIRC::MessageRedirector> &map, KIRC::Message &message);
/*
* Methods that handles all the bindings creations.
* This methods is used by all the bind(...) methods.
*/
- bool _bind(QDict<KIRC::MessageRedirector> &dict,
- QString command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage);
+ bool _bind(TQDict<KIRC::MessageRedirector> &dict,
+ TQString command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage);
//Static regexes
- static const QRegExp m_RemoveLinefeeds;
+ static const TQRegExp m_RemoveLinefeeds;
KIRC::Engine::Status m_status;
- QString m_Host;
+ TQString m_Host;
Q_UINT16 m_Port;
-// QUrl serverURL;
-// QUrl currentServerURL;
- QString m_Nickname;
- QString m_Username;
- QString m_realName;
- QString m_Passwd;
+// TQUrl serverURL;
+// TQUrl currentServerURL;
+ TQString m_Nickname;
+ TQString m_Username;
+ TQString m_realName;
+ TQString m_Passwd;
bool m_ReqsPasswd;
bool m_FailedNickOnLogin;
bool m_useSSL;
- QValueList<KIRC::Entity *> m_entities;
+ TQValueList<KIRC::Entity *> m_entities;
KIRC::EntityPtr m_server;
KIRC::EntityPtr m_self;
- QString m_VersionString;
- QString m_UserString;
- QString m_SourceString;
- QString m_PendingNick;
+ TQString m_VersionString;
+ TQString m_UserString;
+ TQString m_SourceString;
+ TQString m_PendingNick;
- QDict<KIRC::MessageRedirector> m_commands;
-// QIntDict<KIRC::MessageRedirector> m_numericCommands;
- QDict<KIRC::MessageRedirector> m_ctcpQueries;
- QDict<KIRC::MessageRedirector> m_ctcpReplies;
+ TQDict<KIRC::MessageRedirector> m_commands;
+// TQIntDict<KIRC::MessageRedirector> m_numericCommands;
+ TQDict<KIRC::MessageRedirector> m_ctcpQueries;
+ TQDict<KIRC::MessageRedirector> m_ctcpReplies;
- QMap<QString, QString> customCtcpMap;
- QDict<QTextCodec> codecs;
- QTextCodec *defaultCodec;
+ TQMap<TQString, TQString> customCtcpMap;
+ TQDict<TQTextCodec> codecs;
+ TQTextCodec *defaultCodec;
KExtendedSocket *m_sock;
};
diff --git a/kopete/protocols/irc/libkirc/kircengine_commands.cpp b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
index 0a0f9002..21a90676 100644
--- a/kopete/protocols/irc/libkirc/kircengine_commands.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
@@ -21,36 +21,36 @@
#include <kextsock.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIRC;
void Engine::bindCommands()
{
- bind("ERROR", this, SLOT(error(KIRC::Message &)), 0, 0);
- bind("JOIN", this, SLOT(join(KIRC::Message &)), 0, 1);
- bind("KICK", this, SLOT(kick(KIRC::Message &)), 2, 2);
- bind("NICK", this, SLOT(nick(KIRC::Message &)), 0, 0);
- bind("MODE", this, SLOT(mode(KIRC::Message &)), 1, 1);
- bind("NOTICE", this, SLOT(notice(KIRC::Message &)), 1, 1);
- bind("PART", this, SLOT(part(KIRC::Message &)), 1, 1);
- bind("PING", this, SLOT(ping(KIRC::Message &)), 0, 0);
- bind("PONG", this, SLOT(pong(KIRC::Message &)), 0, 0);
- bind("PRIVMSG", this, SLOT(privmsg(KIRC::Message &)), 1, 1);
- bind("QUIT", this, SLOT(quit(KIRC::Message &)), 0, 0);
-// bind("SQUIT", this, SLOT(squit(KIRC::Message &)), 1, 1);
- bind("TOPIC", this, SLOT(topic(KIRC::Message &)), 1, 1);
+ bind("ERROR", this, TQT_SLOT(error(KIRC::Message &)), 0, 0);
+ bind("JOIN", this, TQT_SLOT(join(KIRC::Message &)), 0, 1);
+ bind("KICK", this, TQT_SLOT(kick(KIRC::Message &)), 2, 2);
+ bind("NICK", this, TQT_SLOT(nick(KIRC::Message &)), 0, 0);
+ bind("MODE", this, TQT_SLOT(mode(KIRC::Message &)), 1, 1);
+ bind("NOTICE", this, TQT_SLOT(notice(KIRC::Message &)), 1, 1);
+ bind("PART", this, TQT_SLOT(part(KIRC::Message &)), 1, 1);
+ bind("PING", this, TQT_SLOT(ping(KIRC::Message &)), 0, 0);
+ bind("PONG", this, TQT_SLOT(pong(KIRC::Message &)), 0, 0);
+ bind("PRIVMSG", this, TQT_SLOT(privmsg(KIRC::Message &)), 1, 1);
+ bind("QUIT", this, TQT_SLOT(quit(KIRC::Message &)), 0, 0);
+// bind("SQUIT", this, TQT_SLOT(squit(KIRC::Message &)), 1, 1);
+ bind("TOPIC", this, TQT_SLOT(topic(KIRC::Message &)), 1, 1);
}
-void Engine::away(bool isAway, const QString &awayMessage)
+void Engine::away(bool isAway, const TQString &awayMessage)
{
if(isAway)
if( !awayMessage.isEmpty() )
- writeMessage("AWAY", QString::null, awayMessage);
+ writeMessage("AWAY", TQString::null, awayMessage);
else
- writeMessage("AWAY", QString::null, QString::fromLatin1("I'm away."));
+ writeMessage("AWAY", TQString::null, TQString::fromLatin1("I'm away."));
else
- writeMessage("AWAY", QString::null);
+ writeMessage("AWAY", TQString::null);
}
// FIXME: Really handle this message
@@ -59,28 +59,28 @@ void Engine::error(Message &)
setStatus(Closing);
}
-void Engine::ison(const QStringList &nickList)
+void Engine::ison(const TQStringList &nickList)
{
if (!nickList.isEmpty())
{
- QString statement = QString::fromLatin1("ISON");
- for (QStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it)
+ TQString statement = TQString::fromLatin1("ISON");
+ for (TQStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it)
{
if ((statement.length()+(*it).length())>509) // 512(max buf)-2("\r\n")-1(<space separator>)
{
writeMessage(statement);
- statement = QString::fromLatin1("ISON ") + (*it);
+ statement = TQString::fromLatin1("ISON ") + (*it);
}
else
- statement.append(QChar(' ') + (*it));
+ statement.append(TQChar(' ') + (*it));
}
writeMessage(statement);
}
}
-void Engine::join(const QString &name, const QString &key)
+void Engine::join(const TQString &name, const TQString &key)
{
- QStringList args(name);
+ TQStringList args(name);
if ( !key.isNull() )
args << key;
@@ -101,9 +101,9 @@ void Engine::join(Message &msg)
emit incomingJoinedChannel(Kopete::Message::unescape(msg.suffix()), msg.nickFromPrefix());
}
-void Engine::kick(const QString &user, const QString &channel, const QString &reason)
+void Engine::kick(const TQString &user, const TQString &channel, const TQString &reason)
{
- writeMessage("KICK", QStringList(channel) << user << reason);
+ writeMessage("KICK", TQStringList(channel) << user << reason);
}
void Engine::kick(Message &msg)
@@ -114,9 +114,9 @@ void Engine::kick(Message &msg)
emit incomingKick( Kopete::Message::unescape(msg.arg(0)), msg.nickFromPrefix(), msg.arg(1), msg.suffix());
}
-void Engine::mode(const QString &target, const QString &mode)
+void Engine::mode(const TQString &target, const TQString &mode)
{
- writeMessage("MODE", QStringList(target) << mode);
+ writeMessage("MODE", TQStringList(target) << mode);
}
void Engine::mode(Message &msg)
@@ -124,7 +124,7 @@ void Engine::mode(Message &msg)
/* Change the mode of a user.
* "<nickname> *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )"
*/
- QStringList args = msg.args();
+ TQStringList args = msg.args();
args.pop_front();
if( Entity::isChannel( msg.arg(0) ) )
emit incomingChannelModeChange( msg.arg(0), msg.nickFromPrefix(), args.join(" "));
@@ -132,7 +132,7 @@ void Engine::mode(Message &msg)
emit incomingUserModeChange( msg.nickFromPrefix(), args.join(" "));
}
-void Engine::nick(const QString &newNickname)
+void Engine::nick(const TQString &newNickname)
{
m_PendingNick = newNickname;
writeMessage("NICK", newNickname);
@@ -142,12 +142,12 @@ void Engine::nick(Message &msg)
{
/* Nick name of a user changed
* "<nickname>" */
- QString oldNick = msg.prefix().section('!', 0, 0);
- QString newNick = msg.suffix();
+ TQString oldNick = msg.prefix().section('!', 0, 0);
+ TQString newNick = msg.suffix();
if( codecs[ oldNick ] )
{
- QTextCodec *c = codecs[ oldNick ];
+ TQTextCodec *c = codecs[ oldNick ];
codecs.remove( oldNick );
codecs.insert( newNick, c );
}
@@ -161,7 +161,7 @@ void Engine::nick(Message &msg)
emit incomingNickChange(oldNick, msg.suffix());
}
-void Engine::part(const QString &channel, const QString &reason)
+void Engine::part(const TQString &channel, const TQString &reason)
{
/* This will part a channel with 'reason' as the reason for parting
*/
@@ -177,7 +177,7 @@ void Engine::part(Message &msg)
emit incomingPartedChannel(msg.arg(0), msg.nickFromPrefix(), msg.suffix());
}
-void Engine::pass(const QString &password)
+void Engine::pass(const TQString &password)
{
writeMessage("PASS", password);
}
@@ -191,7 +191,7 @@ void Engine::pong(Message &/*msg*/)
{
}
-void Engine::quit(const QString &reason, bool /*now*/)
+void Engine::quit(const TQString &reason, bool /*now*/)
{
kdDebug(14120) << k_funcinfo << reason << endl;
@@ -199,7 +199,7 @@ void Engine::quit(const QString &reason, bool /*now*/)
return;
if (isConnected())
- writeMessage("QUIT", QString::null, reason);
+ writeMessage("QUIT", TQString::null, reason);
setStatus(Closing);
}
@@ -212,7 +212,7 @@ void Engine::quit(Message &msg)
emit incomingQuitIRC(msg.prefix(), msg.suffix());
}
-void Engine::user(const QString &newUserName, const QString &hostname, const QString &newRealName)
+void Engine::user(const TQString &newUserName, const TQString &hostname, const TQString &newRealName)
{
/* RFC1459: "<username> <hostname> <servername> <realname>"
* The USER command is used at the beginning of connection to specify
@@ -221,10 +221,10 @@ void Engine::user(const QString &newUserName, const QString &hostname, const QSt
m_Username = newUserName;
m_realName = newRealName;
- writeMessage("USER", QStringList(m_Username) << hostname << m_Host, m_realName);
+ writeMessage("USER", TQStringList(m_Username) << hostname << m_Host, m_realName);
}
-void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRealName)
+void Engine::user(const TQString &newUserName, Q_UINT8 mode, const TQString &newRealName)
{
/* RFC2812: "<user> <mode> <unused> <realname>"
* mode is a numeric value (from a bit mask).
@@ -234,10 +234,10 @@ void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRe
m_Username = newUserName;
m_realName = newRealName;
- writeMessage("USER", QStringList(m_Username) << QString::number(mode) << QChar('*'), m_realName);
+ writeMessage("USER", TQStringList(m_Username) << TQString::number(mode) << TQChar('*'), m_realName);
}
-void Engine::topic(const QString &channel, const QString &topic)
+void Engine::topic(const TQString &channel, const TQString &topic)
{
writeMessage("TOPIC", channel, topic);
}
@@ -252,15 +252,15 @@ void Engine::topic(Message &msg)
void Engine::list()
{
- writeMessage("LIST", QString::null);
+ writeMessage("LIST", TQString::null);
}
-void Engine::motd(const QString &server)
+void Engine::motd(const TQString &server)
{
writeMessage("MOTD", server);
}
-void Engine::privmsg(const QString &contact, const QString &message)
+void Engine::privmsg(const TQString &contact, const TQString &message)
{
writeMessage("PRIVMSG", contact, message, codecForNick( contact ) );
}
@@ -272,9 +272,9 @@ void Engine::privmsg(Message &msg)
Message m = msg;
if (!m.suffix().isEmpty())
{
- QString user = m.arg(0);
- QString message = m.suffix();
- const QTextCodec *codec = codecForNick( user );
+ TQString user = m.arg(0);
+ TQString message = m.suffix();
+ const TQTextCodec *codec = codecForNick( user );
if (codec != defaultCodec) {
m.decodeAgain( codec );
message = m.suffix();
@@ -292,7 +292,7 @@ void Engine::privmsg(Message &msg)
}
}
-void Engine::notice(const QString &target, const QString &message)
+void Engine::notice(const TQString &target, const TQString &message)
{
writeMessage("NOTICE", target, message);
}
@@ -306,7 +306,7 @@ void Engine::notice(Message &msg)
invokeCtcpCommandOfMessage(m_ctcpReplies, msg);
}
-void Engine::whois(const QString &user)
+void Engine::whois(const TQString &user)
{
writeMessage("WHOIS", user);
}
diff --git a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
index db1903f3..7216dea7 100644
--- a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
@@ -28,37 +28,37 @@
#include <arpa/inet.h>
#include <kextsock.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
using namespace KIRC;
void Engine::bindCtcp()
{
- bindCtcpQuery("ACTION", this, SLOT(CtcpQuery_action(KIRC::Message &)),
+ bindCtcpQuery("ACTION", this, TQT_SLOT(CtcpQuery_action(KIRC::Message &)),
-1, -1);
- bindCtcpQuery("CLIENTINFO", this, SLOT(CtcpQuery_clientinfo(KIRC::Message &)),
+ bindCtcpQuery("CLIENTINFO", this, TQT_SLOT(CtcpQuery_clientinfo(KIRC::Message &)),
-1, 1);
- bindCtcpQuery("DCC", this, SLOT(CtcpQuery_dcc(KIRC::Message &)),
+ bindCtcpQuery("DCC", this, TQT_SLOT(CtcpQuery_dcc(KIRC::Message &)),
4, 5);
- bindCtcpQuery("FINGER", this, SLOT(CtcpQuery_finger(KIRC::Message &)),
+ bindCtcpQuery("FINGER", this, TQT_SLOT(CtcpQuery_finger(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("PING", this, SLOT(CtcpQuery_ping(KIRC::Message &)),
+ bindCtcpQuery("PING", this, TQT_SLOT(CtcpQuery_ping(KIRC::Message &)),
1, 1);
- bindCtcpQuery("SOURCE", this, SLOT(CtcpQuery_source(KIRC::Message &)),
+ bindCtcpQuery("SOURCE", this, TQT_SLOT(CtcpQuery_source(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("TIME", this, SLOT(CtcpQuery_time(KIRC::Message &)),
+ bindCtcpQuery("TIME", this, TQT_SLOT(CtcpQuery_time(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("USERINFO", this, SLOT(CtcpQuery_userinfo(KIRC::Message &)),
+ bindCtcpQuery("USERINFO", this, TQT_SLOT(CtcpQuery_userinfo(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("VERSION", this, SLOT(CtcpQuery_version(KIRC::Message &)),
+ bindCtcpQuery("VERSION", this, TQT_SLOT(CtcpQuery_version(KIRC::Message &)),
-1, 0);
- bindCtcpReply("ERRMSG", this, SLOT(CtcpReply_errmsg(KIRC::Message &)),
+ bindCtcpReply("ERRMSG", this, TQT_SLOT(CtcpReply_errmsg(KIRC::Message &)),
1, -1);
- bindCtcpReply("PING", this, SLOT(CtcpReply_ping(KIRC::Message &)),
+ bindCtcpReply("PING", this, TQT_SLOT(CtcpReply_ping(KIRC::Message &)),
1, 1, "");
- bindCtcpReply("VERSION", this, SLOT(CtcpReply_version(KIRC::Message &)),
+ bindCtcpReply("VERSION", this, TQT_SLOT(CtcpReply_version(KIRC::Message &)),
-1, -1, "");
}
@@ -68,20 +68,20 @@ void Engine::bindCtcp()
// CtcpReply_* (if any)
/* Generic ctcp commnd for the /ctcp trigger */
-void Engine::CtcpRequestCommand(const QString &contact, const QString &command)
+void Engine::CtcpRequestCommand(const TQString &contact, const TQString &command)
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, QString::null, command);
+ writeCtcpQueryMessage(contact, TQString::null, command);
// emit ctcpCommandMessage( contact, command );
}
}
-void Engine::CtcpRequest_action(const QString &contact, const QString &message)
+void Engine::CtcpRequest_action(const TQString &contact, const TQString &message)
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, QString::null, "ACTION", message);
+ writeCtcpQueryMessage(contact, TQString::null, "ACTION", message);
if( Entity::isChannel(contact) )
emit incomingAction(Kopete::Message::unescape(contact), Kopete::Message::unescape(m_Nickname), message);
@@ -92,7 +92,7 @@ void Engine::CtcpRequest_action(const QString &contact, const QString &message)
void Engine::CtcpQuery_action(Message &msg)
{
- QString target = msg.arg(0);
+ TQString target = msg.arg(0);
if (target[0] == '#' || target[0] == '!' || target[0] == '&')
emit incomingAction(target, msg.nickFromPrefix(), msg.ctcpMessage().ctcpRaw());
else
@@ -109,18 +109,18 @@ bool Engine::CtcpReply_action(Message &msg)
// FIXME: the API can now answer to help commands.
void Engine::CtcpQuery_clientinfo(Message &msg)
{
- QString clientinfo = customCtcpMap[ QString::fromLatin1("clientinfo") ];
+ TQString clientinfo = customCtcpMap[ TQString::fromLatin1("clientinfo") ];
if (clientinfo.isNull())
- clientinfo = QString::fromLatin1("The following commands are supported, but "
+ clientinfo = TQString::fromLatin1("The following commands are supported, but "
"without sub-command help: VERSION, CLIENTINFO, USERINFO, TIME, SOURCE, PING,"
"ACTION.");
- writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QString::null, clientinfo);
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQString::null, clientinfo);
}
-void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, uint port, Transfer::Type type)
+void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, uint port, Transfer::Type type)
{
if( m_status != Connected ||
m_sock->localAddress() == 0 ||
@@ -131,32 +131,32 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u
{
case Transfer::Chat:
{
- writeCtcpQueryMessage(nickname, QString::null,
- QString::fromLatin1("DCC"),
- QStringList(QString::fromLatin1("CHAT")) << QString::fromLatin1("chat") <<
- m_sock->localAddress()->nodeName() << QString::number(port)
+ writeCtcpQueryMessage(nickname, TQString::null,
+ TQString::fromLatin1("DCC"),
+ TQStringList(TQString::fromLatin1("CHAT")) << TQString::fromLatin1("chat") <<
+ m_sock->localAddress()->nodeName() << TQString::number(port)
);
break;
}
case Transfer::FileOutgoing:
{
- QFileInfo file(fileName);
- QString noWhiteSpace = file.fileName();
+ TQFileInfo file(fileName);
+ TQString noWhiteSpace = file.fileName();
if (noWhiteSpace.contains(' ') > 0)
- noWhiteSpace.replace(QRegExp("\\s+"), "_");
+ noWhiteSpace.replace(TQRegExp("\\s+"), "_");
TransferServer *server = TransferHandler::self()->createServer(this, nickname, type, fileName, file.size());
- QString ip = m_sock->localAddress()->nodeName();
- QString ipNumber = QString::number( ntohl( inet_addr( ip.latin1() ) ) );
+ TQString ip = m_sock->localAddress()->nodeName();
+ TQString ipNumber = TQString::number( ntohl( inet_addr( ip.latin1() ) ) );
kdDebug(14120) << "Starting DCC file outgoing transfer." << endl;
- writeCtcpQueryMessage(nickname, QString::null,
- QString::fromLatin1("DCC"),
- QStringList(QString::fromLatin1("SEND")) << noWhiteSpace << ipNumber <<
- QString::number(server->port()) << QString::number(file.size())
+ writeCtcpQueryMessage(nickname, TQString::null,
+ TQString::fromLatin1("DCC"),
+ TQStringList(TQString::fromLatin1("SEND")) << noWhiteSpace << ipNumber <<
+ TQString::number(server->port()) << TQString::number(file.size())
);
break;
}
@@ -171,9 +171,9 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u
void Engine::CtcpQuery_dcc(Message &msg)
{
Message &ctcpMsg = msg.ctcpMessage();
- QString dccCommand = ctcpMsg.arg(0).upper();
+ TQString dccCommand = ctcpMsg.arg(0).upper();
- if (dccCommand == QString::fromLatin1("CHAT"))
+ if (dccCommand == TQString::fromLatin1("CHAT"))
{
// if(ctcpMsg.argsSize()!=4) return false;
@@ -185,7 +185,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
*/
bool okayHost, okayPort;
// should ctctMsg.arg(1) be tested?
- QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
+ TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort);
if (okayHost && okayPort)
{
@@ -196,7 +196,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
Transfer::Chat );
}
}
- else if (dccCommand == QString::fromLatin1("SEND"))
+ else if (dccCommand == TQString::fromLatin1("SEND"))
{
// if(ctcpMsg.argsSize()!=5) return false;
@@ -208,8 +208,8 @@ void Engine::CtcpQuery_dcc(Message &msg)
* filesize = Size of file being sent
*/
bool okayHost, okayPort, okaySize;
-// QFileInfo realfile(msg.arg(1));
- QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
+// TQFileInfo realfile(msg.arg(1));
+ TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort);
unsigned int size = ctcpMsg.arg(4).toUInt(&okaySize);
if (okayHost && okayPort && okaySize)
@@ -243,21 +243,21 @@ void Engine::CtcpQuery_finger( Message &)
// To be implemented
}
-void Engine::CtcpRequest_ping(const QString &target)
+void Engine::CtcpRequest_ping(const TQString &target)
{
kdDebug(14120) << k_funcinfo << endl;
timeval time;
if (gettimeofday(&time, 0) == 0)
{
- QString timeReply;
+ TQString timeReply;
if( Entity::isChannel(target) )
- timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
else
- timeReply = QString::number( time.tv_sec );
+ timeReply = TQString::number( time.tv_sec );
- writeCtcpQueryMessage( target, QString::null, "PING", timeReply);
+ writeCtcpQueryMessage( target, TQString::null, "PING", timeReply);
}
// else
// ((MessageRedirector *)sender())->error("failed to get current time");
@@ -265,7 +265,7 @@ void Engine::CtcpRequest_ping(const QString &target)
void Engine::CtcpQuery_ping(Message &msg)
{
- writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null,
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
msg.ctcpMessage().command(), msg.ctcpMessage().arg(0));
}
@@ -275,30 +275,30 @@ void Engine::CtcpReply_ping(Message &msg)
if (gettimeofday(&time, 0) == 0)
{
// FIXME: the time code is wrong for usec
- QString timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ TQString timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
double newTime = timeReply.toDouble();
double oldTime = msg.suffix().section(' ',0, 0).toDouble();
double difference = newTime - oldTime;
- QString diffString;
+ TQString diffString;
if (difference < 1)
{
- diffString = QString::number(difference);
+ diffString = TQString::number(difference);
diffString.remove((diffString.find('.') -1), 2);
diffString.truncate(3);
diffString.append("milliseconds");
}
else
{
- diffString = QString::number(difference);
- QString seconds = diffString.section('.', 0, 0);
- QString millSec = diffString.section('.', 1, 1);
+ diffString = TQString::number(difference);
+ TQString seconds = diffString.section('.', 0, 0);
+ TQString millSec = diffString.section('.', 1, 1);
millSec.remove(millSec.find('.'), 1);
millSec.truncate(3);
- diffString = QString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
+ diffString = TQString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
}
- emit incomingCtcpReply(QString::fromLatin1("PING"), msg.nickFromPrefix(), diffString);
+ emit incomingCtcpReply(TQString::fromLatin1("PING"), msg.nickFromPrefix(), diffString);
}
// else
// ((MessageRedirector *)sender())->error("failed to get current time");
@@ -306,36 +306,36 @@ void Engine::CtcpReply_ping(Message &msg)
void Engine::CtcpQuery_source(Message &msg)
{
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
msg.ctcpMessage().command(), m_SourceString);
}
void Engine::CtcpQuery_time(Message &msg)
{
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QDateTime::currentDateTime().toString(),
- QString::null, false);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQDateTime::currentDateTime().toString(),
+ TQString::null, false);
}
void Engine::CtcpQuery_userinfo(Message &msg)
{
- QString userinfo = customCtcpMap[ QString::fromLatin1("userinfo") ];
+ TQString userinfo = customCtcpMap[ TQString::fromLatin1("userinfo") ];
if (userinfo.isNull())
userinfo = m_UserString;
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QString::null, userinfo);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQString::null, userinfo);
}
-void Engine::CtcpRequest_version(const QString &target)
+void Engine::CtcpRequest_version(const TQString &target)
{
- writeCtcpQueryMessage(target, QString::null, "VERSION");
+ writeCtcpQueryMessage(target, TQString::null, "VERSION");
}
void Engine::CtcpQuery_version(Message &msg)
{
- QString response = customCtcpMap[ QString::fromLatin1("version") ];
+ TQString response = customCtcpMap[ TQString::fromLatin1("version") ];
kdDebug(14120) << "Version check: " << response << endl;
if (response.isNull())
diff --git a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
index c47b8b05..67d3a842 100644
--- a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
@@ -20,7 +20,7 @@
#include "kircengine.h"
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIRC;
@@ -31,69 +31,69 @@ using namespace KIRC;
void Engine::bindNumericReplies()
{
- bind(1, this, SLOT(numericReply_001(KIRC::Message &)), 1, 1);
- bind(2, this, SLOT(numericReply_002(KIRC::Message &)), 1, 1);
- bind(3, this, SLOT(numericReply_003(KIRC::Message &)), 1, 1);
- bind(4, this, SLOT(numericReply_004(KIRC::Message &)), 5, 5);
- bind(5, this, SLOT(numericReply_004(KIRC::Message &)), 1, 1);
-
- bind(250, this, SLOT(numericReply_250(KIRC::Message &)));
- bind(251, this, SLOT(numericReply_251(KIRC::Message &)));
- bind(252, this, SLOT(numericReply_252(KIRC::Message &)), 2, 2);
- bind(253, this, SLOT(numericReply_253(KIRC::Message &)), 2, 2);
- bind(254, this, SLOT(numericReply_254(KIRC::Message &)), 2, 2);
- bind(255, this, SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString
-
- bind(263, this, SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh
- bind(265, this, SLOT(numericReply_265(KIRC::Message &)));
- bind(266, this, SLOT(numericReply_266(KIRC::Message &)));
-
- bind(301, this, SLOT(numericReply_301(KIRC::Message &)), 2, 2);
- bind(303, this, SLOT(numericReply_303(KIRC::Message &)), 1, 1);
- bind(305, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away
- bind(306, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away
- bind(307, this, SLOT(numericReply_307(KIRC::Message &)), 1, 1);
- bind(311, this, SLOT(numericReply_311(KIRC::Message &)), 5, 5);
- bind(312, this, SLOT(numericReply_312(KIRC::Message &)), 3, 3);
- bind(313, this, SLOT(numericReply_313(KIRC::Message &)), 2, 2);
- bind(314, this, SLOT(numericReply_314(KIRC::Message &)), 5, 5);
- bind(315, this, SLOT(numericReply_315(KIRC::Message &)), 2, 2);
- bind(317, this, SLOT(numericReply_317(KIRC::Message &)), 3, 4);
- bind(318, this, SLOT(numericReply_318(KIRC::Message &)), 2, 2);
- bind(319, this, SLOT(numericReply_319(KIRC::Message &)), 2, 2);
- bind(320, this, SLOT(numericReply_320(KIRC::Message &)), 2, 2);
- bind(321, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 );
- bind(322, this, SLOT(numericReply_322(KIRC::Message &)), 3, 3);
- bind(323, this, SLOT(numericReply_323(KIRC::Message &)), 1, 1);
- bind(324, this, SLOT(numericReply_324(KIRC::Message &)), 2, 4);
- bind(328, this, SLOT(numericReply_328(KIRC::Message &)), 2, 2);
- bind(329, this, SLOT(numericReply_329(KIRC::Message &)), 3, 3);
- bind(330, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ???
- bind(331, this, SLOT(numericReply_331(KIRC::Message &)), 2, 2);
- bind(332, this, SLOT(numericReply_332(KIRC::Message &)), 2, 2);
- bind(333, this, SLOT(numericReply_333(KIRC::Message &)), 4, 4);
- bind(352, this, SLOT(numericReply_352(KIRC::Message &)), 5, 10);
- bind(353, this, SLOT(numericReply_353(KIRC::Message &)), 3, 3);
- bind(366, this, SLOT(numericReply_366(KIRC::Message &)), 2, 2);
- bind(369, this, SLOT(numericReply_369(KIRC::Message &)), 2, 2);
- bind(372, this, SLOT(numericReply_372(KIRC::Message &)), 1, 1);
- bind(375, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
- bind(376, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
-
- bind(401, this, SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan
-// bind(404, this, SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
- bind(406, this, SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick
- bind(422, this, SLOT(numericReply_422(KIRC::Message &)), 1, 1);
- bind(433, this, SLOT(numericReply_433(KIRC::Message &)), 2, 2);
-// bind(442, this, SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
- bind(464, this, SLOT(numericReply_464(KIRC::Message &)), 1, 1);
- bind(471, this, SLOT(numericReply_471(KIRC::Message &)), 2, 2);
- bind(473, this, SLOT(numericReply_473(KIRC::Message &)), 2, 2);
- bind(474, this, SLOT(numericReply_474(KIRC::Message &)), 2, 2);
- bind(475, this, SLOT(numericReply_475(KIRC::Message &)), 2, 2);
+ bind(1, this, TQT_SLOT(numericReply_001(KIRC::Message &)), 1, 1);
+ bind(2, this, TQT_SLOT(numericReply_002(KIRC::Message &)), 1, 1);
+ bind(3, this, TQT_SLOT(numericReply_003(KIRC::Message &)), 1, 1);
+ bind(4, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 5, 5);
+ bind(5, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 1, 1);
+
+ bind(250, this, TQT_SLOT(numericReply_250(KIRC::Message &)));
+ bind(251, this, TQT_SLOT(numericReply_251(KIRC::Message &)));
+ bind(252, this, TQT_SLOT(numericReply_252(KIRC::Message &)), 2, 2);
+ bind(253, this, TQT_SLOT(numericReply_253(KIRC::Message &)), 2, 2);
+ bind(254, this, TQT_SLOT(numericReply_254(KIRC::Message &)), 2, 2);
+ bind(255, this, TQT_SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString
+
+ bind(263, this, TQT_SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh
+ bind(265, this, TQT_SLOT(numericReply_265(KIRC::Message &)));
+ bind(266, this, TQT_SLOT(numericReply_266(KIRC::Message &)));
+
+ bind(301, this, TQT_SLOT(numericReply_301(KIRC::Message &)), 2, 2);
+ bind(303, this, TQT_SLOT(numericReply_303(KIRC::Message &)), 1, 1);
+ bind(305, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away
+ bind(306, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away
+ bind(307, this, TQT_SLOT(numericReply_307(KIRC::Message &)), 1, 1);
+ bind(311, this, TQT_SLOT(numericReply_311(KIRC::Message &)), 5, 5);
+ bind(312, this, TQT_SLOT(numericReply_312(KIRC::Message &)), 3, 3);
+ bind(313, this, TQT_SLOT(numericReply_313(KIRC::Message &)), 2, 2);
+ bind(314, this, TQT_SLOT(numericReply_314(KIRC::Message &)), 5, 5);
+ bind(315, this, TQT_SLOT(numericReply_315(KIRC::Message &)), 2, 2);
+ bind(317, this, TQT_SLOT(numericReply_317(KIRC::Message &)), 3, 4);
+ bind(318, this, TQT_SLOT(numericReply_318(KIRC::Message &)), 2, 2);
+ bind(319, this, TQT_SLOT(numericReply_319(KIRC::Message &)), 2, 2);
+ bind(320, this, TQT_SLOT(numericReply_320(KIRC::Message &)), 2, 2);
+ bind(321, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 );
+ bind(322, this, TQT_SLOT(numericReply_322(KIRC::Message &)), 3, 3);
+ bind(323, this, TQT_SLOT(numericReply_323(KIRC::Message &)), 1, 1);
+ bind(324, this, TQT_SLOT(numericReply_324(KIRC::Message &)), 2, 4);
+ bind(328, this, TQT_SLOT(numericReply_328(KIRC::Message &)), 2, 2);
+ bind(329, this, TQT_SLOT(numericReply_329(KIRC::Message &)), 3, 3);
+ bind(330, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ???
+ bind(331, this, TQT_SLOT(numericReply_331(KIRC::Message &)), 2, 2);
+ bind(332, this, TQT_SLOT(numericReply_332(KIRC::Message &)), 2, 2);
+ bind(333, this, TQT_SLOT(numericReply_333(KIRC::Message &)), 4, 4);
+ bind(352, this, TQT_SLOT(numericReply_352(KIRC::Message &)), 5, 10);
+ bind(353, this, TQT_SLOT(numericReply_353(KIRC::Message &)), 3, 3);
+ bind(366, this, TQT_SLOT(numericReply_366(KIRC::Message &)), 2, 2);
+ bind(369, this, TQT_SLOT(numericReply_369(KIRC::Message &)), 2, 2);
+ bind(372, this, TQT_SLOT(numericReply_372(KIRC::Message &)), 1, 1);
+ bind(375, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
+ bind(376, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
+
+ bind(401, this, TQT_SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan
+// bind(404, this, TQT_SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
+ bind(406, this, TQT_SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick
+ bind(422, this, TQT_SLOT(numericReply_422(KIRC::Message &)), 1, 1);
+ bind(433, this, TQT_SLOT(numericReply_433(KIRC::Message &)), 2, 2);
+// bind(442, this, TQT_SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
+ bind(464, this, TQT_SLOT(numericReply_464(KIRC::Message &)), 1, 1);
+ bind(471, this, TQT_SLOT(numericReply_471(KIRC::Message &)), 2, 2);
+ bind(473, this, TQT_SLOT(numericReply_473(KIRC::Message &)), 2, 2);
+ bind(474, this, TQT_SLOT(numericReply_474(KIRC::Message &)), 2, 2);
+ bind(475, this, TQT_SLOT(numericReply_475(KIRC::Message &)), 2, 2);
//Freenode seems to use this for a non-RFC compliant purpose, as does Unreal
- bind(477, this, SLOT(emitSuffix(KIRC::Message&)),0,0);
+ bind(477, this, TQT_SLOT(emitSuffix(KIRC::Message&)),0,0);
}
/* 001: "Welcome to the Internet Relay Network <nick>!<user>@<host>"
@@ -237,8 +237,8 @@ void Engine::numericReply_301(Message &msg)
*/
void Engine::numericReply_303(Message &msg)
{
- QStringList nicks = QStringList::split(QRegExp(QChar(' ')), msg.suffix());
- for(QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it)
+ TQStringList nicks = TQStringList::split(TQRegExp(TQChar(' ')), msg.suffix());
+ for(TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it)
{
if (!(*it).stripWhiteSpace().isEmpty())
emit incomingUserOnline(Kopete::Message::unescape(*it));
@@ -405,7 +405,7 @@ void Engine::numericReply_332(Message &msg)
void Engine::numericReply_333( Message &msg )
{
kdDebug(14120) << k_funcinfo << endl;
- QDateTime d;
+ TQDateTime d;
d.setTime_t( msg.arg(3).toLong() );
emit incomingTopicUser( Kopete::Message::unescape(msg.arg(1)), Kopete::Message::unescape(msg.arg(2)), d );
}
@@ -439,7 +439,7 @@ void Engine::numericReply_352(Message &msg)
*/
void Engine::numericReply_353(Message &msg)
{
- emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), QStringList::split(' ', msg.suffix()));
+ emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), TQStringList::split(' ', msg.suffix()));
}
/* 366: "<channel> :End of NAMES list"
diff --git a/kopete/protocols/irc/libkirc/kircentity.cpp b/kopete/protocols/irc/libkirc/kircentity.cpp
index 6aa6fd55..ded35fe5 100644
--- a/kopete/protocols/irc/libkirc/kircentity.cpp
+++ b/kopete/protocols/irc/libkirc/kircentity.cpp
@@ -29,19 +29,19 @@ using namespace KNetwork;
* where user and host are optionnal.
* NOTE: If changes are done to the regexp string, update also the sm_userStrictRegExp regexp string.
*/
-const QRegExp Entity::sm_userRegExp(QString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$"));
+const TQRegExp Entity::sm_userRegExp(TQString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$"));
/**
* Regexp to match strictly the complete user definition:
* nick!user@host
* NOTE: If changes are done to the regexp string, update also the sm_userRegExp regexp string.
*/
-const QRegExp Entity::sm_userStrictRegExp(QString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
+const TQRegExp Entity::sm_userStrictRegExp(TQString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
-const QRegExp Entity::sm_channelRegExp( QString::fromLatin1("^[#!+&][^\\s,]+$") );
+const TQRegExp Entity::sm_channelRegExp( TQString::fromLatin1("^[#!+&][^\\s,]+$") );
-Entity::Entity(const QString &, const Type type)
- : QObject(0, "KIRC::Entity"),
+Entity::Entity(const TQString &, const Type type)
+ : TQObject(0, "KIRC::Entity"),
m_type(type)
{
// rename(name, type);
@@ -52,12 +52,12 @@ Entity::~Entity()
emit destroyed(this);
}
-QString Entity::name() const
+TQString Entity::name() const
{
return m_name;
}
-QString Entity::host() const
+TQString Entity::host() const
{
switch(m_type)
{
@@ -70,7 +70,7 @@ QString Entity::host() const
return userHost();
default:
kdDebug(14121) << k_funcinfo << "No host defined for type:" << m_type;
- return QString::null;
+ return TQString::null;
}
}
@@ -86,44 +86,44 @@ KIRC::Entity::Type Entity::guessType()
}
// FIXME: Implement me
-KIRC::Entity::Type Entity::guessType(const QString &)
+KIRC::Entity::Type Entity::guessType(const TQString &)
{
return Unknown;
}
-QString Entity::userNick() const
+TQString Entity::userNick() const
{
return userNick(m_name);
}
-QString Entity::userNick(const QString &s)
+TQString Entity::userNick(const TQString &s)
{
return userInfo(s, 1);
}
-QString Entity::userName() const
+TQString Entity::userName() const
{
return userName(m_name);
}
-QString Entity::userName(const QString &s)
+TQString Entity::userName(const TQString &s)
{
return userInfo(s, 2);
}
-QString Entity::userHost() const
+TQString Entity::userHost() const
{
return userHost(m_name);
}
-QString Entity::userHost(const QString &s)
+TQString Entity::userHost(const TQString &s)
{
return userInfo(s, 3);
}
-QString Entity::userInfo(const QString &s, int num)
+TQString Entity::userInfo(const TQString &s, int num)
{
- QRegExp userRegExp(sm_userRegExp);
+ TQRegExp userRegExp(sm_userRegExp);
userRegExp.search(s);
return userRegExp.cap(num);
}
diff --git a/kopete/protocols/irc/libkirc/kircentity.h b/kopete/protocols/irc/libkirc/kircentity.h
index c9336439..d802d8f4 100644
--- a/kopete/protocols/irc/libkirc/kircentity.h
+++ b/kopete/protocols/irc/libkirc/kircentity.h
@@ -22,10 +22,10 @@
#include <kresolver.h>
#include <ksharedptr.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KIRC
{
@@ -33,7 +33,7 @@ namespace KIRC
class Engine;
class Entity
- : public QObject,
+ : public TQObject,
public KShared
{
Q_OBJECT
@@ -48,49 +48,49 @@ public:
User
};
- Entity(const QString &name, const Type type = Unknown);
+ Entity(const TQString &name, const Type type = Unknown);
virtual ~Entity();
- QString name() const;
- QString host() const;
+ TQString name() const;
+ TQString host() const;
KIRC::Entity::Type type() const;
KIRC::Entity::Type guessType();
- static KIRC::Entity::Type guessType(const QString &name);
+ static KIRC::Entity::Type guessType(const TQString &name);
- // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const QString&)
- inline static bool isUser( const QString &s )
+ // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const TQString&)
+ inline static bool isUser( const TQString &s )
{ return sm_userRegExp.exactMatch(s); };
inline bool isChannel()
{ return isChannel(m_name); };
- inline static bool isChannel( const QString &s )
+ inline static bool isChannel( const TQString &s )
{ return sm_channelRegExp.exactMatch(s); };
- QString userNick() const;
- static QString userNick(const QString &s);
+ TQString userNick() const;
+ static TQString userNick(const TQString &s);
- QString userName() const;
- static QString userName(const QString &s);
+ TQString userName() const;
+ static TQString userName(const TQString &s);
- QString userHost() const;
- static QString userHost(const QString &s);
+ TQString userHost() const;
+ static TQString userHost(const TQString &s);
signals:
void destroyed(KIRC::Entity *self);
private:
- static QString userInfo(const QString &s, int num_cap);
+ static TQString userInfo(const TQString &s, int num_cap);
- static const QRegExp sm_userRegExp;
- static const QRegExp sm_userStrictRegExp;
- static const QRegExp sm_channelRegExp;
+ static const TQRegExp sm_userRegExp;
+ static const TQRegExp sm_userStrictRegExp;
+ static const TQRegExp sm_channelRegExp;
KIRC::Entity::Type m_type;
QString m_name;
// peer ip address if the entity is a User.
- QString m_address;
+ TQString m_address;
};
class EntityPtr
@@ -107,7 +107,7 @@ public:
};
class EntityPtrList
- : public QValueList<EntityPtr>
+ : public TQValueList<EntityPtr>
{
public:
EntityPtrList()
@@ -118,8 +118,8 @@ public:
append(entity);
}
- EntityPtrList(const QValueList<EntityPtr> &list)
- : QValueList<EntityPtr>(list)
+ EntityPtrList(const TQValueList<EntityPtr> &list)
+ : TQValueList<EntityPtr>(list)
{ }
};
diff --git a/kopete/protocols/irc/libkirc/kircmessage.cpp b/kopete/protocols/irc/libkirc/kircmessage.cpp
index f1a5b61f..73a1e53f 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessage.cpp
@@ -30,20 +30,20 @@
using namespace KIRC;
#ifndef _IRC_STRICTNESS_
-QRegExp Message::m_IRCNumericCommand("^\\d{1,3}$");
+TQRegExp Message::m_IRCNumericCommand("^\\d{1,3}$");
// TODO: This regexp parsing is no good. It's slower than it needs to be, and
-// is not codec-safe since QString requires a codec. NEed to parse this with
+// is not codec-safe since TQString requires a codec. NEed to parse this with
// our own parsing class that operates on the raw QCStrings
-QRegExp Message::m_IRCCommandType1(
+TQRegExp Message::m_IRCCommandType1(
"^(?::([^ ]+) )?([A-Za-z]+|\\d{1,3})((?: [^ :][^ ]*)*) ?(?: :(.*))?$");
// Extra end arg space check -------------------------^
#else // _IRC_STRICTNESS_
-QRegExp Message::m_IRCNumericCommand("^\\d{3,3}$");
+TQRegExp Message::m_IRCNumericCommand("^\\d{3,3}$");
-QRegExp Message::m_IRCCommandType1(
+TQRegExp Message::m_IRCCommandType1(
"^(?::([^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){0,13})(?: :(.*))?$");
-QRegExp Message::m_IRCCommandType2(
+TQRegExp Message::m_IRCCommandType2(
"^(?::[[^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){14,14})(?: (.*))?$");
#endif // _IRC_STRICTNESS_
@@ -90,7 +90,7 @@ Message::~Message()
delete m_ctcpMessage;
}
-void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QString &str)
+void Message::writeRawMessage(Engine *engine, const TQTextCodec *codec, const TQString &str)
{
// FIXME: Really handle this
if (!engine->socket())
@@ -99,65 +99,65 @@ void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QSt
return;
}
- QString txt = str + QString::fromLatin1("\r\n");
+ TQString txt = str + TQString::fromLatin1("\r\n");
- QCString s(codec->fromUnicode(txt));
+ TQCString s(codec->fromUnicode(txt));
kdDebug(14120) << "Message is " << s.length() << " chars" << endl;
// FIXME: Should check the amount of data really writen.
int wrote = engine->socket()->writeBlock(s.data(), s.length());
- kdDebug(14121) << QString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl;
+ kdDebug(14121) << TQString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl;
}
-void Message::writeMessage(Engine *engine, const QTextCodec *codec, const QString &message)
+void Message::writeMessage(Engine *engine, const TQTextCodec *codec, const TQString &message)
{
writeRawMessage(engine, codec, quote(message));
}
-void Message::writeMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QStringList &args, const QString &suffix)
+void Message::writeMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQStringList &args, const TQString &suffix)
{
- QString msg = command;
+ TQString msg = command;
if (!args.isEmpty())
- msg += QChar(' ') + args.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here
+ msg += TQChar(' ') + args.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!suffix.isNull())
- msg = msg.stripWhiteSpace() + QString::fromLatin1(" :") + suffix;
+ msg = msg.stripWhiteSpace() + TQString::fromLatin1(" :") + suffix;
writeMessage(engine, codec, msg);
}
-void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QString&to,
- const QString &ctcpMessage)
+void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString&to,
+ const TQString &ctcpMessage)
{
- writeMessage(engine, codec, command, to, QChar(0x01) + ctcpQuote(ctcpMessage) + QChar(0x01));
+ writeMessage(engine, codec, command, to, TQChar(0x01) + ctcpQuote(ctcpMessage) + TQChar(0x01));
}
-void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix )
+void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix )
{
- QString ctcpMsg = ctcpCommand;
+ TQString ctcpMsg = ctcpCommand;
if (!ctcpArgs.isEmpty())
- ctcpMsg += QChar(' ') + ctcpArgs.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here
+ ctcpMsg += TQChar(' ') + ctcpArgs.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!ctcpSuffix.isNull())
- ctcpMsg += QString::fromLatin1(" :") + ctcpSuffix;
+ ctcpMsg += TQString::fromLatin1(" :") + ctcpSuffix;
- writeMessage(engine, codec, command, to, suffix + QChar(0x01) + ctcpQuote(ctcpMsg) + QChar(0x01));
+ writeMessage(engine, codec, command, to, suffix + TQChar(0x01) + ctcpQuote(ctcpMsg) + TQChar(0x01));
}
-Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSuccess)
+Message Message::parse(Engine *engine, const TQTextCodec *codec, bool *parseSuccess)
{
if (parseSuccess)
*parseSuccess=false;
if (engine->socket()->canReadLine())
{
- QCString raw(engine->socket()->bytesAvailable()+1);
+ TQCString raw(engine->socket()->bytesAvailable()+1);
Q_LONG length = engine->socket()->readLine(raw.data(), raw.count());
if( length > -1 )
@@ -197,21 +197,21 @@ Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSucce
return Message();
}
-QString Message::quote(const QString &str)
+TQString Message::quote(const TQString &str)
{
- QString tmp = str;
- QChar q('\020');
- tmp.replace(q, q+QString(q));
- tmp.replace(QChar('\r'), q+QString::fromLatin1("r"));
- tmp.replace(QChar('\n'), q+QString::fromLatin1("n"));
- tmp.replace(QChar('\0'), q+QString::fromLatin1("0"));
+ TQString tmp = str;
+ TQChar q('\020');
+ tmp.replace(q, q+TQString(q));
+ tmp.replace(TQChar('\r'), q+TQString::fromLatin1("r"));
+ tmp.replace(TQChar('\n'), q+TQString::fromLatin1("n"));
+ tmp.replace(TQChar('\0'), q+TQString::fromLatin1("0"));
return tmp;
}
// FIXME: The unquote system is buggy.
-QString Message::unquote(const QString &str)
+TQString Message::unquote(const TQString &str)
{
- QString tmp = str;
+ TQString tmp = str;
char b[3] = { 020, 020, '\0' };
const char b2[2] = { 020, '\0' };
@@ -227,23 +227,23 @@ QString Message::unquote(const QString &str)
return tmp;
}
-QString Message::ctcpQuote(const QString &str)
+TQString Message::ctcpQuote(const TQString &str)
{
- QString tmp = str;
- tmp.replace( QChar('\\'), QString::fromLatin1("\\\\"));
- tmp.replace( (char)1, QString::fromLatin1("\\1"));
+ TQString tmp = str;
+ tmp.replace( TQChar('\\'), TQString::fromLatin1("\\\\"));
+ tmp.replace( (char)1, TQString::fromLatin1("\\1"));
return tmp;
}
-QString Message::ctcpUnquote(const QString &str)
+TQString Message::ctcpUnquote(const TQString &str)
{
- QString tmp = str;
+ TQString tmp = str;
tmp.replace("\\\\", "\\");
tmp.replace("\\1", "\1" );
return tmp;
}
-bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, Message &message)
+bool Message::matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, Message &message)
{
if(matchForIRCRegExp(m_IRCCommandType1, codec, line, message))
return true;
@@ -256,19 +256,19 @@ bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, M
// FIXME: remove the decodeStrings calls or update them.
// FIXME: avoid the recursive call, it make the ctcp command unquoted twice (wich is wrong, but valid in most of the cases)
-bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const QCString &line, Message &msg )
+bool Message::matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, const TQCString &line, Message &msg )
{
if( regexp.exactMatch( codec->toUnicode(line) ) )
{
msg.m_raw = line;
msg.m_prefix = unquote(regexp.cap(1));
msg.m_command = unquote(regexp.cap(2));
- msg.m_args = QStringList::split(' ', regexp.cap(3));
+ msg.m_args = TQStringList::split(' ', regexp.cap(3));
- QCString suffix = codec->fromUnicode(unquote(regexp.cap(4)));
+ TQCString suffix = codec->fromUnicode(unquote(regexp.cap(4)));
if (!suffix.isNull() && suffix.length() > 0)
{
- QCString ctcpRaw;
+ TQCString ctcpRaw;
if (extractCtcpCommand(suffix, ctcpRaw))
{
msg.m_ctcpRaw = codec->toUnicode(ctcpRaw);
@@ -279,7 +279,7 @@ bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const
int space = ctcpRaw.find(' ');
if (!matchForIRCRegExp(msg.m_ctcpMessage->m_raw, codec, *msg.m_ctcpMessage))
{
- QCString command;
+ TQCString command;
if (space > 0)
command = ctcpRaw.mid(0, space).upper();
else
@@ -296,28 +296,28 @@ bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const
msg.m_suffix = Kopete::Message::decodeString( KSParser::parse(suffix), codec );
}
else
- msg.m_suffix = QString::null;
+ msg.m_suffix = TQString::null;
return true;
}
return false;
}
-void Message::decodeAgain( const QTextCodec *codec )
+void Message::decodeAgain( const TQTextCodec *codec )
{
matchForIRCRegExp(m_raw, codec, *this);
}
// FIXME: there are missing parts
-QString Message::toString() const
+TQString Message::toString() const
{
if( !isValid() )
- return QString::null;
+ return TQString::null;
- QString msg = m_command;
- for (QStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it)
- msg += QChar(' ') + *it;
+ TQString msg = m_command;
+ for (TQStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it)
+ msg += TQChar(' ') + *it;
if (!m_suffix.isNull())
- msg += QString::fromLatin1(" :") + m_suffix;
+ msg += TQString::fromLatin1(" :") + m_suffix;
return msg;
}
@@ -339,7 +339,7 @@ bool Message::isValid() const
* string is splited to get the first part of the message and fill the ctcp command.
* FIXME: The code currently only match for a textual message or a ctcp message not both mixed as it can be (even if very rare).
*/
-bool Message::extractCtcpCommand(QCString &message, QCString &ctcpline)
+bool Message::extractCtcpCommand(TQCString &message, TQCString &ctcpline)
{
uint len = message.length();
diff --git a/kopete/protocols/irc/libkirc/kircmessage.h b/kopete/protocols/irc/libkirc/kircmessage.h
index e37f3fb2..02631bbf 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.h
+++ b/kopete/protocols/irc/libkirc/kircmessage.h
@@ -22,11 +22,11 @@
#include <kbufferedio.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <kopetemessage.h>
@@ -44,20 +44,20 @@ class Message
public:
/** \brief Sends the message as-is to the server.
*/
- static void writeRawMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str);
+ static void writeRawMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str);
- static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str);
+ static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str);
- static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QStringList &args, const QString &suffix);
+ static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQStringList &args, const TQString &suffix);
- static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to,
- const QString &ctcpMessage);
+ static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to,
+ const TQString &ctcpMessage);
- static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null );
+ static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null );
Message();
Message(const KIRC::Message &obj);
@@ -65,10 +65,10 @@ public:
~Message();
- inline const QString nickFromPrefix() const
+ inline const TQString nickFromPrefix() const
{ return Kopete::Message::unescape(KIRC::Entity::userNick(m_prefix)); }
- QString toString() const;
+ TQString toString() const;
/** \brief Returns true if the message command is numeric.
*/
@@ -84,11 +84,11 @@ public:
/** \brief Re-decodes the message with given codec.
*/
- void decodeAgain( const QTextCodec *codec );
+ void decodeAgain( const TQTextCodec *codec );
/** \brief The whole message as received.
*/
- inline const QCString &raw() const
+ inline const TQCString &raw() const
{ return m_raw; }
/** \brief Prefix of this message.
@@ -100,7 +100,7 @@ public:
* message = [ ":" prefix SPACE ] command [ params ] crlf
* prefix = servername / ( nickname [ [ "!" user ] "@" host ] )
*/
- inline const QString &prefix() const
+ inline const TQString &prefix() const
{ return m_prefix; }
/** \brief The command part of this message.
@@ -109,7 +109,7 @@ public:
*
* Examples: "MODE", "PRIVMSG", 303, 001, ...
*/
- inline const QString &command() const
+ inline const TQString &command() const
{ return m_command; }
/** \brief The number of command arguments this message contains.
@@ -119,19 +119,19 @@ public:
/** \brief i:th command argument.
*/
- inline const QString &arg(size_t i) const
+ inline const TQString &arg(size_t i) const
{ return m_args[i]; }
/** \brief All command arguments.
*/
- inline const QStringList &args() const
+ inline const TQStringList &args() const
{ return m_args; }
/** \brief Message suffix.
*/
- inline const QString &suffix() const
+ inline const TQString &suffix() const
{ return m_suffix; }
- inline const QString &ctcpRaw() const
+ inline const TQString &ctcpRaw() const
{ return m_ctcpRaw; }
inline bool hasCtcpMessage() const
@@ -139,58 +139,58 @@ public:
inline class KIRC::Message &ctcpMessage() const
{ return *m_ctcpMessage; }
- static KIRC::Message parse(KIRC::Engine *engine, const QTextCodec *codec, bool *parseSuccess=0);
+ static KIRC::Message parse(KIRC::Engine *engine, const TQTextCodec *codec, bool *parseSuccess=0);
private:
/**
* Contains the low level dequoted message.
*/
- QCString m_raw;
+ TQCString m_raw;
/**
* Contains the completely dequoted prefix.
*/
- QString m_prefix;
+ TQString m_prefix;
/**
* Contains the completely dequoted command.
*/
- QString m_command;
+ TQString m_command;
/**
* Contains the completely dequoted args.
*/
- QStringList m_args;
+ TQStringList m_args;
/**
* Contains the completely dequoted suffix.
*/
- QString m_suffix;
+ TQString m_suffix;
/**
* If it is a message contains the completely dequoted rawCtcpLine.
* If it is a ctcp message contains the completely dequoted rawCtcpArgsLine.
*/
- QString m_ctcpRaw;
+ TQString m_ctcpRaw;
// low level quoting, message quoting
- static QString quote(const QString &str);
- static QString unquote(const QString &str);
+ static TQString quote(const TQString &str);
+ static TQString unquote(const TQString &str);
// ctcp level quoting
- static QString ctcpQuote(const QString &str);
- static QString ctcpUnquote(const QString &str);
+ static TQString ctcpQuote(const TQString &str);
+ static TQString ctcpUnquote(const TQString &str);
- static bool extractCtcpCommand(QCString &str, QCString &ctcpline);
+ static bool extractCtcpCommand(TQCString &str, TQCString &ctcpline);
- static bool matchForIRCRegExp(const QCString &line, const QTextCodec *codec, KIRC::Message &message);
- static bool matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const QCString &line, KIRC::Message &message);
+ static bool matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, KIRC::Message &message);
+ static bool matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, const TQCString &line, KIRC::Message &message);
class KIRC::Message *m_ctcpMessage;
- static QRegExp m_IRCCommandType1;
+ static TQRegExp m_IRCCommandType1;
#ifdef _IRC_STRICTNESS_
- static QRegExp m_IRCCommandType2;
+ static TQRegExp m_IRCCommandType2;
#endif // _IRC_STRICTNESS_
- static QRegExp m_IRCNumericCommand;
+ static TQRegExp m_IRCNumericCommand;
};
}
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
index 49194ce0..2e1d0b4c 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
@@ -22,21 +22,21 @@
using namespace KIRC;
MessageRedirector::MessageRedirector(KIRC::Engine *engine,
- int argsSize_min, int argsSize_max, const QString &helpMessage)
- : QObject(engine, "KIRC::MessageRedirector"),
+ int argsSize_min, int argsSize_max, const TQString &helpMessage)
+ : TQObject(engine, "KIRC::MessageRedirector"),
m_argsSize_min(argsSize_min),
m_argsSize_max(argsSize_max),
m_helpMessage(helpMessage)
{
}
-bool MessageRedirector::connect(QObject *object, const char *member)
+bool MessageRedirector::connect(TQObject *object, const char *member)
{
- return QObject::connect(this, SIGNAL(redirect(KIRC::Message &)),
+ return TQObject::connect(this, TQT_SIGNAL(redirect(KIRC::Message &)),
object, member);
}
-QStringList MessageRedirector::operator () (Message &msg)
+TQStringList MessageRedirector::operator () (Message &msg)
{
m_errors.clear();
@@ -49,12 +49,12 @@ QStringList MessageRedirector::operator () (Message &msg)
return m_errors;
}
-QString MessageRedirector::helpMessage()
+TQString MessageRedirector::helpMessage()
{
return m_helpMessage;
}
-void MessageRedirector::error(QString &message)
+void MessageRedirector::error(TQString &message)
{
m_errors.append(message);
}
@@ -82,7 +82,7 @@ bool MessageRedirector::checkValidity(const Message &msg)
( msg.argsSize() > 0 && (
msg.arg(0) == m_Nickname ||
msg.arg(0) == m_PendingNick ||
- msg.arg(0) == QString::fromLatin1("*")
+ msg.arg(0) == TQString::fromLatin1("*")
)
)
)
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.h b/kopete/protocols/irc/libkirc/kircmessageredirector.h
index f87a2af6..24a2f9af 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.h
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.h
@@ -18,8 +18,8 @@
#ifndef KIRC_MESSAGEREDIRECTOR_H
#define KIRC_MESSAGEREDIRECTOR_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
namespace KIRC
{
@@ -42,27 +42,27 @@ public:
MessageRedirector(KIRC::Engine *engine,
int argsSize_min = KIRC::MessageRedirector::Unknown,
int argsSize_max = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
/**
* Connects the given object member signal/slot to this message redirector.
* The member signal slot should be looking like:
- * SIGNAL(mysignal(KIRC::Message &msg))
+ * TQT_SIGNAL(mysignal(KIRC::Message &msg))
* or
- * SIGNAL(myslot(KIRC::Message &msg))
+ * TQT_SIGNAL(myslot(KIRC::Message &msg))
*/
- bool connect(QObject *object, const char *member);
+ bool connect(TQObject *object, const char *member);
/**
* Attempt to send the message.
- * @return a not empty QStringList on errors or no slots connected.
+ * @return a not empty TQStringList on errors or no slots connected.
* The returned string list contains all the errors.
*/
- QStringList operator()(KIRC::Message &msg);
+ TQStringList operator()(KIRC::Message &msg);
- void error(QString &errorMessage);
+ void error(TQString &errorMessage);
- QString helpMessage();
+ TQString helpMessage();
signals:
void redirect(KIRC::Message &);
@@ -74,11 +74,11 @@ private:
*/
bool checkValidity(const KIRC::Message &msg);
- QStringList m_errors;
+ TQStringList m_errors;
int m_argsSize_min;
int m_argsSize_max;
- QString m_helpMessage;
+ TQString m_helpMessage;
};
}
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.cpp b/kopete/protocols/irc/libkirc/kirctransfer.cpp
index 2466d6a9..af7d8948 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransfer.cpp
@@ -19,30 +19,30 @@
#include <kextsock.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include "kirctransfer.h"
using namespace KIRC;
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Type type,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
- m_file(0), m_fileName(QString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0),
+ m_file(0), m_fileName(TQString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0),
m_receivedBytes(0), m_receivedBytesLimit(0), m_sentBytes(0), m_sentBytesLimit(0)
{
}
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize, // put this in a QVariant ?
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -51,12 +51,12 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
{
}
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
- QHostAddress hostAdress, Q_UINT16 port, // put this in a QVariant ?
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
+ TQHostAddress hostAdress, Q_UINT16 port, // put this in a TQVariant ?
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize, // put this in a QVariant ?
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -66,10 +66,10 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
setSocket(new KExtendedSocket(hostAdress.toString(), port));
}
/*
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
- Transfer::Type type, QVariant properties,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
+ Transfer::Type type, TQVariant properties,
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(properties[socket]),
m_initiated(false),
@@ -81,11 +81,11 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
else if(!properites["hostAddress"].isNull() && !properites["hostPort"].isNull())
setSocket(new KExtendedSocket(properites["hostAddress"], properites["hostPort"]));
- connect(this, SIGNAL(complete()),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(complete()),
+ this, TQT_SLOT(closeSocket()));
- connect(this, SIGNAL(abort(QString)),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(abort(TQString)),
+ this, TQT_SLOT(closeSocket()));
}
*/
Transfer::~Transfer()
@@ -116,7 +116,7 @@ void Transfer::slotError( int error )
bool Transfer::initiate()
{
- QTimer *timer = 0;
+ TQTimer *timer = 0;
if(m_initiated)
{
@@ -134,39 +134,39 @@ bool Transfer::initiate()
m_file.setName(m_fileName);
- connect(this, SIGNAL(complete()),
- this, SLOT(closeSocket()));
- connect(this, SIGNAL(abort(QString)),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(complete()),
+ this, TQT_SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(abort(TQString)),
+ this, TQT_SLOT(closeSocket()));
-// connect(m_socket, SIGNAL(connectionClosed()),
-// this, SLOT(slotConnectionClosed()));
-// connect(m_socket, SIGNAL(delayedCloseFinished()),
-// this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int)
- this, SLOT(slotError(int)));
+// connect(m_socket, TQT_SIGNAL(connectionClosed()),
+// this, TQT_SLOT(slotConnectionClosed()));
+// connect(m_socket, TQT_SIGNAL(delayedCloseFinished()),
+// this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int)
+ this, TQT_SLOT(slotError(int)));
switch( m_type )
{
case Chat:
kdDebug(14121) << k_funcinfo << "Stting up a chat." << endl;
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileIncoming()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileIncoming()));
break;
case FileIncoming:
kdDebug(14121) << k_funcinfo << "Stting up an incoming file transfer." << endl;
m_file.open(IO_WriteOnly);
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileIncoming()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileIncoming()));
break;
case FileOutgoing:
kdDebug(14121) << k_funcinfo << "Stting up an outgoing file transfer." << endl;
m_file.open(IO_ReadOnly);
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileOutgoing()));
-// timer = new QTimer(this);
-// connect(timer, SIGNAL(timeout()),
-// this, SLOT(writeFileOutgoing()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileOutgoing()));
+// timer = new TQTimer(this);
+// connect(timer, TQT_SIGNAL(timeout()),
+// this, TQT_SLOT(writeFileOutgoing()));
// timer->start(1000, false);
writeFileOutgoing(); // send a first packet.
break;
@@ -189,9 +189,9 @@ bool Transfer::initiate()
// I wonder if calling this is really necessary
// As far as I understand, buffer (socket buffer at least) should be flushed while event-looping.
// But I'm not really sure of this, so I force the flush.
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()),
- this, SLOT(flush()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(flush()));
timer->start(1000, FALSE); // flush the streams at every seconds
return true;
@@ -240,12 +240,12 @@ void Transfer::closeSocket()
m_socket->flush();
}
-void Transfer::userAbort(QString msg)
+void Transfer::userAbort(TQString msg)
{
emit abort(msg);
}
-void Transfer::setCodec( QTextCodec *codec )
+void Transfer::setCodec( TQTextCodec *codec )
{
switch( m_type )
{
@@ -258,7 +258,7 @@ void Transfer::setCodec( QTextCodec *codec )
}
}
-void Transfer::writeLine( const QString &line )
+void Transfer::writeLine( const TQString &line )
{
switch( m_type )
{
@@ -275,7 +275,7 @@ void Transfer::readyReadLine()
{
if( m_socket->canReadLine() )
{
- QString msg = m_socket_textStream.readLine();
+ TQString msg = m_socket_textStream.readLine();
emit readLine(msg);
}
}
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.h b/kopete/protocols/irc/libkirc/kirctransfer.h
index 3453f5cb..4053d1fd 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.h
+++ b/kopete/protocols/irc/libkirc/kirctransfer.h
@@ -18,11 +18,11 @@
#ifndef KIRCTRANSFER_H
#define KIRCTRANSFER_H
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qhostaddress.h>
-#include <qobject.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqhostaddress.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
class KExtendedSocket;
@@ -56,25 +56,25 @@ public:
Closed
};
public:
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress
Type type = Unknown,
- QObject *parent = 0L, const char *name = 0L );
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QObject *parent = 0L, const char *name = 0L );
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0L, const char *name = 0L );
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0L, const char *name = 0L );
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0L, const char *name = 0L );
/*
For a file transfer properties are:
@@ -88,15 +88,15 @@ public:
Q_UINT32 fileSize
for detemining the file propeties.
*//*
- Transfer( KIRC *engine, QString nick,// QString nick_peer_adress,
- Transfer::Type type, QVariant properties,
- QObject *parent = 0L, const char *name = 0L );
+ Transfer( KIRC *engine, TQString nick,// TQString nick_peer_adress,
+ Transfer::Type type, TQVariant properties,
+ TQObject *parent = 0L, const char *name = 0L );
*/
~Transfer();
KIRC::Engine *engine() const
{ return m_engine; }
- QString nick() const
+ TQString nick() const
{ return m_nick; }
Type type() const
{ return m_type; }
@@ -108,11 +108,11 @@ public:
*/
bool initiate();
- QString fileName() const
+ TQString fileName() const
{ return m_fileName; }
/* Change the file name.
*/
- void setFileName(QString fileName)
+ void setFileName(TQString fileName)
{ m_fileName = fileName; }
unsigned long fileSize() const
{ return m_fileSize; }
@@ -120,15 +120,15 @@ public slots:
bool setSocket( KExtendedSocket *socket );
void closeSocket();
- void setCodec( QTextCodec *codec );
- void writeLine( const QString &msg );
+ void setCodec( TQTextCodec *codec );
+ void writeLine( const TQString &msg );
void flush();
- void userAbort(QString);
+ void userAbort(TQString);
signals:
- void readLine( const QString &msg );
+ void readLine( const TQString &msg );
void fileSizeCurrent( unsigned int );
void fileSizeAcknowledge( unsigned int );
@@ -136,7 +136,7 @@ signals:
// void received(Q_UINT32);
// void sent(Q_UINT32);
- void abort(QString);
+ void abort(TQString);
/* Emited when the transfer is complete.
* Usually it means that the file transfer has successfully finished.
@@ -166,7 +166,7 @@ protected:
// Text member data
QTextStream m_socket_textStream;
-// QTextCodec * m_socket_codec;
+// TQTextCodec * m_socket_codec;
// File member data
QFile m_file;
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
index 3fa73dff..c6c2185e 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
@@ -19,9 +19,9 @@
#include <klocale.h>
#include <kextsock.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include "kirctransferserver.h"
@@ -54,9 +54,9 @@ TransferServer *TransferHandler::server( Q_UINT16 port, int backlog )
return m_server;
}
-TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName,
+TransferServer *TransferHandler::createServer(Engine *engine, TQString m_userName,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize)
+ TQString fileName, Q_UINT32 fileSize)
{
TransferServer *server = new TransferServer(engine, m_userName, type, fileName, fileSize, this);
transferServerCreated(server);
@@ -64,13 +64,13 @@ TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName
}
Transfer *TransferHandler::createClient(
- Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize )
+ TQString fileName, Q_UINT32 fileSize )
{
Transfer *client = new Transfer(
- engine, nick,// QString nick_peer_adress,
+ engine, nick,// TQString nick_peer_adress,
peer_address, peer_port,
type,
fileName, fileSize,
@@ -80,9 +80,9 @@ Transfer *TransferHandler::createClient(
}
/*
-File *DCCHandler::openFile( QString file, int mode = IO_ReadWrite )
+File *DCCHandler::openFile( TQString file, int mode = IO_ReadWrite )
{
- QFile *file = new QFile(filename);
+ TQFile *file = new TQFile(filename);
if (!file->open(mode))
{
delete file;
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.h b/kopete/protocols/irc/libkirc/kirctransferhandler.h
index 81774c02..de03b810 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.h
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.h
@@ -18,7 +18,7 @@
#ifndef KIRCTRANSFERHANDLER_H
#define KIRCTRANSFERHANDLER_H
-#include <qhostaddress.h>
+#include <tqhostaddress.h>
#include "kirctransfer.h"
#include "kirctransferserver.h"
@@ -42,24 +42,24 @@ public:
TransferServer *server();
TransferServer *server( Q_UINT16 port, int backlog = 1 );
- TransferServer *createServer(KIRC::Engine *engine, QString m_userName,
+ TransferServer *createServer(KIRC::Engine *engine, TQString m_userName,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize);
+ TQString fileName, Q_UINT32 fileSize);
Transfer *createClient(
- KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString file = QString::null, Q_UINT32 fileSize = 0 );
+ TQString file = TQString::null, Q_UINT32 fileSize = 0 );
// void registerServer( DCCServer * );
-// QPtrList<DCCServer> getRegisteredServers();
-// static QPtrList<DCCServer> getAllRegisteredServers();
+// TQPtrList<DCCServer> getRegisteredServers();
+// static TQPtrList<DCCServer> getAllRegisteredServers();
// void unregisterServer( DCCServer * );
// void registerClient( DCCClient * );
-// QPtrList<DCCClient> getRegisteredClients();
-// static QPtrList<DCCClient> getAllRegisteredClients();
+// TQPtrList<DCCClient> getRegisteredClients();
+// static TQPtrList<DCCClient> getAllRegisteredClients();
// void unregisterClient( DCCClient * );
signals:
@@ -70,8 +70,8 @@ private:
// TransferHandler();
TransferServer *m_server;
-// QPtrList<TransferServer> m_servers;
-// QPtrList<Transfer> m_clients;
+// TQPtrList<TransferServer> m_servers;
+// TQPtrList<Transfer> m_clients;
};
}
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.cpp b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
index 96cc66fb..1fbe1629 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
@@ -25,27 +25,27 @@
using namespace KIRC;
/*
-TransferServer::TransferServer( QObject *parent, const char *name )
- : QObject( parent, name ),
+TransferServer::TransferServer( TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_socket( 0 ),
m_port( 0 ),
m_backlog( 1 )
{
}
*/
-TransferServer::TransferServer(Q_UINT16 port, int backlog, QObject *parent, const char *name)
- : QObject( parent, name ),
+TransferServer::TransferServer(Q_UINT16 port, int backlog, TQObject *parent, const char *name)
+ : TQObject( parent, name ),
m_socket( 0 ),
m_port( port ),
m_backlog( backlog )
{
}
-TransferServer::TransferServer(Engine *engine, QString nick,// QString nick_peer_adress,
+TransferServer::TransferServer(Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent, const char *name)
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent, const char *name)
+ : TQObject( parent, name ),
m_socket(0),
m_port(0),
m_backlog(1),
@@ -68,8 +68,8 @@ bool TransferServer::initServer()
{
if (!m_socket)
{
- QObject::connect(this, SIGNAL(incomingNewTransfer(Transfer *)),
- TransferHandler::self(), SIGNAL(transferCreated(Transfer *)));
+ TQObject::connect(this, TQT_SIGNAL(incomingNewTransfer(Transfer *)),
+ TransferHandler::self(), TQT_SIGNAL(transferCreated(Transfer *)));
m_socket = new KExtendedSocket();
@@ -83,10 +83,10 @@ bool TransferServer::initServer()
if (!m_socket->setTimeout(2*60)) // FIXME: allow configuration of this.
kdDebug(14120) << k_funcinfo << "Failed to set timeout." << endl;
- QObject::connect(m_socket, SIGNAL(readyAccept()),
- this, SLOT(readyAccept()));
- QObject::connect(m_socket, SIGNAL(connectionFailed(int)),
- this, SLOT(connectionFailed(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyAccept()),
+ this, TQT_SLOT(readyAccept()));
+ TQObject::connect(m_socket, TQT_SIGNAL(connectionFailed(int)),
+ this, TQT_SLOT(connectionFailed(int)));
m_socket->listen(m_backlog);
m_socket->setBlockingMode(true);
@@ -137,14 +137,14 @@ void Transfer::initClient()
{
if(!m_socket)
{
- connect(m_socket, SIGNAL(connectionClosed()),
- this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(delayedCloseFinished()),
- this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(error(int)),
- this, SLOT(slotError(int)));
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileOut));
+ connect(m_socket, TQT_SIGNAL(connectionClosed()),
+ this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(delayedCloseFinished()),
+ this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(error(int)),
+ this, TQT_SLOT(slotError(int)));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileOut));
m_socket->enableRead( true );
m_socket->enableWrite( true );
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.h b/kopete/protocols/irc/libkirc/kirctransferserver.h
index 8ac016ef..af7c498d 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.h
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.h
@@ -20,7 +20,7 @@
#include "kirctransfer.h"
-#include <qobject.h>
+#include <tqobject.h>
class KExtendedSocket;
@@ -36,12 +36,12 @@ class TransferServer
Q_OBJECT
public:
-// TransferServer(QObject *parent = 0, const char *name = 0);
- TransferServer(Q_UINT16 port, int backlog = 1, QObject *parent = 0, const char *name = 0);
- TransferServer(KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
+// TransferServer(TQObject *parent = 0, const char *name = 0);
+ TransferServer(Q_UINT16 port, int backlog = 1, TQObject *parent = 0, const char *name = 0);
+ TransferServer(KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0, const char *name = 0);
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0, const char *name = 0);
~TransferServer();
@@ -71,8 +71,8 @@ private:
QString m_fileName;
Q_UINT32 m_fileSize;
// by
- // QPtrList<Transfer> m_pendingTransfers;
- // QPtrList<Transfer> m_activeTransfers;
+ // TQPtrList<Transfer> m_pendingTransfers;
+ // TQPtrList<Transfer> m_activeTransfers;
};
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.cpp b/kopete/protocols/irc/libkirc/ksslsocket.cpp
index fb2d5161..afe78fed 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.cpp
+++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -36,8 +36,8 @@ struct KSSLSocketPrivate
mutable KSSL *kssl;
KSSLCertificateCache *cc;
DCOPClient *dcc;
- QMap<QString,QString> metaData;
- QSocketNotifier *socketNotifier;
+ TQMap<TQString,TQString> metaData;
+ TQSocketNotifier *socketNotifier;
};
KSSLSocket::KSSLSocket() : KExtendedSocket()
@@ -52,9 +52,9 @@ KSSLSocket::KSSLSocket() : KExtendedSocket()
setBlockingMode(false);
//Connect internal slots
- QObject::connect( this, SIGNAL(connectionSuccess()), this, SLOT(slotConnected()) );
- QObject::connect( this, SIGNAL(closed(int)), this, SLOT(slotDisconnected()) );
- QObject::connect( this, SIGNAL(connectionFailed(int)), this, SLOT(slotDisconnected()));
+ TQObject::connect( this, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotConnected()) );
+ TQObject::connect( this, TQT_SIGNAL(closed(int)), this, TQT_SLOT(slotDisconnected()) );
+ TQObject::connect( this, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotDisconnected()));
}
KSSLSocket::~KSSLSocket()
@@ -118,7 +118,7 @@ int KSSLSocket::bytesAvailable() const
void KSSLSocket::slotReadData()
{
kdDebug(14120) << k_funcinfo << d->kssl->pending() << endl;
- QByteArray buff(512);
+ TQByteArray buff(512);
int bytesRead = d->kssl->read( buff.data(), 512 );
//Fill the read buffer
@@ -148,11 +148,11 @@ void KSSLSocket::slotConnected()
}
//Disconnect the KExtSocket notifier slot, we use our own
- QObject::disconnect( readNotifier(), SIGNAL(activated( int )),
- this, SLOT(socketActivityRead()) );
+ TQObject::disconnect( readNotifier(), TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(socketActivityRead()) );
- QObject::connect( readNotifier(), SIGNAL(activated( int )),
- this, SLOT(slotReadData()) );
+ TQObject::connect( readNotifier(), TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(slotReadData()) );
readNotifier()->setEnabled(true);
@@ -182,34 +182,34 @@ void KSSLSocket::showInfoDialog()
{
if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{
- KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList());
+ KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << "irc://" + peerAddress()->pretty() + ":" + port() << d->metaData;
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData)", data, ignoretype, ignore);
+ "showSSLInfoDialog(TQString,KIO::MetaData)", data, ignoretype, ignore);
}
}
-void KSSLSocket::setMetaData( const QString &key, const QVariant &data )
+void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data )
{
- QVariant v = data;
+ TQVariant v = data;
d->metaData[key] = v.asString();
}
-bool KSSLSocket::hasMetaData( const QString &key )
+bool KSSLSocket::hasMetaData( const TQString &key )
{
return d->metaData.contains(key);
}
-QString KSSLSocket::metaData( const QString &key )
+TQString KSSLSocket::metaData( const TQString &key )
{
if( d->metaData.contains(key) )
return d->metaData[key];
- return QString::null;
+ return TQString::null;
}
/*
@@ -220,27 +220,27 @@ I basically copied the below from tcpKIO::SlaveBase.hpp, with some modificaions
* Copyright (C) 2001 Dawit Alemayehu <adawit@kde.org>
*/
-int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo )
+int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
kdDebug(14120) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
- QByteArray data, result;
- QCString returnType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, result;
+ TQCString returnType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)1 << (int)type << text << caption << buttonYes << buttonNo;
if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{
- KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList());
+ KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
}
d->dcc->call("kio_uiserver", "UIServer",
- "messageBox(int,int,QString,QString,QString,QString)", data, returnType, result);
+ "messageBox(int,int,TQString,TQString,TQString,TQString)", data, returnType, result);
if( returnType == "int" )
{
int res;
- QDataStream r(result, IO_ReadOnly);
+ TQDataStream r(result, IO_ReadOnly);
r >> res;
return res;
}
@@ -257,10 +257,10 @@ int KSSLSocket::verifyCertificate()
bool _IPmatchesCN = false;
int result;
bool doAddHost = false;
- QString ourHost = host();
- QString ourIp = peerAddress()->pretty();
+ TQString ourHost = host();
+ TQString ourIp = peerAddress()->pretty();
- QString theurl = "irc://" + ourHost + ":" + port();
+ TQString theurl = "irc://" + ourHost + ":" + port();
if (!d->cc)
d->cc = new KSSLCertificateCache;
@@ -284,15 +284,15 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher());
setMetaData("ssl_cipher_desc", d->kssl->connectionInfo().getCipherDescription());
setMetaData("ssl_cipher_version", d->kssl->connectionInfo().getCipherVersion());
- setMetaData("ssl_cipher_used_bits", QString::number(d->kssl->connectionInfo().getCipherUsedBits()));
- setMetaData("ssl_cipher_bits", QString::number(d->kssl->connectionInfo().getCipherBits()));
+ setMetaData("ssl_cipher_used_bits", TQString::number(d->kssl->connectionInfo().getCipherUsedBits()));
+ setMetaData("ssl_cipher_bits", TQString::number(d->kssl->connectionInfo().getCipherBits()));
setMetaData("ssl_peer_ip", ourIp );
- QString errorStr;
+ TQString errorStr;
for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin();
it != ksvl.end(); ++it)
{
- errorStr += QString::number(*it)+":";
+ errorStr += TQString::number(*it)+":";
}
setMetaData("ssl_cert_errors", errorStr);
@@ -300,8 +300,8 @@ int KSSLSocket::verifyCertificate()
if (pc.chain().isValid() && pc.chain().depth() > 1)
{
- QString theChain;
- QPtrList<KSSLCertificate> chain = pc.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = pc.chain().getChain();
for (KSSLCertificate *c = chain.first(); c; c = chain.next())
{
theChain += c->toString();
@@ -314,7 +314,7 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_peer_chain", "");
}
- setMetaData("ssl_cert_state", QString::number(ksv));
+ setMetaData("ssl_cert_state", TQString::number(ksv));
if (ksv == KSSLCertificate::Ok)
{
@@ -364,7 +364,7 @@ int KSSLSocket::verifyCertificate()
{
if (ksv == KSSLCertificate::InvalidHost)
{
- QString msg = i18n("The IP address of the host %1 "
+ TQString msg = i18n("The IP address of the host %1 "
"does not match the one the "
"certificate was issued to.");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
@@ -375,7 +375,7 @@ int KSSLSocket::verifyCertificate()
}
else
{
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
msg.arg(ourHost),
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.h b/kopete/protocols/irc/libkirc/ksslsocket.h
index 692d5288..79e3b70b 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.h
+++ b/kopete/protocols/irc/libkirc/ksslsocket.h
@@ -20,7 +20,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kextsock.h>
#include <kio/slavebase.h>
@@ -53,14 +53,14 @@ class KSSLSocket : public KExtendedSocket
private:
int verifyCertificate();
- int messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text,
- const QString &caption, const QString &buttonYes, const QString &buttonNo );
+ int messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes, const TQString &buttonNo );
//Copied frm tcpslavebase to simply integrating their dialog function
- void setMetaData( const QString &, const QVariant & );
- bool hasMetaData( const QString & );
- QString metaData( const QString & );
+ void setMetaData( const TQString &, const TQVariant & );
+ bool hasMetaData( const TQString & );
+ TQString metaData( const TQString & );
KSSLSocketPrivate *d;
};
diff --git a/kopete/protocols/irc/ui/channellist.cpp b/kopete/protocols/irc/ui/channellist.cpp
index 5c66ede0..ea085db8 100644
--- a/kopete/protocols/irc/ui/channellist.cpp
+++ b/kopete/protocols/irc/ui/channellist.cpp
@@ -22,34 +22,34 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qvariant.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qsimplerichtext.h>
-#include <qstyle.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqvariant.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqsimplerichtext.h>
+#include <tqstyle.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <klistview.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
class ChannelListItem : public KListViewItem
{
public:
- ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 );
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
- virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 );
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
private:
KListView *parentList;
};
-ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ) :
+ChannelListItem::ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 ) :
KListViewItem( parent, parent->lastItem() ), parentList( parent )
{
setText(0, arg1);
@@ -57,7 +57,7 @@ ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2,
setText(2, arg3);
}
-int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const
+int ChannelListItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
if( col == 1 )
{
@@ -69,58 +69,58 @@ int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const
return 1;
}
else
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
-void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void ChannelListItem::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 );
}
@@ -129,7 +129,7 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
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
}
@@ -138,16 +138,16 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
// 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 ) );
}
}
}
@@ -156,33 +156,33 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
//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() );
- QSimpleRichText myrichtext( text(column), paint.font() );
+ TQSimpleRichText myrichtext( text(column), paint.font() );
myrichtext.draw( &paint, 0, 0, paint.window(), _cg );
paint.end();
p->drawPixmap( 0, 0, back );
}
-ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine )
- : QWidget( parent ), m_engine( engine )
+ChannelList::ChannelList( TQWidget* parent, KIRC::Engine *engine )
+ : TQWidget( parent ), m_engine( engine )
{
- ChannelListLayout = new QVBoxLayout( this, 11, 6, "ChannelListLayout");
+ ChannelListLayout = new TQVBoxLayout( this, 11, 6, "ChannelListLayout");
- layout72_2 = new QHBoxLayout( 0, 0, 6, "layout72_2");
+ layout72_2 = new TQHBoxLayout( 0, 0, 6, "layout72_2");
- textLabel1_2 = new QLabel( this, "textLabel1_2" );
+ textLabel1_2 = new TQLabel( this, "textLabel1_2" );
layout72_2->addWidget( textLabel1_2 );
- channelSearch = new QLineEdit( this, "channelSearch" );
+ channelSearch = new TQLineEdit( this, "channelSearch" );
layout72_2->addWidget( channelSearch );
- numUsers = new QSpinBox( 0, 32767, 1, this, "num_users" );
+ numUsers = new TQSpinBox( 0, 32767, 1, this, "num_users" );
numUsers->setSuffix( i18n(" members") );
layout72_2->addWidget( numUsers );
- mSearchButton = new QPushButton( this, "mSearchButton" );
+ mSearchButton = new TQPushButton( this, "mSearchButton" );
layout72_2->addWidget( mSearchButton );
ChannelListLayout->addLayout( layout72_2 );
@@ -198,46 +198,46 @@ ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine )
clearWState( WState_Polished );
textLabel1_2->setText( i18n( "Search for:" ) );
- QToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
- QToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
- QWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
- QWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
- QToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
- QWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
+ TQToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
+ TQToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
+ TQWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
+ TQWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
+ TQToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
+ TQWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
mSearchButton->setText( i18n( "S&earch" ) );
- QToolTip::add( mSearchButton, i18n( "Perform a channel search." ) );
- QWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) );
- QToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) );
+ TQToolTip::add( mSearchButton, i18n( "Perform a channel search." ) );
+ TQWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) );
+ TQToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) );
mChannelList->header()->setLabel( 0, i18n( "Channel" ) );
mChannelList->header()->setLabel( 1, i18n( "Users" ) );
mChannelList->header()->setLabel( 2, i18n( "Topic" ) );
// signals and slots connections
- connect( mChannelList, SIGNAL( doubleClicked(QListViewItem*) ),
- this, SLOT( slotItemDoubleClicked(QListViewItem*) ) );
+ connect( mChannelList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ this, TQT_SLOT( slotItemDoubleClicked(TQListViewItem*) ) );
- connect( mSearchButton, SIGNAL( clicked() ), this, SLOT( search() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( search() ) );
- connect( mChannelList, SIGNAL( selectionChanged( QListViewItem*) ), this,
- SLOT( slotItemSelected( QListViewItem *) ) );
+ connect( mChannelList, TQT_SIGNAL( selectionChanged( TQListViewItem*) ), this,
+ TQT_SLOT( slotItemSelected( TQListViewItem *) ) );
- connect( m_engine, SIGNAL( incomingListedChan( const QString &, uint, const QString & ) ),
- this, SLOT( slotChannelListed( const QString &, uint, const QString & ) ) );
+ connect( m_engine, TQT_SIGNAL( incomingListedChan( const TQString &, uint, const TQString & ) ),
+ this, TQT_SLOT( slotChannelListed( const TQString &, uint, const TQString & ) ) );
- connect( m_engine, SIGNAL( incomingEndOfList() ), this, SLOT( slotListEnd() ) );
+ connect( m_engine, TQT_SIGNAL( incomingEndOfList() ), this, TQT_SLOT( slotListEnd() ) );
- connect( m_engine, SIGNAL( statusChanged(KIRC::Engine::Status) ),
- this, SLOT( slotStatusChanged(KIRC::Engine::Status) ) );
+ connect( m_engine, TQT_SIGNAL( statusChanged(KIRC::Engine::Status) ),
+ this, TQT_SLOT( slotStatusChanged(KIRC::Engine::Status) ) );
show();
}
-void ChannelList::slotItemDoubleClicked( QListViewItem *i )
+void ChannelList::slotItemDoubleClicked( TQListViewItem *i )
{
emit channelDoubleClicked( i->text(0) );
}
-void ChannelList::slotItemSelected( QListViewItem *i )
+void ChannelList::slotItemSelected( TQListViewItem *i )
{
emit channelSelected( i->text(0) );
}
@@ -306,19 +306,19 @@ void ChannelList::search()
}
}
-void ChannelList::slotChannelListed( const QString &channel, uint users, const QString &topic )
+void ChannelList::slotChannelListed( const TQString &channel, uint users, const TQString &topic )
{
checkSearchResult( channel, users, topic );
- channelCache.insert( channel, QPair< uint, QString >( users, topic ) );
+ channelCache.insert( channel, QPair< uint, TQString >( users, topic ) );
}
-void ChannelList::checkSearchResult( const QString &channel, uint users, const QString &topic )
+void ChannelList::checkSearchResult( const TQString &channel, uint users, const TQString &topic )
{
if( ( mUsers == 0 || mUsers <= users ) &&
( mSearch.isEmpty() || channel.contains( mSearch, false ) || topic.contains( mSearch, false ) )
)
{
- new ChannelListItem( mChannelList, channel, QString::number(users), topic );
+ new ChannelListItem( mChannelList, channel, TQString::number(users), topic );
}
}
@@ -328,7 +328,7 @@ void ChannelList::slotSearchCache()
{
checkSearchResult( cacheIterator.key(), cacheIterator.data().first, cacheIterator.data().second );
++cacheIterator;
- QTimer::singleShot( 0, this, SLOT( slotSearchCache() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotSearchCache() ) );
}
else
{
diff --git a/kopete/protocols/irc/ui/channellist.h b/kopete/protocols/irc/ui/channellist.h
index c6f435a0..59b03a25 100644
--- a/kopete/protocols/irc/ui/channellist.h
+++ b/kopete/protocols/irc/ui/channellist.h
@@ -18,9 +18,9 @@
#ifndef CHANNELLIST_H
#define CHANNELLIST_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qpair.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqpair.h>
#include "kircengine.h"
@@ -40,7 +40,7 @@ class ChannelList
Q_OBJECT
public:
- ChannelList( QWidget *parent, KIRC::Engine *engine );
+ ChannelList( TQWidget *parent, KIRC::Engine *engine );
public slots:
void search();
@@ -48,33 +48,33 @@ class ChannelList
void clear();
signals:
- void channelDoubleClicked( const QString &channel );
- void channelSelected( const QString &channel );
+ void channelDoubleClicked( const TQString &channel );
+ void channelSelected( const TQString &channel );
private slots:
- void slotItemDoubleClicked( QListViewItem * i );
- void slotItemSelected( QListViewItem * i );
- void slotChannelListed( const QString & channel, uint users, const QString & topic );
+ void slotItemDoubleClicked( TQListViewItem * i );
+ void slotItemSelected( TQListViewItem * i );
+ void slotChannelListed( const TQString & channel, uint users, const TQString & topic );
void slotListEnd();
void slotSearchCache();
void slotStatusChanged( KIRC::Engine::Status );
private:
- void checkSearchResult( const QString & channel, uint users, const QString & topic );
+ void checkSearchResult( const TQString & channel, uint users, const TQString & topic );
- QLabel* textLabel1_2;
- QLineEdit* channelSearch;
- QSpinBox* numUsers;
- QPushButton* mSearchButton;
+ TQLabel* textLabel1_2;
+ TQLineEdit* channelSearch;
+ TQSpinBox* numUsers;
+ TQPushButton* mSearchButton;
KListView* mChannelList;
- QVBoxLayout* ChannelListLayout;
- QHBoxLayout* layout72_2;
+ TQVBoxLayout* ChannelListLayout;
+ TQHBoxLayout* layout72_2;
KIRC::Engine *m_engine;
bool mSearching;
- QString mSearch;
+ TQString mSearch;
uint mUsers;
- QMap< QString, QPair< uint, QString > > channelCache;
- QMap< QString, QPair< uint, QString > >::const_iterator cacheIterator;
+ TQMap< TQString, QPair< uint, TQString > > channelCache;
+ TQMap< TQString, QPair< uint, TQString > >::const_iterator cacheIterator;
};
#endif
diff --git a/kopete/protocols/irc/ui/channellistdialog.cpp b/kopete/protocols/irc/ui/channellistdialog.cpp
index 46128730..e344d227 100644
--- a/kopete/protocols/irc/ui/channellistdialog.cpp
+++ b/kopete/protocols/irc/ui/channellistdialog.cpp
@@ -22,23 +22,23 @@
#include "kopeteuiglobal.h"
-#include "qlayout.h"
+#include "tqlayout.h"
-ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan)
+ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan)
: KDialogBase(Kopete::UI::Global::mainWidget(), "channel_list_widget", false, caption, Close)
{
m_engine = engine;
m_list = new ChannelList( this, engine );
- connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ),
+ connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
target, slotJoinChan );
- connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ),
- this, SLOT( slotChannelDoubleClicked( const QString & ) ) );
+ connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
+ this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) );
- new QHBoxLayout( m_list, 0, spacingHint() );
+ new TQHBoxLayout( m_list, 0, spacingHint() );
- setInitialSize( QSize( 500, 400 ) );
+ setInitialSize( TQSize( 500, 400 ) );
setMainWidget( m_list );
show();
}
@@ -53,7 +53,7 @@ void ChannelListDialog::search()
m_list->search();
}
-void ChannelListDialog::slotChannelDoubleClicked( const QString & )
+void ChannelListDialog::slotChannelDoubleClicked( const TQString & )
{
close();
}
diff --git a/kopete/protocols/irc/ui/channellistdialog.h b/kopete/protocols/irc/ui/channellistdialog.h
index 2bb85f5b..9dcb0cbb 100644
--- a/kopete/protocols/irc/ui/channellistdialog.h
+++ b/kopete/protocols/irc/ui/channellistdialog.h
@@ -28,14 +28,14 @@ class ChannelListDialog
Q_OBJECT
public:
- ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan);
+ ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan);
void clear();
void search();
private slots:
- void slotChannelDoubleClicked( const QString & );
+ void slotChannelDoubleClicked( const TQString & );
private:
KIRC::Engine *m_engine;
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
index 4a1e6ed3..06e2f166 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.cpp
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
@@ -36,17 +36,17 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qconnection.h>
-#include <qvalidator.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-
-IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, QWidget *parent, const char * )
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqconnection.h>
+#include <tqvalidator.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+
+IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *parent, const char * )
: IRCEditAccountBase(parent), KopeteEditAccountWidget(ident)
{
mProtocol = proto;
@@ -56,8 +56,8 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
if( account() )
{
- QString nickName = account()->mySelf()->nickName();
- QString serverInfo = account()->accountId();
+ TQString nickName = account()->mySelf()->nickName();
+ TQString serverInfo = account()->accountId();
mNickName->setText( nickName );
mAltNickname->setText( account()->altNick() );
@@ -82,23 +82,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
informationReplies->setCurrentItem( config->readNumEntry( "InformationReplies", IRCAccount::ActiveWindow ) - 1 );
errorMessages->setCurrentItem( config->readNumEntry( "ErrorMessages", IRCAccount::ActiveWindow ) - 1 );
- QStringList cmds = account()->connectCommands();
- for( QStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
- new QListViewItem( commandList, *i );
+ TQStringList cmds = account()->connectCommands();
+ for( TQStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
+ new TQListViewItem( commandList, *i );
- const QMap< QString, QString > replies = account()->customCtcpReplies();
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
- new QListViewItem( ctcpList, it.key(), it.data() );
+ const TQMap< TQString, TQString > replies = account()->customCtcpReplies();
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ new TQListViewItem( ctcpList, it.key(), it.data() );
}
- mUserName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^\\s]*$"), mUserName ) );
- mNickName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
- mAltNickname->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
+ mUserName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^\\s]*$"), mUserName ) );
+ mNickName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
+ mAltNickname->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
charset->insertStringList( KCodecAction::supportedEncodings() );
for (int i = 0; i < charset->count(); ++i) {
- QString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
+ TQString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == currentCodec) {
charset->setCurrentItem( i );
@@ -106,23 +106,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
}
}
- connect( commandList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCommandContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( commandList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCommandContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( ctcpList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCtcpContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( ctcpList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCtcpContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddCommand() ) );
- connect( editButton, SIGNAL( clicked() ), this, SLOT(slotEditNetworks() ) );
- connect( addReply, SIGNAL( clicked() ), this, SLOT( slotAddCtcp() ) );
+ connect( addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCommand() ) );
+ connect( editButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotEditNetworks() ) );
+ connect( addReply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCtcp() ) );
- connect( network, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotUpdateNetworkDescription( const QString &) ) );
+ connect( network, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworkDescription( const TQString &) ) );
- connect( IRCProtocol::protocol(), SIGNAL( networkConfigUpdated( const QString & ) ),
- this, SLOT( slotUpdateNetworks( const QString & ) ) );
+ connect( IRCProtocol::protocol(), TQT_SIGNAL( networkConfigUpdated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworks( const TQString & ) ) );
- slotUpdateNetworks( QString::null );
+ slotUpdateNetworks( TQString::null );
}
IRCEditAccountWidget::~IRCEditAccountWidget()
@@ -134,19 +134,19 @@ IRCAccount *IRCEditAccountWidget::account ()
return dynamic_cast<IRCAccount *>(KopeteEditAccountWidget::account () );
}
-void IRCEditAccountWidget::slotUpdateNetworks( const QString & selectedNetwork )
+void IRCEditAccountWidget::slotUpdateNetworks( const TQString & selectedNetwork )
{
network->clear();
uint i = 0;
- QStringList keys;
- for( QDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
+ TQStringList keys;
+ for( TQDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
keys.append( it.currentKey() );
keys.sort();
- QStringList::Iterator end = keys.end();
- for( QStringList::Iterator it = keys.begin(); it != end; ++it )
+ TQStringList::Iterator end = keys.end();
+ for( TQStringList::Iterator it = keys.begin(); it != end; ++it )
{
IRCNetwork * current = IRCProtocol::protocol()->networks()[*it];
network->insertItem( current->name );
@@ -164,24 +164,24 @@ void IRCEditAccountWidget::slotEditNetworks()
IRCProtocol::protocol()->editNetworks( network->currentText() );
}
-void IRCEditAccountWidget::slotUpdateNetworkDescription( const QString &network )
+void IRCEditAccountWidget::slotUpdateNetworkDescription( const TQString &network )
{
description->setText(
IRCProtocol::protocol()->networks()[ network ]->description
);
}
-void IRCEditAccountWidget::slotCommandContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCommandContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove Command"), 1 );
if( popup.exec( p ) == 1 )
delete item;
}
-void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove CTCP Reply"), 1 );
if( popup.exec( p ) == 1 )
delete item;
@@ -191,7 +191,7 @@ void IRCEditAccountWidget::slotAddCommand()
{
if ( !commandEdit->text().isEmpty() )
{
- new QListViewItem( commandList, commandEdit->text() );
+ new TQListViewItem( commandList, commandEdit->text() );
commandEdit->clear();
}
}
@@ -200,21 +200,21 @@ void IRCEditAccountWidget::slotAddCtcp()
{
if ( !newCTCP->text().isEmpty() && !newReply->text().isEmpty() )
{
- new QListViewItem( ctcpList, newCTCP->text(), newReply->text() );
+ new TQListViewItem( ctcpList, newCTCP->text(), newReply->text() );
newCTCP->clear();
newReply->clear();
}
}
-QString IRCEditAccountWidget::generateAccountId( const QString &network )
+TQString IRCEditAccountWidget::generateAccountId( const TQString &network )
{
KConfig *config = KGlobal::config();
- QString nextId = network;
+ TQString nextId = network;
uint accountNumber = 1;
- while( config->hasGroup( QString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
+ while( config->hasGroup( TQString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
{
- nextId = QString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
+ nextId = TQString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
}
kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl;
return nextId;
@@ -222,12 +222,12 @@ QString IRCEditAccountWidget::generateAccountId( const QString &network )
Kopete::Account *IRCEditAccountWidget::apply()
{
- QString nickName = mNickName->text();
- QString networkName = network->currentText();
+ TQString nickName = mNickName->text();
+ TQString networkName = network->currentText();
if( !account() )
{
- setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), QString::null, networkName, nickName ) );
+ setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString::null, networkName, nickName ) );
}
else
@@ -251,12 +251,12 @@ Kopete::Account *IRCEditAccountWidget::apply()
account()->configGroup()->writeEntry("PreferSSL", preferSSL->isChecked());
- QStringList cmds;
- for( QListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
+ TQStringList cmds;
+ for( TQListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
cmds.append( i->text(0) );
- QMap< QString, QString > replies;
- for( QListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
+ TQMap< TQString, TQString > replies;
+ for( TQListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
replies[ i->text(0) ] = i->text(1);
account()->setCustomCtcpReplies( replies );
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.h b/kopete/protocols/irc/ui/irceditaccountwidget.h
index 365acaf3..348e5cc3 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.h
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.h
@@ -31,7 +31,7 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount
Q_OBJECT
public:
- IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, QWidget *parent=0, const char *name=0);
+ IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, TQWidget *parent=0, const char *name=0);
~IRCEditAccountWidget();
IRCAccount *account();
@@ -39,17 +39,17 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount
virtual Kopete::Account *apply();
private slots:
- void slotCommandContextMenu( KListView*, QListViewItem*, const QPoint & );
- void slotCtcpContextMenu( KListView*, QListViewItem*, const QPoint & );
+ void slotCommandContextMenu( KListView*, TQListViewItem*, const TQPoint & );
+ void slotCtcpContextMenu( KListView*, TQListViewItem*, const TQPoint & );
void slotAddCommand();
void slotAddCtcp();
void slotEditNetworks();
- void slotUpdateNetworks( const QString & );
- void slotUpdateNetworkDescription( const QString & );
+ void slotUpdateNetworks( const TQString & );
+ void slotUpdateNetworkDescription( const TQString & );
private:
void readNetworks();
- QString generateAccountId( const QString &network );
+ TQString generateAccountId( const TQString &network );
IRCProtocol *mProtocol;
};
diff --git a/kopete/protocols/irc/ui/networkconfig.ui.h b/kopete/protocols/irc/ui/networkconfig.ui.h
index 7716e75f..30f9654e 100644
--- a/kopete/protocols/irc/ui/networkconfig.ui.h
+++ b/kopete/protocols/irc/ui/networkconfig.ui.h
@@ -15,12 +15,12 @@
void NetworkConfig::accept()
{
emit accepted();
- QDialog::accept();
+ TQDialog::accept();
}
void NetworkConfig::reject()
{
emit rejected();
- QDialog::reject();
+ TQDialog::reject();
}
diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp
index 785e9c53..bb1c0f2e 100644
--- a/kopete/protocols/jabber/jabberaccount.cpp
+++ b/kopete/protocols/jabber/jabberaccount.cpp
@@ -33,9 +33,9 @@
#include <time.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -87,7 +87,7 @@
-JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId, const char *name)
+JabberAccount::JabberAccount (JabberProtocol * parent, const TQString & accountId, const char *name)
:Kopete::PasswordedAccount ( parent, accountId, 0, name )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Instantiating new account " << accountId << endl;
@@ -109,7 +109,7 @@ JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId
JabberContact *myContact = contactPool()->addContact ( XMPP::RosterItem ( accountId ), Kopete::ContactList::self()->myself(), false );
setMyself( myContact );
- QObject::connect(Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ) );
+ TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ) );
m_initialPresence = XMPP::Status ( "", "", 5, true );
@@ -124,8 +124,8 @@ JabberAccount::~JabberAccount ()
cleanup ();
- QMap<QString,JabberTransport*> tranposrts_copy=m_transports;
- QMap<QString,JabberTransport*>::Iterator it;
+ TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports;
+ TQMap<TQString,JabberTransport*>::Iterator it;
for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it )
delete it.data();
}
@@ -178,7 +178,7 @@ KActionMenu *JabberAccount::actionMenu ()
KAction *action;
- action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, SLOT (slotJoinNewChat ()), this, "actionJoinChat");
+ action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat");
m_actionMenu->insert(action);
action->setEnabled( isConnected() );
@@ -190,17 +190,17 @@ KActionMenu *JabberAccount::actionMenu ()
m_actionMenu->popupMenu()->insertSeparator();
action = new KAction ( i18n ("Services..."), "jabber_serv_on", 0,
- this, SLOT ( slotGetServices () ), this, "actionJabberServices");
+ this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices");
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
action = new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0,
- this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ;
+ this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ;
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
action = new KAction ( i18n ("Edit User Info..."), "identity", 0,
- this, SLOT ( slotEditVCard () ), this, "actionEditVCard") ;
+ this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") ;
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
@@ -229,11 +229,11 @@ JabberContactPool *JabberAccount::contactPool ()
}
-bool JabberAccount::createContact (const QString & contactId, Kopete::MetaContact * metaContact)
+bool JabberAccount::createContact (const TQString & contactId, Kopete::MetaContact * metaContact)
{
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = metaContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -271,11 +271,11 @@ bool JabberAccount::isConnecting ()
XMPP::Jid jid ( myself()->contactId () );
// see if we are currently trying to connect
- return resourcePool()->bestResource ( jid ).status().show () == QString("connecting");
+ return resourcePool()->bestResource ( jid ).status().show () == TQString("connecting");
}
-void JabberAccount::connectWithPassword ( const QString &password )
+void JabberAccount::connectWithPassword ( const TQString &password )
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "called" << endl;
@@ -295,40 +295,40 @@ void JabberAccount::connectWithPassword ( const QString &password )
{
m_jabberClient = new JabberClient;
- QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
-
- QObject::connect ( m_jabberClient, SIGNAL ( subscription ( const XMPP::Jid &, const QString & ) ),
- this, SLOT ( slotSubscription ( const XMPP::Jid &, const QString & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( rosterRequestFinished ( bool ) ),
- this, SLOT ( slotRosterRequestFinished ( bool ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( newContact ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
- this, SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
- this, SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( messageReceived ( const XMPP::Message & ) ),
- this, SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( incomingFileTransfer () ),
- this, SLOT ( slotIncomingFileTransfer () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ),
- this, SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ),
- this, SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ),
- this, SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatError ( const XMPP::Jid &, int, const QString & ) ),
- this, SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const QString & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ),
- this, SLOT ( slotClientDebugMessage ( const QString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
+
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( subscription ( const XMPP::Jid &, const TQString & ) ),
+ this, TQT_SLOT ( slotSubscription ( const XMPP::Jid &, const TQString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool ) ),
+ this, TQT_SLOT ( slotRosterRequestFinished ( bool ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( newContact ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
+ this, TQT_SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
+ this, TQT_SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( messageReceived ( const XMPP::Message & ) ),
+ this, TQT_SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( incomingFileTransfer () ),
+ this, TQT_SLOT ( slotIncomingFileTransfer () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ),
+ this, TQT_SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ),
+ this, TQT_SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ),
+ this, TQT_SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatError ( const XMPP::Jid &, int, const TQString & ) ),
+ this, TQT_SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const TQString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ),
+ this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) );
}
else
{
@@ -363,7 +363,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
m_jabberClient->setClientName ("Kopete");
m_jabberClient->setClientVersion (kapp->aboutData ()->version ());
- m_jabberClient->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
+ m_jabberClient->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
}
// Set caps node information
@@ -387,14 +387,14 @@ void JabberAccount::connectWithPassword ( const QString &password )
char str[256];
char fmt[32];
int timezoneOffset;
- QString timezoneString;
+ TQString timezoneString;
strcpy ( fmt, "%z" );
strftime ( str, 256, fmt, localtime ( &x ) );
if ( strcmp ( fmt, str ) )
{
- QString s = str;
+ TQString s = str;
if ( s.at ( 0 ) == '+' )
s.remove ( 0, 1 );
s.truncate ( s.length () - 2 );
@@ -416,7 +416,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
setPresence( XMPP::Status ("connecting", "", 0, true) );
- switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + QString("/") + resource () ), password ) )
+ switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + TQString("/") + resource () ), password ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -435,7 +435,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
}
-void JabberAccount::slotClientDebugMessage ( const QString &msg )
+void JabberAccount::slotClientDebugMessage ( const TQString &msg )
{
kdDebug (JABBER_DEBUG_PROTOCOL) << k_funcinfo << msg << endl;
@@ -444,10 +444,10 @@ void JabberAccount::slotClientDebugMessage ( const QString &msg )
bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning )
{
- QString validityString, code;
+ TQString validityString, code;
- QString server = jabberClient->jid().domain ();
- QString accountId = jabberClient->jid().bare ();
+ TQString server = jabberClient->jid().domain ();
+ TQString accountId = jabberClient->jid().bare ();
switch ( warning )
{
@@ -509,7 +509,7 @@ bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning )
arg(server, accountId, validityString),
i18n("Jabber Connection Certificate Problem"),
KStdGuiItem::cont(),
- QString("KopeteTLSWarning") + server + code) == KMessageBox::Continue );
+ TQString("KopeteTLSWarning") + server + code) == KMessageBox::Continue );
}
@@ -556,7 +556,7 @@ void JabberAccount::slotConnected ()
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Voice caller..." << endl;
m_voiceCaller = new JingleVoiceCaller( this );
- QObject::connect(m_voiceCaller,SIGNAL(incoming(const Jid&)),this,SLOT(slotIncomingVoiceCall( const Jid& )));
+ TQObject::connect(m_voiceCaller,TQT_SIGNAL(incoming(const Jid&)),this,TQT_SLOT(slotIncomingVoiceCall( const Jid& )));
m_voiceCaller->initialize();
}
@@ -567,12 +567,12 @@ void JabberAccount::slotConnected ()
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Session Manager..." << endl;
m_jingleSessionManager = new JingleSessionManager( this );
- QObject::connect(m_jingleSessionManager, SIGNAL(incomingSession(const QString &, JingleSession *)), this, SLOT(slotIncomingJingleSession(const QString &, JingleSession *)));
+ TQObject::connect(m_jingleSessionManager, TQT_SIGNAL(incomingSession(const TQString &, JingleSession *)), this, TQT_SLOT(slotIncomingJingleSession(const TQString &, JingleSession *)));
}
#endif
// Set caps extensions
- m_jabberClient->client()->addExtension("voice-v1", Features(QString("http://www.google.com/xmpp/protocol/voice/v1")));
+ m_jabberClient->client()->addExtension("voice-v1", Features(TQString("http://www.google.com/xmpp/protocol/voice/v1")));
#endif
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl;
@@ -607,7 +607,7 @@ void JabberAccount::slotIncomingFileTransfer ()
}
-void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason)
+void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason)
{
XMPP::Status xmppStatus = m_protocol->kosToStatus( status, reason);
@@ -725,10 +725,10 @@ void JabberAccount::slotCSDisconnected ()
}
-void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass)
+void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass)
{
- QString errorText;
- QString errorCondition;
+ TQString errorText;
+ TQString errorCondition;
errorClass = Kopete::Account::InvalidHost;
@@ -1046,7 +1046,7 @@ void JabberAccount::setPresence ( const XMPP::Status &status )
/*
* Unless we are in the connecting status, send a presence packet to the server
*/
- if(status.show () != QString("connecting") )
+ if(status.show () != TQString("connecting") )
{
/*
* Make sure we are actually connected before sending out a packet.
@@ -1081,7 +1081,7 @@ void JabberAccount::slotSendRaw ()
}
-void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & type)
+void JabberAccount::slotSubscription (const XMPP::Jid & jid, const TQString & type)
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << jid.full () << ", " << type << endl;
@@ -1103,9 +1103,9 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ
hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ;
Kopete::UI::ContactAddedNotifyDialog *dialog=
- new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,QString::null,this, hideFlags );
- QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),
- this,SLOT(slotContactAddedNotifyDialogClosed(const QString& )));
+ new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,TQString::null,this, hideFlags );
+ TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),
+ this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& )));
dialog->show();
}
else if (type == "unsubscribed")
@@ -1150,7 +1150,7 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ
}
}
-void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contactid )
+void JabberAccount::slotContactAddedNotifyDialogClosed( const TQString & contactid )
{ // the dialog that asked the authorisation is closed. (it was shown in slotSubscrition)
XMPP::JT_Presence *task;
@@ -1187,7 +1187,7 @@ void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contacti
Kopete::MetaContact *parentContact=dialog->addContact();
if(parentContact)
{
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -1270,10 +1270,10 @@ void JabberAccount::slotContactUpdated (const XMPP::RosterItem & item)
* so add a new metacontact to the list.
*/
metaContact = new Kopete::MetaContact ();
- QStringList groups = item.groups ();
+ TQStringList groups = item.groups ();
// add this metacontact to all groups the contact is a member of
- for (QStringList::Iterator it = groups.begin (); it != groups.end (); ++it)
+ for (TQStringList::Iterator it = groups.begin (); it != groups.end (); ++it)
metaContact->addToGroup (Kopete::ContactList::self ()->findGroup (*it));
// put it onto contact list
@@ -1503,7 +1503,7 @@ void JabberAccount::slotGroupChatPresence (const XMPP::Jid & jid, const XMPP::St
}
-void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const QString &reason)
+void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const TQString &reason)
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Group chat error - room " << jid.full () << " had error " << error << " (" << reason << ")" << endl;
@@ -1511,7 +1511,7 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
{
case JabberClient::InvalidPasswordForMUC:
{
- QCString password;
+ TQCString password;
int result = KPasswordDialog::getPassword(password, i18n("A password is required to join the room %1.").arg(jid.node()));
if (result == KPasswordDialog::Accepted)
m_jabberClient->joinGroupChat(jid.domain(), jid.node(), jid.resource(), password);
@@ -1521,9 +1521,9 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
case JabberClient::NicknameConflict:
{
bool ok;
- QString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()),
+ TQString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()),
i18n("Give your nickname"),
- QString(),
+ TQString(),
&ok);
if (ok)
{
@@ -1548,11 +1548,11 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
default:
{
- QString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason;
+ TQString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason;
KMessageBox::queuedMessageBox ( Kopete::UI::Global::mainWidget (),
KMessageBox::Error,
- i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, QString::number ( error ) ),
+ i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, TQString::number ( error ) ),
i18n ("Jabber Group Chat") );
}
}
@@ -1581,7 +1581,7 @@ void JabberAccount::slotEditVCard ()
static_cast<JabberContact *>( myself() )->slotUserInfo ();
}
-void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVariant &value)
+void JabberAccount::slotGlobalIdentityChanged (const TQString &key, const TQVariant &value)
{
// Check if this account is excluded from Global Identity.
if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) )
@@ -1589,8 +1589,8 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian
JabberContact *jabberMyself = static_cast<JabberContact *>( myself() );
if( key == Kopete::Global::Properties::self()->nickName().key() )
{
- QString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString();
- QString newNick = value.toString();
+ TQString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString();
+ TQString newNick = value.toString();
if( newNick != oldNick && isConnected() )
{
@@ -1609,14 +1609,14 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian
}
}
-const QString JabberAccount::resource () const
+const TQString JabberAccount::resource () const
{
return configGroup()->readEntry ( "Resource", "Kopete" );
}
-const QString JabberAccount::server () const
+const TQString JabberAccount::server () const
{
return configGroup()->readEntry ( "Server" );
@@ -1653,13 +1653,13 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid )
#endif
}
-// void JabberAccount::slotIncomingJingleSession( const QString &sessionType, JingleSession *session )
+// void JabberAccount::slotIncomingJingleSession( const TQString &sessionType, JingleSession *session )
// {
// #ifdef SUPPORT_JINGLE
// if(sessionType == "http://www.google.com/session/phone")
// {
-// QString from = ((XMPP::Jid)session->peers().first()).full();
-// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, QString("Received a voice session invitation from %1.").arg(from) );
+// TQString from = ((XMPP::Jid)session->peers().first()).full();
+// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, TQString("Received a voice session invitation from %1.").arg(from) );
// JingleVoiceSessionDialog *voiceDialog = new JingleVoiceSessionDialog( static_cast<JingleVoiceSession*>(session) );
// voiceDialog->show();
// }
@@ -1670,12 +1670,12 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid )
// }
-void JabberAccount::addTransport( JabberTransport * tr, const QString &jid )
+void JabberAccount::addTransport( JabberTransport * tr, const TQString &jid )
{
m_transports.insert(jid,tr);
}
-void JabberAccount::removeTransport( const QString &jid )
+void JabberAccount::removeTransport( const TQString &jid )
{
m_transports.remove(jid);
}
@@ -1691,7 +1691,7 @@ bool JabberAccount::removeAccount( )
i18n("Unregister"),
KGuiItem(i18n( "Remove and Unregister" ), "editdelete"),
KGuiItem(i18n( "Remove from kopete only"), "edittrash"),
- QString(), KMessageBox::Notify | KMessageBox::Dangerous );
+ TQString(), KMessageBox::Notify | KMessageBox::Dangerous );
if(result == KMessageBox::Cancel)
{
return false;
@@ -1705,21 +1705,21 @@ bool JabberAccount::removeAccount( )
}
XMPP::JT_Register *task = new XMPP::JT_Register ( client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotUnregisterFinished ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotUnregisterFinished ) );
task->unreg ();
task->go ( true );
m_removing=true;
// from my experiment, not all server reply us with a response. it simply dosconnect
// so after one seconde, we will force to remove the account
- QTimer::singleShot(1111, this, SLOT(slotUnregisterFinished()));
+ TQTimer::singleShot(1111, this, TQT_SLOT(slotUnregisterFinished()));
return false; //the account will be removed when the task will be finished
}
}
//remove transports from config file.
- QMap<QString,JabberTransport*> tranposrts_copy=m_transports;
- QMap<QString,JabberTransport*>::Iterator it;
+ TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports;
+ TQMap<TQString,JabberTransport*>::Iterator it;
for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it )
{
(*it)->jabberAccountRemoved();
diff --git a/kopete/protocols/jabber/jabberaccount.h b/kopete/protocols/jabber/jabberaccount.h
index 3731b590..a2781006 100644
--- a/kopete/protocols/jabber/jabberaccount.h
+++ b/kopete/protocols/jabber/jabberaccount.h
@@ -59,15 +59,15 @@ class JabberAccount : public Kopete::PasswordedAccount
Q_OBJECT
public:
- JabberAccount (JabberProtocol * parent, const QString & accountID, const char *name = 0L);
+ JabberAccount (JabberProtocol * parent, const TQString & accountID, const char *name = 0L);
~JabberAccount ();
/* Returns the action menu for this account. */
virtual KActionMenu *actionMenu ();
/* Return the resource of the client */
- const QString resource () const;
- const QString server () const;
+ const TQString resource () const;
+ const TQString server () const;
const int port () const;
JabberResourcePool *resourcePool ();
@@ -124,9 +124,9 @@ public:
/*
* Handle stream errors. Displays a dialog and returns.
*/
- static void handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass);
+ static void handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass);
- const QMap<QString, JabberTransport *> &transports()
+ const TQMap<TQString, JabberTransport *> &transports()
{ return m_transports; }
@@ -137,7 +137,7 @@ public:
public slots:
/* Connects to the server. */
- void connectWithPassword ( const QString &password );
+ void connectWithPassword ( const TQString &password );
/* Disconnects from the server. */
void disconnect ();
@@ -148,10 +148,10 @@ public slots:
/* Disconnect with a reason, and status */
void disconnect( Kopete::Account::DisconnectReason reason, XMPP::Status &status );
/* 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);
- void addTransport( JabberTransport *tr , const QString &jid);
- void removeTransport( const QString &jid );
+ void addTransport( JabberTransport *tr , const TQString &jid);
+ void removeTransport( const TQString &jid );
protected:
@@ -172,7 +172,7 @@ protected:
* @param contactId The unique ID for this protocol
* @param parentContact The metacontact to add this contact to
*/
- virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact);
+ virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact);
@@ -211,7 +211,7 @@ private:
*/
bool isConnecting ();
- QMap<QString, JabberTransport *>m_transports;
+ TQMap<TQString, JabberTransport *>m_transports;
/* used in removeAccount() */
bool m_removing;
@@ -247,7 +247,7 @@ private slots:
void slotIncomingFileTransfer ();
/* Called from Psi: debug messages from the backend. */
- void slotClientDebugMessage (const QString &msg);
+ void slotClientDebugMessage (const TQString &msg);
/* Sends a raw message to the server (use with caution) */
void slotSendRaw ();
@@ -257,13 +257,13 @@ private slots:
void slotGroupChatJoined ( const XMPP::Jid &jid );
void slotGroupChatLeft ( const XMPP::Jid &jid );
void slotGroupChatPresence ( const XMPP::Jid &jid, const XMPP::Status &status );
- void slotGroupChatError ( const XMPP::Jid &jid, int error, const QString &reason );
+ void slotGroupChatError ( const XMPP::Jid &jid, int error, const TQString &reason );
/* Incoming subscription request. */
- void slotSubscription ( const XMPP::Jid &jid, const QString &type );
+ void slotSubscription ( const XMPP::Jid &jid, const TQString &type );
/* the dialog that asked to add the contact was closed (that dialog is shown in slotSubscription) */
- void slotContactAddedNotifyDialogClosed(const QString& contactid);
+ void slotContactAddedNotifyDialogClosed(const TQString& contactid);
/**
* A new item appeared in our roster, synch it with the
@@ -295,7 +295,7 @@ private slots:
void slotGetServices ();
/* Update the myself information if the global identity changes. */
- void slotGlobalIdentityChanged( const QString &key, const QVariant &value );
+ void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value );
/* we received a voice invitation */
void slotIncomingVoiceCall(const Jid&);
@@ -303,7 +303,7 @@ private slots:
/* the unregister task finished */
void slotUnregisterFinished();
- //void slotIncomingJingleSession(const QString &sessionType, JingleSession *session);
+ //void slotIncomingJingleSession(const TQString &sessionType, JingleSession *session);
};
#endif
diff --git a/kopete/protocols/jabber/jabberbasecontact.cpp b/kopete/protocols/jabber/jabberbasecontact.cpp
index 56cc1de4..cffc65f9 100644
--- a/kopete/protocols/jabber/jabberbasecontact.cpp
+++ b/kopete/protocols/jabber/jabberbasecontact.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
@@ -48,7 +48,7 @@
/**
* JabberBaseContact constructor
*/
-JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId)
+JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId)
: Kopete::Contact (account, legacyId.isEmpty() ? rosterItem.jid().full() : legacyId , mc )
{
setDontSync ( false );
@@ -112,8 +112,8 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
// only update the alias if its not empty
if ( !item.name().isEmpty () && item.name() != item.jid().bare() )
{
- QString newName = item.name ();
- QString oldName = metaContact()->displayName();
+ TQString newName = item.name ();
+ TQString oldName = metaContact()->displayName();
Kopete::Contact *source=metaContact()->displayNameSourceContact();
// kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "setting display name of " << contactId () << " to " << newName << endl;
metaContact()->setDisplayName ( newName );
@@ -217,7 +217,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
setDontSync ( false );
//can't do it now because it's called from contructor at a point some virtual function are not available
- QTimer::singleShot(0, this, SLOT(reevaluateStatus()));
+ TQTimer::singleShot(0, this, TQT_SLOT(reevaluateStatus()));
}
@@ -239,50 +239,50 @@ void JabberBaseContact::updateResourceList ()
return;
}
- QString resourceListStr = "<table cellspacing=\"0\">";
+ TQString resourceListStr = "<table cellspacing=\"0\">";
for ( JabberResourcePool::ResourceList::iterator it = resourceList.begin (); it != resourceList.end (); ++it )
{
// icon, resource name and priority
- resourceListStr += QString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
arg ( protocol()->resourceToKOS((*it)->resource()).mimeSourceFor ( account () ),
- (*it)->resource().name (), QString::number ( (*it)->resource().priority () ) );
+ (*it)->resource().name (), TQString::number ( (*it)->resource().priority () ) );
// client name, version, OS
if ( !(*it)->clientName().isEmpty () )
{
- resourceListStr += QString ( "<tr><td>%1: %2 (%3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2 (%3)</td></tr>" ).
arg ( i18n ( "Client" ), (*it)->clientName (), (*it)->clientSystem () );
}
// Supported features
#if 0 //disabled because it's just an ugly and long list of incomprehensible namespaces to the user
- QStringList supportedFeatures = (*it)->features().list();
- QStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd();
+ TQStringList supportedFeatures = (*it)->features().list();
+ TQStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd();
if( !supportedFeatures.empty() )
- resourceListStr += QString( "<tr><td>Supported Features:" );
+ resourceListStr += TQString( "<tr><td>Supported Features:" );
for( featuresIt = supportedFeatures.constBegin(); featuresIt != featuresItEnd; ++featuresIt )
{
XMPP::Features tempFeature(*featuresIt);
- resourceListStr += QString("\n<br>");
+ resourceListStr += TQString("\n<br>");
if ( tempFeature.id() > XMPP::Features::FID_None )
- resourceListStr += tempFeature.name() + QString(" (");
+ resourceListStr += tempFeature.name() + TQString(" (");
resourceListStr += *featuresIt;
if ( tempFeature.id() > Features::FID_None )
- resourceListStr += QString(")");
+ resourceListStr += TQString(")");
}
if( !supportedFeatures.empty() )
- resourceListStr += QString( "</td></tr>" );
+ resourceListStr += TQString( "</td></tr>" );
#endif
// resource timestamp
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
arg ( i18n ( "Timestamp" ), KGlobal::locale()->formatDateTime ( (*it)->resource().status().timeStamp(), true, true ) );
// message, if any
if ( !(*it)->resource().status().status().stripWhiteSpace().isEmpty () )
{
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
arg (
i18n ( "Message" ),
Kopete::Message::escape( (*it)->resource().status().status () )
@@ -313,7 +313,7 @@ void JabberBaseContact::reevaluateStatus ()
status.weight() ,
protocol() ,
status.internalStatus() | 0x0100,
- status.overlayIcons() + QStringList("status_unknown_overlay") , //FIXME: find better icon
+ status.overlayIcons() + TQStringList("status_unknown_overlay") , //FIXME: find better icon
status.description() );
}
@@ -338,7 +338,7 @@ void JabberBaseContact::reevaluateStatus ()
}
-QString JabberBaseContact::fullAddress ()
+TQString JabberBaseContact::fullAddress ()
{
XMPP::Jid jid = rosterItem().jid();
@@ -384,13 +384,13 @@ bool JabberBaseContact::dontSync ()
}
-void JabberBaseContact::serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > & /* addressBookData */ )
+void JabberBaseContact::serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > & /* addressBookData */ )
{
// Contact id and display name are already set for us, only add the rest
serializedData["JID"] = mRosterItem.jid().full();
- serializedData["groups"] = mRosterItem.groups ().join (QString::fromLatin1 (","));
+ serializedData["groups"] = mRosterItem.groups ().join (TQString::fromLatin1 (","));
}
void JabberBaseContact::slotUserInfo( )
@@ -414,7 +414,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
// update vCard cache timestamp if this is not a temporary contact
if ( metaContact() && !metaContact()->isTemporary () )
{
- setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) );
+ setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) );
}
@@ -449,8 +449,8 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
if ( !vCard.fullName().isEmpty () && vCard.givenName().isEmpty () && vCard.familyName().isEmpty () )
{
- QString lastName = vCard.fullName().section ( ' ', 0, -1 );
- QString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace ();
+ TQString lastName = vCard.fullName().section ( ' ', 0, -1 );
+ TQString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace ();
setProperty ( protocol()->propFirstName, firstName );
setProperty ( protocol()->propLastName, lastName );
@@ -628,22 +628,22 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
*/
removeProperty( protocol()->propPhoto );
- QImage contactPhoto;
- QString fullJid = mRosterItem.jid().full();
- QString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(QRegExp("[./~]"),"-") +".png");
+ TQImage contactPhoto;
+ TQString fullJid = mRosterItem.jid().full();
+ TQString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(TQRegExp("[./~]"),"-") +".png");
// photo() is a QByteArray
if ( !vCard.photo().isEmpty() )
{
kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact has a photo embedded into his vCard." << endl;
- // QImage is used to save to disk in PNG later.
- contactPhoto = QImage( vCard.photo() );
+ // TQImage is used to save to disk in PNG later.
+ contactPhoto = TQImage( vCard.photo() );
}
// Contact photo is a URI.
else if( !vCard.photoURI().isEmpty() )
{
- QString tempPhotoPath = 0;
+ TQString tempPhotoPath = 0;
// Downalod photo from URI.
if( !KIO::NetAccess::download( vCard.photoURI(), tempPhotoPath, 0) )
@@ -654,7 +654,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact photo is a URI." << endl;
- contactPhoto = QImage( tempPhotoPath );
+ contactPhoto = TQImage( tempPhotoPath );
KIO::NetAccess::removeTempFile( tempPhotoPath );
}
diff --git a/kopete/protocols/jabber/jabberbasecontact.h b/kopete/protocols/jabber/jabberbasecontact.h
index 7ba5c3fb..ef9b7416 100644
--- a/kopete/protocols/jabber/jabberbasecontact.h
+++ b/kopete/protocols/jabber/jabberbasecontact.h
@@ -44,7 +44,7 @@ public:
*/
JabberBaseContact (const XMPP::RosterItem &rosterItem,
Kopete::Account *account, Kopete::MetaContact * mc,
- const QString &legacyId=QString());
+ const TQString &legacyId=TQString());
/********************************************************************
*
@@ -77,12 +77,12 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- virtual QPtrList<KAction> *customContextMenuActions () = 0;
+ virtual TQPtrList<KAction> *customContextMenuActions () = 0;
/**
* Serialize contact
*/
- virtual void serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > &addressBookData);
+ virtual void serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > &addressBookData);
/**
* Update contact if a roster item has been
@@ -106,7 +106,7 @@ public:
* Uses bestResource() if no presubscribed
* address exists.
*/
- QString fullAddress ();
+ TQString fullAddress ();
/**
* Set the dontSync flag for this contact.
diff --git a/kopete/protocols/jabber/jabberbookmarks.cpp b/kopete/protocols/jabber/jabberbookmarks.cpp
index 720705b2..661f0974 100644
--- a/kopete/protocols/jabber/jabberbookmarks.cpp
+++ b/kopete/protocols/jabber/jabberbookmarks.cpp
@@ -26,9 +26,9 @@
#include "xmpp_tasks.h"
-JabberBookmarks::JabberBookmarks(JabberAccount *parent) : QObject(parent) , m_account(parent)
+JabberBookmarks::JabberBookmarks(JabberAccount *parent) : TQObject(parent) , m_account(parent)
{
- connect( m_account , SIGNAL( isConnectedChanged() ) , this , SLOT( accountConnected() ) );
+ connect( m_account , TQT_SIGNAL( isConnectedChanged() ) , this , TQT_SLOT( accountConnected() ) );
}
void JabberBookmarks::accountConnected()
@@ -38,34 +38,34 @@ void JabberBookmarks::accountConnected()
XMPP::JT_PrivateStorage * task = new XMPP::JT_PrivateStorage ( m_account->client()->rootTask ());
task->get( "storage" , "storage:bookmarks" );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotReceivedBookmarks() ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotReceivedBookmarks() ) );
task->go ( true );
}
void JabberBookmarks::slotReceivedBookmarks( )
{
XMPP::JT_PrivateStorage * task = (XMPP::JT_PrivateStorage*)(sender());
- m_storage=QDomDocument("storage");
+ m_storage=TQDomDocument("storage");
m_conferencesJID.clear();
if(task->success())
{
- QDomElement storage_e=task->element();
+ TQDomElement storage_e=task->element();
if(!storage_e.isNull() && storage_e.tagName() == "storage")
{
storage_e=m_storage.importNode(storage_e,true).toElement();
m_storage.appendChild(storage_e);
- for(QDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement i = n.toElement();
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "conference")
{
- QString jid=i.attribute("jid");
- QString password;
- for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ TQString jid=i.attribute("jid");
+ TQString password;
+ for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if(e.isNull())
continue;
else if(e.tagName() == "nick")
@@ -78,7 +78,7 @@ void JabberBookmarks::slotReceivedBookmarks( )
if(i.attribute("autojoin") == "true")
{
XMPP::Jid x_jid(jid);
- QString nick=x_jid.resource();
+ TQString nick=x_jid.resource();
if(nick.isEmpty())
nick=m_account->myself()->nickName();
@@ -101,7 +101,7 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
return;
}
- QDomElement storage_e=m_storage.documentElement();
+ TQDomElement storage_e=m_storage.documentElement();
if(storage_e.isNull())
{
storage_e=m_storage.createElement("storage");
@@ -109,13 +109,13 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
storage_e.setAttribute("xmlns","storage:bookmarks");
}
- QDomElement conference=m_storage.createElement("conference");
+ TQDomElement conference=m_storage.createElement("conference");
storage_e.appendChild(conference);
conference.setAttribute("jid",jid.userHost());
- QDomElement nick=m_storage.createElement("nick");
+ TQDomElement nick=m_storage.createElement("nick");
conference.appendChild(nick);
nick.appendChild(m_storage.createTextNode(jid.resource()));
- QDomElement name=m_storage.createElement("name");
+ TQDomElement name=m_storage.createElement("name");
conference.appendChild(name);
name.appendChild(m_storage.createTextNode(jid.full()));
@@ -127,15 +127,15 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
m_conferencesJID += jid.full();
}
-KAction * JabberBookmarks::bookmarksAction(QObject *parent)
+KAction * JabberBookmarks::bookmarksAction(TQObject *parent)
{
KSelectAction *groupchatBM = new KSelectAction( i18n("Groupchat bookmark") , "jabber_group" , 0 , parent , "actionBookMark" );
groupchatBM->setItems(m_conferencesJID);
- QObject::connect(groupchatBM, SIGNAL(activated (const QString&)) , this, SLOT(slotJoinChatBookmark(const QString&)));
+ TQObject::connect(groupchatBM, TQT_SIGNAL(activated (const TQString&)) , this, TQT_SLOT(slotJoinChatBookmark(const TQString&)));
return groupchatBM;
}
-void JabberBookmarks::slotJoinChatBookmark( const QString & _jid )
+void JabberBookmarks::slotJoinChatBookmark( const TQString & _jid )
{
if(!m_account->isConnected())
return;
diff --git a/kopete/protocols/jabber/jabberbookmarks.h b/kopete/protocols/jabber/jabberbookmarks.h
index 826d15e2..31675b50 100644
--- a/kopete/protocols/jabber/jabberbookmarks.h
+++ b/kopete/protocols/jabber/jabberbookmarks.h
@@ -18,9 +18,9 @@
#ifndef JABBERBOOKMARKS_H
#define JABBERBOOKMARKS_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
namespace XMPP { class Jid; }
class JabberAccount;
@@ -52,17 +52,17 @@ class JabberBookmarks : public QObject
/**
* return an action that will be added in the jabber popup menu
*/
- KAction *bookmarksAction(QObject * parent);
+ KAction *bookmarksAction(TQObject * parent);
private slots:
void accountConnected();
void slotReceivedBookmarks();
- void slotJoinChatBookmark(const QString&);
+ void slotJoinChatBookmark(const TQString&);
private:
JabberAccount *m_account;
- QDomDocument m_storage;
- QStringList m_conferencesJID;
+ TQDomDocument m_storage;
+ TQStringList m_conferencesJID;
};
#endif
diff --git a/kopete/protocols/jabber/jabberbytestream.cpp b/kopete/protocols/jabber/jabberbytestream.cpp
index 2f0f5c80..1021757d 100644
--- a/kopete/protocols/jabber/jabberbytestream.cpp
+++ b/kopete/protocols/jabber/jabberbytestream.cpp
@@ -17,14 +17,14 @@
* *
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#include "jabberbytestream.h"
#include <kbufferedsocket.h>
#include <kresolver.h>
#include "jabberprotocol.h"
-JabberByteStream::JabberByteStream ( QObject *parent, const char */*name*/ )
+JabberByteStream::JabberByteStream ( TQObject *parent, const char */*name*/ )
: ByteStream ( parent )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Instantiating new Jabber byte stream." << endl;
@@ -38,15 +38,15 @@ JabberByteStream::JabberByteStream ( 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 JabberByteStream::connect ( QString host, QString service )
+bool JabberByteStream::connect ( TQString host, TQString service )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl;
@@ -78,7 +78,7 @@ int JabberByteStream::tryWrite ()
{
// send all data from the buffers to the socket
- QByteArray writeData = takeWrite();
+ TQByteArray writeData = takeWrite();
socket()->writeBlock ( writeData.data (), writeData.size () );
return writeData.size ();
@@ -128,7 +128,7 @@ void JabberByteStream::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/jabber/jabberbytestream.h b/kopete/protocols/jabber/jabberbytestream.h
index 97e1ceeb..882d3007 100644
--- a/kopete/protocols/jabber/jabberbytestream.h
+++ b/kopete/protocols/jabber/jabberbytestream.h
@@ -33,11 +33,11 @@ class JabberByteStream : public ByteStream
Q_OBJECT
public:
- JabberByteStream ( QObject *parent = 0, const char *name = 0 );
+ JabberByteStream ( TQObject *parent = 0, const char *name = 0 );
~JabberByteStream ();
- bool connect ( QString host, QString service );
+ bool connect ( TQString host, TQString service );
virtual bool isOpen () const;
virtual void close ();
diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
index e570d241..9d9dd770 100644
--- a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
+++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
@@ -19,12 +19,12 @@
*/
#include "jabbercapabilitiesmanager.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qpair.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqpair.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -40,21 +40,21 @@ using namespace XMPP;
JabberCapabilitiesManager::Capabilities::Capabilities()
{}
-JabberCapabilitiesManager::Capabilities::Capabilities(const QString& node, const QString& version, const QString& extensions)
+JabberCapabilitiesManager::Capabilities::Capabilities(const TQString& node, const TQString& version, const TQString& extensions)
: m_node(node), m_version(version), m_extensions(extensions)
{}
-const QString& JabberCapabilitiesManager::Capabilities::node() const
+const TQString& JabberCapabilitiesManager::Capabilities::node() const
{
return m_node;
}
-const QString& JabberCapabilitiesManager::Capabilities::version() const
+const TQString& JabberCapabilitiesManager::Capabilities::version() const
{
return m_version;
}
-const QString& JabberCapabilitiesManager::Capabilities::extensions() const
+const TQString& JabberCapabilitiesManager::Capabilities::extensions() const
{
return m_extensions;
}
@@ -64,8 +64,8 @@ JabberCapabilitiesManager::CapabilitiesList JabberCapabilitiesManager::Capabilit
CapabilitiesList capsList;
capsList.append( Capabilities(node(), version(), version()) );
- QStringList extensionList = QStringList::split(" ",extensions());
- QStringList::ConstIterator it, itEnd = extensionList.constEnd();
+ TQStringList extensionList = TQStringList::split(" ",extensions());
+ TQStringList::ConstIterator it, itEnd = extensionList.constEnd();
for(it = extensionList.constBegin(); it != itEnd; ++it)
{
capsList.append( Capabilities(node(),version(),*it) );
@@ -99,7 +99,7 @@ JabberCapabilitiesManager::CapabilitiesInformation::CapabilitiesInformation()
updateLastSeen();
}
-const QStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const
+const TQStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const
{
return m_features;
}
@@ -109,14 +109,14 @@ const DiscoItem::Identities& JabberCapabilitiesManager::CapabilitiesInformation:
return m_identities;
}
-QStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const
+TQStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const
{
- QStringList jids;
+ TQStringList jids;
- QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
- QString jid( (*it).first );
+ TQString jid( (*it).first );
if( !jids.contains(jid) )
jids.push_back(jid);
}
@@ -143,12 +143,12 @@ void JabberCapabilitiesManager::CapabilitiesInformation::reset()
void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAccount *account)
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).second == account)
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -161,7 +161,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAcc
void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, JabberAccount* account)
{
- QPair<QString,JabberAccount*> jidAccountPair(jid.full(),account);
+ QPair<TQString,JabberAccount*> jidAccountPair(jid.full(),account);
if( !m_jids.contains(jidAccountPair) )
{
@@ -172,14 +172,14 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid,
void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid)
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << QString(jid.full()).replace('%',"%%") << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << TQString(jid.full()).replace('%',"%%") << endl;
- QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).first == jid.full() )
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -194,7 +194,7 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Looking for next JID" << endl;
- QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
if( (*it).first == jid.full() && (*it).second->client()->rootTask() == t)
@@ -233,26 +233,26 @@ void JabberCapabilitiesManager::CapabilitiesInformation::setIdentities(const Dis
m_identities = identities;
}
-void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const QStringList& featureList)
+void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const TQStringList& featureList)
{
m_features = featureList;
}
void JabberCapabilitiesManager::CapabilitiesInformation::updateLastSeen()
{
- m_lastSeen = QDate::currentDate();
+ m_lastSeen = TQDate::currentDate();
}
-QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocument *doc) const
+TQDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(TQDomDocument *doc) const
{
- QDomElement info = doc->createElement("info");
+ TQDomElement info = doc->createElement("info");
//info.setAttribute("last-seen",lastSeen_.toString(Qt::ISODate));
// Identities
DiscoItem::Identities::ConstIterator discoIt = m_identities.constBegin(), discoItEnd = m_identities.constEnd();
for( ; discoIt != discoItEnd; ++discoIt )
{
- QDomElement identity = doc->createElement("identity");
+ TQDomElement identity = doc->createElement("identity");
identity.setAttribute("category",(*discoIt).category);
identity.setAttribute("name",(*discoIt).name);
identity.setAttribute("type",(*discoIt).type);
@@ -260,10 +260,10 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume
}
// Features
- QStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd();
+ TQStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd();
for( ; featuresIt != featuresItEnd; ++featuresIt )
{
- QDomElement feature = doc->createElement("feature");
+ TQDomElement feature = doc->createElement("feature");
feature.setAttribute("node",*featuresIt);
info.appendChild(feature);
}
@@ -271,7 +271,7 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume
return info;
}
-void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomElement &element)
+void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const TQDomElement &element)
{
if( element.tagName() != "info")
{
@@ -280,11 +280,11 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme
}
//if (!e.attribute("last-seen").isEmpty())
- // lastSeen_ = QDate::fromString(e.attribute("last-seen"),Qt::ISODate);
+ // lastSeen_ = TQDate::fromString(e.attribute("last-seen"),Qt::ISODate);
- for(QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement infoElement = node.toElement();
+ TQDomElement infoElement = node.toElement();
if( infoElement.isNull() )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Null element" << endl;
@@ -321,9 +321,9 @@ public:
{}
// Map a full jid to a capabilities
- QMap<QString,Capabilities> jidCapabilitiesMap;
+ TQMap<TQString,Capabilities> jidCapabilitiesMap;
// Map a capabilities to its detail information
- QMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap;
+ TQMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap;
};
//END Private(d-ptr)
@@ -342,9 +342,9 @@ void JabberCapabilitiesManager::removeAccount(JabberAccount *account)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Removing account " << account->accountId() << endl;
- QValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values();
+ TQValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values();
- QValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end();
+ TQValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end();
for(it = info.begin(); it != info.end(); ++it)
{
(*it).removeAccount(account);
@@ -362,7 +362,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
if( jid.compare(account->client()->jid(), false) )
return;
- QString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt();
+ TQString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt();
Capabilities capabilities( node, version, extensions );
// Check if the capabilities was really updated(i.e the content is different)
@@ -400,7 +400,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
{
if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << QString("Sending disco request to %1, node=%2").arg(QString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << TQString("Sending disco request to %1, node=%2").arg(TQString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl;
d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1);
requestDiscoInfo(account, jid, node + "#" + (*newCapsIt).extensions());
@@ -410,7 +410,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
else
{
// Remove all caps specifications
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Illegal caps info from %1: node=%2, ver=%3").arg(QString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Illegal caps info from %1: node=%2, ver=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl;
d->jidCapabilitiesMap.remove( jid.full() );
}
@@ -427,13 +427,13 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
}
}
-void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node)
+void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node)
{
if( !account->client()->rootTask() )
return;
JT_DiscoInfo *discoInfo = new JT_DiscoInfo(account->client()->rootTask());
- connect(discoInfo, SIGNAL(finished()), SLOT(discoRequestFinished()));
+ connect(discoInfo, TQT_SIGNAL(finished()), TQT_SLOT(discoRequestFinished()));
discoInfo->get(jid, node);
//pending_++;
//timer_.start(REQUEST_TIMEOUT,true);
@@ -448,14 +448,14 @@ void JabberCapabilitiesManager::discoRequestFinished()
DiscoItem item = discoInfo->item();
Jid jid = discoInfo->jid();
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Disco response from %1, node=%2, success=%3").arg(QString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Disco response from %1, node=%2, success=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl;
- QStringList tokens = QStringList::split("#",discoInfo->node());
+ TQStringList tokens = TQStringList::split("#",discoInfo->node());
// Update features
Q_ASSERT(tokens.count() == 2);
- QString node = tokens[0];
- QString extensions = tokens[1];
+ TQString node = tokens[0];
+ TQString extensions = tokens[1];
Capabilities jidCapabilities = d->jidCapabilitiesMap[jid.full()];
if( jidCapabilities.node() == node )
@@ -474,8 +474,8 @@ void JabberCapabilitiesManager::discoRequestFinished()
saveInformation();
// Notify affected jids.
- QStringList jids = d->capabilitiesInformationMap[capabilities].jids();
- QStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd();
+ TQStringList jids = d->capabilitiesInformationMap[capabilities].jids();
+ TQStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd();
for( ; jidsIt != jidsItEnd; ++jidsItEnd )
{
emit capabilitiesChanged(*jidsIt);
@@ -486,7 +486,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent());
if( jidAccountPair.second )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Falling back on %1.").arg(QString(jidAccountPair.first.full()).replace('%',"%%")) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Falling back on %1.").arg(TQString(jidAccountPair.first.full()).replace('%',"%%")) << endl;
requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() );
}
else
@@ -497,7 +497,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
}
}
else
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl;
//for (unsigned int i = 0; i < item.features().list().count(); i++)
// printf(" Feature: %s\n",item.features().list()[i].latin1());
@@ -512,12 +512,12 @@ void JabberCapabilitiesManager::discoRequestFinished()
void JabberCapabilitiesManager::loadCachedInformation()
{
- QString capsFileName;
- capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml"));
+ TQString capsFileName;
+ capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml"));
// Load settings
- QDomDocument doc;
- QFile cacheFile(capsFileName);
+ TQDomDocument doc;
+ TQFile cacheFile(capsFileName);
if( !cacheFile.open(IO_ReadOnly) )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Could not open the Capabilities cache from disk." << endl;
@@ -530,17 +530,17 @@ void JabberCapabilitiesManager::loadCachedInformation()
}
cacheFile.close();
- QDomElement caps = doc.documentElement();
+ TQDomElement caps = doc.documentElement();
if( caps.tagName() != "capabilities" )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Invalid capabilities element." << endl;
return;
}
- QDomNode node;
+ TQDomNode node;
for(node = caps.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( element.isNull() )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Found a null element." << endl;
@@ -568,7 +568,7 @@ bool JabberCapabilitiesManager::capabilitiesEnabled(const Jid &jid) const
XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const
{
- QStringList featuresList;
+ TQStringList featuresList;
if( capabilitiesEnabled(jid) )
{
@@ -583,12 +583,12 @@ XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const
return Features(featuresList);
}
-QString JabberCapabilitiesManager::clientName(const Jid& jid) const
+TQString JabberCapabilitiesManager::clientName(const Jid& jid) const
{
if( capabilitiesEnabled(jid) )
{
Capabilities caps = d->jidCapabilitiesMap[jid.full()];
- QString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name;
+ TQString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name;
// Try to be intelligent about the name
/*if (name.isEmpty()) {
@@ -609,28 +609,28 @@ QString JabberCapabilitiesManager::clientName(const Jid& jid) const
}
else
{
- return QString();
+ return TQString();
}
}
-QString JabberCapabilitiesManager::clientVersion(const Jid& jid) const
+TQString JabberCapabilitiesManager::clientVersion(const Jid& jid) const
{
- return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : QString());
+ return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : TQString());
}
void JabberCapabilitiesManager::saveInformation()
{
- QString capsFileName;
- capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml"));
+ TQString capsFileName;
+ capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml"));
// Generate XML
- QDomDocument doc;
- QDomElement capabilities = doc.createElement("capabilities");
+ TQDomDocument doc;
+ TQDomElement capabilities = doc.createElement("capabilities");
doc.appendChild(capabilities);
- QMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd();
+ TQMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd();
for( ; it != itEnd; ++it )
{
- QDomElement info = it.data().toXml(&doc);
+ TQDomElement info = it.data().toXml(&doc);
info.setAttribute("node",it.key().node());
info.setAttribute("ver",it.key().version());
info.setAttribute("ext",it.key().extensions());
@@ -638,16 +638,16 @@ void JabberCapabilitiesManager::saveInformation()
}
// Save
- QFile capsFile(capsFileName);
+ TQFile capsFile(capsFileName);
if( !capsFile.open(IO_WriteOnly) )
{
kdDebug(JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Error while opening Capabilities cache file." << endl;
return;
}
- QTextStream textStream;
+ TQTextStream textStream;
textStream.setDevice(&capsFile);
- textStream.setEncoding(QTextStream::UnicodeUTF8);
+ textStream.setEncoding(TQTextStream::UnicodeUTF8);
textStream << doc.toString();
textStream.unsetDevice();
capsFile.close();
diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.h b/kopete/protocols/jabber/jabbercapabilitiesmanager.h
index 3010479f..a783188f 100644
--- a/kopete/protocols/jabber/jabbercapabilitiesmanager.h
+++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.h
@@ -20,7 +20,7 @@
#ifndef JABBERCAPABILITIESMANAGER_H
#define JABBERCAPABILITIESMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
#include <xmpp.h>
@@ -67,11 +67,11 @@ public:
/**
* Return the client name for the current JID.
*/
- QString clientName(const Jid& jid) const;
+ TQString clientName(const Jid& jid) const;
/**
* Return the client version for the current JID.
*/
- QString clientVersion(const Jid& jid) const;
+ TQString clientVersion(const Jid& jid) const;
signals:
void capabilitiesChanged(const XMPP::Jid &jid);
@@ -107,7 +107,7 @@ private:
* @param jid The target entity's JID
* @param node The target disco#info node
*/
- void requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node);
+ void requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node);
/**
* Save capabilities information to disk.
@@ -115,7 +115,7 @@ private:
void saveInformation();
class Capabilities;
- typedef QValueList<Capabilities> CapabilitiesList;
+ typedef TQValueList<Capabilities> CapabilitiesList;
/**
* @brief A class representing an entity capability specification.
* An entity capability is a combination of a node, a version, and a set of
@@ -134,19 +134,19 @@ private:
* @param version the version
* @param extensions the list of extensions (separated by spaces)
*/
- Capabilities(const QString &node, const QString &version, const QString &extensions);
+ Capabilities(const TQString &node, const TQString &version, const TQString &extensions);
/**
* Returns the node of the capabilities specification.
*/
- const QString& node() const;
+ const TQString& node() const;
/**
* @brief Returns the version of the capabilities specification.
*/
- const QString& version() const;
+ const TQString& version() const;
/**
* @brief Returns the extensions of the capabilities specification.
*/
- const QString& extensions() const;
+ const TQString& extensions() const;
/**
* \brief Flattens the caps specification into the set of 'simple' specifications.
* A 'simple' specification is a specification with exactly one extension,
@@ -165,16 +165,16 @@ private:
bool operator<(const Capabilities&) const;
private:
- QString m_node, m_version, m_extensions;
+ TQString m_node, m_version, m_extensions;
};
class CapabilitiesInformation
{
public:
CapabilitiesInformation();
- const QStringList& features() const;
+ const TQStringList& features() const;
const DiscoItem::Identities& identities() const;
- QStringList jids() const;
+ TQStringList jids() const;
bool discovered() const;
int pendingRequests() const;
@@ -187,10 +187,10 @@ private:
void setDiscovered(bool);
void setPendingRequests(int);
void setIdentities(const DiscoItem::Identities&);
- void setFeatures(const QStringList&);
+ void setFeatures(const TQStringList&);
- QDomElement toXml(QDomDocument *) const;
- void fromXml(const QDomElement&);
+ TQDomElement toXml(TQDomDocument *) const;
+ void fromXml(const TQDomElement&);
protected:
void updateLastSeen();
@@ -198,10 +198,10 @@ private:
private:
bool m_discovered;
int m_pendingRequests;
- QStringList m_features;
+ TQStringList m_features;
DiscoItem::Identities m_identities;
- QValueList<QPair<QString,JabberAccount*> > m_jids;
- QDate m_lastSeen;
+ TQValueList<QPair<TQString,JabberAccount*> > m_jids;
+ TQDate m_lastSeen;
};
class Private;
diff --git a/kopete/protocols/jabber/jabberchatsession.cpp b/kopete/protocols/jabber/jabberchatsession.cpp
index faa6f950..e07582f7 100644
--- a/kopete/protocols/jabber/jabberchatsession.cpp
+++ b/kopete/protocols/jabber/jabberchatsession.cpp
@@ -17,12 +17,12 @@
#include "jabberchatsession.h"
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qiconset.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqiconset.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -41,7 +41,7 @@
JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user,
- Kopete::ContactPtrList others, const QString &resource, const char *name )
+ Kopete::ContactPtrList others, const TQString &resource, const char *name )
: Kopete::ChatSession ( user, others, protocol, name )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New message manager for " << user->contactId () << endl;
@@ -49,12 +49,12 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
- connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
- this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
+ connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
+ this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
- connect ( this, SIGNAL ( myselfTyping ( bool ) ), this, SLOT ( slotSendTypingNotification ( bool ) ) );
+ connect ( this, TQT_SIGNAL ( myselfTyping ( bool ) ), this, TQT_SLOT ( slotSendTypingNotification ( bool ) ) );
- connect ( this, SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, SLOT ( slotUpdateDisplayName () ) );
+ connect ( this, TQT_SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, TQT_SLOT ( slotUpdateDisplayName () ) );
// check if the user ID contains a hardwired resource,
// we'll have to use that one in that case
@@ -64,7 +64,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
slotUpdateDisplayName ();
#ifdef SUPPORT_JINGLE
- KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" );
+ KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), TQT_SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" );
setInstance(protocol->instance());
jabber_voicecall->setEnabled( false );
@@ -84,7 +84,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
#endif
- new KAction( i18n( "Send File" ), "attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" );
+ new KAction( i18n( "Send File" ), "attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" );
setXMLFile("jabberchatui.rc");
@@ -116,7 +116,7 @@ void JabberChatSession::slotUpdateDisplayName ()
if ( !mResource.isEmpty () )
jid.setResource ( mResource );
- QString statusText = i18n("a contact's online status in parenthesis.", " (%1)")
+ TQString statusText = i18n("a contact's online status in parenthesis.", " (%1)")
.arg( chatMembers.first()->onlineStatus().description() );
if ( jid.resource().isEmpty () )
setDisplayName ( chatMembers.first()->metaContact()->displayName () + statusText );
@@ -139,14 +139,14 @@ JabberAccount *JabberChatSession::account () const
}
-const QString &JabberChatSession::resource () const
+const TQString &JabberChatSession::resource () const
{
return mResource;
}
-void JabberChatSession::appendMessage ( Kopete::Message &msg, const QString &fromResource )
+void JabberChatSession::appendMessage ( Kopete::Message &msg, const TQString &fromResource )
{
mResource = fromResource;
@@ -178,7 +178,7 @@ void JabberChatSession::sendNotification( XMPP::MsgEvent event )
return;
JabberContact *contact;
- QPtrListIterator<Kopete::Contact> listIterator ( members () );
+ TQPtrListIterator<Kopete::Contact> listIterator ( members () );
while ( ( contact = dynamic_cast<JabberContact*>( listIterator.current () ) ) != 0 )
{
@@ -224,7 +224,7 @@ void JabberChatSession::slotSendTypingNotification ( bool typing )
// create JID for us as sender
XMPP::Jid fromJid = static_cast<const JabberBaseContact*>(myself())->rosterItem().jid();
- fromJid.setResource ( account()->configGroup()->readEntry( "Resource", QString::null ) );
+ fromJid.setResource ( account()->configGroup()->readEntry( "Resource", TQString::null ) );
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Sending out typing notification (" << typing << ") to all chat members." << endl;
@@ -265,10 +265,10 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
// please don't translate the following string
jabberMessage.setBody ( i18n ( "This message is encrypted." ) );
- QString encryptedBody = message.plainBody ();
+ TQString encryptedBody = message.plainBody ();
// remove PGP header and footer from message
- encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 );
+ encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 );
encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 );
// assign payload to message
@@ -283,7 +283,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
JabberResource *bestResource = account()->resourcePool()->bestJabberResource(toJid);
if( bestResource && bestResource->features().canXHTML() )
{
- QString xhtmlBody = message.escapedBody();
+ TQString xhtmlBody = message.escapedBody();
// According to JEP-0071 8.9 it is only RECOMMANDED to replace \n with <br/>
// which mean that some implementation (gaim 2 beta) may still think that \n are linebreak.
@@ -347,7 +347,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
void JabberChatSession::slotSendFile()
{
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<JabberContact *>(contacts.first())->sendFile();
}
diff --git a/kopete/protocols/jabber/jabberchatsession.h b/kopete/protocols/jabber/jabberchatsession.h
index 66b4c63b..52b6197a 100644
--- a/kopete/protocols/jabber/jabberchatsession.h
+++ b/kopete/protocols/jabber/jabberchatsession.h
@@ -38,7 +38,7 @@ class JabberChatSession : public Kopete::ChatSession
public:
JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user,
- Kopete::ContactPtrList others, const QString &resource = "",
+ Kopete::ContactPtrList others, const TQString &resource = "",
const char *name = 0 );
~JabberChatSession();
@@ -59,7 +59,7 @@ public:
* @brief Return the resource this manager is currently associated with.
* @return currently associated resource
*/
- const QString &resource () const;
+ const TQString &resource () const;
public slots:
/**
@@ -74,7 +74,7 @@ public slots:
* new message managers for messages not originating from the same resource
* a manager already exists for.
*/
- void appendMessage ( Kopete::Message &msg, const QString &fromResource );
+ void appendMessage ( Kopete::Message &msg, const TQString &fromResource );
private slots:
void slotSendTypingNotification ( bool typing );
@@ -94,7 +94,7 @@ private:
*/
void sendNotification( XMPP::MsgEvent event );
- QString mResource;
+ TQString mResource;
};
#endif
diff --git a/kopete/protocols/jabber/jabberclient.cpp b/kopete/protocols/jabber/jabberclient.cpp
index b8e05d48..41157aaa 100644
--- a/kopete/protocols/jabber/jabberclient.cpp
+++ b/kopete/protocols/jabber/jabberclient.cpp
@@ -21,8 +21,8 @@
#include "jabberclient.h"
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <qca.h>
#include <bsocket.h>
@@ -55,7 +55,7 @@ public:
// connection details
XMPP::Jid jid;
- QString password;
+ TQString password;
// XMPP backend
XMPP::Client *jabberClient;
@@ -70,12 +70,12 @@ public:
// current S5B server instance
static XMPP::S5BServer *s5bServer;
// address list being handled by the S5B server instance
- static QStringList s5bAddressList;
+ static TQStringList s5bAddressList;
// port of S5B server
static int s5bServerPort;
// local IP address
- QString localAddress;
+ TQString localAddress;
// whether TLS (or direct SSL in case of the old protocol) should be used
bool forceTLS;
@@ -91,7 +91,7 @@ public:
// override the default server name and port (only pre-XMPP 1.0)
bool overrideHost;
- QString server;
+ TQString server;
int port;
// allow transmission of plaintext passwords
@@ -104,19 +104,19 @@ public:
int currentPenaltyTime;
// client information
- QString clientName, clientVersion, osName;
+ TQString clientName, clientVersion, osName;
// timezone information
- QString timeZoneName;
+ TQString timeZoneName;
int timeZoneOffset;
// Caps(JEP-0115: Entity Capabilities) information
- QString capsNode, capsVersion;
+ TQString capsNode, capsVersion;
DiscoItem::Identity discoIdentity;
};
XMPP::S5BServer *JabberClient::Private::s5bServer = 0L;
-QStringList JabberClient::Private::s5bAddressList;
+TQStringList JabberClient::Private::s5bAddressList;
int JabberClient::Private::s5bServerPort = 8010;
JabberClient::JabberClient ()
@@ -126,7 +126,7 @@ JabberClient::JabberClient ()
cleanUp ();
// initiate penalty timer
- QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) );
+ TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) );
}
@@ -157,7 +157,7 @@ void JabberClient::cleanUp ()
d->currentPenaltyTime = 0;
d->jid = XMPP::Jid ();
- d->password = QString::null;
+ d->password = TQString::null;
setForceTLS ( false );
setUseSSL ( false );
@@ -171,9 +171,9 @@ void JabberClient::cleanUp ()
setFileTransfersEnabled ( false );
setS5BServerPort ( 8010 );
- setClientName ( QString::null );
- setClientVersion ( QString::null );
- setOSName ( QString::null );
+ setClientName ( TQString::null );
+ setClientVersion ( TQString::null );
+ setOSName ( TQString::null );
setTimeZone ( "UTC", 0 );
@@ -189,7 +189,7 @@ void JabberClient::slotUpdatePenaltyTime ()
else
d->currentPenaltyTime = 0;
- QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) );
+ TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) );
}
@@ -234,7 +234,7 @@ XMPP::S5BServer *JabberClient::s5bServer ()
if ( !d->s5bServer )
{
d->s5bServer = new XMPP::S5BServer ();
- QObject::connect ( d->s5bServer, SIGNAL ( destroyed () ), this, SLOT ( slotS5BServerGone () ) );
+ TQObject::connect ( d->s5bServer, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotS5BServerGone () ) );
/*
* Try to start the server at the default port here.
@@ -263,14 +263,14 @@ void JabberClient::slotS5BServerGone ()
}
-void JabberClient::addS5BServerAddress ( const QString &address )
+void JabberClient::addS5BServerAddress ( const TQString &address )
{
- QStringList newList;
+ TQStringList newList;
d->s5bAddressList.append ( address );
// now filter the list without dupes
- for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
+ for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
{
if ( !newList.contains ( *it ) )
newList.append ( *it );
@@ -280,11 +280,11 @@ void JabberClient::addS5BServerAddress ( const QString &address )
}
-void JabberClient::removeS5BServerAddress ( const QString &address )
+void JabberClient::removeS5BServerAddress ( const TQString &address )
{
- QStringList newList;
+ TQStringList newList;
- QStringList::iterator it = d->s5bAddressList.find ( address );
+ TQStringList::iterator it = d->s5bAddressList.find ( address );
if ( it != d->s5bAddressList.end () )
{
d->s5bAddressList.remove ( it );
@@ -298,7 +298,7 @@ void JabberClient::removeS5BServerAddress ( const QString &address )
else
{
// now filter the list without dupes
- for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
+ for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
{
if ( !newList.contains ( *it ) )
newList.append ( *it );
@@ -365,7 +365,7 @@ bool JabberClient::probeSSL () const
}
-void JabberClient::setOverrideHost ( bool flag, const QString &server, int port )
+void JabberClient::setOverrideHost ( bool flag, const TQString &server, int port )
{
d->overrideHost = flag;
@@ -395,7 +395,7 @@ bool JabberClient::allowPlainTextPassword () const
}
-void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddress )
+void JabberClient::setFileTransfersEnabled ( bool flag, const TQString &localAddress )
{
d->fileTransfersEnabled = flag;
@@ -403,7 +403,7 @@ void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddr
}
-QString JabberClient::localAddress () const
+TQString JabberClient::localAddress () const
{
return d->localAddress;
@@ -417,76 +417,76 @@ bool JabberClient::fileTransfersEnabled () const
}
-void JabberClient::setClientName ( const QString &clientName )
+void JabberClient::setClientName ( const TQString &clientName )
{
d->clientName = clientName;
}
-QString JabberClient::clientName () const
+TQString JabberClient::clientName () const
{
return d->clientName;
}
-void JabberClient::setClientVersion ( const QString &clientVersion )
+void JabberClient::setClientVersion ( const TQString &clientVersion )
{
d->clientVersion = clientVersion;
}
-QString JabberClient::clientVersion () const
+TQString JabberClient::clientVersion () const
{
return d->clientVersion;
}
-void JabberClient::setOSName ( const QString &osName )
+void JabberClient::setOSName ( const TQString &osName )
{
d->osName = osName;
}
-QString JabberClient::osName () const
+TQString JabberClient::osName () const
{
return d->osName;
}
-void JabberClient::setCapsNode( const QString &capsNode )
+void JabberClient::setCapsNode( const TQString &capsNode )
{
d->capsNode = capsNode;
}
-QString JabberClient::capsNode() const
+TQString JabberClient::capsNode() const
{
return d->capsNode;
}
-void JabberClient::setCapsVersion( const QString &capsVersion )
+void JabberClient::setCapsVersion( const TQString &capsVersion )
{
d->capsVersion = capsVersion;
}
-QString JabberClient::capsVersion() const
+TQString JabberClient::capsVersion() const
{
return d->capsVersion;
}
-QString JabberClient::capsExt() const
+TQString JabberClient::capsExt() const
{
if(d->jabberClient)
{
return d->jabberClient->capsExt();
}
- return QString();
+ return TQString();
}
void JabberClient::setDiscoIdentity( DiscoItem::Identity identity )
{
@@ -498,7 +498,7 @@ DiscoItem::Identity JabberClient::discoIdentity() const
return d->discoIdentity;
}
-void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset )
+void JabberClient::setTimeZone ( const TQString &timeZoneName, int timeZoneOffset )
{
d->timeZoneName = timeZoneName;
@@ -506,7 +506,7 @@ void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset
}
-QString JabberClient::timeZoneName () const
+TQString JabberClient::timeZoneName () const
{
return d->timeZoneName;
@@ -587,7 +587,7 @@ XMPP::Jid JabberClient::jid () const
}
-JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QString &password, bool auth )
+JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const TQString &password, bool auth )
{
/*
* Close any existing connection.
@@ -638,10 +638,10 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberTLSHandler, SIGNAL ( tlsHandshaken() ), this, SLOT ( slotTLSHandshaken () ) );
+ TQObject::connect ( d->jabberTLSHandler, TQT_SIGNAL ( tlsHandshaken() ), this, TQT_SLOT ( slotTLSHandshaken () ) );
}
- QPtrList<QCA::Cert> certStore;
+ TQPtrList<QCA::Cert> certStore;
d->jabberTLS->setCertificateStore ( certStore );
}
@@ -653,18 +653,18 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberClientStream, SIGNAL ( needAuthParams(bool, bool, bool) ),
- this, SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( authenticated () ),
- this, SLOT ( slotCSAuthenticated () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( connectionClosed () ),
- this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( delayedCloseFinished () ),
- this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( warning (int) ),
- this, SLOT ( slotCSWarning (int) ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( error (int) ),
- this, SLOT ( slotCSError (int) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( needAuthParams(bool, bool, bool) ),
+ this, TQT_SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( authenticated () ),
+ this, TQT_SLOT ( slotCSAuthenticated () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( connectionClosed () ),
+ this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( delayedCloseFinished () ),
+ this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( warning (int) ),
+ this, TQT_SLOT ( slotCSWarning (int) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( error (int) ),
+ this, TQT_SLOT ( slotCSError (int) ) );
}
d->jabberClientStream->setOldOnly ( useXMPP09 () );
@@ -694,8 +694,8 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberClient->fileTransferManager(), SIGNAL ( incomingReady() ),
- this, SLOT ( slotIncomingFileTransfer () ) );
+ TQObject::connect ( d->jabberClient->fileTransferManager(), TQT_SIGNAL ( incomingReady() ),
+ this, TQT_SLOT ( slotIncomingFileTransfer () ) );
}
}
@@ -704,36 +704,36 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
*/
{
using namespace XMPP;
- QObject::connect ( d->jabberClient, SIGNAL ( subscription (const Jid &, const QString &) ),
- this, SLOT ( slotSubscription (const Jid &, const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterRequestFinished ( bool, int, const QString & ) ),
- this, SLOT ( slotRosterRequestFinished ( bool, int, const QString & ) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemAdded (const RosterItem &) ),
- this, SLOT ( slotNewContact (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemUpdated (const RosterItem &) ),
- this, SLOT ( slotContactUpdated (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemRemoved (const RosterItem &) ),
- this, SLOT ( slotContactDeleted (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( resourceAvailable (const Jid &, const Resource &) ),
- this, SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ),
- this, SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( messageReceived (const Message &) ),
- this, SLOT ( slotReceivedMessage (const Message &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatJoined (const Jid &) ),
- this, SLOT ( slotGroupChatJoined (const Jid &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatLeft (const Jid &) ),
- this, SLOT ( slotGroupChatLeft (const Jid &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatPresence (const Jid &, const Status &) ),
- this, SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatError (const Jid &, int, const QString &) ),
- this, SLOT ( slotGroupChatError (const Jid &, int, const QString &) ) );
- //QObject::connect ( d->jabberClient, SIGNAL (debugText (const QString &) ),
- // this, SLOT ( slotPsiDebug (const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( xmlIncoming(const QString& ) ),
- this, SLOT ( slotIncomingXML (const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( xmlOutgoing(const QString& ) ),
- this, SLOT ( slotOutgoingXML (const QString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( subscription (const Jid &, const TQString &) ),
+ this, TQT_SLOT ( slotSubscription (const Jid &, const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool, int, const TQString & ) ),
+ this, TQT_SLOT ( slotRosterRequestFinished ( bool, int, const TQString & ) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemAdded (const RosterItem &) ),
+ this, TQT_SLOT ( slotNewContact (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemUpdated (const RosterItem &) ),
+ this, TQT_SLOT ( slotContactUpdated (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemRemoved (const RosterItem &) ),
+ this, TQT_SLOT ( slotContactDeleted (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceAvailable (const Jid &, const Resource &) ),
+ this, TQT_SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ),
+ this, TQT_SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( messageReceived (const Message &) ),
+ this, TQT_SLOT ( slotReceivedMessage (const Message &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatJoined (const Jid &) ),
+ this, TQT_SLOT ( slotGroupChatJoined (const Jid &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatLeft (const Jid &) ),
+ this, TQT_SLOT ( slotGroupChatLeft (const Jid &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatPresence (const Jid &, const Status &) ),
+ this, TQT_SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatError (const Jid &, int, const TQString &) ),
+ this, TQT_SLOT ( slotGroupChatError (const Jid &, int, const TQString &) ) );
+ //TQObject::connect ( d->jabberClient, TQT_SIGNAL (debugText (const TQString &) ),
+ // this, TQT_SLOT ( slotPsiDebug (const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlIncoming(const TQString& ) ),
+ this, TQT_SLOT ( slotIncomingXML (const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlOutgoing(const TQString& ) ),
+ this, TQT_SLOT ( slotOutgoingXML (const TQString &) ) );
}
d->jabberClient->setClientName ( clientName () );
@@ -802,33 +802,33 @@ bool JabberClient::isConnected () const
}
-void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick )
+void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick )
{
client()->groupChatJoin ( host, room, nick );
}
-void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password )
+void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password )
{
client()->groupChatJoin ( host, room, nick, password );
}
-void JabberClient::leaveGroupChat ( const QString &host, const QString &room )
+void JabberClient::leaveGroupChat ( const TQString &host, const TQString &room )
{
client()->groupChatLeave ( host, room );
}
-void JabberClient::setGroupChatStatus( const QString & host, const QString & room, const XMPP::Status & status )
+void JabberClient::setGroupChatStatus( const TQString & host, const TQString & room, const XMPP::Status & status )
{
client()->groupChatSetStatus( host, room, status);
}
-void JabberClient::changeGroupChatNick( const QString & host, const QString & room, const QString & nick, const XMPP::Status & status )
+void JabberClient::changeGroupChatNick( const TQString & host, const TQString & room, const TQString & nick, const XMPP::Status & status )
{
client()->groupChatChangeNick( host, room, nick, status );
}
@@ -841,7 +841,7 @@ void JabberClient::sendMessage ( const XMPP::Message &message )
}
-void JabberClient::send ( const QString &packet )
+void JabberClient::send ( const TQString &packet )
{
client()->send ( packet );
@@ -855,34 +855,34 @@ void JabberClient::requestRoster ()
}
-void JabberClient::slotPsiDebug ( const QString & _msg )
+void JabberClient::slotPsiDebug ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "Psi: " + msg );
}
-void JabberClient::slotIncomingXML ( const QString & _msg )
+void JabberClient::slotIncomingXML ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "XML IN: " + msg );
}
-void JabberClient::slotOutgoingXML ( const QString & _msg )
+void JabberClient::slotOutgoingXML ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "XML OUT: " + msg );
@@ -1042,7 +1042,7 @@ void JabberClient::slotCSError ( int error )
}
-void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const QString &/*statusString*/ )
+void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const TQString &/*statusString*/ )
{
emit rosterRequestFinished ( success );
@@ -1119,14 +1119,14 @@ void JabberClient::slotGroupChatPresence ( const Jid &jid, const Status &status)
}
-void JabberClient::slotGroupChatError ( const Jid &jid, int error, const QString &reason)
+void JabberClient::slotGroupChatError ( const Jid &jid, int error, const TQString &reason)
{
emit groupChatError ( jid, error, reason );
}
-void JabberClient::slotSubscription ( const Jid &jid, const QString &type )
+void JabberClient::slotSubscription ( const Jid &jid, const TQString &type )
{
emit subscription ( jid, type );
diff --git a/kopete/protocols/jabber/jabberclient.h b/kopete/protocols/jabber/jabberclient.h
index 7cd33e02..4db2975f 100644
--- a/kopete/protocols/jabber/jabberclient.h
+++ b/kopete/protocols/jabber/jabberclient.h
@@ -22,7 +22,7 @@
#ifndef JABBERCLIENT_H
#define JABBERCLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
// include these because of namespace reasons
#include <im.h>
@@ -84,7 +84,7 @@ public:
* @param password Password to authenticate with.
* @param auth True if authentication should be done, false if not.
*/
- ErrorCode connect ( const XMPP::Jid &jid, const QString &password, bool auth = true );
+ ErrorCode connect ( const XMPP::Jid &jid, const TQString &password, bool auth = true );
/**
* Disconnect from Jabber server.
@@ -191,7 +191,7 @@ public:
* This only has an effect if the old protocol (@ref useXMPP09)
* has been enabled. Default is false.
*/
- void setOverrideHost ( bool flag, const QString &server = "", int port = 5222 );
+ void setOverrideHost ( bool flag, const TQString &server = "", int port = 5222 );
/**
* Returns if the server name and port are overridden.
*/
@@ -213,12 +213,12 @@ public:
* @param flag Whether to enable file transfers.
* @param localAddress Local address to receive file transfers at. Will be determined automatically if not specified.
*/
- void setFileTransfersEnabled ( bool flag, const QString &localAddress = QString::null );
+ void setFileTransfersEnabled ( bool flag, const TQString &localAddress = TQString::null );
/**
* Returns the address of the local interface.
*/
- QString localAddress () const;
+ TQString localAddress () const;
/**
* Returns if file transfers are enabled.
@@ -228,57 +228,57 @@ public:
/**
* Set client name.
*/
- void setClientName ( const QString &clientName );
+ void setClientName ( const TQString &clientName );
/**
* Return client name.
*/
- QString clientName () const;
+ TQString clientName () const;
/**
* Set client version.
*/
- void setClientVersion ( const QString &clientVersion );
+ void setClientVersion ( const TQString &clientVersion );
/**
* Return client version.
*/
- QString clientVersion () const;
+ TQString clientVersion () const;
/**
* Set operating system name.
*/
- void setOSName ( const QString &osName );
+ void setOSName ( const TQString &osName );
/**
* Return operating system name.
*/
- QString osName () const;
+ TQString osName () const;
/**
* Set the caps(JEP-0115: Entity capabilities) node name.
* @param node Node name.
*/
- void setCapsNode( const QString &capsNode );
+ void setCapsNode( const TQString &capsNode );
/**
* Return the caps node name for this client.
* @return the caps node name.
*/
- QString capsNode() const;
+ TQString capsNode() const;
/**
* Set the caps(JEP-0115: Entity capabilities) node version.
* @param capsVersion the node version.
*/
- void setCapsVersion( const QString &capsVersion );
+ void setCapsVersion( const TQString &capsVersion );
/**
* Return the caps version for this client.
* @return the caps version.
*/
- QString capsVersion() const;
+ TQString capsVersion() const;
/**
* Return the caps extension list for this client.
* @return A string containing all extensions separated by space.
*/
- QString capsExt() const;
+ TQString capsExt() const;
/**
* Set the disco Identity information for this client.
@@ -302,11 +302,11 @@ public:
/**
* Set timezone information. Default is UTC.
*/
- void setTimeZone ( const QString &timeZoneName, int timeZoneOffset );
+ void setTimeZone ( const TQString &timeZoneName, int timeZoneOffset );
/**
* Return timezone name.
*/
- QString timeZoneName () const;
+ TQString timeZoneName () const;
/**
* Return timezone offset.
*/
@@ -357,7 +357,7 @@ public:
* @param room Name of room to join.
* @param nick Nick name you want to join with.
*/
- void joinGroupChat ( const QString &host, const QString &room, const QString &nick );
+ void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick );
/**
* Join a group chat that require a password.
@@ -366,23 +366,23 @@ public:
* @param nick Nick name you want to join with.
* @param password The password to join the room.
*/
- void joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password );
+ void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password );
/**
* Leave a group chat.
* @param host Node to leave room at.
* @param room Name of room to leave.
*/
- void leaveGroupChat ( const QString &host, const QString &room );
+ void leaveGroupChat ( const TQString &host, const TQString &room );
/**
* change the status of a group chat
*/
- void setGroupChatStatus(const QString &host, const QString &room, const XMPP::Status &);
+ void setGroupChatStatus(const TQString &host, const TQString &room, const XMPP::Status &);
/**
* change the nick in a group chat
*/
- void changeGroupChatNick(const QString &host, const QString &room, const QString &nick, const XMPP::Status &status =XMPP::Status());
+ void changeGroupChatNick(const TQString &host, const TQString &room, const TQString &nick, const XMPP::Status &status =XMPP::Status());
/**
* Send a message.
@@ -392,7 +392,7 @@ public:
/**
* Send raw packet to the server.
*/
- void send ( const QString &packet );
+ void send ( const TQString &packet );
/**
* Request the roster from the Jabber server.
@@ -496,19 +496,19 @@ signals:
/**
* An error was encountered joining or processing a group chat.
*/
- void groupChatError ( const XMPP::Jid &jid, int error, const QString &reason );
+ void groupChatError ( const XMPP::Jid &jid, int error, const TQString &reason );
/**
* New subscription request.
*/
- void subscription ( const XMPP::Jid &jid, const QString &type );
+ void subscription ( const XMPP::Jid &jid, const TQString &type );
/**
* Dispatches a debug message. Debug messages
* include incoming and outgoing XML packets
* as well as internal status messages.
*/
- void debugMessage ( const QString &message );
+ void debugMessage ( const TQString &message );
private:
class Private;
@@ -526,11 +526,11 @@ private:
/**
* Add an address that the S5B server should handle.
*/
- void addS5BServerAddress ( const QString &address );
+ void addS5BServerAddress ( const TQString &address );
/**
* Remove an address that the S5B server currently handles.
*/
- void removeS5BServerAddress ( const QString &address );
+ void removeS5BServerAddress ( const TQString &address );
private slots:
/* S5B server object has been destroyed. */
@@ -558,7 +558,7 @@ private slots:
void slotTLSHandshaken ();
/* Called from Psi: roster request finished */
- void slotRosterRequestFinished ( bool success, int statusCode, const QString &statusString );
+ void slotRosterRequestFinished ( bool success, int statusCode, const TQString &statusString );
/* Called from Psi: incoming file transfer */
void slotIncomingFileTransfer ();
@@ -582,18 +582,18 @@ private slots:
void slotReceivedMessage (const Message &);
/* Called from Psi: debug messages from the backend. */
- void slotPsiDebug (const QString & msg);
- void slotIncomingXML (const QString &msg);
- void slotOutgoingXML (const QString &msg);
+ void slotPsiDebug (const TQString & msg);
+ void slotIncomingXML (const TQString &msg);
+ void slotOutgoingXML (const TQString &msg);
/* Slots for handling group chats. */
void slotGroupChatJoined (const Jid & jid);
void slotGroupChatLeft (const Jid & jid);
void slotGroupChatPresence (const Jid & jid, const Status & status);
- void slotGroupChatError (const Jid & jid, int error, const QString & reason);
+ void slotGroupChatError (const Jid & jid, int error, const TQString & reason);
/* Incoming subscription request. */
- void slotSubscription (const Jid & jid, const QString & type);
+ void slotSubscription (const Jid & jid, const TQString & type);
};
diff --git a/kopete/protocols/jabber/jabberconnector.cpp b/kopete/protocols/jabber/jabberconnector.cpp
index 2359dd69..8fdc3e84 100644
--- a/kopete/protocols/jabber/jabberconnector.cpp
+++ b/kopete/protocols/jabber/jabberconnector.cpp
@@ -22,7 +22,7 @@
#include "jabberbytestream.h"
#include "jabberprotocol.h"
-JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ )
+JabberConnector::JabberConnector ( TQObject *parent, const char */*name*/ )
: XMPP::Connector ( parent )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New Jabber connector." << endl;
@@ -31,8 +31,8 @@ JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ )
mByteStream = new JabberByteStream ( 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 ) ) );
}
@@ -43,7 +43,7 @@ JabberConnector::~JabberConnector ()
}
-void JabberConnector::connectToServer ( const QString &server )
+void JabberConnector::connectToServer ( const TQString &server )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << server << endl;
@@ -56,7 +56,7 @@ void JabberConnector::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 ();
@@ -71,7 +71,7 @@ void JabberConnector::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 ();
@@ -107,7 +107,7 @@ void JabberConnector::done ()
}
-void JabberConnector::setOptHostPort ( const QString &host, Q_UINT16 port )
+void JabberConnector::setOptHostPort ( const TQString &host, Q_UINT16 port )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl;
diff --git a/kopete/protocols/jabber/jabberconnector.h b/kopete/protocols/jabber/jabberconnector.h
index 6fbc4167..b7ee533a 100644
--- a/kopete/protocols/jabber/jabberconnector.h
+++ b/kopete/protocols/jabber/jabberconnector.h
@@ -35,15 +35,15 @@ class JabberConnector : public XMPP::Connector
Q_OBJECT
public:
- JabberConnector ( QObject *parent = 0, const char *name = 0 );
+ JabberConnector ( TQObject *parent = 0, const char *name = 0 );
~JabberConnector ();
- void connectToServer ( const QString &server );
+ void connectToServer ( const TQString &server );
ByteStream *stream () const;
void done ();
- void setOptHostPort ( const QString &host, Q_UINT16 port );
+ void setOptHostPort ( const TQString &host, Q_UINT16 port );
void setOptSSL ( bool );
void setOptProbe ( bool );
@@ -54,7 +54,7 @@ private slots:
void slotError ( int );
private:
- QString mHost;
+ TQString mHost;
Q_UINT16 mPort;
int mErrorCode;
diff --git a/kopete/protocols/jabber/jabbercontact.cpp b/kopete/protocols/jabber/jabbercontact.cpp
index c8589e1e..840f9cf3 100644
--- a/kopete/protocols/jabber/jabbercontact.cpp
+++ b/kopete/protocols/jabber/jabbercontact.cpp
@@ -21,12 +21,12 @@
#include "xmpp_tasks.h"
#include "im.h"
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,7 +63,7 @@
/**
* JabberContact constructor
*/
-JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const QString &legacyId)
+JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const TQString &legacyId)
: JabberBaseContact ( rosterItem, _account, mc, legacyId) , mDiscoDone(false), m_syncTimer(0L)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is created - " << this << endl;
@@ -89,19 +89,19 @@ JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Accoun
{
// this contact is a regular contact
connect ( this,
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckVCard () ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckVCard () ) );
}
else
{
// this contact is the myself instance
connect ( account()->myself (),
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckVCard () ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckVCard () ) );
connect ( account()->myself (),
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
/*
* Trigger update once if we're already connected for contacts
@@ -127,44 +127,44 @@ JabberContact::~JabberContact()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is destroyed - " << this << endl;
}
-QPtrList<KAction> *JabberContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberContact::customContextMenuActions ()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
KActionMenu *actionAuthorization = new KActionMenu ( i18n ("Authorization"), "connect_established", this, "jabber_authorization");
KAction *resendAuthAction, *requestAuthAction, *removeAuthAction;
resendAuthAction = new KAction (i18n ("(Re)send Authorization To"), "mail_forward", 0,
- this, SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth");
+ this, TQT_SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth");
resendAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::To || mRosterItem.subscription().type() == XMPP::Subscription::None );
actionAuthorization->insert(resendAuthAction);
requestAuthAction = new KAction (i18n ("(Re)request Authorization From"), "mail_reply", 0,
- this, SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth");
+ this, TQT_SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth");
requestAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::From || mRosterItem.subscription().type() == XMPP::Subscription::None );
actionAuthorization->insert(requestAuthAction);
removeAuthAction = new KAction (i18n ("Remove Authorization From"), "mail_delete", 0,
- this, SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth");
+ this, TQT_SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth");
removeAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::Both || mRosterItem.subscription().type() == XMPP::Subscription::From );
actionAuthorization->insert(removeAuthAction);
KActionMenu *actionSetAvailability = new KActionMenu (i18n ("Set Availability"), "kopeteavailable", this, "jabber_online");
actionSetAvailability->insert(new KAction (i18n ("Online"), protocol()->JabberKOSOnline.iconFor(this),
- 0, this, SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline"));
+ 0, this, TQT_SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline"));
actionSetAvailability->insert(new KAction (i18n ("Free to Chat"), protocol()->JabberKOSChatty.iconFor(this),
- 0, this, SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty"));
+ 0, this, TQT_SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty"));
actionSetAvailability->insert(new KAction (i18n ("Away"), protocol()->JabberKOSAway.iconFor(this),
- 0, this, SLOT (slotStatusAway ()), actionSetAvailability, "actionAway"));
+ 0, this, TQT_SLOT (slotStatusAway ()), actionSetAvailability, "actionAway"));
actionSetAvailability->insert(new KAction (i18n ("Extended Away"), protocol()->JabberKOSXA.iconFor(this),
- 0, this, SLOT (slotStatusXA ()), actionSetAvailability, "actionXA"));
+ 0, this, TQT_SLOT (slotStatusXA ()), actionSetAvailability, "actionXA"));
actionSetAvailability->insert(new KAction (i18n ("Do Not Disturb"), protocol()->JabberKOSDND.iconFor(this),
- 0, this, SLOT (slotStatusDND ()), actionSetAvailability, "actionDND"));
+ 0, this, TQT_SLOT (slotStatusDND ()), actionSetAvailability, "actionDND"));
actionSetAvailability->insert(new KAction (i18n ("Invisible"), protocol()->JabberKOSInvisible.iconFor(this),
- 0, this, SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible"));
+ 0, this, TQT_SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible"));
KActionMenu *actionSelectResource = new KActionMenu (i18n ("Select Resource"), "connect_no", this, "actionSelectResource");
@@ -176,7 +176,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
}
else
{
- QStringList items;
+ TQStringList items;
XMPP::ResourceList availableResources;
int activeItem = 0, i = 1;
@@ -198,13 +198,13 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
// now go through the string list and add the resources with their icons
i = 0;
- QStringList::const_iterator itemsEnd = items.end ();
- for(QStringList::const_iterator it = items.begin(); it != itemsEnd; ++it)
+ TQStringList::const_iterator itemsEnd = items.end ();
+ for(TQStringList::const_iterator it = items.begin(); it != itemsEnd; ++it)
{
if( i == activeItem )
{
- actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, SLOT( slotSelectResource() ),
- actionSelectResource, QString::number( i ).latin1() ) );
+ actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, TQT_SLOT( slotSelectResource() ),
+ actionSelectResource, TQString::number( i ).latin1() ) );
}
else
{
@@ -212,11 +212,11 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
* Select icon, using bestResource() without lock for the automatic entry
* and the resources' respective status icons for the rest.
*/
- QIconSet iconSet ( !i ?
+ TQIconSet iconSet ( !i ?
protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.find(*it) ).iconFor ( account () ));
- actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, SLOT( slotSelectResource() ),
- actionSelectResource, QString::number( i ).latin1() ) );
+ actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, TQT_SLOT( slotSelectResource() ),
+ actionSelectResource, TQString::number( i ).latin1() ) );
}
i++;
@@ -230,7 +230,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
#ifdef SUPPORT_JINGLE
- KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, SLOT (voiceCall ()), this, "jabber_voicecall");
+ KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, TQT_SLOT (voiceCall ()), this, "jabber_voicecall");
actionVoiceCall->setEnabled( false );
actionCollection->append( actionVoiceCall );
@@ -248,7 +248,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
void JabberContact::handleIncomingMessage (const XMPP::Message & message)
{
- QString viewPlugin;
+ TQString viewPlugin;
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl;
@@ -261,17 +261,17 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
{
if (!message.invite().isEmpty())
{
- QString room=message.invite();
- QString originalBody=message.body().isEmpty() ? QString() :
- i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(QStyleSheet::escape(message.body()));
- QString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>"
+ TQString room=message.invite();
+ TQString originalBody=message.body().isEmpty() ? TQString() :
+ i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(TQStyleSheet::escape(message.body()));
+ TQString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>"
"If you want to accept and join, just <b>enter your nickname</b> and press ok<br>"
"If you want to decline, press cancel</qt>")
.arg(message.from().full(), room , originalBody);
bool ok=false;
- QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
- mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) );
+ TQString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
+ mes, TQString() , &ok , (mManager ? dynamic_cast<TQWidget*>(mManager->view(false)) : 0) );
if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() )
return;
@@ -347,11 +347,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
mLastReceivedMessageId = message.id ();
// retrieve and reformat body
- QString body = message.body ();
- QString xHTMLBody;
+ TQString body = message.body ();
+ TQString xHTMLBody;
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
else
{
@@ -393,11 +393,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
for ( XMPP::UrlList::const_iterator it = urlList.begin (); it != urlList.end (); ++it )
{
- QString description = (*it).desc().isEmpty() ? (*it).url() : QStyleSheet::escape ( (*it).desc() );
- QString url = (*it).url ();
+ TQString description = (*it).desc().isEmpty() ? (*it).url() : TQStyleSheet::escape ( (*it).desc() );
+ TQString url = (*it).url ();
newMessage = new Kopete::Message ( message.timeStamp (), this, contactList,
- QString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ),
+ TQString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ),
message.subject (), Kopete::Message::Inbound,
Kopete::Message::RichText, viewPlugin );
@@ -411,7 +411,7 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
void JabberContact::slotCheckVCard ()
{
- QDateTime cacheDate;
+ TQDateTime cacheDate;
Kopete::ContactProperty cacheDateString = property ( protocol()->propVCardCacheTimeStamp );
// don't do anything while we are offline
@@ -431,8 +431,8 @@ void JabberContact::slotCheckVCard ()
mDiscoDone = true; //or it will happen twice, we don't want that.
//disco to see if it's not a transport
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask());
- QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
- jt->get(rosterItem().jid(), QString());
+ TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
+ jt->get(rosterItem().jid(), TQString());
jt->go(true);
}
}
@@ -440,20 +440,20 @@ void JabberContact::slotCheckVCard ()
// avoid warning if key does not exist in configuration file
if ( cacheDateString.isNull () )
- cacheDate = QDateTime::currentDateTime().addDays ( -2 );
+ cacheDate = TQDateTime::currentDateTime().addDays ( -2 );
else
- cacheDate = QDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate );
+ cacheDate = TQDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate );
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Cached vCard data for " << contactId () << " from " << cacheDate.toString () << endl;
- if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < QDateTime::currentDateTime () ) )
+ if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < TQDateTime::currentDateTime () ) )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling update." << endl;
mVCardUpdateInProgress = true;
// current data is older than 24 hours, request a new one
- QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedVCard () ) );
+ TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedVCard () ) );
}
}
@@ -479,8 +479,8 @@ void JabberContact::slotGetTimedVCard ()
{
//disco to see if it's not a transport
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask());
- QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
- jt->get(rosterItem().jid(), QString());
+ TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
+ jt->get(rosterItem().jid(), TQString());
jt->go(true);
}
}
@@ -492,7 +492,7 @@ void JabberContact::slotGetTimedVCard ()
// request vCard
XMPP::JT_VCard *task = new XMPP::JT_VCard ( account()->client()->rootTask () );
// signal to ourselves when the vCard data arrived
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) );
task->get ( mRosterItem.jid () );
task->go ( true );
@@ -506,7 +506,7 @@ void JabberContact::slotGotVCard ()
// update timestamp of last vCard retrieval
if ( metaContact() && !metaContact()->isTemporary () )
{
- setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) );
+ setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) );
}
mVCardUpdateInProgress = false;
@@ -551,7 +551,7 @@ void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::Onl
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling request for last activity for " << mRosterItem.jid().bare () << endl;
- QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedLastActivity () ) );
+ TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedLastActivity () ) );
}
}
@@ -578,7 +578,7 @@ void JabberContact::slotGetTimedLastActivity ()
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Requesting last activity from timer for " << mRosterItem.jid().bare () << endl;
XMPP::JT_GetLastActivity *task = new XMPP::JT_GetLastActivity ( account()->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotLastActivity () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotLastActivity () ) );
task->get ( mRosterItem.jid () );
task->go ( true );
}
@@ -591,7 +591,7 @@ void JabberContact::slotGotLastActivity ()
if ( task->success () )
{
- setProperty ( protocol()->propLastSeen, QDateTime::currentDateTime().addSecs ( -task->seconds () ) );
+ setProperty ( protocol()->propLastSeen, TQDateTime::currentDateTime().addSecs ( -task->seconds () ) );
if( !task->message().isEmpty() )
{
setProperty( protocol()->propAwayMessage, task->message() );
@@ -668,7 +668,7 @@ void JabberContact::slotSendVCard()
// work information tab
XMPP::VCard::Org org;
org.name = property(protocol()->propCompanyName).value().toString();
- org.unit = QStringList::split(",", property(protocol()->propCompanyDepartement).value().toString());
+ org.unit = TQStringList::split(",", property(protocol()->propCompanyDepartement).value().toString());
vCard.setOrg(org);
vCard.setTitle (property(protocol()->propCompanyPosition).value().toString());
vCard.setRole (property(protocol()->propCompanyRole).value().toString());
@@ -703,10 +703,10 @@ void JabberContact::slotSendVCard()
// Set contact photo as a binary value (if he has set a photo)
if( hasProperty( protocol()->propPhoto.key() ) )
{
- QString photoPath = property( protocol()->propPhoto ).value().toString();
- QImage image( photoPath );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQString photoPath = property( protocol()->propPhoto ).value().toString();
+ TQImage image( photoPath );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, "PNG" );
vCard.setPhoto( ba );
@@ -717,22 +717,22 @@ void JabberContact::slotSendVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard (account()->client()->rootTask ());
// signal to ourselves when the vCard data arrived
- QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotSentVCard ()));
+ TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentVCard ()));
task->set (vCard);
task->go (true);
}
-void JabberContact::setPhoto( const QString &photoPath )
+void JabberContact::setPhoto( const TQString &photoPath )
{
- QImage contactPhoto(photoPath);
- QString newPhotoPath = photoPath;
+ TQImage contactPhoto(photoPath);
+ TQString newPhotoPath = photoPath;
if(contactPhoto.width() > 96 || contactPhoto.height() > 96)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
// Scale and crop the picture.
- contactPhoto = contactPhoto.smoothScale( 96, 96, QImage::ScaleMin );
+ contactPhoto = contactPhoto.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 96, 96);
@@ -741,17 +741,17 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
else if (contactPhoto.width() < 32 || contactPhoto.height() < 32)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
// Scale and crop the picture.
- contactPhoto = contactPhoto.smoothScale( 32, 32, QImage::ScaleMin );
+ contactPhoto = contactPhoto.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 32, 32);
@@ -760,14 +760,14 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
else if (contactPhoto.width() != contactPhoto.height())
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, contactPhoto.height(), contactPhoto.height());
@@ -776,7 +776,7 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
@@ -789,7 +789,7 @@ void JabberContact::slotSentVCard ()
}
-void JabberContact::slotChatSessionDeleted ( QObject *sender )
+void JabberContact::slotChatSessionDeleted ( TQObject *sender )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Message manager deleted, collecting the pieces..." << endl;
@@ -826,7 +826,7 @@ JabberChatSession *JabberContact::manager ( Kopete::ContactPtrList chatMembers,
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "No manager found, creating a new one with resource '" << jid.resource () << "'" << endl;
manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers, jid.resource () );
- connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) );
+ connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) );
mManagers.append ( manager );
}
@@ -845,7 +845,7 @@ Kopete::ChatSession *JabberContact::manager ( Kopete::Contact::CanCreateFlags ca
}
-JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Contact::CanCreateFlags canCreate )
+JabberChatSession *JabberContact::manager ( const TQString &resource, Kopete::Contact::CanCreateFlags canCreate )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "called, canCreate: " << canCreate << ", Resource: '" << resource << "'" << endl;
@@ -880,7 +880,7 @@ JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Con
JabberChatSession *manager = new JabberChatSession ( protocol(),
static_cast<JabberBaseContact *>(account()->myself()),
chatmembers, resource );
- connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) );
+ connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) );
mManagers.append ( manager );
return manager;
@@ -938,7 +938,7 @@ void JabberContact::deleteContact ()
sendSubscription("unsubscribe");
XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () );
- rosterTask->set ( mRosterItem.jid (), QString() , QStringList() );
+ rosterTask->set ( mRosterItem.jid (), TQString() , TQStringList() );
rosterTask->go (true);
}
@@ -954,8 +954,8 @@ void JabberContact::sync ( unsigned int )
if(!m_syncTimer)
{
- m_syncTimer=new QTimer(this);
- connect(m_syncTimer, SIGNAL(timeout()) , this , SLOT(slotDelayedSync()));
+ m_syncTimer=new TQTimer(this);
+ connect(m_syncTimer, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotDelayedSync()));
}
m_syncTimer->start(2*1000,true);
/*
@@ -979,7 +979,7 @@ void JabberContact::slotDelayedSync( )
bool changed=metaContact()->displayName() != mRosterItem.name();
- QStringList groups;
+ TQStringList groups;
Kopete::GroupList groupList = metaContact ()->groups ();
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Synchronizing contact " << contactId () << endl;
@@ -1009,17 +1009,17 @@ void JabberContact::slotDelayedSync( )
}
-void JabberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
@@ -1057,7 +1057,7 @@ void JabberContact::slotRemoveAuth ()
}
-void JabberContact::sendSubscription ( const QString& subType )
+void JabberContact::sendSubscription ( const TQString& subType )
{
if ( !account()->isConnected () )
@@ -1075,7 +1075,7 @@ void JabberContact::sendSubscription ( const QString& subType )
void JabberContact::slotSelectResource ()
{
- int currentItem = QString ( static_cast<const KAction *>( sender() )->name () ).toUInt ();
+ int currentItem = TQString ( static_cast<const KAction *>( sender() )->name () ).toUInt ();
/*
* Warn the user if there is already an active chat window.
@@ -1101,7 +1101,7 @@ void JabberContact::slotSelectResource ()
}
else
{
- QString selectedResource = static_cast<const KAction *>(sender())->text();
+ TQString selectedResource = static_cast<const KAction *>(sender())->text();
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Moving to resource " << selectedResource << endl;
@@ -1212,7 +1212,7 @@ bool JabberContact::isContactRequestingEvent( XMPP::MsgEvent event )
return false;
}
-QString JabberContact::lastReceivedMessageId () const
+TQString JabberContact::lastReceivedMessageId () const
{
return mLastReceivedMessageId;
}
@@ -1263,12 +1263,12 @@ void JabberContact::slotDiscoFinished( )
JT_DiscoInfo *jt = (JT_DiscoInfo *)sender();
bool is_transport=false;
- QString tr_type;
+ TQString tr_type;
if ( jt->success() )
{
- QValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities();
- QValueList<XMPP::DiscoItem::Identity>::Iterator it;
+ TQValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities();
+ TQValueList<XMPP::DiscoItem::Identity>::Iterator it;
for ( it = identities.begin(); it != identities.end(); ++it )
{
XMPP::DiscoItem::Identity ident=*it;
diff --git a/kopete/protocols/jabber/jabbercontact.h b/kopete/protocols/jabber/jabbercontact.h
index a7a3b024..64402a48 100644
--- a/kopete/protocols/jabber/jabbercontact.h
+++ b/kopete/protocols/jabber/jabbercontact.h
@@ -38,7 +38,7 @@ Q_OBJECT
public:
JabberContact (const XMPP::RosterItem &rosterItem,
- Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId = QString());
+ Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId = TQString());
~JabberContact();
@@ -46,12 +46,12 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Start a rename request.
*/
- void rename ( const QString &newName );
+ void rename ( const TQString &newName );
/**
* Deal with an incoming message for this contact.
@@ -69,7 +69,7 @@ public:
bool isContactRequestingEvent( XMPP::MsgEvent event );
- QString lastReceivedMessageId () const;
+ TQString lastReceivedMessageId () const;
public slots:
@@ -95,7 +95,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
/**
* Update the vCard on the server.
@@ -107,7 +107,7 @@ public slots:
* Set contact photo.
* @param path Path to the photo.
*/
- void setPhoto(const QString &photoPath);
+ void setPhoto(const TQString &photoPath);
/**
* this will start a voice call to the contact
@@ -146,7 +146,7 @@ private slots:
*/
void slotSelectResource ();
- void slotChatSessionDeleted ( QObject *sender );
+ void slotChatSessionDeleted ( TQObject *sender );
/**
* Check if cached vCard is recent.
@@ -209,7 +209,7 @@ private:
* the manager. If a new manager is created, the given
* resource is preselected.
*/
- JabberChatSession *manager ( const QString &resource, Kopete::Contact::CanCreateFlags );
+ JabberChatSession *manager ( const TQString &resource, Kopete::Contact::CanCreateFlags );
/**
* Create a message manager for this contact.
@@ -222,7 +222,7 @@ private:
/**
* Sends subscription messages.
*/
- void sendSubscription (const QString& subType);
+ void sendSubscription (const TQString& subType);
/**
* Sends a presence packet to this contact
@@ -240,7 +240,7 @@ private:
* The casts in manager() and slotChatSessionDeleted()
* are thus legal.
*/
- QPtrList<JabberChatSession> mManagers;
+ TQPtrList<JabberChatSession> mManagers;
/**
* Indicates whether the vCard is currently
@@ -258,8 +258,8 @@ private:
*/
bool mDiscoDone :1;
- QString mLastReceivedMessageId;
- QTimer *m_syncTimer;
+ TQString mLastReceivedMessageId;
+ TQTimer *m_syncTimer;
};
diff --git a/kopete/protocols/jabber/jabbercontactpool.cpp b/kopete/protocols/jabber/jabbercontactpool.cpp
index 736c6045..43724d28 100644
--- a/kopete/protocols/jabber/jabbercontactpool.cpp
+++ b/kopete/protocols/jabber/jabbercontactpool.cpp
@@ -18,7 +18,7 @@
#include "jabbercontactpool.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kopeteaccountmanager.h>
@@ -91,7 +91,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact,
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Adding new contact " << contact.jid().full() << endl;
JabberTransport *transport=0l;
- QString legacyId;
+ TQString legacyId;
//find if the contact should be added to a transport.
if(mAccount->transports().contains(contact.jid().domain()))
{
@@ -102,7 +102,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact,
// create new contact instance and add it to the dictionary
JabberContact *newContact = new JabberContact ( contact, transport ? (Kopete::Account*)transport : (Kopete::Account*)mAccount, metaContact , legacyId );
JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact );
- connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
+ connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
newContactItem->setDirty ( dirty );
mPool.append ( newContactItem );
@@ -161,7 +161,7 @@ JabberBaseContact *JabberContactPool::addGroupContact ( const XMPP::RosterItem &
JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact );
- connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
+ connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
newContactItem->setDirty ( dirty );
mPool.append ( newContactItem );
@@ -222,7 +222,7 @@ void JabberContactPool::slotContactDestroyed ( Kopete::Contact *contact )
else
{
//this is a legacy contact. we have no way to get the real Jid at this point, we can only guess it.
- QString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId();
+ TQString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId();
mAccount->resourcePool()->removeAllResources ( XMPP::Jid ( contactId ) ) ;
}
@@ -311,9 +311,9 @@ JabberBaseContact *JabberContactPool::findRelevantRecipient ( const XMPP::Jid &j
}
-QPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid )
+TQPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid )
{
- QPtrList<JabberBaseContact> list;
+ TQPtrList<JabberBaseContact> list;
for(JabberContactPoolItem *mContactItem = mPool.first (); mContactItem; mContactItem = mPool.next ())
{
diff --git a/kopete/protocols/jabber/jabbercontactpool.h b/kopete/protocols/jabber/jabbercontactpool.h
index 6582f64c..419061fd 100644
--- a/kopete/protocols/jabber/jabbercontactpool.h
+++ b/kopete/protocols/jabber/jabbercontactpool.h
@@ -18,7 +18,7 @@
#ifndef JABBERCONTACTPOOL_H
#define JABBERCONTACTPOOL_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
namespace Kopete { class MetaContact; }
@@ -92,7 +92,7 @@ public:
* Find relevant sources for a given JID.
* This will match user@domain/resource for a given user@domain.
*/
- QPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid );
+ TQPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid );
private slots:
void slotContactDestroyed ( Kopete::Contact *contact );
@@ -100,7 +100,7 @@ private slots:
private:
JabberContactPoolItem *findPoolItem ( const XMPP::RosterItem &contact );
- QPtrList<JabberContactPoolItem> mPool;
+ TQPtrList<JabberContactPoolItem> mPool;
JabberAccount *mAccount;
};
diff --git a/kopete/protocols/jabber/jabberfiletransfer.cpp b/kopete/protocols/jabber/jabberfiletransfer.cpp
index fde5b105..00d8be18 100644
--- a/kopete/protocols/jabber/jabberfiletransfer.cpp
+++ b/kopete/protocols/jabber/jabberfiletransfer.cpp
@@ -35,7 +35,7 @@
JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTransfer *incomingTransfer )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << QString::number ( incomingTransfer->fileSize () ) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << TQString::number ( incomingTransfer->fileSize () ) << endl;
mAccount = account;
mXMPPTransfer = incomingTransfer;
@@ -62,10 +62,10 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans
Kopete::ContactList::self ()->addMetaContact ( metaContact );
}
- connect ( Kopete::TransferManager::transferManager (), SIGNAL ( accepted ( Kopete::Transfer *, const QString & ) ),
- this, SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) );
- connect ( Kopete::TransferManager::transferManager (), SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ),
- this, SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) );
+ connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( accepted ( Kopete::Transfer *, const TQString & ) ),
+ this, TQT_SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) );
+ connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ),
+ this, TQT_SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) );
initializeVariables ();
@@ -76,7 +76,7 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans
}
-JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file )
+JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New outgoing transfer for " << contact->contactId() << ": " << file << endl;
@@ -90,15 +90,15 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseConta
contact->contactId (),
Kopete::FileTransferInfo::Outgoing );
- connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) );
+ connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) );
mXMPPTransfer = mAccount->client()->fileTransferManager()->createTransfer ();
initializeVariables ();
- connect ( mXMPPTransfer, SIGNAL ( connected () ), this, SLOT ( slotOutgoingConnected () ) );
- connect ( mXMPPTransfer, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotOutgoingBytesWritten ( int ) ) );
- connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotOutgoingConnected () ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotOutgoingBytesWritten ( int ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) );
mXMPPTransfer->sendFile ( XMPP::Jid ( contact->fullAddress () ), KURL(file).fileName (), mLocalFile.size (), "" );
@@ -125,7 +125,7 @@ void JabberFileTransfer::initializeVariables ()
}
-void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName )
+void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName )
{
if ( (long)transfer->info().transferId () != mTransferId )
@@ -188,9 +188,9 @@ void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transf
}
else
{
- connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) );
- connect ( mXMPPTransfer, SIGNAL ( readyRead ( const QByteArray& ) ), this, SLOT ( slotIncomingDataReady ( const QByteArray & ) ) );
- connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) );
+ connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( readyRead ( const TQByteArray& ) ), this, TQT_SLOT ( slotIncomingDataReady ( const TQByteArray & ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) );
mXMPPTransfer->accept ( offset, length );
}
@@ -260,7 +260,7 @@ void JabberFileTransfer::slotTransferError ( int errorCode )
}
-void JabberFileTransfer::slotIncomingDataReady ( const QByteArray &data )
+void JabberFileTransfer::slotIncomingDataReady ( const TQByteArray &data )
{
mBytesTransferred += data.size ();
@@ -306,7 +306,7 @@ void JabberFileTransfer::slotOutgoingBytesWritten ( int nrWritten )
{
int nrToWrite = mXMPPTransfer->dataSizeNeeded ();
- QByteArray readBuffer ( nrToWrite );
+ TQByteArray readBuffer ( nrToWrite );
mLocalFile.readBlock ( readBuffer.data (), nrToWrite );
diff --git a/kopete/protocols/jabber/jabberfiletransfer.h b/kopete/protocols/jabber/jabberfiletransfer.h
index 01ba99e1..296e38ca 100644
--- a/kopete/protocols/jabber/jabberfiletransfer.h
+++ b/kopete/protocols/jabber/jabberfiletransfer.h
@@ -18,7 +18,7 @@
#ifndef JABBERFILETRANSFER_H
#define JABBERFILETRANSFER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <filetransfer.h>
class QString;
@@ -41,12 +41,12 @@ public:
/**
* Constructor for an outgoing transfer
*/
- JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file );
+ JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file );
~JabberFileTransfer ();
private slots:
- void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName );
+ void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName );
void slotTransferRefused ( const Kopete::FileTransferInfo &transfer );
void slotTransferResult ();
void slotTransferError ( int errorCode );
@@ -54,7 +54,7 @@ private slots:
void slotOutgoingConnected ();
void slotOutgoingBytesWritten ( int nrWritten );
- void slotIncomingDataReady ( const QByteArray &data );
+ void slotIncomingDataReady ( const TQByteArray &data );
private:
void initializeVariables ();
@@ -62,7 +62,7 @@ private:
JabberAccount *mAccount;
XMPP::FileTransfer *mXMPPTransfer;
Kopete::Transfer *mKopeteTransfer;
- QFile mLocalFile;
+ TQFile mLocalFile;
int mTransferId;
Q_LLONG mBytesTransferred;
Q_LLONG mBytesToTransfer;
diff --git a/kopete/protocols/jabber/jabberformlineedit.cpp b/kopete/protocols/jabber/jabberformlineedit.cpp
index 04187b20..991d4a56 100644
--- a/kopete/protocols/jabber/jabberformlineedit.cpp
+++ b/kopete/protocols/jabber/jabberformlineedit.cpp
@@ -17,7 +17,7 @@
#include "jabberformlineedit.h"
-JabberFormLineEdit::JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):QLineEdit (value,
+JabberFormLineEdit::JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):TQLineEdit (value,
parent,
name)
{
@@ -38,7 +38,7 @@ JabberFormLineEdit::~JabberFormLineEdit ()
{
}
-JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):KPasswordEdit(parent, name)
+JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):KPasswordEdit(parent, name)
{
setText(value);
diff --git a/kopete/protocols/jabber/jabberformlineedit.h b/kopete/protocols/jabber/jabberformlineedit.h
index 770bab39..179a8844 100644
--- a/kopete/protocols/jabber/jabberformlineedit.h
+++ b/kopete/protocols/jabber/jabberformlineedit.h
@@ -18,8 +18,8 @@
#ifndef JABBERFORMLINEEDIT_H
#define JABBERFORMLINEEDIT_H
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#include <kpassdlg.h>
#include "xmpp_tasks.h"
@@ -32,14 +32,14 @@ class JabberFormLineEdit:public QLineEdit
{
Q_OBJECT public:
- JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0);
+ JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0);
~JabberFormLineEdit ();
public slots:void slotGatherData (XMPP::Form & form);
private:
int fieldType;
- QString fieldName;
+ TQString fieldName;
};
@@ -47,13 +47,13 @@ class JabberFormPasswordEdit:public KPasswordEdit
{
Q_OBJECT public:
- JabberFormPasswordEdit(const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0);
+ JabberFormPasswordEdit(const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0);
public slots:void slotGatherData (XMPP::Form & form);
private:
int fieldType;
- QString fieldName;
+ TQString fieldName;
};
#endif
diff --git a/kopete/protocols/jabber/jabberformtranslator.cpp b/kopete/protocols/jabber/jabberformtranslator.cpp
index fe6ec230..3344f802 100644
--- a/kopete/protocols/jabber/jabberformtranslator.cpp
+++ b/kopete/protocols/jabber/jabberformtranslator.cpp
@@ -15,14 +15,14 @@
* *************************************************************************
*/
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include "jabberformlineedit.h"
#include "jabberformtranslator.h"
-JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * parent, const char *name):QWidget (parent, name)
+JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, TQWidget * parent, const char *name):TQWidget (parent, name)
{
/* Copy basic form values. */
privForm.setJid (form.jid ());
@@ -32,16 +32,16 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
emptyForm = privForm;
/* Add instructions to layout. */
- QVBoxLayout *innerLayout = new QVBoxLayout (this, 0, 4);
+ TQVBoxLayout *innerLayout = new TQVBoxLayout (this, 0, 4);
- QLabel *label = new QLabel (form.instructions (), this, "InstructionLabel");
- label->setAlignment (int (QLabel::WordBreak | QLabel::AlignVCenter));
- label->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed, true);
+ TQLabel *label = new TQLabel (form.instructions (), this, "InstructionLabel");
+ label->setAlignment (int (TQLabel::WordBreak | TQLabel::AlignVCenter));
+ label->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Fixed, true);
label->show ();
innerLayout->addWidget (label, 0);
- QGridLayout *formLayout = new QGridLayout (innerLayout, form.count (), 2);
+ TQGridLayout *formLayout = new TQGridLayout (innerLayout, form.count (), 2);
int row = 1;
XMPP::Form::const_iterator formEnd = form.end ();
@@ -50,11 +50,11 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
kdDebug (14130) << "[JabberFormTranslator] Adding field realName()==" <<
(*it).realName () << ", fieldName()==" << (*it).fieldName () << " to the dialog" << endl;
- label = new QLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ());
+ label = new TQLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ());
formLayout->addWidget (label, row, 0);
label->show ();
- QLineEdit *edit;
+ TQLineEdit *edit;
if ((*it).type() == XMPP::FormField::password)
{
edit = new JabberFormPasswordEdit((*it).type (), (*it).realName (), (*it).value (), this);
@@ -67,7 +67,7 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
formLayout->addWidget (edit, row, 1);
edit->show ();
- connect (this, SIGNAL (gatherData (XMPP::Form &)), edit, SLOT (slotGatherData (XMPP::Form &)));
+ connect (this, TQT_SIGNAL (gatherData (XMPP::Form &)), edit, TQT_SLOT (slotGatherData (XMPP::Form &)));
}
innerLayout->addStretch ();
diff --git a/kopete/protocols/jabber/jabberformtranslator.h b/kopete/protocols/jabber/jabberformtranslator.h
index d9cf4044..875594df 100644
--- a/kopete/protocols/jabber/jabberformtranslator.h
+++ b/kopete/protocols/jabber/jabberformtranslator.h
@@ -18,8 +18,8 @@
#ifndef JABBERFORMTRANSLATOR_H
#define JABBERFORMTRANSLATOR_H
-#include <qwidget.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
#include "xmpp_tasks.h"
@@ -33,7 +33,7 @@ class JabberFormTranslator:public QWidget
Q_OBJECT
public:
- JabberFormTranslator (const XMPP::Form & form, QWidget * parent = 0, const char *name = 0);
+ JabberFormTranslator (const XMPP::Form & form, TQWidget * parent = 0, const char *name = 0);
~JabberFormTranslator ();
XMPP::Form & resultData ();
diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.cpp b/kopete/protocols/jabber/jabbergroupchatmanager.cpp
index 7686ba8c..e098fdad 100644
--- a/kopete/protocols/jabber/jabbergroupchatmanager.cpp
+++ b/kopete/protocols/jabber/jabbergroupchatmanager.cpp
@@ -17,7 +17,7 @@
#include "jabbergroupchatmanager.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
#include "kopetechatsessionmanager.h"
@@ -40,8 +40,8 @@ JabberGroupChatManager::JabberGroupChatManager ( JabberProtocol *protocol, const
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
- connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
- this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
+ connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
+ this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
updateDisplayName ();
}
@@ -102,10 +102,10 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete:
// please don't translate the following string
jabberMessage.setBody ( i18n ( "This message is encrypted." ) );
- QString encryptedBody = message.plainBody ();
+ TQString encryptedBody = message.plainBody ();
// remove PGP header and footer from message
- encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 );
+ encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 );
encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 );
// assign payload to message
@@ -135,7 +135,7 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete:
}
}
-void JabberGroupChatManager::inviteContact( const QString & contactId )
+void JabberGroupChatManager::inviteContact( const TQString & contactId )
{
if( account()->isConnected () )
{
diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.h b/kopete/protocols/jabber/jabbergroupchatmanager.h
index 96c689d0..98fda47a 100644
--- a/kopete/protocols/jabber/jabbergroupchatmanager.h
+++ b/kopete/protocols/jabber/jabbergroupchatmanager.h
@@ -61,7 +61,7 @@ public:
* reimplemented from Kopete::ChatSession
* called when a contact is droped in the window
*/
- virtual void inviteContact(const QString &contactId);
+ virtual void inviteContact(const TQString &contactId);
private slots:
void slotMessageSent ( Kopete::Message &message, Kopete::ChatSession *kmm );
diff --git a/kopete/protocols/jabber/jabbergroupcontact.cpp b/kopete/protocols/jabber/jabbergroupcontact.cpp
index 83d69ab9..4cc9d628 100644
--- a/kopete/protocols/jabber/jabbergroupcontact.cpp
+++ b/kopete/protocols/jabber/jabbergroupcontact.cpp
@@ -58,10 +58,10 @@ JabberGroupContact::JabberGroupContact (const XMPP::RosterItem &rosterItem, Jabb
mManager = new JabberGroupChatManager ( protocol (), mSelfContact,
Kopete::ContactPtrList (), XMPP::Jid ( rosterItem.jid().userHost () ) );
- connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
- connect ( account->myself() , SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) ,
- this , SLOT(slotStatusChanged() ) ) ;
+ connect ( account->myself() , TQT_SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) ,
+ this , TQT_SLOT(slotStatusChanged() ) ) ;
/**
* FIXME: The first contact in the list of the message manager
@@ -109,11 +109,11 @@ JabberGroupContact::~JabberGroupContact ()
}
}
-QPtrList<KAction> *JabberGroupContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberGroupContact::customContextMenuActions ()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
- KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, SLOT (slotChangeNick()), this, "jabber_changenick");
+ KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, TQT_SLOT (slotChangeNick()), this, "jabber_changenick");
actionCollection->append( actionSetNick );
return actionCollection;
@@ -129,7 +129,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla
mManager->addContact ( this );
- connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
//if we have to recreate the manager, we probably have to connect again to the chat.
slotStatusChanged();
@@ -141,7 +141,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla
void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message)
{
// message type is always chat in a groupchat
- QString viewType = "kopete_chatwindow";
+ TQString viewType = "kopete_chatwindow";
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received a message" << endl;
@@ -168,11 +168,11 @@ void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message)
else
{
// retrieve and reformat body
- QString body = message.body ();
+ TQString body = message.body ();
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
// locate the originating contact
@@ -238,7 +238,7 @@ JabberBaseContact *JabberGroupContact::addSubContact ( const XMPP::RosterItem &r
// now, add the contact also to our own list
mContactList.append ( subContact );
- connect(subContact , SIGNAL(contactDestroyed(Kopete::Contact*)) , this , SLOT(slotSubContactDestroyed(Kopete::Contact*)));
+ connect(subContact , TQT_SIGNAL(contactDestroyed(Kopete::Contact*)) , this , TQT_SLOT(slotSubContactDestroyed(Kopete::Contact*)));
return subContact;
@@ -290,17 +290,17 @@ void JabberGroupContact::removeSubContact ( const XMPP::RosterItem &rosterItem )
}
-void JabberGroupContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberGroupContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
@@ -329,7 +329,7 @@ void JabberGroupContact::slotStatusChanged( )
if( !account()->isConnected() )
{
//we need to remove all contact, because when we connect again, we will not receive the notificaion they are gone.
- QPtrList<Kopete::Contact> copy_contactlist=mContactList;
+ TQPtrList<Kopete::Contact> copy_contactlist=mContactList;
for ( Kopete::Contact *contact = copy_contactlist.first (); contact; contact = copy_contactlist.next () )
{
removeSubContact( XMPP::Jid(contact->contactId()) );
@@ -353,7 +353,7 @@ void JabberGroupContact::slotChangeNick( )
{
bool ok;
- QString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ),
+ TQString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ),
i18n( "Please enter the new nick name you want to have on the room <i>%1</i>" ).arg(rosterItem().jid().userHost()),
mNick, &ok );
if ( !ok || !account()->isConnected())
diff --git a/kopete/protocols/jabber/jabbergroupcontact.h b/kopete/protocols/jabber/jabbergroupcontact.h
index c157b823..7cbd4f36 100644
--- a/kopete/protocols/jabber/jabbergroupcontact.h
+++ b/kopete/protocols/jabber/jabbergroupcontact.h
@@ -39,7 +39,7 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Deal with an incoming message for this contact.
@@ -70,7 +70,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
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:
@@ -96,12 +96,12 @@ private slots:
private:
- QPtrList<Kopete::Contact> mContactList;
- QPtrList<Kopete::MetaContact> mMetaContactList;
+ TQPtrList<Kopete::Contact> mContactList;
+ TQPtrList<Kopete::MetaContact> mMetaContactList;
JabberGroupChatManager *mManager;
JabberBaseContact *mSelfContact;
- QString mNick;
+ TQString mNick;
};
#endif
diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.cpp b/kopete/protocols/jabber/jabbergroupmembercontact.cpp
index 2e86b898..ca71b472 100644
--- a/kopete/protocols/jabber/jabbergroupmembercontact.cpp
+++ b/kopete/protocols/jabber/jabbergroupmembercontact.cpp
@@ -56,7 +56,7 @@ JabberGroupMemberContact::~JabberGroupMemberContact ()
}
}
-QPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions ()
{
return 0;
@@ -80,7 +80,7 @@ Kopete::ChatSession *JabberGroupMemberContact::manager ( Kopete::Contact::CanCre
* the global myself() instance for a correct representation.
*/
mManager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers );
- connect ( mManager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
return mManager;
@@ -96,7 +96,7 @@ void JabberGroupMemberContact::slotChatSessionDeleted ()
void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &message )
{
// message type is always chat in a groupchat
- QString viewType = "kopete_chatwindow";
+ TQString viewType = "kopete_chatwindow";
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl;
@@ -124,11 +124,11 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess
else
{
// retrieve and reformat body
- QString body = message.body ();
+ TQString body = message.body ();
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
// convert XMPP::Message into Kopete::Message
@@ -144,17 +144,17 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess
}
-void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.h b/kopete/protocols/jabber/jabbergroupmembercontact.h
index d4ec5b06..2936a5f8 100644
--- a/kopete/protocols/jabber/jabbergroupmembercontact.h
+++ b/kopete/protocols/jabber/jabbergroupmembercontact.h
@@ -40,7 +40,7 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Return message manager for this instance.
@@ -64,7 +64,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
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:
/**
diff --git a/kopete/protocols/jabber/jabberprotocol.cpp b/kopete/protocols/jabber/jabberprotocol.cpp
index ea2e8039..df8dba7d 100644
--- a/kopete/protocols/jabber/jabberprotocol.cpp
+++ b/kopete/protocols/jabber/jabberprotocol.cpp
@@ -26,12 +26,12 @@
#include <kstandarddirs.h>
#include <klineeditdlg.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qmap.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include "im.h"
#include "xmpp.h"
@@ -69,14 +69,14 @@ typedef KGenericFactory<JabberProtocol> JabberProtocolFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_jabber, JabberProtocolFactory( "kopete_jabber" ) )
-JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStringList &)
+JabberProtocol::JabberProtocol (TQObject * parent, const char *name, const TQStringList &)
: Kopete::Protocol( JabberProtocolFactory::instance(), parent, name ),
JabberKOSChatty(Kopete::OnlineStatus::Online, 100, this, JabberFreeForChat, "jabber_chatty", i18n ("Free for Chat"), i18n ("Free for Chat"), Kopete::OnlineStatusManager::FreeForChat, Kopete::OnlineStatusManager::HasAwayMessage ),
- JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, QString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ),
+ JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, TQString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ),
JabberKOSAway(Kopete::OnlineStatus::Away, 80, this, JabberAway, "contact_away_overlay", i18n ("Away"), i18n ("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage),
JabberKOSXA(Kopete::OnlineStatus::Away, 70, this, JabberXA, "contact_xa_overlay", i18n ("Extended Away"), i18n ("Extended Away"), 0, Kopete::OnlineStatusManager::HasAwayMessage),
JabberKOSDND(Kopete::OnlineStatus::Away, 60, this, JabberDND, "contact_busy_overlay", i18n ("Do not Disturb"), i18n ("Do not Disturb"), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage),
- JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, QString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ),
+ JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, TQString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ),
JabberKOSInvisible(Kopete::OnlineStatus::Invisible, 40, this, JabberInvisible, "contact_invisible_overlay", i18n ("Invisible") ,i18n ("Invisible"), Kopete::OnlineStatusManager::Invisible),
JabberKOSConnecting(Kopete::OnlineStatus::Connecting, 30, this, JabberConnecting, "jabber_connecting", i18n("Connecting")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
@@ -90,34 +90,34 @@ JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStrin
propWorkPhone(Kopete::Global::Properties::self()->workPhone()),
propWorkMobilePhone(Kopete::Global::Properties::self()->workMobilePhone()),
propNickName(Kopete::Global::Properties::self()->nickName()),
- propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), QString::null, true, false),
- propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), QString::null, true, false),
+ propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), TQString::null, true, false),
+ propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), TQString::null, true, false),
propAvailableResources("jabberAvailableResources", i18n ("Available Resources"), "jabber_chatty", false, true),
- propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), QString::null, true, false, true),
+ propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), TQString::null, true, false, true),
propPhoto(Kopete::Global::Properties::self()->photo()),
- propJid("jabberVCardJid", i18n("Jabber ID"), QString::null, true, false),
- propBirthday("jabberVCardBirthday", i18n("Birthday"), QString::null, true, false),
- propTimezone("jabberVCardTimezone", i18n("Timezone"), QString::null, true, false),
- propHomepage("jabberVCardHomepage", i18n("Homepage"), QString::null, true, false),
- propCompanyName("jabberVCardCompanyName", i18n("Company name"), QString::null, true, false),
- propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), QString::null, true, false),
- propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), QString::null, true, false),
- propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), QString::null, true, false),
- propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), QString::null, true, false),
- propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), QString::null, true, false),
- propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), QString::null, true, false),
- propWorkCity("jabberVCardWorkCity", i18n("Work City"), QString::null, true, false),
- propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), QString::null, true, false),
- propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), QString::null, true, false),
- propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), QString::null, true, false),
- propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), QString::null, true, false),
- propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), QString::null, true, false),
- propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), QString::null, true, false),
- propHomeCity("jabberVCardHomeCity", i18n("Home City"), QString::null, true, false),
- propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), QString::null, true, false),
- propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), QString::null, true, false),
- propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), QString::null, true, false),
- propAbout("jabberVCardAbout", i18n("About"), QString::null, true, false)
+ propJid("jabberVCardJid", i18n("Jabber ID"), TQString::null, true, false),
+ propBirthday("jabberVCardBirthday", i18n("Birthday"), TQString::null, true, false),
+ propTimezone("jabberVCardTimezone", i18n("Timezone"), TQString::null, true, false),
+ propHomepage("jabberVCardHomepage", i18n("Homepage"), TQString::null, true, false),
+ propCompanyName("jabberVCardCompanyName", i18n("Company name"), TQString::null, true, false),
+ propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), TQString::null, true, false),
+ propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), TQString::null, true, false),
+ propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), TQString::null, true, false),
+ propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), TQString::null, true, false),
+ propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), TQString::null, true, false),
+ propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), TQString::null, true, false),
+ propWorkCity("jabberVCardWorkCity", i18n("Work City"), TQString::null, true, false),
+ propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), TQString::null, true, false),
+ propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), TQString::null, true, false),
+ propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), TQString::null, true, false),
+ propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), TQString::null, true, false),
+ propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), TQString::null, true, false),
+ propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), TQString::null, true, false),
+ propHomeCity("jabberVCardHomeCity", i18n("Home City"), TQString::null, true, false),
+ propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), TQString::null, true, false),
+ propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), TQString::null, true, false),
+ propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), TQString::null, true, false),
+ propAbout("jabberVCardAbout", i18n("About"), TQString::null, true, false)
{
@@ -155,13 +155,13 @@ JabberProtocol::~JabberProtocol ()
-AddContactPage *JabberProtocol::createAddContactWidget (QWidget * parent, Kopete::Account * i)
+AddContactPage *JabberProtocol::createAddContactWidget (TQWidget * parent, Kopete::Account * i)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create Add Contact Widget\n" << endl;
return new JabberAddContactPage (i, parent);
}
-KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, QWidget * parent)
+KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, TQWidget * parent)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Edit Account Widget\n" << endl;
JabberAccount *ja=dynamic_cast < JabberAccount * >(account);
@@ -179,7 +179,7 @@ KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Accoun
}
}
-Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId)
+Kopete::Account *JabberProtocol::createNewAccount (const TQString & accountId)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create New Account. ID: " << accountId << "\n" << endl;
if( Kopete::AccountManager::self()->findAccount( pluginId() , accountId ) )
@@ -188,7 +188,7 @@ Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId)
int slash=accountId.find('/');
if(slash>=0)
{
- QString realAccountId=accountId.left(slash);
+ TQString realAccountId=accountId.left(slash);
JabberAccount *realAccount=dynamic_cast<JabberAccount*>(Kopete::AccountManager::self()->findAccount( pluginId() , realAccountId ));
if(!realAccount) //if it doesn't exist yet, create it
{
@@ -278,16 +278,16 @@ JabberProtocol *JabberProtocol::protocol ()
}
Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaContact,
- const QMap < QString, QString > &serializedData, const QMap < QString, QString > & /* addressBookData */ )
+ const TQMap < TQString, TQString > &serializedData, const TQMap < TQString, TQString > & /* addressBookData */ )
{
// kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Deserializing data for metacontact " << metaContact->displayName () << "\n" << endl;
- QString contactId = serializedData["contactId"];
- QString displayName = serializedData["displayName"];
- QString accountId = serializedData["accountId"];
- QString jid = serializedData["JID"];
+ TQString contactId = serializedData["contactId"];
+ TQString displayName = serializedData["displayName"];
+ TQString accountId = serializedData["accountId"];
+ TQString jid = serializedData["JID"];
- QDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this);
+ TQDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this);
Kopete::Account *account = accounts[accountId];
if (!account)
@@ -304,7 +304,7 @@ Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaC
return account->contacts()[contactId];
}
-XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const QString & message )
+XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const TQString & message )
{
XMPP::Status xmppStatus ( "", message );
diff --git a/kopete/protocols/jabber/jabberprotocol.h b/kopete/protocols/jabber/jabberprotocol.h
index 798aafb4..35c8cdbc 100644
--- a/kopete/protocols/jabber/jabberprotocol.h
+++ b/kopete/protocols/jabber/jabberprotocol.h
@@ -19,11 +19,11 @@
#ifndef JABBERPROTOCOL_H
#define JABBERPROTOCOL_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qmovie.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqmovie.h>
#include <kaction.h>
#include <kpopupmenu.h>
@@ -55,21 +55,21 @@ public:
/**
* Object constructor and destructor
*/
- JabberProtocol (QObject * parent, const char *name, const QStringList &);
+ JabberProtocol (TQObject * parent, const char *name, const TQStringList &);
~JabberProtocol ();
/**
* Creates the "add contact" dialog specific to this protocol
*/
- 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);
/**
* Deserialize contact data
*/
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);
enum OnlineStatus { JabberOnline, JabberFreeForChat, JabberAway, JabberXA, JabberDND,
JabberOffline, JabberInvisible, JabberConnecting };
@@ -142,7 +142,7 @@ public:
/**
* Convert an online status to a XMPP::Status
*/
- XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const QString& message=QString() );
+ XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const TQString& message=TQString() );
/**
* Return the Entity Capabilities(JEP-0115) manager instance.
diff --git a/kopete/protocols/jabber/jabberresource.cpp b/kopete/protocols/jabber/jabberresource.cpp
index e74a0fa9..04b7d9f3 100644
--- a/kopete/protocols/jabber/jabberresource.cpp
+++ b/kopete/protocols/jabber/jabberresource.cpp
@@ -19,7 +19,7 @@
#include "jabberresource.h"
// Qt includes
-#include <qtimer.h>
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -47,7 +47,7 @@ public:
XMPP::Jid jid;
XMPP::Resource resource;
- QString clientName, clientSystem;
+ TQString clientName, clientSystem;
XMPP::Features supportedFeatures;
bool capsEnabled;
};
@@ -59,10 +59,10 @@ JabberResource::JabberResource ( JabberAccount *account, const XMPP::Jid &jid, c
if ( account->isConnected () )
{
- QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedClientVersion () ) );
+ TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedClientVersion () ) );
if(!d->capsEnabled)
{
- QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetDiscoCapabilties () ) );
+ TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetDiscoCapabilties () ) );
}
}
}
@@ -92,12 +92,12 @@ void JabberResource::setResource ( const XMPP::Resource &resource )
emit updated( this );
}
-const QString &JabberResource::clientName () const
+const TQString &JabberResource::clientName () const
{
return d->clientName;
}
-const QString &JabberResource::clientSystem () const
+const TQString &JabberResource::clientSystem () const
{
return d->clientSystem;
}
@@ -123,7 +123,7 @@ void JabberResource::slotGetTimedClientVersion ()
// request client version
XMPP::JT_ClientVersion *task = new XMPP::JT_ClientVersion ( d->account->client()->rootTask () );
// signal to ourselves when the vCard data arrived
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotClientVersion () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotClientVersion () ) );
task->get ( d->jid );
task->go ( true );
}
@@ -150,7 +150,7 @@ void JabberResource:: slotGetDiscoCapabilties ()
XMPP:: JT_DiscoInfo *task = new XMPP::JT_DiscoInfo ( d->account->client()->rootTask () );
// Retrive features when service discovery is done.
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT (slotGotDiscoCapabilities () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT (slotGotDiscoCapabilities () ) );
task->get ( d->jid);
task->go ( true );
}
diff --git a/kopete/protocols/jabber/jabberresource.h b/kopete/protocols/jabber/jabberresource.h
index 7b398c09..b29129be 100644
--- a/kopete/protocols/jabber/jabberresource.h
+++ b/kopete/protocols/jabber/jabberresource.h
@@ -23,8 +23,8 @@
* Container class for a contact's resource
*/
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class JabberAccount;
@@ -55,12 +55,12 @@ public:
* Return the client name for this resource.
* @return the client name
*/
- const QString &clientName () const;
+ const TQString &clientName () const;
/**
* Return the client system for this resource.
* @return the client system.
*/
- const QString &clientSystem () const;
+ const TQString &clientSystem () const;
/**
* Get the available features for this resource.
diff --git a/kopete/protocols/jabber/jabberresourcepool.cpp b/kopete/protocols/jabber/jabberresourcepool.cpp
index 9d953ce6..19492790 100644
--- a/kopete/protocols/jabber/jabberresourcepool.cpp
+++ b/kopete/protocols/jabber/jabberresourcepool.cpp
@@ -16,7 +16,7 @@
* *************************************************************************
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include "jabberresourcepool.h"
@@ -44,8 +44,8 @@ public:
pool.setAutoDelete(true);
}
- QPtrList<JabberResource> pool;
- QPtrList<JabberResource> lockList;
+ TQPtrList<JabberResource> pool;
+ TQPtrList<JabberResource> lockList;
/**
* Pointer to the JabberAccount instance.
@@ -62,7 +62,7 @@ JabberResourcePool::~JabberResourcePool ()
delete d;
}
-void JabberResourcePool::slotResourceDestroyed (QObject *sender)
+void JabberResourcePool::slotResourceDestroyed (TQObject *sender)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Resource has been destroyed, collecting the pieces." << endl;
@@ -74,7 +74,7 @@ void JabberResourcePool::slotResourceDestroyed (QObject *sender)
void JabberResourcePool::slotResourceUpdated ( JabberResource *resource )
{
- QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () );
+ TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () );
for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ())
{
@@ -91,7 +91,7 @@ void JabberResourcePool::slotResourceUpdated ( JabberResource *resource )
void JabberResourcePool::notifyRelevantContacts ( const XMPP::Jid &jid )
{
- QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid );
+ TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid );
for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ())
{
@@ -133,8 +133,8 @@ void JabberResourcePool::addResource ( const XMPP::Jid &jid, const XMPP::Resourc
// create new resource instance and add it to the dictionary
JabberResource *newResource = new JabberResource(d->account, jid, resource);
- connect ( newResource, SIGNAL ( destroyed (QObject *) ), this, SLOT ( slotResourceDestroyed (QObject *) ) );
- connect ( newResource, SIGNAL ( updated (JabberResource *) ), this, SLOT ( slotResourceUpdated (JabberResource *) ) );
+ connect ( newResource, TQT_SIGNAL ( destroyed (TQObject *) ), this, TQT_SLOT ( slotResourceDestroyed (TQObject *) ) );
+ connect ( newResource, TQT_SIGNAL ( updated (JabberResource *) ), this, TQT_SLOT ( slotResourceUpdated (JabberResource *) ) );
d->pool.append ( newResource );
// send notifications out to the relevant contacts that
@@ -189,7 +189,7 @@ void JabberResourcePool::clear ()
* and then notify all JIDs after the resources have been deleted.
*/
- QStringList jidList;
+ TQStringList jidList;
for ( JabberResource *mResource = d->pool.first (); mResource; mResource = d->pool.next () )
{
@@ -206,7 +206,7 @@ void JabberResourcePool::clear ()
* Now go through the list of JIDs and notify each contact
* of its status change
*/
- for ( QStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it )
+ for ( TQStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it )
{
notifyRelevantContacts ( XMPP::Jid ( *it ) );
}
diff --git a/kopete/protocols/jabber/jabberresourcepool.h b/kopete/protocols/jabber/jabberresourcepool.h
index a6cefcde..7378cbe0 100644
--- a/kopete/protocols/jabber/jabberresourcepool.h
+++ b/kopete/protocols/jabber/jabberresourcepool.h
@@ -19,7 +19,7 @@
#ifndef JABBERRESOURCEPOOL_H
#define JABBERRESOURCEPOOL_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
class JabberResource;
@@ -35,7 +35,7 @@ class JabberResourcePool : public QObject
public:
static XMPP::Resource EmptyResource;
- typedef QPtrList<JabberResource> ResourceList;
+ typedef TQPtrList<JabberResource> ResourceList;
/**
* Default constructor
@@ -118,7 +118,7 @@ public:
void findResources ( const XMPP::Jid &jid, XMPP::ResourceList &resourceList );
private slots:
- void slotResourceDestroyed ( QObject *sender );
+ void slotResourceDestroyed ( TQObject *sender );
void slotResourceUpdated ( JabberResource *resource );
private:
diff --git a/kopete/protocols/jabber/jabbertransport.cpp b/kopete/protocols/jabber/jabbertransport.cpp
index e7a8e7d3..26d16b28 100644
--- a/kopete/protocols/jabber/jabbertransport.cpp
+++ b/kopete/protocols/jabber/jabbertransport.cpp
@@ -29,8 +29,8 @@
#include <kopeteversion.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kdebug.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
#include "xmpp_tasks.h"
-JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const QString& gateway_type)
+JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const TQString& gateway_type)
: Kopete::Account ( parentAccount->protocol(), parentAccount->accountId()+"/"+ item.jid().bare() )
{
m_status=Creating;
@@ -53,7 +53,7 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros
setColor( account()->color() );
#if KOPETE_IS_VERSION(0,11,51) //setCustomIcon is new in kopete 0.12
- QString cIcon;
+ TQString cIcon;
if(gateway_type=="msn")
cIcon="jabber_gateway_msn";
else if(gateway_type=="icq")
@@ -83,18 +83,18 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros
configGroup()->writeEntry("GatewayJID" , item.jid().full() );
- QTimer::singleShot(0, this, SLOT(eatContacts()));
+ TQTimer::singleShot(0, this, TQT_SLOT(eatContacts()));
m_status=Normal;
}
-JabberTransport::JabberTransport( JabberAccount * parentAccount, const QString & _accountId )
+JabberTransport::JabberTransport( JabberAccount * parentAccount, const TQString & _accountId )
: Kopete::Account ( parentAccount->protocol(), _accountId )
{
m_status=Creating;
m_account = parentAccount;
- const QString contactJID_s = configGroup()->readEntry("GatewayJID");
+ const TQString contactJID_s = configGroup()->readEntry("GatewayJID");
if(contactJID_s.isEmpty())
{
@@ -124,13 +124,13 @@ JabberTransport::~JabberTransport ()
KActionMenu *JabberTransport::actionMenu ()
{
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 )
);
- QPtrList<KAction> *customActions = myself()->customContextMenuActions( );
+ TQPtrList<KAction> *customActions = myself()->customContextMenuActions( );
if( customActions && !customActions->isEmpty() )
{
menu->popupMenu()->insertSeparator();
@@ -147,28 +147,28 @@ KActionMenu *JabberTransport::actionMenu ()
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert(new KAction (i18n ("Join Groupchat..."), "jabber_group", 0,
- this, SLOT (slotJoinNewChat ()), this, "actionJoinChat"));
+ this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat"));
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert ( new KAction ( i18n ("Services..."), "jabber_serv_on", 0,
- this, SLOT ( slotGetServices () ), this, "actionJabberServices") );
+ this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices") );
m_actionMenu->insert ( new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0,
- this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") );
+ this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") );
m_actionMenu->insert ( new KAction ( i18n ("Edit User Info..."), "identity", 0,
- this, SLOT ( slotEditVCard () ), this, "actionEditVCard") );
+ this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") );
return m_actionMenu;*/
}
-bool JabberTransport::createContact (const QString & contactId, Kopete::MetaContact * metaContact)
+bool JabberTransport::createContact (const TQString & contactId, Kopete::MetaContact * metaContact)
{
#if 0 //TODO
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = metaContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -188,7 +188,7 @@ bool JabberTransport::createContact (const QString & contactId, Kopete::MetaCon
}
-void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason)
+void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason)
{
#if 0
if( status.status() == Kopete::OnlineStatus::Offline )
@@ -263,7 +263,7 @@ bool JabberTransport::removeAccount( )
m_status = Removing;
XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( removeAllContacts() ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( removeAllContacts() ) );
//JabberContact *my=static_cast<JabberContact*>(myself());
task->unreg ( myself()->contactId() );
@@ -282,7 +282,7 @@ void JabberTransport::removeAllContacts( )
*/ //we don't really care, we remove everithing anyway.
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "delete all contacts of the transport"<< endl;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for( ; it.current(); ++it )
{
XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () );
@@ -293,11 +293,11 @@ void JabberTransport::removeAllContacts( )
Kopete::AccountManager::self()->removeAccount( this ); //this will delete this
}
-QString JabberTransport::legacyId( const XMPP::Jid & jid )
+TQString JabberTransport::legacyId( const XMPP::Jid & jid )
{
if(jid.node().isEmpty())
- return QString();
- QString node = jid.node();
+ return TQString();
+ TQString node = jid.node();
return node.replace("%","@");
}
@@ -319,8 +319,8 @@ void JabberTransport::eatContacts( )
* - Olivier 2006-01-17 -
*/
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl;
- QDict<Kopete::Contact> cts=account()->contacts();
- QDictIterator<Kopete::Contact> it( cts );
+ TQDict<Kopete::Contact> cts=account()->contacts();
+ TQDictIterator<Kopete::Contact> it( cts );
for( ; it.current(); ++it )
{
JabberContact *contact=dynamic_cast<JabberContact*>(it.current());
diff --git a/kopete/protocols/jabber/jabbertransport.h b/kopete/protocols/jabber/jabbertransport.h
index b26fd9c0..605f5cc4 100644
--- a/kopete/protocols/jabber/jabbertransport.h
+++ b/kopete/protocols/jabber/jabbertransport.h
@@ -48,14 +48,14 @@ public:
* @param item is the roster item of the gateway
* @param gateway_type eg: "msn" or "icq" only used when the account is not loaded from config file for determining the icon
*/
- JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const QString& gateway_type=QString());
+ JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const TQString& gateway_type=TQString());
/**
* constructor called when the transport is loaded from config
* @param parentAccount is the parent jabber account.
* @param accountId is the accountId
*/
- JabberTransport (JabberAccount * parentAccount, const QString &accountId );
+ JabberTransport (JabberAccount * parentAccount, const TQString &accountId );
~JabberTransport ();
@@ -86,12 +86,12 @@ public:
* return the legacyId conrresponding to the jid
* example: jhon%msn.com@msn.foojabber.org -> jhon@msn.com
*/
- QString legacyId( const XMPP::Jid &jid );
+ TQString legacyId( const XMPP::Jid &jid );
public slots:
/* 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);
/**
* the account has been unregistered.
@@ -127,7 +127,7 @@ protected:
* @param contactId The unique ID for this protocol
* @param parentContact The metacontact to add this contact to
*/
- virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact);
+ virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact);
private:
JabberAccount *m_account;
diff --git a/kopete/protocols/jabber/jingle/jinglesession.cpp b/kopete/protocols/jabber/jingle/jinglesession.cpp
index 6c370fca..9bebb3b8 100644
--- a/kopete/protocols/jabber/jingle/jinglesession.cpp
+++ b/kopete/protocols/jabber/jingle/jinglesession.cpp
@@ -34,7 +34,7 @@ public:
};
JingleSession::JingleSession(JabberAccount *account, const JidList &peers)
- : QObject(account, 0), d(new Private(account, peers))
+ : TQObject(account, 0), d(new Private(account, peers))
{
d->myself = account->client()->jid();
}
@@ -64,7 +64,7 @@ JabberAccount *JingleSession::account()
return d->account;
}
-void JingleSession::sendStanza(const QString &stanza)
+void JingleSession::sendStanza(const TQString &stanza)
{
account()->client()->send( stanza );
}
diff --git a/kopete/protocols/jabber/jingle/jinglesession.h b/kopete/protocols/jabber/jingle/jinglesession.h
index 00c192bd..a9d73440 100644
--- a/kopete/protocols/jabber/jingle/jinglesession.h
+++ b/kopete/protocols/jabber/jingle/jinglesession.h
@@ -17,11 +17,11 @@
#ifndef JINGLESESSION_H
#define JINGLESESSION_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <xmpp.h> // XMPP::Jid
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class JabberAccount;
/**
@@ -33,7 +33,7 @@ class JingleSession : public QObject
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleSession(JabberAccount *account, const JidList &peers);
virtual ~JingleSession();
@@ -52,7 +52,7 @@ public:
* Note that you must return the XML namespace that define
* the session: ex:(http://jabber.org/protocol/jingle/sessions/audio)
*/
- virtual QString sessionType() = 0;
+ virtual TQString sessionType() = 0;
public slots:
/**
@@ -74,7 +74,7 @@ public slots:
virtual void terminate() = 0;
protected slots:
- void sendStanza(const QString &stanza);
+ void sendStanza(const TQString &stanza);
signals:
/**
diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
index aeec2889..54fc7274 100644
--- a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
+++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
@@ -90,7 +90,7 @@ public:
}
JabberAccount *account;
- QValueList<JingleSession*> sessionList;
+ TQValueList<JingleSession*> sessionList;
JingleWatchSessionTask *watchSessionTask;
cricket::NetworkManager *networkManager;
@@ -101,18 +101,18 @@ public:
//END JingleSessionManager::Private
JingleSessionManager::JingleSessionManager(JabberAccount *account)
- : QObject(account, 0), d(new Private(account))
+ : TQObject(account, 0), d(new Private(account))
{
// Create slots proxy for libjingle
slotsProxy = new SlotsProxy(this);
// Create watch incoming session task.
d->watchSessionTask = new JingleWatchSessionTask(account->client()->rootTask());
- connect(d->watchSessionTask, SIGNAL(watchSession(const QString &, const QString &)), this, SLOT(slotIncomingSession(const QString &, const QString &)));
+ connect(d->watchSessionTask, TQT_SIGNAL(watchSession(const TQString &, const TQString &)), this, TQT_SLOT(slotIncomingSession(const TQString &, const TQString &)));
// Create global cricket variables common to all sessions.
// Seed random generation with the JID of the account.
- QString accountJid = account->client()->jid().full();
+ TQString accountJid = account->client()->jid().full();
cricket::InitRandom( accountJid.ascii(), accountJid.length() );
// Create the libjingle NetworkManager that manager local network connections
@@ -137,7 +137,7 @@ JingleSessionManager::~JingleSessionManager()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl;
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Cleaning up Jingle sessions." << endl;
- QValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end();
+ TQValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end();
for(it = d->sessionList.begin(); it != itEnd; ++it)
{
JingleSession *deletedSession = *it;
@@ -162,7 +162,7 @@ JabberAccount *JingleSessionManager::account()
return d->account;
}
-JingleSession *JingleSessionManager::createSession(const QString &sessionType, const JidList &peers)
+JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const JidList &peers)
{
JingleSession *newSession = 0L;
@@ -178,7 +178,7 @@ JingleSession *JingleSessionManager::createSession(const QString &sessionType, c
return newSession;
}
-JingleSession *JingleSessionManager::createSession(const QString &sessionType, const XMPP::Jid &user)
+JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const XMPP::Jid &user)
{
JingleSessionManager::JidList jidList;
jidList.append(user);
@@ -194,7 +194,7 @@ void JingleSessionManager::removeSession(JingleSession *session)
delete session;
}
-void JingleSessionManager::slotIncomingSession(const QString &sessionType, const QString &initiator)
+void JingleSessionManager::slotIncomingSession(const TQString &sessionType, const TQString &initiator)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Incoming session: " << sessionType << ". Initiator: " << initiator << endl;
diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.h b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
index 06951c2f..f9bb82b9 100644
--- a/kopete/protocols/jabber/jingle/jinglesessionmanager.h
+++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
@@ -20,8 +20,8 @@
#include <xmpp.h>
#include <im.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
namespace cricket
{
@@ -40,7 +40,7 @@ class JingleSessionManager : public QObject
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleSessionManager(JabberAccount *account);
~JingleSessionManager();
@@ -61,22 +61,22 @@ public slots:
* @param sessionType the session you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param peers Lists of participants of the session.
*/
- JingleSession *createSession(const QString &sessionType, const JidList &peers);
+ JingleSession *createSession(const TQString &sessionType, const JidList &peers);
/**
* Override method that create a session for a one-to-one session.
* It behave like createSession method.
* @param sessionType the sesion you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param user The JID of the user you want to begin a session with.
*/
- JingleSession *createSession(const QString &sessionType, const XMPP::Jid &user);
+ JingleSession *createSession(const TQString &sessionType, const XMPP::Jid &user);
void removeSession(JingleSession *session);
signals:
- void incomingSession(const QString &sessionType, JingleSession *session);
+ void incomingSession(const TQString &sessionType, JingleSession *session);
private slots:
- void slotIncomingSession(const QString &sessionType, const QString &initiator);
+ void slotIncomingSession(const TQString &sessionType, const TQString &initiator);
private:
class Private;
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
index 3ad6a89a..dd809cea 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
@@ -20,8 +20,8 @@
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
@@ -47,7 +47,7 @@ public:
JingleIQResponder(XMPP::Task *);
~JingleIQResponder();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
/**
@@ -63,14 +63,14 @@ JingleIQResponder::~JingleIQResponder()
{
}
-bool JingleIQResponder::take(const QDomElement &e)
+bool JingleIQResponder::take(const TQDomElement &e)
{
if(e.tagName() != "iq")
return false;
- QDomElement first = e.firstChild().toElement();
+ TQDomElement first = e.firstChild().toElement();
if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
@@ -114,7 +114,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
qDebug("JingleClientSlots: Call destroyed");
Jid jid(call->sessions()[0]->remote_address().c_str());
if (voiceCaller_->calling(jid)) {
- qDebug(QString("Removing unterminated call to %1").arg(jid.full()));
+ qDebug(TQString("Removing unterminated call to %1").arg(jid.full()));
voiceCaller_->removeCall(jid);
emit voiceCaller_->terminated(jid);
}
@@ -122,7 +122,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza)
{
- QString st(stanza->Str().c_str());
+ TQString st(stanza->Str().c_str());
st.replace("cli:iq","iq");
st.replace(":cli=","=");
fprintf(stderr,"bling\n");
@@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling()
void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state)
{
- qDebug(QString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
+ qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
// Why is c_str() stuff needed to make it compile on OS X ?
Jid jid(session->remote_address().c_str());
@@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess
}
else if (state == cricket::Session::STATE_SENTMODIFY) { }
else if (state == cricket::Session::STATE_RECEIVEDMODIFY) {
- qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
+ qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
}
else if (state == cricket::Session::STATE_SENTREJECT) { }
else if (state == cricket::Session::STATE_RECEIVEDREJECT) {
@@ -194,8 +194,8 @@ void JingleVoiceCaller::initialize()
if (initialized_)
return;
- QString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
- qDebug(QString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
+ TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
+ qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
if (jid.isEmpty()) {
qWarning("jinglevoicecaller.cpp: Empty JID");
return;
@@ -233,7 +233,7 @@ void JingleVoiceCaller::initialize()
new JingleIQResponder(account()->client()->rootTask());
// Listen to incoming packets
- connect(account()->client()->client(),SIGNAL(xmlIncoming(const QString&)),SLOT(receiveStanza(const QString&)));
+ connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&)));
initialized_ = true;
}
@@ -245,7 +245,7 @@ void JingleVoiceCaller::deinitialize()
return;
// Stop listening to incoming packets
- disconnect(account()->client(),SIGNAL(xmlIncoming(const QString&)),this,SLOT(receiveStanza(const QString&)));
+ disconnect(account()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),this,TQT_SLOT(receiveStanza(const TQString&)));
// Disconnect signals (is this needed)
//phone_client_->SignalCallCreate.disconnect(slots_);
@@ -271,7 +271,7 @@ bool JingleVoiceCaller::calling(const Jid& jid)
void JingleVoiceCaller::call(const Jid& jid)
{
- qDebug(QString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall();
c->InitiateSession(buzz::Jid(jid.full().ascii()));
phone_client_->SetFocus(c);
@@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j)
void JingleVoiceCaller::terminate(const Jid& j)
{
- qDebug(QString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
cricket::Call* call = calls_[j.full()];
if (call != NULL) {
call->Terminate();
@@ -309,7 +309,7 @@ void JingleVoiceCaller::terminate(const Jid& j)
void JingleVoiceCaller::sendStanza(const char* stanza)
{
- account()->client()->send(QString(stanza));
+ account()->client()->send(TQString(stanza));
}
void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
@@ -327,19 +327,19 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
void JingleVoiceCaller::removeCall(const Jid& j)
{
- qDebug(QString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
+ qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
calls_.remove(j.full());
}
-void JingleVoiceCaller::receiveStanza(const QString& stanza)
+void JingleVoiceCaller::receiveStanza(const TQString& stanza)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(stanza);
// Check if it is offline presence from an open chat
if (doc.documentElement().tagName() == "presence") {
Jid from = Jid(doc.documentElement().attribute("from"));
- QString type = doc.documentElement().attribute("type");
+ TQString type = doc.documentElement().attribute("type");
if (type == "unavailable" && calls_.contains(from.full())) {
qDebug("JingleVoiceCaller: User went offline without closing a call.");
removeCall(from);
@@ -351,10 +351,10 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Check if the packet is destined for libjingle.
// We could use Session::IsClientStanza to check this, but this one crashes
// for some reason.
- QDomNode n = doc.documentElement().firstChild();
+ TQDomNode n = doc.documentElement().firstChild();
bool ok = false;
while (!n.isNull() && !ok) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull() && e.attribute("xmlns") == JINGLE_NS) {
ok = true;
}
@@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Spread the word
if (ok) {
- qDebug(QString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
+ qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii());
phone_client_->OnIncomingStanza(e);
}
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.h b/kopete/protocols/jabber/jingle/jinglevoicecaller.h
index 4448d530..50070289 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicecaller.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.h
@@ -3,7 +3,7 @@
#ifndef JINGLEVOICECALLER_H
#define JINGLEVOICECALLER_H
-#include <qmap.h>
+#include <tqmap.h>
#include "im.h"
#include "voicecaller.h"
@@ -54,7 +54,7 @@ protected:
void removeCall(const Jid&);
protected slots:
- void receiveStanza(const QString&);
+ void receiveStanza(const TQString&);
private:
bool initialized_;
@@ -66,7 +66,7 @@ private:
cricket::SessionManager *session_manager_;
cricket::PhoneSessionClient *phone_client_;
JingleClientSlots *slots_;
- QMap<QString,cricket::Call*> calls_;
+ TQMap<TQString,cricket::Call*> calls_;
};
#endif
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
index 09019ce4..91fa1a77 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
@@ -39,7 +39,7 @@
#include "jinglesessionmanager.h"
// Qt includes
-#include <qdom.h>
+#include <tqdom.h>
// KDE includes
#include <kdebug.h>
@@ -115,7 +115,7 @@ public:
{}
else if (state == cricket::Session::STATE_RECEIVEDMODIFY)
{
- //qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
+ //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
}
else if (state == cricket::Session::STATE_SENTREJECT)
{}
@@ -141,7 +141,7 @@ public:
void OnSendingStanza(cricket::SessionClient*, const buzz::XmlElement *buzzStanza)
{
- QString irisStanza(buzzStanza->Str().c_str());
+ TQString irisStanza(buzzStanza->Str().c_str());
irisStanza.replace("cli:iq","iq");
irisStanza.replace(":cli=","=");
@@ -159,7 +159,7 @@ public:
JingleIQResponder(XMPP::Task *);
~JingleIQResponder();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
/**
@@ -175,14 +175,14 @@ JingleVoiceSession::JingleIQResponder::~JingleIQResponder()
{
}
-bool JingleVoiceSession::JingleIQResponder::take(const QDomElement &e)
+bool JingleVoiceSession::JingleIQResponder::take(const TQDomElement &e)
{
if(e.tagName() != "iq")
return false;
- QDomElement first = e.firstChild().toElement();
+ TQDomElement first = e.firstChild().toElement();
if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
@@ -224,7 +224,7 @@ JingleVoiceSession::JingleVoiceSession(JabberAccount *account, const JidList &pe
d->phoneSessionClient->SignalCallCreate.connect(slotsProxy, &JingleVoiceSession::SlotsProxy::OnCallCreated);
// Listen to incoming packets
- connect(account->client()->client(), SIGNAL(xmlIncoming(const QString&)), this, SLOT(receiveStanza(const QString&)));
+ connect(account->client()->client(), TQT_SIGNAL(xmlIncoming(const TQString&)), this, TQT_SLOT(receiveStanza(const TQString&)));
new JingleIQResponder(account->client()->rootTask());
}
@@ -236,9 +236,9 @@ JingleVoiceSession::~JingleVoiceSession()
delete d;
}
-QString JingleVoiceSession::sessionType()
+TQString JingleVoiceSession::sessionType()
{
- return QString(JINGLE_VOICE_SESSION_NS);
+ return TQString(JINGLE_VOICE_SESSION_NS);
}
void JingleVoiceSession::start()
@@ -246,7 +246,7 @@ void JingleVoiceSession::start()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Starting a voice session..." << endl;
d->currentCall = d->phoneSessionClient->CreateCall();
- QString firstPeerJid = ((XMPP::Jid)peers().first()).full();
+ TQString firstPeerJid = ((XMPP::Jid)peers().first()).full();
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "With peer: " << firstPeerJid << endl;
d->currentCall->InitiateSession( buzz::Jid(firstPeerJid.ascii()) );
@@ -287,16 +287,16 @@ void JingleVoiceSession::setCall(cricket::Call *call)
d->phoneSessionClient->SetFocus(d->currentCall);
}
-void JingleVoiceSession::receiveStanza(const QString &stanza)
+void JingleVoiceSession::receiveStanza(const TQString &stanza)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(stanza);
// Check if it is offline presence from an open chat
if( doc.documentElement().tagName() == "presence" )
{
XMPP::Jid from = XMPP::Jid(doc.documentElement().attribute("from"));
- QString type = doc.documentElement().attribute("type");
+ TQString type = doc.documentElement().attribute("type");
if( type == "unavailable" && hasPeer(peers(), from) )
{
//qDebug("JingleVoiceCaller: User went offline without closing a call.");
@@ -309,11 +309,11 @@ void JingleVoiceSession::receiveStanza(const QString &stanza)
// Check if the packet is destined for libjingle.
// We could use Session::IsClientStanza to check this, but this one crashes
// for some reason.
- QDomNode node = doc.documentElement().firstChild();
+ TQDomNode node = doc.documentElement().firstChild();
bool ok = false;
while( !node.isNull() && !ok )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() && element.attribute("xmlns") == JINGLE_NS)
{
ok = true;
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.h b/kopete/protocols/jabber/jingle/jinglevoicesession.h
index e70d3b54..2769d351 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesession.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicesession.h
@@ -20,7 +20,7 @@
#include <jinglesession.h>
#include <xmpp.h> // XMPP::Jid
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace cricket
{
@@ -39,12 +39,12 @@ class JingleVoiceSession : public JingleSession
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleVoiceSession(JabberAccount *account, const JidList &peers);
virtual ~JingleVoiceSession();
- virtual QString sessionType();
+ virtual TQString sessionType();
public slots:
virtual void accept();
@@ -53,7 +53,7 @@ public slots:
virtual void terminate();
protected slots:
- void receiveStanza(const QString &stanza);
+ void receiveStanza(const TQString &stanza);
private:
void setCall(cricket::Call *call);
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
index 9fb61274..b017cdfd 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
@@ -17,9 +17,9 @@
#include "jinglevoicesessiondialog.h"
// Qt includes
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
// Jingle includes
// #include "jinglevoicesession.h"
@@ -40,27 +40,27 @@
using namespace XMPP;
-JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent, const char *name)
+JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent, const char *name)
: JingleVoiceSessionDialogBase(parent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming)
{
- QString contactJid = m_peerJid.full();
+ TQString contactJid = m_peerJid.full();
setCaption( i18n("Voice session with %1").arg(contactJid) );
- connect(buttonAccept, SIGNAL(clicked()), this, SLOT(slotAcceptClicked()));
- connect(buttonDecline, SIGNAL(clicked()), this, SLOT(slotDeclineClicked()));
- connect(buttonTerminate, SIGNAL(clicked()), this, SLOT(slotTerminateClicked()));
+ connect(buttonAccept, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAcceptClicked()));
+ connect(buttonDecline, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeclineClicked()));
+ connect(buttonTerminate, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTerminateClicked()));
// NOTE: Disabled for 0.12
#if 0
- connect(m_session, SIGNAL(sessionStarted()), this, SLOT(sessionStarted()));
- connect(m_session, SIGNAL(accepted()), this, SLOT(sessionAccepted()));
- connect(m_session, SIGNAL(declined()), this, SLOT(sessionDeclined()));
- connect(m_session, SIGNAL(terminated()), this, SLOT(sessionTerminated()));
+ connect(m_session, TQT_SIGNAL(sessionStarted()), this, TQT_SLOT(sessionStarted()));
+ connect(m_session, TQT_SIGNAL(accepted()), this, TQT_SLOT(sessionAccepted()));
+ connect(m_session, TQT_SIGNAL(declined()), this, TQT_SLOT(sessionDeclined()));
+ connect(m_session, TQT_SIGNAL(terminated()), this, TQT_SLOT(sessionTerminated()));
#endif
- connect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) ));
- connect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) ));
- connect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) ));
- connect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) ));
// Find JabberContact for the peer and fill this dialog with contact information.
JabberContact *peerContact = static_cast<JabberContact*>( m_session->account()->contactPool()->findRelevantRecipient( m_peerJid ) );
@@ -84,12 +84,12 @@ void JingleVoiceSessionDialog::setContactInformation(JabberContact *contact)
if( contact->metaContact() )
{
labelDisplayName->setText( contact->metaContact()->displayName() );
- labelContactPhoto->setPixmap( QPixmap(contact->metaContact()->photo()) );
+ labelContactPhoto->setPixmap( TQPixmap(contact->metaContact()->photo()) );
}
else
{
labelDisplayName->setText( contact->nickName() );
- labelDisplayName->setPixmap( QPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) );
+ labelDisplayName->setPixmap( TQPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) );
}
}
@@ -194,15 +194,15 @@ void JingleVoiceSessionDialog::sessionTerminated(const Jid &jid)
void JingleVoiceSessionDialog::reject()
{
finalize();
- QDialog::reject();
+ TQDialog::reject();
}
void JingleVoiceSessionDialog::finalize()
{
- disconnect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) ));
- disconnect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) ));
- disconnect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) ));
- disconnect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) ));
}
#include "jinglevoicesessiondialog.moc"
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
index 29d0c091..1a911bae 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
@@ -33,7 +33,7 @@ class JingleVoiceSessionDialog : public JingleVoiceSessionDialogBase
public:
enum SessionState { Incoming, Waiting, Accepted, Declined, Started, Terminated };
- JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent = 0, const char *name = 0);
+ JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent = 0, const char *name = 0);
~JingleVoiceSessionDialog();
public slots:
diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
index fc7de053..571f9ff6 100644
--- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
+++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
@@ -31,30 +31,30 @@ JingleWatchSessionTask::~JingleWatchSessionTask()
{}
//NOTE: This task watch for pre-JEP session.
-bool JingleWatchSessionTask::take(const QDomElement &element)
+bool JingleWatchSessionTask::take(const TQDomElement &element)
{
if(element.tagName() != "iq")
return false;
- QString sessionType, initiator;
+ TQString sessionType, initiator;
- QDomElement first = element.firstChild().toElement();
+ TQDomElement first = element.firstChild().toElement();
if( !first.isNull() && first.attribute("xmlns") == JINGLE_NS && first.tagName() == "session" )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Checking for incoming sesssion." << endl;
initiator = first.attribute("initiator");
// Only proceed initiate type Jingle XMPP call.
- if( first.attribute("type") != QString::fromUtf8("initiate") )
+ if( first.attribute("type") != TQString::fromUtf8("initiate") )
return false;
int nodeIndex;
- QDomNodeList nodeList = first.childNodes();
+ TQDomNodeList nodeList = first.childNodes();
// Do not check first child
for(nodeIndex = 0; nodeIndex < nodeList.length(); nodeIndex++)
{
- QDomElement nodeElement = nodeList.item(nodeIndex).toElement();
+ TQDomElement nodeElement = nodeList.item(nodeIndex).toElement();
if(nodeElement.tagName() == "description")
{
sessionType = nodeElement.attribute("xmlns");
diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
index 99b76661..09dbdbce 100644
--- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
+++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
@@ -30,10 +30,10 @@ public:
JingleWatchSessionTask(XMPP::Task *parent);
~JingleWatchSessionTask();
- bool take(const QDomElement &element);
+ bool take(const TQDomElement &element);
signals:
- void watchSession(const QString &sessionType, const QString &initiator);
+ void watchSession(const TQString &sessionType, const TQString &initiator);
};
#endif
diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.cpp b/kopete/protocols/jabber/kioslave/jabberdisco.cpp
index a6775320..4ceeca09 100644
--- a/kopete/protocols/jabber/kioslave/jabberdisco.cpp
+++ b/kopete/protocols/jabber/kioslave/jabberdisco.cpp
@@ -22,8 +22,8 @@
#include "jabberdisco.h"
#include <stdlib.h>
-#include <qcstring.h>
-#include <qthread.h>
+#include <tqcstring.h>
+#include <tqthread.h>
#include <kdebug.h>
#include <klocale.h>
#include <kapplication.h>
@@ -32,7 +32,7 @@
#include <xmpp_tasks.h>
#include "jabberclient.h"
-JabberDiscoProtocol::JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket )
+JabberDiscoProtocol::JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket )
: KIO::SlaveBase ( "kio_jabberdisco", pool_socket, app_socket )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Slave launched." << endl;
@@ -51,13 +51,13 @@ JabberDiscoProtocol::~JabberDiscoProtocol ()
}
-void JabberDiscoProtocol::setHost ( const QString &host, int port, const QString &user, const QString &pass )
+void JabberDiscoProtocol::setHost ( const TQString &host, int port, const TQString &user, const TQString &pass )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << " Host " << host << ", port " << port << ", user " << user << endl;
m_host = host;
m_port = !port ? 5222 : port;
- m_user = QString(user).replace ( "%", "@" );
+ m_user = TQString(user).replace ( "%", "@" );
m_password = pass;
}
@@ -76,14 +76,14 @@ void JabberDiscoProtocol::openConnection ()
{
m_jabberClient = new JabberClient;
- QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
-
- QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ),
- this, SLOT ( slotClientDebugMessage ( const QString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
+
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ),
+ this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) );
}
else
{
@@ -102,7 +102,7 @@ void JabberDiscoProtocol::openConnection ()
// allow plaintext password authentication or not?
m_jabberClient->setAllowPlainTextPassword ( false );
- switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + QString("/") + "JabberBrowser" ), m_password ) )
+ switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + TQString("/") + "JabberBrowser" ), m_password ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -173,7 +173,7 @@ void JabberDiscoProtocol::mimetype ( const KURL &/*url*/ )
}
-void JabberDiscoProtocol::slotClientDebugMessage ( const QString &msg )
+void JabberDiscoProtocol::slotClientDebugMessage ( const TQString &msg )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << msg << endl;
@@ -228,7 +228,7 @@ void JabberDiscoProtocol::slotConnected ()
case ListDir: // list a directory
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Listing directory..." << endl;
discoTask = new XMPP::JT_DiscoItems ( m_jabberClient->rootTask () );
- connect ( discoTask, SIGNAL ( finished () ), this, SLOT ( slotQueryFinished () ) );
+ connect ( discoTask, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotQueryFinished () ) );
discoTask->get ( m_host );
discoTask->go ( true );
break;
diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.h b/kopete/protocols/jabber/kioslave/jabberdisco.h
index f2f6d78d..ef6e75fa 100644
--- a/kopete/protocols/jabber/kioslave/jabberdisco.h
+++ b/kopete/protocols/jabber/kioslave/jabberdisco.h
@@ -20,9 +20,9 @@
#ifndef _JABBERDISCO_H_
#define _JABBERDISCO_H_
-#include <qobject.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -33,16 +33,16 @@
class JabberClient;
-class JabberDiscoProtocol : public QObject, public KIO::SlaveBase
+class JabberDiscoProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket );
+ JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket );
virtual ~JabberDiscoProtocol ();
- void setHost ( const QString &host, int port, const QString &user, const QString &pass );
+ void setHost ( const TQString &host, int port, const TQString &user, const TQString &pass );
void openConnection ();
void closeConnection ();
@@ -56,7 +56,7 @@ public:
void dispatchLoop ();
private slots:
- void slotClientDebugMessage ( const QString &msg );
+ void slotClientDebugMessage ( const TQString &msg );
void slotHandleTLSWarning ( int validityResult );
void slotClientError ( JabberClient::ErrorCode errorCode );
void slotConnected ();
@@ -68,7 +68,7 @@ private slots:
private:
enum CommandType { Get, ListDir };
- QString m_host, m_user, m_password;
+ TQString m_host, m_user, m_password;
int m_port;
KURL m_url;
bool m_connected;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
index 75b1fe2a..33c5ec8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
@@ -1,5 +1,5 @@
/*
- * bsocket.cpp - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.cpp - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -20,10 +20,10 @@
#include"bsocket.h"
-#include<qcstring.h>
-#include<qsocket.h>
-#include<qdns.h>
-#include<qguardedptr.h>
+#include<tqcstring.h>
+#include<tqsocket.h>
+#include<tqdns.h>
+#include<tqguardedptr.h>
#include"safedelete.h"
#ifndef NO_NDNS
#include"ndns.h"
@@ -46,26 +46,26 @@ public:
qsock = 0;
}
- QSocket *qsock;
+ TQSocket *qsock;
int state;
#ifndef NO_NDNS
NDns ndns;
#endif
SrvResolver srv;
- QString host;
+ TQString host;
int port;
SafeDelete sd;
};
-BSocket::BSocket(QObject *parent)
+BSocket::BSocket(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
reset();
}
@@ -83,7 +83,7 @@ void BSocket::reset(bool clear)
if(!clear && d->qsock->isOpen()) {
// move remaining into the local queue
- QByteArray block(d->qsock->bytesAvailable());
+ TQByteArray block(d->qsock->bytesAvailable());
d->qsock->readBlock(block.data(), block.size());
appendRead(block);
}
@@ -112,17 +112,17 @@ void BSocket::ensureSocket()
#if QT_VERSION >= 0x030200
d->qsock->setReadBufferSize(READBUFSIZE);
#endif
- connect(d->qsock, SIGNAL(hostFound()), SLOT(qs_hostFound()));
- connect(d->qsock, SIGNAL(connected()), SLOT(qs_connected()));
- connect(d->qsock, SIGNAL(connectionClosed()), SLOT(qs_connectionClosed()));
- connect(d->qsock, SIGNAL(delayedCloseFinished()), SLOT(qs_delayedCloseFinished()));
- connect(d->qsock, SIGNAL(readyRead()), SLOT(qs_readyRead()));
- connect(d->qsock, SIGNAL(bytesWritten(int)), SLOT(qs_bytesWritten(int)));
- connect(d->qsock, SIGNAL(error(int)), SLOT(qs_error(int)));
+ connect(d->qsock, TQT_SIGNAL(hostFound()), TQT_SLOT(qs_hostFound()));
+ connect(d->qsock, TQT_SIGNAL(connected()), TQT_SLOT(qs_connected()));
+ connect(d->qsock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(qs_connectionClosed()));
+ connect(d->qsock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(qs_delayedCloseFinished()));
+ connect(d->qsock, TQT_SIGNAL(readyRead()), TQT_SLOT(qs_readyRead()));
+ connect(d->qsock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(qs_bytesWritten(int)));
+ connect(d->qsock, TQT_SIGNAL(error(int)), TQT_SLOT(qs_error(int)));
}
}
-void BSocket::connectToHost(const QString &host, Q_UINT16 port)
+void BSocket::connectToHost(const TQString &host, Q_UINT16 port)
{
reset(true);
d->host = host;
@@ -136,7 +136,7 @@ void BSocket::connectToHost(const QString &host, Q_UINT16 port)
#endif
}
-void BSocket::connectToServer(const QString &srv, const QString &type)
+void BSocket::connectToServer(const TQString &srv, const TQString &type)
{
reset(true);
d->state = HostLookup;
@@ -188,23 +188,23 @@ void BSocket::close()
}
}
-void BSocket::write(const QByteArray &a)
+void BSocket::write(const TQByteArray &a)
{
if(d->state != Connected)
return;
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: writing [%d]: {%s}\n", a.size(), cs.data());
#endif
d->qsock->writeBlock(a.data(), a.size());
}
-QByteArray BSocket::read(int bytes)
+TQByteArray BSocket::read(int bytes)
{
- QByteArray block;
+ TQByteArray block;
if(d->qsock) {
int max = bytesAvailable();
if(bytes <= 0 || bytes > max)
@@ -216,10 +216,10 @@ QByteArray BSocket::read(int bytes)
block = ByteStream::read(bytes);
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(block.size()+1);
memcpy(cs.data(), block.data(), block.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: read [%d]: {%s}\n", block.size(), s.latin1());
#endif
return block;
@@ -240,12 +240,12 @@ int BSocket::bytesToWrite() const
return d->qsock->bytesToWrite();
}
-QHostAddress BSocket::address() const
+TQHostAddress BSocket::address() const
{
if(d->qsock)
return d->qsock->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::port() const
@@ -256,12 +256,12 @@ Q_UINT16 BSocket::port() const
return 0;
}
-QHostAddress BSocket::peerAddress() const
+TQHostAddress BSocket::peerAddress() const
{
if(d->qsock)
return d->qsock->peerAddress();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::peerPort() const
@@ -285,7 +285,7 @@ void BSocket::srv_done()
d->host = d->srv.resultAddress().toString();
d->port = d->srv.resultPort();
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
@@ -296,7 +296,7 @@ void BSocket::ndns_done()
d->host = d->ndns.resultString();
d->state = Connecting;
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
else {
@@ -375,17 +375,17 @@ void BSocket::qs_error(int x)
SafeDeleteLock s(&d->sd);
// connection error during SRV host connect? try next
- if(d->state == HostLookup && (x == QSocket::ErrConnectionRefused || x == QSocket::ErrHostNotFound)) {
+ if(d->state == HostLookup && (x == TQSocket::ErrConnectionRefused || x == TQSocket::ErrHostNotFound)) {
d->srv.next();
return;
}
reset();
- if(x == QSocket::ErrConnectionRefused)
+ if(x == TQSocket::ErrConnectionRefused)
error(ErrConnectionRefused);
- else if(x == QSocket::ErrHostNotFound)
+ else if(x == TQSocket::ErrHostNotFound)
error(ErrHostNotFound);
- else if(x == QSocket::ErrSocketRead)
+ else if(x == TQSocket::ErrSocketRead)
error(ErrRead);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
index f51b3470..7887b9c0 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
@@ -1,5 +1,5 @@
/*
- * bsocket.h - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.h - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
#ifndef CS_BSOCKET_H
#define CS_BSOCKET_H
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"bytestream.h"
// CS_NAMESPACE_BEGIN
@@ -33,11 +33,11 @@ class BSocket : public ByteStream
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound };
enum State { Idle, HostLookup, Connecting, Connected, Closing };
- BSocket(QObject *parent=0);
+ BSocket(TQObject *parent=0);
~BSocket();
- void connectToHost(const QString &host, Q_UINT16 port);
- void connectToServer(const QString &srv, const QString &type);
+ void connectToHost(const TQString &host, Q_UINT16 port);
+ void connectToServer(const TQString &srv, const TQString &type);
int socket() const;
void setSocket(int);
int state() const;
@@ -45,17 +45,17 @@ public:
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// local
- QHostAddress address() const;
+ TQHostAddress address() const;
Q_UINT16 port() const;
// remote
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
index 76550db0..6abeb556 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
@@ -20,7 +20,7 @@
#include"httpconnect.h"
-#include<qstringlist.h>
+#include<tqstringlist.h>
#include"bsocket.h"
#include"base64.h"
@@ -30,20 +30,20 @@
// CS_NAMESPACE_BEGIN
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -56,7 +56,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -81,31 +81,31 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
int toWrite;
bool active;
};
-HttpConnect::HttpConnect(QObject *parent)
+HttpConnect::HttpConnect(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -127,13 +127,13 @@ void HttpConnect::reset(bool clear)
d->active = false;
}
-void HttpConnect::setAuth(const QString &user, const QString &pass)
+void HttpConnect::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpConnect::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port)
+void HttpConnect::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port)
{
reset(true);
@@ -164,13 +164,13 @@ void HttpConnect::close()
reset();
}
-void HttpConnect::write(const QByteArray &buf)
+void HttpConnect::write(const TQByteArray &buf)
{
if(d->active)
d->sock.write(buf);
}
-QByteArray HttpConnect::read(int bytes)
+TQByteArray HttpConnect::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -197,18 +197,18 @@ void HttpConnect::sock_connected()
d->headerLines.clear();
// connected, now send the request
- QString s;
- s += QString("CONNECT ") + d->real_host + ':' + QString::number(d->real_port) + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("CONNECT ") + d->real_host + ':' + TQString::number(d->real_port) + " HTTP/1.0\r\n";
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
s += "\r\n";
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->toWrite = block.size();
d->sock.write(block);
@@ -235,7 +235,7 @@ void HttpConnect::sock_delayedCloseFinished()
void HttpConnect::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
ByteStream::appendArray(&d->recvBuf, block);
@@ -244,7 +244,7 @@ void HttpConnect::sock_readyRead()
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -256,12 +256,12 @@ void HttpConnect::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: invalid header!\n");
@@ -273,7 +273,7 @@ void HttpConnect::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpConnect: * [%s]\n", (*it).latin1());
#endif
}
@@ -294,7 +294,7 @@ void HttpConnect::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
index e383969b..2acef809 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
@@ -30,17 +30,17 @@ class HttpConnect : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpConnect(QObject *parent=0);
+ HttpConnect(TQObject *parent=0);
~HttpConnect();
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
index 605d44e9..3a182457 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
@@ -20,10 +20,10 @@
#include"httppoll.h"
-#include<qstringlist.h>
-#include<qurl.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqstringlist.h>
+#include<tqurl.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include<stdlib.h>
#include"bsocket.h"
@@ -37,9 +37,9 @@
// CS_NAMESPACE_BEGIN
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
@@ -48,12 +48,12 @@ static QByteArray randomArray(int size)
//----------------------------------------------------------------------------
// HttpPoll
//----------------------------------------------------------------------------
-static QString hpk(int n, const QString &s)
+static TQString hpk(int n, const TQString &s)
{
if(n == 0)
return s;
else
- return Base64::arrayToString( QCA::SHA1::hash( QCString(hpk(n - 1, s).latin1()) ) );
+ return Base64::arrayToString( QCA::SHA1::hash( TQCString(hpk(n - 1, s).latin1()) ) );
}
class HttpPoll::Private
@@ -62,37 +62,37 @@ public:
Private() {}
HttpProxyPost http;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString url;
+ TQString user, pass;
+ TQString url;
bool use_proxy;
- QByteArray out;
+ TQByteArray out;
int state;
bool closing;
- QString ident;
+ TQString ident;
- QTimer *t;
+ TQTimer *t;
- QString key[POLL_KEYS];
+ TQString key[POLL_KEYS];
int key_n;
int polltime;
};
-HttpPoll::HttpPoll(QObject *parent)
+HttpPoll::HttpPoll(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
d->polltime = 30;
d->t = new QTimer;
- connect(d->t, SIGNAL(timeout()), SLOT(do_sync()));
+ connect(d->t, TQT_SIGNAL(timeout()), TQT_SLOT(do_sync()));
- connect(&d->http, SIGNAL(result()), SLOT(http_result()));
- connect(&d->http, SIGNAL(error(int)), SLOT(http_error(int)));
+ connect(&d->http, TQT_SIGNAL(result()), TQT_SLOT(http_result()));
+ connect(&d->http, TQT_SIGNAL(error(int)), TQT_SLOT(http_error(int)));
reset(true);
}
@@ -117,18 +117,18 @@ void HttpPoll::reset(bool clear)
d->t->stop();
}
-void HttpPoll::setAuth(const QString &user, const QString &pass)
+void HttpPoll::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpPoll::connectToUrl(const QString &url)
+void HttpPoll::connectToUrl(const TQString &url)
{
connectToHost("", 0, url);
}
-void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QString &url)
+void HttpPoll::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url)
{
reset(true);
@@ -140,7 +140,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
d->use_proxy = true;
}
else {
- QUrl u = url;
+ TQUrl u = url;
d->host = u.host();
if(u.hasPort())
d->port = u.port();
@@ -152,7 +152,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
resetKey();
bool last;
- QString key = getKey(&last);
+ TQString key = getKey(&last);
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: Connecting to %s:%d [%s]", d->host.latin1(), d->port, d->url.latin1());
@@ -161,19 +161,19 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
else
fprintf(stderr, ", auth {%s,%s}\n", d->user.latin1(), d->pass.latin1());
#endif
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
d->state = 1;
d->http.setAuth(d->user, d->pass);
- d->http.post(d->host, d->port, d->url, makePacket("0", key, "", QByteArray()), d->use_proxy);
+ d->http.post(d->host, d->port, d->url, makePacket("0", key, "", TQByteArray()), d->use_proxy);
}
-QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block)
+TQByteArray HttpPoll::makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block)
{
- QString str = ident;
+ TQString str = ident;
if(!key.isEmpty()) {
str += ';';
str += key;
@@ -183,10 +183,10 @@ QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const
str += newkey;
}
str += ',';
- QCString cs = str.latin1();
+ TQCString cs = str.latin1();
int len = cs.length();
- QByteArray a(len + block.size());
+ TQByteArray a(len + block.size());
memcpy(a.data(), cs.data(), len);
memcpy(a.data() + len, block.data(), block.size());
return a;
@@ -221,14 +221,14 @@ void HttpPoll::close()
void HttpPoll::http_result()
{
// check for death :)
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncFinished();
if(!self)
return;
// get id and packet
- QString id;
- QString cookie = d->http.getHeader("Set-Cookie");
+ TQString id;
+ TQString cookie = d->http.getHeader("Set-Cookie");
int n = cookie.find("ID=");
if(n == -1) {
reset();
@@ -241,7 +241,7 @@ void HttpPoll::http_result()
id = cookie.mid(n, n2-n);
else
id = cookie.mid(n);
- QByteArray block = d->http.body();
+ TQByteArray block = d->http.body();
// session error?
if(id.right(2) == ":0") {
@@ -337,14 +337,14 @@ void HttpPoll::do_sync()
d->out = takeWrite(0, false);
bool last;
- QString key = getKey(&last);
- QString newkey;
+ TQString key = getKey(&last);
+ TQString newkey;
if(last) {
resetKey();
newkey = getKey(&last);
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
@@ -357,15 +357,15 @@ void HttpPoll::resetKey()
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: reset key!\n");
#endif
- QByteArray a = randomArray(64);
- QString str = QString::fromLatin1(a.data(), a.size());
+ TQByteArray a = randomArray(64);
+ TQString str = TQString::fromLatin1(a.data(), a.size());
d->key_n = POLL_KEYS;
for(int n = 0; n < POLL_KEYS; ++n)
d->key[n] = hpk(n+1, str);
}
-const QString & HttpPoll::getKey(bool *last)
+const TQString & HttpPoll::getKey(bool *last)
{
*last = false;
--(d->key_n);
@@ -378,20 +378,20 @@ const QString & HttpPoll::getKey(bool *last)
//----------------------------------------------------------------------------
// HttpProxyPost
//----------------------------------------------------------------------------
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -404,7 +404,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -429,23 +429,23 @@ public:
Private() {}
BSocket sock;
- QByteArray postdata, recvBuf, body;
- QString url;
- QString user, pass;
+ TQByteArray postdata, recvBuf, body;
+ TQString url;
+ TQString user, pass;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
bool asProxy;
- QString host;
+ TQString host;
};
-HttpProxyPost::HttpProxyPost(QObject *parent)
-:QObject(parent)
+HttpProxyPost::HttpProxyPost(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -464,7 +464,7 @@ void HttpProxyPost::reset(bool clear)
d->body.resize(0);
}
-void HttpProxyPost::setAuth(const QString &user, const QString &pass)
+void HttpProxyPost::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
@@ -475,7 +475,7 @@ bool HttpProxyPost::isActive() const
return (d->sock.state() == BSocket::Idle ? false: true);
}
-void HttpProxyPost::post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy)
+void HttpProxyPost::post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy)
{
reset(true);
@@ -499,19 +499,19 @@ void HttpProxyPost::stop()
reset();
}
-QByteArray HttpProxyPost::body() const
+TQByteArray HttpProxyPost::body() const
{
return d->body;
}
-QString HttpProxyPost::getHeader(const QString &var) const
+TQString HttpProxyPost::getHeader(const TQString &var) const
{
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
- const QString &s = *it;
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
+ const TQString &s = *it;
int n = s.find(": ");
if(n == -1)
continue;
- QString v = s.mid(0, n);
+ TQString v = s.mid(0, n);
if(v == var)
return s.mid(n+2);
}
@@ -526,30 +526,30 @@ void HttpProxyPost::sock_connected()
d->inHeader = true;
d->headerLines.clear();
- QUrl u = d->url;
+ TQUrl u = d->url;
// connected, now send the request
- QString s;
- s += QString("POST ") + d->url + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("POST ") + d->url + " HTTP/1.0\r\n";
if(d->asProxy) {
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
- s += QString("Host: ") + u.host() + "\r\n";
+ s += TQString("Host: ") + u.host() + "\r\n";
}
else {
- s += QString("Host: ") + d->host + "\r\n";
+ s += TQString("Host: ") + d->host + "\r\n";
}
s += "Content-Type: application/x-www-form-urlencoded\r\n";
- s += QString("Content-Length: ") + QString::number(d->postdata.size()) + "\r\n";
+ s += TQString("Content-Length: ") + TQString::number(d->postdata.size()) + "\r\n";
s += "\r\n";
// write request
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->sock.write(block);
@@ -566,14 +566,14 @@ void HttpProxyPost::sock_connectionClosed()
void HttpProxyPost::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
ByteStream::appendArray(&d->recvBuf, block);
if(d->inHeader) {
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -585,12 +585,12 @@ void HttpProxyPost::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: invalid header!\n");
@@ -602,7 +602,7 @@ void HttpProxyPost::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpProxyPost: * [%s]\n", (*it).latin1());
#endif
}
@@ -614,7 +614,7 @@ void HttpProxyPost::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
index 4c02ead2..c38b7a8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
@@ -30,12 +30,12 @@ class HttpPoll : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpPoll(QObject *parent=0);
+ HttpPoll(TQObject *parent=0);
~HttpPoll();
- void setAuth(const QString &user, const QString &pass="");
- void connectToUrl(const QString &url);
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &url);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToUrl(const TQString &url);
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url);
int pollInterval() const;
void setPollInterval(int seconds);
@@ -62,9 +62,9 @@ private:
Private *d;
void reset(bool clear=false);
- QByteArray makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block);
+ TQByteArray makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block);
void resetKey();
- const QString & getKey(bool *);
+ const TQString & getKey(bool *);
};
class HttpProxyPost : public QObject
@@ -72,15 +72,15 @@ class HttpProxyPost : public QObject
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrSocket, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpProxyPost(QObject *parent=0);
+ HttpProxyPost(TQObject *parent=0);
~HttpProxyPost();
- void setAuth(const QString &user, const QString &pass="");
+ void setAuth(const TQString &user, const TQString &pass="");
bool isActive() const;
- void post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy=true);
+ void post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy=true);
void stop();
- QByteArray body() const;
- QString getHeader(const QString &) const;
+ TQByteArray body() const;
+ TQString getHeader(const TQString &) const;
signals:
void result();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
index 1203315a..748db248 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
@@ -21,9 +21,9 @@
//! \class NDns ndns.h
//! \brief Simple DNS resolution using native system calls
//!
-//! This class is to be used when Qt's QDns is not good enough. Because QDns
+//! This class is to be used when Qt's TQDns is not good enough. Because QDns
//! does not use threads, it cannot make a system call asyncronously. Thus,
-//! QDns tries to imitate the behavior of each platform's native behavior, and
+//! TQDns tries to imitate the behavior of each platform's native behavior, and
//! generally falls short.
//!
//! NDns uses a thread to make the system call happen in the background. This
@@ -45,15 +45,15 @@
//!
//! // or if you want to get the IP address as a string:
//!
-//! QString ip_address = dns.resultString();
+//! TQString ip_address = dns.resultString();
//! \endcode
#include"ndns.h"
-#include<qapplication.h>
-#include<qsocketdevice.h>
-#include<qptrlist.h>
-#include<qeventloop.h>
+#include<tqapplication.h>
+#include<tqsocketdevice.h>
+#include<tqptrlist.h>
+#include<tqeventloop.h>
#ifdef Q_OS_UNIX
#include<netdb.h>
@@ -72,7 +72,7 @@
class NDnsWorkerEvent : public QCustomEvent
{
public:
- enum Type { WorkerEvent = QEvent::User + 100 };
+ enum Type { WorkerEvent = TQEvent::User + 100 };
NDnsWorkerEvent(NDnsWorker *);
NDnsWorker *worker;
@@ -81,18 +81,18 @@ public:
class NDnsWorker : public QThread
{
public:
- NDnsWorker(QObject *, const QCString &);
+ NDnsWorker(TQObject *, const TQCString &);
bool success;
bool cancelled;
- QHostAddress addr;
+ TQHostAddress addr;
protected:
void run();
private:
- QCString host;
- QObject *par;
+ TQCString host;
+ TQObject *par;
};
//! \endif
@@ -100,8 +100,8 @@ private:
// NDnsManager
//----------------------------------------------------------------------------
#ifndef HAVE_GETHOSTBYNAME_R
-static QMutex *workerMutex = 0;
-static QMutex *workerCancelled = 0;
+static TQMutex *workerMutex = 0;
+static TQMutex *workerCancelled = 0;
#endif
static NDnsManager *man = 0;
bool winsock_init = false;
@@ -118,7 +118,7 @@ class NDnsManager::Private
public:
Item *find(const NDns *n)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->ndns == n)
return i;
@@ -128,7 +128,7 @@ public:
Item *find(const NDnsWorker *w)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->worker == w)
return i;
@@ -136,7 +136,7 @@ public:
return 0;
}
- QPtrList<Item> list;
+ TQPtrList<Item> list;
};
NDnsManager::NDnsManager()
@@ -149,7 +149,7 @@ NDnsManager::NDnsManager()
#ifdef Q_OS_WIN32
if(!winsock_init) {
winsock_init = true;
- QSocketDevice *sd = new QSocketDevice;
+ TQSocketDevice *sd = new QSocketDevice;
delete sd;
}
#endif
@@ -157,7 +157,7 @@ NDnsManager::NDnsManager()
d = new Private;
d->list.setAutoDelete(true);
- connect(qApp, SIGNAL(aboutToQuit()), SLOT(app_aboutToQuit()));
+ connect(qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit()));
}
NDnsManager::~NDnsManager()
@@ -172,7 +172,7 @@ NDnsManager::~NDnsManager()
#endif
}
-void NDnsManager::resolve(NDns *self, const QString &name)
+void NDnsManager::resolve(NDns *self, const TQString &name)
{
Item *i = new Item;
i->ndns = self;
@@ -204,7 +204,7 @@ bool NDnsManager::isBusy(const NDns *self) const
return (i ? true: false);
}
-bool NDnsManager::event(QEvent *e)
+bool NDnsManager::event(TQEvent *e)
{
if((int)e->type() == (int)NDnsWorkerEvent::WorkerEvent) {
NDnsWorkerEvent *we = static_cast<NDnsWorkerEvent*>(e);
@@ -215,7 +215,7 @@ bool NDnsManager::event(QEvent *e)
// should NOT happen
return true;
}
- QHostAddress addr = i->worker->addr;
+ TQHostAddress addr = i->worker->addr;
NDns *ndns = i->ndns;
delete i->worker;
d->list.removeRef(i);
@@ -242,8 +242,8 @@ void NDnsManager::tryDestroy()
void NDnsManager::app_aboutToQuit()
{
while(man) {
- QEventLoop *e = qApp->eventLoop();
- e->processEvents(QEventLoop::WaitForMore);
+ TQEventLoop *e = qApp->eventLoop();
+ e->processEvents(TQEventLoop::WaitForMore);
}
}
@@ -257,8 +257,8 @@ void NDnsManager::app_aboutToQuit()
//!
//! Constructs an NDns object with parent \a parent.
-NDns::NDns(QObject *parent)
-:QObject(parent)
+NDns::NDns(TQObject *parent)
+:TQObject(parent)
{
}
@@ -271,7 +271,7 @@ NDns::~NDns()
//!
//! Resolves hostname \a host (eg. psi.affinix.com)
-void NDns::resolve(const QString &host)
+void NDns::resolve(const TQString &host)
{
stop();
if(!man)
@@ -299,7 +299,7 @@ uint NDns::result() const
//!
//! Returns the IP address as a string. This will be an empty string if the lookup failed.
//! \sa resultsReady()
-QString NDns::resultString() const
+TQString NDns::resultString() const
{
return addr.toString();
}
@@ -313,7 +313,7 @@ bool NDns::isBusy() const
return man->isBusy(this);
}
-void NDns::finished(const QHostAddress &a)
+void NDns::finished(const TQHostAddress &a)
{
addr = a;
resultsReady();
@@ -323,7 +323,7 @@ void NDns::finished(const QHostAddress &a)
// NDnsWorkerEvent
//----------------------------------------------------------------------------
NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
-:QCustomEvent(WorkerEvent)
+:TQCustomEvent(WorkerEvent)
{
worker = p;
}
@@ -331,7 +331,7 @@ NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
//----------------------------------------------------------------------------
// NDnsWorker
//----------------------------------------------------------------------------
-NDnsWorker::NDnsWorker(QObject *_par, const QCString &_host)
+NDnsWorker::NDnsWorker(TQObject *_par, const TQCString &_host)
{
success = cancelled = false;
par = _par;
@@ -349,7 +349,7 @@ void NDnsWorker::run()
gethostbyname_r(host.data(), &buf, char_buf, sizeof(char_buf), &h, &err);
#else
// lock for gethostbyname
- QMutexLocker locker(workerMutex);
+ TQMutexLocker locker(workerMutex);
// check for cancel
workerCancelled->lock();
@@ -362,7 +362,7 @@ void NDnsWorker::run()
if(!h) {
success = false;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
return;
}
@@ -370,7 +370,7 @@ void NDnsWorker::run()
addr.setAddress(ntohl(a.s_addr));
success = true;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
}
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
index ccbc6b57..48243e30 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
@@ -21,11 +21,11 @@
#ifndef CS_NDNS_H
#define CS_NDNS_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qthread.h>
-#include<qmutex.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqthread.h>
+#include<tqmutex.h>
+#include<tqhostaddress.h>
// CS_NAMESPACE_BEGIN
@@ -36,24 +36,24 @@ class NDns : public QObject
{
Q_OBJECT
public:
- NDns(QObject *parent=0);
+ NDns(TQObject *parent=0);
~NDns();
- void resolve(const QString &);
+ void resolve(const TQString &);
void stop();
bool isBusy() const;
uint result() const;
- QString resultString() const;
+ TQString resultString() const;
signals:
void resultsReady();
private:
- QHostAddress addr;
+ TQHostAddress addr;
friend class NDnsManager;
- void finished(const QHostAddress &);
+ void finished(const TQHostAddress &);
};
class NDnsManager : public QObject
@@ -65,7 +65,7 @@ public:
//! \if _hide_doc_
protected:
- bool event(QEvent *);
+ bool event(TQEvent *);
//! \endif
private slots:
@@ -77,7 +77,7 @@ private:
friend class NDns;
NDnsManager();
- void resolve(NDns *self, const QString &name);
+ void resolve(NDns *self, const TQString &name);
void stop(NDns *self);
bool isBusy(const NDns *self) const;
void tryDestroy();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
index e503d57a..5b88b4e5 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
@@ -33,8 +33,8 @@ public:
ServSockSignal *serv;
};
-ServSock::ServSock(QObject *parent)
-:QObject(parent)
+ServSock::ServSock(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->serv = 0;
@@ -61,7 +61,7 @@ bool ServSock::listen(Q_UINT16 port)
d->serv = 0;
return false;
}
- connect(d->serv, SIGNAL(connectionReady(int)), SLOT(sss_connectionReady(int)));
+ connect(d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(sss_connectionReady(int)));
return true;
}
@@ -80,12 +80,12 @@ int ServSock::port() const
return -1;
}
-QHostAddress ServSock::address() const
+TQHostAddress ServSock::address() const
{
if(d->serv)
return d->serv->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
void ServSock::sss_connectionReady(int s)
@@ -98,7 +98,7 @@ void ServSock::sss_connectionReady(int s)
// ServSockSignal
//----------------------------------------------------------------------------
ServSockSignal::ServSockSignal(int port)
-:QServerSocket(port, 16)
+:TQServerSocket(port, 16)
{
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
index a19cd38e..4628d8ea 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
@@ -21,7 +21,7 @@
#ifndef CS_SERVSOCK_H
#define CS_SERVSOCK_H
-#include<qserversocket.h>
+#include<tqserversocket.h>
// CS_NAMESPACE_BEGIN
@@ -29,14 +29,14 @@ class ServSock : public QObject
{
Q_OBJECT
public:
- ServSock(QObject *parent=0);
+ ServSock(TQObject *parent=0);
~ServSock();
bool isActive() const;
bool listen(Q_UINT16 port);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
signals:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
index 2f3ca5a8..59504170 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
@@ -20,13 +20,13 @@
#include"socks.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
-#include<qsocketdevice.h>
-#include<qsocketnotifier.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
+#include<tqsocketdevice.h>
+#include<tqsocketnotifier.h>
#ifdef Q_OS_UNIX
#include<sys/types.h>
@@ -49,20 +49,20 @@
//----------------------------------------------------------------------------
// SocksUDP
//----------------------------------------------------------------------------
-static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteArray &buf)
+static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQByteArray &buf)
{
// detect for IP addresses
- //QHostAddress addr;
+ //TQHostAddress addr;
//if(addr.setAddress(host))
// return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x00; // reserved
a[at++] = 0x00; // reserved
a[at++] = 0x00; // frag
@@ -88,19 +88,19 @@ static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteA
struct SPS_UDP
{
- QString host;
+ TQString host;
Q_UINT16 port;
- QByteArray data;
+ TQByteArray data;
};
-static int sp_read_udp(QByteArray *from, SPS_UDP *s)
+static int sp_read_udp(TQByteArray *from, SPS_UDP *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -120,9 +120,9 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -152,24 +152,24 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
class SocksUDP::Private
{
public:
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
SocksClient *sc;
- QHostAddress routeAddr;
+ TQHostAddress routeAddr;
int routePort;
- QString host;
+ TQString host;
int port;
};
-SocksUDP::SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort)
-:QObject(sc)
+SocksUDP::SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
+:TQObject(sc)
{
d = new Private;
d->sc = sc;
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
d->host = host;
d->port = port;
d->routeAddr = routeAddr;
@@ -183,15 +183,15 @@ SocksUDP::~SocksUDP()
delete d;
}
-void SocksUDP::change(const QString &host, int port)
+void SocksUDP::change(const TQString &host, int port)
{
d->host = host;
d->port = port;
}
-void SocksUDP::write(const QByteArray &data)
+void SocksUDP::write(const TQByteArray &data)
{
- QByteArray buf = sp_create_udp(d->host, d->port, data);
+ TQByteArray buf = sp_create_udp(d->host, d->port, data);
d->sd->setBlocking(true);
d->sd->writeBlock(buf.data(), buf.size(), d->routeAddr, d->routePort);
d->sd->setBlocking(false);
@@ -199,7 +199,7 @@ void SocksUDP::write(const QByteArray &data)
void SocksUDP::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
packetReady(buf);
@@ -222,9 +222,9 @@ void SocksUDP::sn_activated(int)
// SPSS = socks packet server struct
// Version
-static QByteArray spc_set_version()
+static TQByteArray spc_set_version()
{
- QByteArray ver(4);
+ TQByteArray ver(4);
ver[0] = 0x05; // socks version 5
ver[1] = 0x02; // number of methods
ver[2] = 0x00; // no-auth
@@ -232,9 +232,9 @@ static QByteArray spc_set_version()
return ver;
}
-static QByteArray sps_set_version(int method)
+static TQByteArray sps_set_version(int method)
{
- QByteArray ver(2);
+ TQByteArray ver(2);
ver[0] = 0x05;
ver[1] = method;
return ver;
@@ -243,10 +243,10 @@ static QByteArray sps_set_version(int method)
struct SPCS_VERSION
{
unsigned char version;
- QByteArray methodList;
+ TQByteArray methodList;
};
-static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
+static int spc_get_version(TQByteArray *from, SPCS_VERSION *s)
{
if(from->size() < 1)
return 0;
@@ -259,7 +259,7 @@ static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
return -1;
if(from->size() < 2 + num)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2+num);
+ TQByteArray a = ByteStream::takeArray(from, 2+num);
s->version = a[0];
s->methodList.resize(num);
memcpy(s->methodList.data(), a.data() + 2, num);
@@ -272,18 +272,18 @@ struct SPSS_VERSION
unsigned char method;
};
-static int sps_get_version(QByteArray *from, SPSS_VERSION *s)
+static int sps_get_version(TQByteArray *from, SPSS_VERSION *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->method = a[1];
return 1;
}
// authUsername
-static QByteArray spc_set_authUsername(const QCString &user, const QCString &pass)
+static TQByteArray spc_set_authUsername(const TQCString &user, const TQCString &pass)
{
int len1 = user.length();
int len2 = pass.length();
@@ -291,7 +291,7 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
len1 = 255;
if(len2 > 255)
len2 = 255;
- QByteArray a(1+1+len1+1+len2);
+ TQByteArray a(1+1+len1+1+len2);
a[0] = 0x01; // username auth version 1
a[1] = len1;
memcpy(a.data() + 2, user.data(), len1);
@@ -300,9 +300,9 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
return a;
}
-static QByteArray sps_set_authUsername(bool success)
+static TQByteArray sps_set_authUsername(bool success)
{
- QByteArray a(2);
+ TQByteArray a(2);
a[0] = 0x01;
a[1] = success ? 0x00 : 0xff;
return a;
@@ -310,10 +310,10 @@ static QByteArray sps_set_authUsername(bool success)
struct SPCS_AUTHUSERNAME
{
- QString user, pass;
+ TQString user, pass;
};
-static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
+static int spc_get_authUsername(TQByteArray *from, SPCS_AUTHUSERNAME *s)
{
if(from->size() < 1)
return 0;
@@ -328,15 +328,15 @@ static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
unsigned char plen = from->at(ulen+2);
if((int)from->size() < ulen + plen + 3)
return 0;
- QByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
+ TQByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
- QCString user, pass;
+ TQCString user, pass;
user.resize(ulen+1);
pass.resize(plen+1);
memcpy(user.data(), a.data()+2, ulen);
memcpy(pass.data(), a.data()+ulen+3, plen);
- s->user = QString::fromUtf8(user);
- s->pass = QString::fromUtf8(pass);
+ s->user = TQString::fromUtf8(user);
+ s->pass = TQString::fromUtf8(pass);
return 1;
}
@@ -346,21 +346,21 @@ struct SPSS_AUTHUSERNAME
bool success;
};
-static int sps_get_authUsername(QByteArray *from, SPSS_AUTHUSERNAME *s)
+static int sps_get_authUsername(TQByteArray *from, SPSS_AUTHUSERNAME *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->success = a[1] == 0 ? true: false;
return 1;
}
// connectRequest
-static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port, unsigned char cmd1)
{
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -374,11 +374,11 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
else {
a[at++] = 0x04;
Q_UINT8 a6[16];
- QStringList s6 = QStringList::split(':', addr.toString(), true);
+ TQStringList s6 = TQStringList::split(':', addr.toString(), true);
int at = 0;
Q_UINT16 c;
bool ok;
- for(QStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
+ for(TQStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
c = (*it).toInt(&ok, 16);
a6[at++] = (c >> 8);
a6[at++] = c & 0xff;
@@ -396,20 +396,20 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
return a;
}
-static QByteArray sp_set_request(const QString &host, Q_UINT16 port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQString &host, Q_UINT16 port, unsigned char cmd1)
{
// detect for IP addresses
- QHostAddress addr;
+ TQHostAddress addr;
if(addr.setAddress(host))
return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -434,19 +434,19 @@ struct SPS_CONNREQ
unsigned char version;
unsigned char cmd;
int address_type;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
Q_UINT16 port;
};
-static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
+static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -465,9 +465,9 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -482,7 +482,7 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
if((int)from->size() < full_len)
return 0;
- QByteArray a = ByteStream::takeArray(from, full_len);
+ TQByteArray a = ByteStream::takeArray(from, full_len);
Q_UINT16 p;
memcpy(&p, a.data() + full_len - 2, 2);
@@ -505,29 +505,29 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool active;
int step;
int authMethod;
bool incoming, waiting;
- QString rhost;
+ TQString rhost;
int rport;
int pending;
bool udp;
- QString udpAddr;
+ TQString udpAddr;
int udpPort;
};
-SocksClient::SocksClient(QObject *parent)
+SocksClient::SocksClient(TQObject *parent)
:ByteStream(parent)
{
init();
@@ -535,7 +535,7 @@ SocksClient::SocksClient(QObject *parent)
d->incoming = false;
}
-SocksClient::SocksClient(int s, QObject *parent)
+SocksClient::SocksClient(int s, TQObject *parent)
:ByteStream(parent)
{
init();
@@ -548,12 +548,12 @@ SocksClient::SocksClient(int s, QObject *parent)
void SocksClient::init()
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -582,13 +582,13 @@ bool SocksClient::isIncoming() const
return d->incoming;
}
-void SocksClient::setAuth(const QString &user, const QString &pass)
+void SocksClient::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void SocksClient::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode)
+void SocksClient::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode)
{
reset(true);
@@ -620,19 +620,19 @@ void SocksClient::close()
reset();
}
-void SocksClient::writeData(const QByteArray &buf)
+void SocksClient::writeData(const TQByteArray &buf)
{
d->pending += buf.size();
d->sock.write(buf);
}
-void SocksClient::write(const QByteArray &buf)
+void SocksClient::write(const TQByteArray &buf)
{
if(d->active && !d->udp)
d->sock.write(buf);
}
-QByteArray SocksClient::read(int bytes)
+TQByteArray SocksClient::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -681,7 +681,7 @@ void SocksClient::sock_delayedCloseFinished()
void SocksClient::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
if(d->incoming)
@@ -697,7 +697,7 @@ void SocksClient::sock_readyRead()
}
}
-void SocksClient::processOutgoing(const QByteArray &block)
+void SocksClient::processOutgoing(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -726,7 +726,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
return;
}
- QString str;
+ TQString str;
if(s.method == 0x00) {
str = "None";
d->authMethod = AuthNone;
@@ -818,7 +818,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
d->active = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -839,11 +839,11 @@ void SocksClient::do_request()
#endif
d->step = StepRequest;
int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT;
- QByteArray buf;
+ TQByteArray buf;
if(!d->real_host.isEmpty())
buf = sp_set_request(d->real_host, d->real_port, cmd);
else
- buf = sp_set_request(QHostAddress(), 0, cmd);
+ buf = sp_set_request(TQHostAddress(), 0, cmd);
writeData(buf);
}
@@ -886,7 +886,7 @@ void SocksClient::serve()
continueIncoming();
}
-void SocksClient::processIncoming(const QByteArray &block)
+void SocksClient::processIncoming(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -1045,7 +1045,7 @@ void SocksClient::grantConnect()
}
}
-void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
+void SocksClient::grantUDPAssociate(const TQString &relayHost, int relayPort)
{
if(d->step != StepRequest || !d->waiting)
return;
@@ -1063,7 +1063,7 @@ void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
d->recvBuf.resize(0);
}
-QHostAddress SocksClient::peerAddress() const
+TQHostAddress SocksClient::peerAddress() const
{
return d->sock.peerAddress();
}
@@ -1073,7 +1073,7 @@ Q_UINT16 SocksClient::peerPort() const
return d->sock.peerPort();
}
-QString SocksClient::udpAddress() const
+TQString SocksClient::udpAddress() const
{
return d->udpAddr;
}
@@ -1083,7 +1083,7 @@ Q_UINT16 SocksClient::udpPort() const
return d->udpPort;
}
-SocksUDP *SocksClient::createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort)
+SocksUDP *SocksClient::createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
{
return new SocksUDP(this, host, port, routeAddr, routePort);
}
@@ -1097,18 +1097,18 @@ public:
Private() {}
ServSock serv;
- QPtrList<SocksClient> incomingConns;
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQPtrList<SocksClient> incomingConns;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
};
-SocksServer::SocksServer(QObject *parent)
-:QObject(parent)
+SocksServer::SocksServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->sd = 0;
d->sn = 0;
- connect(&d->serv, SIGNAL(connectionReady(int)), SLOT(connectionReady(int)));
+ connect(&d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(connectionReady(int)));
}
SocksServer::~SocksServer()
@@ -1130,16 +1130,16 @@ bool SocksServer::listen(Q_UINT16 port, bool udp)
if(!d->serv.listen(port))
return false;
if(udp) {
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- if(!d->sd->bind(QHostAddress(), port)) {
+ if(!d->sd->bind(TQHostAddress(), port)) {
delete d->sd;
d->sd = 0;
d->serv.stop();
return false;
}
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
}
return true;
}
@@ -1158,7 +1158,7 @@ int SocksServer::port() const
return d->serv.port();
}
-QHostAddress SocksServer::address() const
+TQHostAddress SocksServer::address() const
{
return d->serv.address();
}
@@ -1172,15 +1172,15 @@ SocksClient *SocksServer::takeIncoming()
d->incomingConns.removeRef(c);
// we don't care about errors anymore
- disconnect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ disconnect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
// don't serve the connection until the event loop, to give the caller a chance to map signals
- QTimer::singleShot(0, c, SLOT(serve()));
+ TQTimer::singleShot(0, c, TQT_SLOT(serve()));
return c;
}
-void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void SocksServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
if(d->sd) {
d->sd->setBlocking(true);
@@ -1192,7 +1192,7 @@ void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray
void SocksServer::connectionReady(int s)
{
SocksClient *c = new SocksClient(s, this);
- connect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ connect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
d->incomingConns.append(c);
incomingReady();
}
@@ -1206,10 +1206,10 @@ void SocksServer::connectionError()
void SocksServer::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
- QHostAddress pa = d->sd->peerAddress();
+ TQHostAddress pa = d->sd->peerAddress();
int pp = d->sd->peerPort();
SPS_UDP s;
int r = sp_read_udp(&buf, &s);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
index b10361dd..507caf5f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
@@ -35,11 +35,11 @@ class SocksUDP : public QObject
public:
~SocksUDP();
- void change(const QString &host, int port);
- void write(const QByteArray &data);
+ void change(const TQString &host, int port);
+ void write(const TQByteArray &data);
signals:
- void packetReady(const QByteArray &data);
+ void packetReady(const TQByteArray &data);
private slots:
void sn_activated(int);
@@ -49,7 +49,7 @@ private:
Private *d;
friend class SocksClient;
- SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
};
class SocksClient : public ByteStream
@@ -59,39 +59,39 @@ public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
enum Method { AuthNone=0x0001, AuthUsername=0x0002 };
enum Request { ReqConnect, ReqUDPAssociate };
- SocksClient(QObject *parent=0);
- SocksClient(int, QObject *parent=0);
+ SocksClient(TQObject *parent=0);
+ SocksClient(int, TQObject *parent=0);
~SocksClient();
bool isIncoming() const;
// outgoing
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode=false);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode=false);
// incoming
void chooseMethod(int);
void authGrant(bool);
void requestDeny();
void grantConnect();
- void grantUDPAssociate(const QString &relayHost, int relayPort);
+ void grantUDPAssociate(const TQString &relayHost, int relayPort);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// remote address
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
// udp
- QString udpAddress() const;
+ TQString udpAddress() const;
Q_UINT16 udpPort() const;
- SocksUDP *createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP *createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
signals:
// outgoing
@@ -99,8 +99,8 @@ signals:
// incoming
void incomingMethods(int);
- void incomingAuth(const QString &user, const QString &pass);
- void incomingConnectRequest(const QString &host, int port);
+ void incomingAuth(const TQString &user, const TQString &pass);
+ void incomingConnectRequest(const TQString &host, int port);
void incomingUDPAssociateRequest();
private slots:
@@ -119,31 +119,31 @@ private:
void init();
void reset(bool clear=false);
void do_request();
- void processOutgoing(const QByteArray &);
- void processIncoming(const QByteArray &);
+ void processOutgoing(const TQByteArray &);
+ void processIncoming(const TQByteArray &);
void continueIncoming();
- void writeData(const QByteArray &a);
+ void writeData(const TQByteArray &a);
};
class SocksServer : public QObject
{
Q_OBJECT
public:
- SocksServer(QObject *parent=0);
+ SocksServer(TQObject *parent=0);
~SocksServer();
bool isActive() const;
bool listen(Q_UINT16 port, bool udp=false);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
SocksClient *takeIncoming();
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
signals:
void incomingReady();
- void incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
private slots:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
index 851873f2..d462a17e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
@@ -20,9 +20,9 @@
#include"srvresolver.h"
-#include<qcstring.h>
-#include<qtimer.h>
-#include<qdns.h>
+#include<tqcstring.h>
+#include<tqtimer.h>
+#include<tqdns.h>
#include"safedelete.h"
#ifndef NO_NDNS
@@ -31,14 +31,14 @@
// CS_NAMESPACE_BEGIN
-static void sortSRVList(QValueList<QDns::Server> &list)
+static void sortSRVList(TQValueList<TQDns::Server> &list)
{
- QValueList<QDns::Server> tmp = list;
+ TQValueList<TQDns::Server> tmp = list;
list.clear();
while(!tmp.isEmpty()) {
- QValueList<QDns::Server>::Iterator p = tmp.end();
- for(QValueList<QDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
+ TQValueList<TQDns::Server>::Iterator p = tmp.end();
+ for(TQValueList<TQDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
if(p == tmp.end())
p = it;
else {
@@ -60,34 +60,34 @@ class SrvResolver::Private
public:
Private() {}
- QDns *qdns;
+ TQDns *qdns;
#ifndef NO_NDNS
NDns ndns;
#endif
bool failed;
- QHostAddress resultAddress;
+ TQHostAddress resultAddress;
Q_UINT16 resultPort;
bool srvonly;
- QString srv;
- QValueList<QDns::Server> servers;
+ TQString srv;
+ TQValueList<TQDns::Server> servers;
bool aaaa;
- QTimer t;
+ TQTimer t;
SafeDelete sd;
};
-SrvResolver::SrvResolver(QObject *parent)
-:QObject(parent)
+SrvResolver::SrvResolver(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->qdns = 0;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
stop();
}
@@ -97,31 +97,31 @@ SrvResolver::~SrvResolver()
delete d;
}
-void SrvResolver::resolve(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolve(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = false;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
-void SrvResolver::resolveSrvOnly(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = true;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
@@ -146,7 +146,7 @@ void SrvResolver::stop()
if(d->ndns.isBusy())
d->ndns.stop();
#endif
- d->resultAddress = QHostAddress();
+ d->resultAddress = TQHostAddress();
d->resultPort = 0;
d->servers.clear();
d->srv = "";
@@ -165,7 +165,7 @@ bool SrvResolver::isBusy() const
return false;
}
-QValueList<QDns::Server> SrvResolver::servers() const
+TQValueList<TQDns::Server> SrvResolver::servers() const
{
return d->servers;
}
@@ -175,7 +175,7 @@ bool SrvResolver::failed() const
return d->failed;
}
-QHostAddress SrvResolver::resultAddress() const
+TQHostAddress SrvResolver::resultAddress() const
{
return d->resultAddress;
}
@@ -191,11 +191,11 @@ void SrvResolver::tryNext()
d->ndns.resolve(d->servers.first().name);
#else
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->servers.first().name);
#endif
}
@@ -213,8 +213,8 @@ void SrvResolver::qdns_done()
SafeDeleteLock s(&d->sd);
// grab the server list and destroy the qdns object
- QValueList<QDns::Server> list;
- if(d->qdns->recordType() == QDns::Srv)
+ TQValueList<TQDns::Server> list;
+ if(d->qdns->recordType() == TQDns::Srv)
list = d->qdns->servers();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
@@ -247,7 +247,7 @@ void SrvResolver::ndns_done()
d->servers.remove(d->servers.begin());
if(r) {
- d->resultAddress = QHostAddress(d->ndns.result());
+ d->resultAddress = TQHostAddress(d->ndns.result());
d->resultPort = port;
resultsReady();
}
@@ -273,8 +273,8 @@ void SrvResolver::ndns_done()
SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list;
- if(d->qdns->recordType() == QDns::A || d->qdns->recordType() == QDns::Aaaa)
+ TQValueList<TQHostAddress> list;
+ if(d->qdns->recordType() == TQDns::A || d->qdns->recordType() == TQDns::Aaaa)
list = d->qdns->addresses();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
index fb5aa2b1..400639c1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
@@ -21,8 +21,8 @@
#ifndef CS_SRVRESOLVER_H
#define CS_SRVRESOLVER_H
-#include<qvaluelist.h>
-#include<qdns.h>
+#include<tqvaluelist.h>
+#include<tqdns.h>
// CS_NAMESPACE_BEGIN
@@ -30,19 +30,19 @@ class SrvResolver : public QObject
{
Q_OBJECT
public:
- SrvResolver(QObject *parent=0);
+ SrvResolver(TQObject *parent=0);
~SrvResolver();
- void resolve(const QString &server, const QString &type, const QString &proto);
- void resolveSrvOnly(const QString &server, const QString &type, const QString &proto);
+ void resolve(const TQString &server, const TQString &type, const TQString &proto);
+ void resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto);
void next();
void stop();
bool isBusy() const;
- QValueList<QDns::Server> servers() const;
+ TQValueList<TQDns::Server> servers() const;
bool failed() const;
- QHostAddress resultAddress() const;
+ TQHostAddress resultAddress() const;
Q_UINT16 resultPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
index c1483196..06df3f73 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
@@ -33,21 +33,21 @@
//! ...
//!
//! // encode a block of data into base64
-//! QByteArray block(1024);
-//! QByteArray enc = Base64::encode(block);
+//! TQByteArray block(1024);
+//! TQByteArray enc = Base64::encode(block);
//!
//! \endcode
//!
//! Encodes array \a s and returns the result.
-QByteArray Base64::encode(const QByteArray &s)
+TQByteArray Base64::encode(const TQByteArray &s)
{
int i;
int len = s.size();
char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
int a, b, c;
- QByteArray p((len+2)/3*4);
+ TQByteArray p((len+2)/3*4);
int at = 0;
for( i = 0; i < len; i += 3 ) {
a = ((unsigned char)s[i] & 3) << 4;
@@ -74,10 +74,10 @@ QByteArray Base64::encode(const QByteArray &s)
//!
//! Decodes array \a s and returns the result.
-QByteArray Base64::decode(const QByteArray &s)
+TQByteArray Base64::decode(const TQByteArray &s)
{
// return value
- QByteArray p;
+ TQByteArray p;
// -1 specifies invalid
// 64 specifies eof
@@ -140,41 +140,41 @@ QByteArray Base64::decode(const QByteArray &s)
//!
//! Encodes array \a a and returns the result as a string.
-QString Base64::arrayToString(const QByteArray &a)
+TQString Base64::arrayToString(const TQByteArray &a)
{
- QByteArray b = encode(a);
- QCString c;
+ TQByteArray b = encode(a);
+ TQCString c;
c.resize(b.size()+1);
memcpy(c.data(), b.data(), b.size());
- return QString::fromLatin1(c);
+ return TQString::fromLatin1(c);
}
//!
//! Decodes string \a s and returns the result as an array.
-QByteArray Base64::stringToArray(const QString &s)
+TQByteArray Base64::stringToArray(const TQString &s)
{
if(s.isEmpty())
- return QByteArray();
+ return TQByteArray();
// Unfold data
- QString us(s);
+ TQString us(s);
us.remove('\n');
const char *c = us.latin1();
int len = strlen(c);
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c, len);
- QByteArray a = decode(b);
+ TQByteArray a = decode(b);
return a;
}
//!
//! Encodes string \a s and returns the result as a string.
-QString Base64::encodeString(const QString &s)
+TQString Base64::encodeString(const TQString &s)
{
- QCString c = s.utf8();
+ TQCString c = s.utf8();
int len = c.length();
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c.data(), len);
return arrayToString(b);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
index 3aae2ba6..eaa2ff5b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
@@ -21,18 +21,18 @@
#ifndef CS_BASE64_H
#define CS_BASE64_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class Base64
{
public:
- static QByteArray encode(const QByteArray &);
- static QByteArray decode(const QByteArray &);
- static QString arrayToString(const QByteArray &);
- static QByteArray stringToArray(const QString &);
- static QString encodeString(const QString &);
+ static TQByteArray encode(const TQByteArray &);
+ static TQByteArray decode(const TQByteArray &);
+ static TQString arrayToString(const TQByteArray &);
+ static TQByteArray stringToArray(const TQString &);
+ static TQString encodeString(const TQString &);
};
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
index 068e39a0..e78c2f9a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
@@ -35,7 +35,7 @@
//!
//! The signals connectionClosed(), delayedCloseFinished(), readyRead(),
//! bytesWritten(), and error() serve the exact same function as those from
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! 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/jabber/libiris/cutestuff/util/bytestream.h b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
index b90f109d..f10b46a1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
@@ -21,8 +21,8 @@
#ifndef CS_BYTESTREAM_H
#define CS_BYTESTREAM_H
-#include<qobject.h>
-#include<qcstring.h>
+#include<tqobject.h>
+#include<tqcstring.h>
// 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/jabber/libiris/cutestuff/util/cipher.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
index f1581a6f..8f918dde 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
@@ -25,9 +25,9 @@
#include"bytestream.h"
#include"qrandom.h"
-static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_encryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -42,7 +42,7 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return false;
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_EncryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -54,9 +54,9 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_decryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -77,7 +77,7 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
}
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_DecryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -89,9 +89,9 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_generateKeyIV(const EVP_CIPHER *type, const QByteArray &data, const QByteArray &salt, QByteArray *key, QByteArray *iv)
+static bool lib_generateKeyIV(const EVP_CIPHER *type, const TQByteArray &data, const TQByteArray &salt, TQByteArray *key, TQByteArray *iv)
{
- QByteArray k, i;
+ TQByteArray k, i;
unsigned char *kp = 0;
unsigned char *ip = 0;
if(key) {
@@ -129,7 +129,7 @@ Cipher::Key Cipher::generateKey(Type t)
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
return k;
- QByteArray out;
+ TQByteArray out;
if(!lib_generateKeyIV(type, QRandom::randomArray(128), QRandom::randomArray(2), &out, 0))
return k;
k.setType(t);
@@ -137,14 +137,14 @@ Cipher::Key Cipher::generateKey(Type t)
return k;
}
-QByteArray Cipher::generateIV(Type t)
+TQByteArray Cipher::generateIV(Type t)
{
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
- return QByteArray();
- QByteArray out;
- if(!lib_generateKeyIV(type, QCString("Get this man an iv!"), QByteArray(), 0, &out))
- return QByteArray();
+ return TQByteArray();
+ TQByteArray out;
+ if(!lib_generateKeyIV(type, TQCString("Get this man an iv!"), TQByteArray(), 0, &out))
+ return TQByteArray();
return out;
}
@@ -156,32 +156,32 @@ int Cipher::ivSize(Type t)
return type->iv_len;
}
-QByteArray Cipher::encrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::encrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_encryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
return out;
}
-QByteArray Cipher::decrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::decrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_decryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
@@ -272,7 +272,7 @@ RSAKey generateRSAKey()
return key;
}
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -281,12 +281,12 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 11)
flen = size - 11;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -294,19 +294,19 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -314,7 +314,7 @@ QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -323,12 +323,12 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 41)
flen = size - 41;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -336,19 +336,19 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
index 148deff8..02c7606c 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
@@ -21,8 +21,8 @@
#ifndef CS_CIPHER_H
#define CS_CIPHER_H
-#include<qstring.h>
-#include<qcstring.h>
+#include<tqstring.h>
+#include<tqcstring.h>
namespace Cipher
{
@@ -36,19 +36,19 @@ namespace Cipher
bool isValid() const { return (v_type == None ? false: true); }
void setType(Type x) { v_type = x; }
Type type() const { return v_type; }
- void setData(const QByteArray &d) { v_data = d; }
- const QByteArray & data() const { return v_data; }
+ void setData(const TQByteArray &d) { v_data = d; }
+ const TQByteArray & data() const { return v_data; }
private:
Type v_type;
- QByteArray v_data;
+ TQByteArray v_data;
};
Key generateKey(Type);
- QByteArray generateIV(Type);
+ TQByteArray generateIV(Type);
int ivSize(Type);
- QByteArray encrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
- QByteArray decrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray encrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray decrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
}
class RSAKey
@@ -71,9 +71,9 @@ private:
};
RSAKey generateRSAKey();
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
index 3becd7c5..9805de2f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
@@ -9,15 +9,15 @@ uchar QRandom::randomChar()
uint QRandom::randomInt()
{
- QByteArray a = randomArray(sizeof(uint));
+ TQByteArray a = randomArray(sizeof(uint));
uint x;
memcpy(&x, a.data(), a.size());
return x;
}
-QByteArray QRandom::randomArray(uint size)
+TQByteArray QRandom::randomArray(uint size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(uint n = 0; n < size; ++n)
a[n] = randomChar();
return a;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
index 92339fb0..f04c7e0f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
@@ -1,14 +1,14 @@
#ifndef CS_QRANDOM_H
#define CS_QRANDOM_H
-#include<qcstring.h>
+#include<tqcstring.h>
class QRandom
{
public:
static uchar randomChar();
static uint randomInt();
- static QByteArray randomArray(uint size);
+ static TQByteArray randomArray(uint size);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
index 6bd012e9..12ed189b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
@@ -1,6 +1,6 @@
#include"safedelete.h"
-#include<qtimer.h>
+#include<tqtimer.h>
//----------------------------------------------------------------------------
// SafeDelete
@@ -16,7 +16,7 @@ SafeDelete::~SafeDelete()
lock->dying();
}
-void SafeDelete::deleteLater(QObject *o)
+void SafeDelete::deleteLater(TQObject *o)
{
if(!lock)
deleteSingle(o);
@@ -35,16 +35,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
@@ -97,7 +97,7 @@ SafeDeleteLater::SafeDeleteLater()
{
list.setAutoDelete(true);
self = this;
- QTimer::singleShot(0, this, SLOT(explode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(explode()));
}
SafeDeleteLater::~SafeDeleteLater()
@@ -106,7 +106,7 @@ SafeDeleteLater::~SafeDeleteLater()
self = 0;
}
-void SafeDeleteLater::deleteItLater(QObject *o)
+void SafeDeleteLater::deleteItLater(TQObject *o)
{
list.append(o);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
index 078d36cd..add5af6b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
@@ -1,8 +1,8 @@
#ifndef SAFEDELETE_H
#define SAFEDELETE_H
-#include<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
class SafeDelete;
class SafeDeleteLock
@@ -24,13 +24,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;
@@ -43,7 +43,7 @@ class SafeDeleteLater : public QObject
Q_OBJECT
public:
static SafeDeleteLater *ensureExists();
- void deleteItLater(QObject *o);
+ void deleteItLater(TQObject *o);
private slots:
void explode();
@@ -52,7 +52,7 @@ private:
SafeDeleteLater();
~SafeDeleteLater();
- QObjectList list;
+ TQObjectList list;
friend class SafeDelete;
static SafeDeleteLater *self;
};
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
index f4ad554f..a3195d89 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
@@ -161,10 +161,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -173,19 +173,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
index 797c3753..7f1a3f9e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
@@ -21,16 +21,16 @@
#ifndef CS_SHA1_H
#define CS_SHA1_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class SHA1
{
public:
- static QByteArray hash(const QByteArray &);
- static QByteArray hashString(const QCString &);
- static QString digest(const QString &);
+ static TQByteArray hash(const TQByteArray &);
+ static TQByteArray hashString(const TQCString &);
+ static TQString digest(const TQString &);
private:
SHA1();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
index fa446d58..0c8b46df 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
@@ -20,38 +20,38 @@
#include"showtextdlg.h"
-#include<qlayout.h>
-#include<qtextedit.h>
-#include<qpushbutton.h>
-#include<qfile.h>
-#include<qtextstream.h>
+#include<tqlayout.h>
+#include<tqtextedit.h>
+#include<tqpushbutton.h>
+#include<tqfile.h>
+#include<tqtextstream.h>
-ShowTextDlg::ShowTextDlg(const QString &fname, bool rich, QWidget *parent, const char *name)
-:QDialog(parent, name, FALSE, WDestructiveClose)
+ShowTextDlg::ShowTextDlg(const TQString &fname, bool rich, TQWidget *parent, const char *name)
+:TQDialog(parent, name, FALSE, WDestructiveClose)
{
- QString text;
+ TQString text;
- QFile f(fname);
+ TQFile f(fname);
if(f.open(IO_ReadOnly)) {
- QTextStream t(&f);
+ TQTextStream t(&f);
while(!t.eof())
text += t.readLine() + '\n';
f.close();
}
- QVBoxLayout *vb1 = new QVBoxLayout(this, 8);
- QTextEdit *te = new QTextEdit(this);
+ TQVBoxLayout *vb1 = new TQVBoxLayout(this, 8);
+ TQTextEdit *te = new TQTextEdit(this);
te->setReadOnly(TRUE);
- te->setTextFormat(rich ? QTextEdit::RichText : QTextEdit::PlainText);
+ te->setTextFormat(rich ? TQTextEdit::RichText : TQTextEdit::PlainText);
te->setText(text);
vb1->addWidget(te);
- QHBoxLayout *hb1 = new QHBoxLayout(vb1);
+ TQHBoxLayout *hb1 = new TQHBoxLayout(vb1);
hb1->addStretch(1);
- QPushButton *pb = new QPushButton(tr("&OK"), this);
- connect(pb, SIGNAL(clicked()), SLOT(accept()));
+ TQPushButton *pb = new TQPushButton(tr("&OK"), this);
+ connect(pb, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
hb1->addWidget(pb);
hb1->addStretch(1);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
index 08c74c5d..3d92dd74 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
@@ -21,13 +21,13 @@
#ifndef CS_SHOWTEXTDLG_H
#define CS_SHOWTEXTDLG_H
-#include<qdialog.h>
+#include<tqdialog.h>
class ShowTextDlg : public QDialog
{
Q_OBJECT
public:
- ShowTextDlg(const QString &fname, bool rich=FALSE, QWidget *parent=0, const char *name=0);
+ ShowTextDlg(const TQString &fname, bool rich=FALSE, TQWidget *parent=0, const char *name=0);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h
index 170338fc..f4905057 100644
--- a/kopete/protocols/jabber/libiris/iris/include/im.h
+++ b/kopete/protocols/jabber/libiris/iris/include/im.h
@@ -21,8 +21,8 @@
#ifndef XMPP_IM_H
#define XMPP_IM_H
-#include<qdatetime.h>
-#include<qvaluelist.h>
+#include<tqdatetime.h>
+#include<tqvaluelist.h>
#include"xmpp.h"
namespace XMPP
@@ -30,24 +30,24 @@ namespace XMPP
class Url
{
public:
- Url(const QString &url="", const QString &desc="");
+ Url(const TQString &url="", const TQString &desc="");
Url(const Url &);
Url & operator=(const Url &);
~Url();
- QString url() const;
- QString desc() const;
+ TQString url() const;
+ TQString desc() const;
- void setUrl(const QString &);
- void setDesc(const QString &);
+ void setUrl(const TQString &);
+ void setDesc(const TQString &);
private:
class Private;
Private *d;
};
- typedef QValueList<Url> UrlList;
- typedef QMap<QString, QString> StringMap;
+ typedef TQValueList<Url> UrlList;
+ typedef TQMap<TQString, TQString> StringMap;
typedef enum { OfflineEvent, DeliveredEvent, DisplayedEvent,
ComposingEvent, CancelEvent, InactiveEvent, GoneEvent } MsgEvent;
@@ -61,29 +61,29 @@ namespace XMPP
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
- QString subject(const QString &lang="") const;
- QString body(const QString &lang="") const;
- QString xHTMLBody(const QString &lang="") const;
- QString thread() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
+ TQString subject(const TQString &lang="") const;
+ TQString body(const TQString &lang="") const;
+ TQString xHTMLBody(const TQString &lang="") const;
+ TQString thread() const;
Stanza::Error error() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &s);
- void setType(const QString &s);
- void setLang(const QString &s);
- void setSubject(const QString &s, const QString &lang="");
- void setBody(const QString &s, const QString &lang="");
- void setXHTMLBody(const QString &s, const QString &lang="", const QString &attr = "");
- void setThread(const QString &s);
+ void setId(const TQString &s);
+ void setType(const TQString &s);
+ void setLang(const TQString &s);
+ void setSubject(const TQString &s, const TQString &lang="");
+ void setBody(const TQString &s, const TQString &lang="");
+ void setXHTMLBody(const TQString &s, const TQString &lang="", const TQString &attr = "");
+ void setThread(const TQString &s);
void setError(const Stanza::Error &err);
// JEP-0091
- QDateTime timeStamp() const;
- void setTimeStamp(const QDateTime &ts);
+ TQDateTime timeStamp() const;
+ void setTimeStamp(const TQDateTime &ts);
// JEP-0066
UrlList urlList() const;
@@ -92,19 +92,19 @@ namespace XMPP
void setUrlList(const UrlList &list);
// JEP-0022
- QString eventId() const;
- void setEventId(const QString& id);
+ TQString eventId() const;
+ void setEventId(const TQString& id);
bool containsEvents() const;
bool containsEvent(MsgEvent e) const;
void addEvent(MsgEvent e);
// JEP-0027
- QString xencrypted() const;
- void setXEncrypted(const QString &s);
+ TQString xencrypted() const;
+ void setXEncrypted(const TQString &s);
// Obsolete invitation
- QString invite() const;
- void setInvite(const QString &s);
+ TQString invite() const;
+ void setInvite(const TQString &s);
// for compatibility. delete me later
bool spooled() const;
@@ -129,8 +129,8 @@ namespace XMPP
int type() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
private:
SubType value;
@@ -139,56 +139,56 @@ namespace XMPP
class Status
{
public:
- Status(const QString &show="", const QString &status="", int priority=0, bool available=true);
+ Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true);
~Status();
int priority() const;
- const QString & show() const;
- const QString & status() const;
- QDateTime timeStamp() const;
- const QString & keyID() const;
+ const TQString & show() const;
+ const TQString & status() const;
+ TQDateTime timeStamp() const;
+ const TQString & keyID() const;
bool isAvailable() const;
bool isAway() const;
bool isInvisible() const;
bool hasError() const;
int errorCode() const;
- const QString & errorString() const;
+ const TQString & errorString() const;
- const QString & xsigned() const;
- const QString & songTitle() const;
- const QString & capsNode() const;
- const QString & capsVersion() const;
- const QString & capsExt() const;
+ const TQString & xsigned() const;
+ const TQString & songTitle() const;
+ const TQString & capsNode() const;
+ const TQString & capsVersion() const;
+ const TQString & capsExt() const;
void setPriority(int);
- void setShow(const QString &);
- void setStatus(const QString &);
- void setTimeStamp(const QDateTime &);
- void setKeyID(const QString &);
+ void setShow(const TQString &);
+ void setStatus(const TQString &);
+ void setTimeStamp(const TQDateTime &);
+ void setKeyID(const TQString &);
void setIsAvailable(bool);
void setIsInvisible(bool);
- void setError(int, const QString &);
- void setCapsNode(const QString&);
- void setCapsVersion(const QString&);
- void setCapsExt(const QString&);
+ void setError(int, const TQString &);
+ void setCapsNode(const TQString&);
+ void setCapsVersion(const TQString&);
+ void setCapsExt(const TQString&);
- void setXSigned(const QString &);
- void setSongTitle(const QString &);
+ void setXSigned(const TQString &);
+ void setSongTitle(const TQString &);
private:
int v_priority;
- QString v_show, v_status, v_key;
- QDateTime v_timeStamp;
+ TQString v_show, v_status, v_key;
+ TQDateTime v_timeStamp;
bool v_isAvailable;
bool v_isInvisible;
- QString v_xsigned;
+ TQString v_xsigned;
// gabber song extension
- QString v_songTitle;
- QString v_capsNode, v_capsVersion, v_capsExt;
+ TQString v_songTitle;
+ TQString v_capsNode, v_capsVersion, v_capsExt;
int ecode;
- QString estr;
+ TQString estr;
class Private;
Private *d;
@@ -197,33 +197,33 @@ namespace XMPP
class Resource
{
public:
- Resource(const QString &name="", const Status &s=Status());
+ Resource(const TQString &name="", const Status &s=Status());
~Resource();
- const QString & name() const;
+ const TQString & name() const;
int priority() const;
const Status & status() const;
- void setName(const QString &);
+ void setName(const TQString &);
void setStatus(const Status &);
private:
- QString v_name;
+ TQString v_name;
Status v_status;
class ResourcePrivate *d;
};
- class ResourceList : public QValueList<Resource>
+ class ResourceList : public TQValueList<Resource>
{
public:
ResourceList();
~ResourceList();
- ResourceList::Iterator find(const QString &);
+ ResourceList::Iterator find(const TQString &);
ResourceList::Iterator priority();
- ResourceList::ConstIterator find(const QString &) const;
+ ResourceList::ConstIterator find(const TQString &) const;
ResourceList::ConstIterator priority() const;
private:
@@ -237,37 +237,37 @@ namespace XMPP
virtual ~RosterItem();
const Jid & jid() const;
- const QString & name() const;
- const QStringList & groups() const;
+ const TQString & name() const;
+ const TQStringList & groups() const;
const Subscription & subscription() const;
- const QString & ask() const;
+ const TQString & ask() const;
bool isPush() const;
- bool inGroup(const QString &) const;
+ bool inGroup(const TQString &) const;
virtual void setJid(const Jid &);
- void setName(const QString &);
- void setGroups(const QStringList &);
+ void setName(const TQString &);
+ void setGroups(const TQStringList &);
void setSubscription(const Subscription &);
- void setAsk(const QString &);
+ void setAsk(const TQString &);
void setIsPush(bool);
- bool addGroup(const QString &);
- bool removeGroup(const QString &);
+ bool addGroup(const TQString &);
+ bool removeGroup(const TQString &);
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
private:
Jid v_jid;
- QString v_name;
- QStringList v_groups;
+ TQString v_name;
+ TQStringList v_groups;
Subscription v_subscription;
- QString v_ask;
+ TQString v_ask;
bool v_push;
class RosterItemPrivate *d;
};
- class Roster : public QValueList<RosterItem>
+ class Roster : public TQValueList<RosterItem>
{
public:
Roster();
@@ -284,12 +284,12 @@ namespace XMPP
{
public:
Features();
- Features(const QStringList &);
- Features(const QString &);
+ Features(const TQStringList &);
+ Features(const TQString &);
~Features();
- QStringList list() const; // actual featurelist
- void setList(const QStringList &);
+ TQStringList list() const; // actual featurelist
+ void setList(const TQStringList &);
// features
bool canRegister() const;
@@ -317,19 +317,19 @@ namespace XMPP
};
// useful functions
- bool test(const QStringList &) const;
+ bool test(const TQStringList &) const;
- QString name() const;
- static QString name(long id);
- static QString name(const QString &feature);
+ TQString name() const;
+ static TQString name(long id);
+ static TQString name(const TQString &feature);
long id() const;
- static long id(const QString &feature);
- static QString feature(long id);
+ static long id(const TQString &feature);
+ static TQString feature(long id);
class FeatureName;
private:
- QStringList _list;
+ TQStringList _list;
};
class AgentItem
@@ -338,24 +338,24 @@ namespace XMPP
AgentItem() { }
const Jid & jid() const { return v_jid; }
- const QString & name() const { return v_name; }
- const QString & category() const { return v_category; }
- const QString & type() const { return v_type; }
+ const TQString & name() const { return v_name; }
+ const TQString & category() const { return v_category; }
+ const TQString & type() const { return v_type; }
const Features & features() const { return v_features; }
void setJid(const Jid &j) { v_jid = j; }
- void setName(const QString &n) { v_name = n; }
- void setCategory(const QString &c) { v_category = c; }
- void setType(const QString &t) { v_type = t; }
+ void setName(const TQString &n) { v_name = n; }
+ void setCategory(const TQString &c) { v_category = c; }
+ void setType(const TQString &t) { v_type = t; }
void setFeatures(const Features &f) { v_features = f; }
private:
Jid v_jid;
- QString v_name, v_category, v_type;
+ TQString v_name, v_category, v_type;
Features v_features;
};
- typedef QValueList<AgentItem> AgentList;
+ typedef TQValueList<AgentItem> AgentList;
class DiscoItem
{
@@ -364,12 +364,12 @@ namespace XMPP
~DiscoItem();
const Jid &jid() const;
- const QString &node() const;
- const QString &name() const;
+ const TQString &node() const;
+ const TQString &name() const;
void setJid(const Jid &);
- void setName(const QString &);
- void setNode(const QString &);
+ void setName(const TQString &);
+ void setNode(const TQString &);
enum Action {
None = 0,
@@ -385,19 +385,19 @@ namespace XMPP
struct Identity
{
- QString category;
- QString name;
- QString type;
+ TQString category;
+ TQString name;
+ TQString type;
};
- typedef QValueList<Identity> Identities;
+ typedef TQValueList<Identity> Identities;
const Identities &identities() const;
void setIdentities(const Identities &);
// some useful helper functions
- static Action string2action(QString s);
- static QString action2string(Action a);
+ static Action string2action(TQString s);
+ static TQString action2string(Action a);
DiscoItem & operator= (const DiscoItem &);
DiscoItem(const DiscoItem &);
@@ -411,51 +411,51 @@ namespace XMPP
Private *d;
};
- typedef QValueList<DiscoItem> DiscoList;
+ typedef TQValueList<DiscoItem> DiscoList;
class FormField
{
public:
enum { username, nick, password, name, first, last, email, address, city, state, zip, phone, url, date, misc };
- FormField(const QString &type="", const QString &value="");
+ FormField(const TQString &type="", const TQString &value="");
~FormField();
int type() const;
- QString fieldName() const;
- QString realName() const;
+ TQString fieldName() const;
+ TQString realName() const;
bool isSecret() const;
- const QString & value() const;
+ const TQString & value() const;
void setType(int);
- bool setType(const QString &);
- void setValue(const QString &);
+ bool setType(const TQString &);
+ void setValue(const TQString &);
private:
- int tagNameToType(const QString &) const;
- QString typeToTagName(int) const;
+ int tagNameToType(const TQString &) const;
+ TQString typeToTagName(int) const;
int v_type;
- QString v_value;
+ TQString v_value;
class Private;
Private *d;
};
- class Form : public QValueList<FormField>
+ class Form : public TQValueList<FormField>
{
public:
Form(const Jid &j="");
~Form();
Jid jid() const;
- QString instructions() const;
- QString key() const;
+ TQString instructions() const;
+ TQString key() const;
void setJid(const Jid &);
- void setInstructions(const QString &);
- void setKey(const QString &);
+ void setInstructions(const TQString &);
+ void setKey(const TQString &);
private:
Jid v_jid;
- QString v_instructions, v_key;
+ TQString v_instructions, v_key;
class Private;
Private *d;
@@ -468,20 +468,20 @@ namespace XMPP
~SearchResult();
const Jid & jid() const;
- const QString & nick() const;
- const QString & first() const;
- const QString & last() const;
- const QString & email() const;
+ const TQString & nick() const;
+ const TQString & first() const;
+ const TQString & last() const;
+ const TQString & email() const;
void setJid(const Jid &);
- void setNick(const QString &);
- void setFirst(const QString &);
- void setLast(const QString &);
- void setEmail(const QString &);
+ void setNick(const TQString &);
+ void setFirst(const TQString &);
+ void setLast(const TQString &);
+ void setEmail(const TQString &);
private:
Jid v_jid;
- QString v_nick, v_first, v_last, v_email;
+ TQString v_nick, v_first, v_last, v_email;
};
class Client;
@@ -503,15 +503,15 @@ namespace XMPP
Task *parent() const;
Client *client() const;
- QDomDocument *doc() const;
- QString id() const;
+ TQDomDocument *doc() const;
+ TQString id() const;
bool success() const;
int statusCode() const;
- const QString & statusString() const;
+ const TQString & statusString() const;
void go(bool autoDelete=false);
- virtual bool take(const QDomElement &);
+ virtual bool take(const TQDomElement &);
void safeDelete();
signals:
@@ -520,13 +520,13 @@ namespace XMPP
protected:
virtual void onGo();
virtual void onDisconnect();
- void send(const QDomElement &);
- void setSuccess(int code=0, const QString &str="");
- void setError(const QDomElement &);
- void setError(int code=0, const QString &str="");
+ void send(const TQDomElement &);
+ void setSuccess(int code=0, const TQString &str="");
+ void setError(const TQDomElement &);
+ void setError(int code=0, const TQString &str="");
void debug(const char *, ...);
- void debug(const QString &);
- bool iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns="");
+ void debug(const TQString &);
+ bool iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns="");
private slots:
void clientDisconnected();
@@ -544,60 +544,60 @@ namespace XMPP
Q_OBJECT
public:
- Client(QObject *parent=0);
+ Client(TQObject *parent=0);
~Client();
bool isActive() const;
void connectToServer(ClientStream *s, const Jid &j, bool auth=true);
- void start(const QString &host, const QString &user, const QString &pass, const QString &resource);
+ void start(const TQString &host, const TQString &user, const TQString &pass, const TQString &resource);
void close(bool fast=false);
Stream & stream();
const LiveRoster & roster() const;
const ResourceList & resourceList() const;
- void send(const QDomElement &);
- void send(const QString &);
+ void send(const TQDomElement &);
+ void send(const TQString &);
- QString host() const;
- QString user() const;
- QString pass() const;
- QString resource() const;
+ TQString host() const;
+ TQString user() const;
+ TQString pass() const;
+ TQString resource() const;
Jid jid() const;
void rosterRequest();
void sendMessage(const Message &);
- void sendSubscription(const Jid &, const QString &);
+ void sendSubscription(const Jid &, const TQString &);
void setPresence(const Status &);
- void debug(const QString &);
- QString genUniqueId();
+ void debug(const TQString &);
+ TQString genUniqueId();
Task *rootTask();
- QDomDocument *doc() const;
+ TQDomDocument *doc() const;
- QString OSName() const;
- QString timeZone() const;
+ TQString OSName() const;
+ TQString timeZone() const;
int timeZoneOffset() const;
- QString clientName() const;
- QString clientVersion() const;
- QString capsNode() const;
- QString capsVersion() const;
- QString capsExt() const;
-
- void setOSName(const QString &);
- void setTimeZone(const QString &, int);
- void setClientName(const QString &);
- void setClientVersion(const QString &);
- void setCapsNode(const QString &);
- void setCapsVersion(const QString &);
+ TQString clientName() const;
+ TQString clientVersion() const;
+ TQString capsNode() const;
+ TQString capsVersion() const;
+ TQString capsExt() const;
+
+ void setOSName(const TQString &);
+ void setTimeZone(const TQString &, int);
+ void setClientName(const TQString &);
+ void setClientVersion(const TQString &);
+ void setCapsNode(const TQString &);
+ void setCapsVersion(const TQString &);
void setIdentity(DiscoItem::Identity);
DiscoItem::Identity identity();
- void addExtension(const QString& ext, const Features& f);
- void removeExtension(const QString& ext);
- const Features& extension(const QString& ext) const;
- QStringList extensions() const;
+ void addExtension(const TQString& ext, const Features& f);
+ void removeExtension(const TQString& ext);
+ const Features& extension(const TQString& ext) const;
+ TQStringList extensions() const;
S5BManager *s5bManager() const;
IBBManager *ibbManager() const;
@@ -606,32 +606,32 @@ namespace XMPP
void setFileTransferEnabled(bool b);
FileTransferManager *fileTransferManager() const;
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick);
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password);
- void groupChatSetStatus(const QString &host, const QString &room, const Status &);
- void groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &);
- void groupChatLeave(const QString &host, const QString &room);
+ bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick);
+ bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password);
+ void groupChatSetStatus(const TQString &host, const TQString &room, const Status &);
+ void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &);
+ void groupChatLeave(const TQString &host, const TQString &room);
signals:
void activated();
void disconnected();
- //void authFinished(bool, int, const QString &);
- void rosterRequestFinished(bool, int, const QString &);
+ //void authFinished(bool, int, const TQString &);
+ void rosterRequestFinished(bool, int, const TQString &);
void rosterItemAdded(const RosterItem &);
void rosterItemUpdated(const RosterItem &);
void rosterItemRemoved(const RosterItem &);
void resourceAvailable(const Jid &, const Resource &);
void resourceUnavailable(const Jid &, const Resource &);
- void presenceError(const Jid &, int, const QString &);
- void subscription(const Jid &, const QString &);
+ void presenceError(const Jid &, int, const TQString &);
+ void subscription(const Jid &, const TQString &);
void messageReceived(const Message &);
- void debugText(const QString &);
- void xmlIncoming(const QString &);
- void xmlOutgoing(const QString &);
+ void debugText(const TQString &);
+ void xmlIncoming(const TQString &);
+ void xmlOutgoing(const TQString &);
void groupChatJoined(const Jid &);
void groupChatLeft(const Jid &);
void groupChatPresence(const Jid &, const Status &);
- void groupChatError(const Jid &, int, const QString &);
+ void groupChatError(const Jid &, int, const TQString &);
void incomingJidLink();
@@ -643,13 +643,13 @@ namespace XMPP
//void streamCloseFinished();
void streamError(int);
void streamReadyRead();
- void streamIncomingXml(const QString &);
- void streamOutgoingXml(const QString &);
+ void streamIncomingXml(const TQString &);
+ void streamOutgoingXml(const TQString &);
void slotRosterRequestFinished();
// basic daemons
- void ppSubscription(const Jid &, const QString &);
+ void ppSubscription(const Jid &, const TQString &);
void ppPresence(const Jid &, const Status &);
void pmMessage(const Message &);
void prRoster(const Roster &);
@@ -661,7 +661,7 @@ namespace XMPP
class GroupChat;
private:
void cleanup();
- void distribute(const QDomElement &);
+ void distribute(const TQDomElement &);
void importRoster(const Roster &);
void importRosterItem(const RosterItem &);
void updateSelfPresence(const Jid &, const Status &);
@@ -702,7 +702,7 @@ namespace XMPP
LiveRosterItemPrivate *d;
};
- class LiveRoster : public QValueList<LiveRosterItem>
+ class LiveRoster : public TQValueList<LiveRosterItem>
{
public:
LiveRoster();
diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
index dbb1b2cf..12d87d18 100644
--- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h
+++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
@@ -21,13 +21,13 @@
#ifndef XMPP_H
#define XMPP_H
-#include<qobject.h>
-#include<qstring.h>
-#include<qhostaddress.h>
-#include<qstring.h>
-#include<qcstring.h>
-#include<qxml.h>
-#include<qdom.h>
+#include<tqobject.h>
+#include<tqstring.h>
+#include<tqhostaddress.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqxml.h>
+#include<tqdom.h>
namespace QCA
{
@@ -51,11 +51,11 @@ namespace XMPP
public:
virtual ~Debug();
- virtual void msg(const QString &)=0;
- virtual void outgoingTag(const QString &)=0;
- virtual void incomingTag(const QString &)=0;
- virtual void outgoingXml(const QDomElement &)=0;
- virtual void incomingXml(const QDomElement &)=0;
+ virtual void msg(const TQString &)=0;
+ virtual void outgoingTag(const TQString &)=0;
+ virtual void incomingTag(const TQString &)=0;
+ virtual void outgoingXml(const TQDomElement &)=0;
+ virtual void incomingXml(const TQDomElement &)=0;
};
void setDebug(Debug *);
@@ -64,16 +64,16 @@ namespace XMPP
{
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 useSSL() const;
bool havePeerAddress() const;
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
@@ -83,12 +83,12 @@ namespace XMPP
protected:
void setUseSSL(bool b);
void setPeerAddressNone();
- void setPeerAddress(const QHostAddress &addr, Q_UINT16 port);
+ void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port);
private:
bool ssl;
bool haveaddr;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -97,7 +97,7 @@ namespace XMPP
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream };
- AdvancedConnector(QObject *parent=0);
+ AdvancedConnector(TQObject *parent=0);
virtual ~AdvancedConnector();
class Proxy
@@ -108,42 +108,42 @@ namespace XMPP
~Proxy();
int type() const;
- QString host() const;
+ TQString host() const;
Q_UINT16 port() const;
- QString url() const;
- QString user() const;
- QString pass() const;
+ TQString url() const;
+ TQString user() const;
+ TQString pass() const;
int pollInterval() const;
- void setHttpConnect(const QString &host, Q_UINT16 port);
- void setHttpPoll(const QString &host, Q_UINT16 port, const QString &url);
- void setSocks(const QString &host, Q_UINT16 port);
- void setUserPass(const QString &user, const QString &pass);
+ void setHttpConnect(const TQString &host, Q_UINT16 port);
+ void setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url);
+ void setSocks(const TQString &host, Q_UINT16 port);
+ void setUserPass(const TQString &user, const TQString &pass);
void setPollInterval(int secs);
private:
int t;
- QString v_host, v_url;
+ TQString v_host, v_url;
Q_UINT16 v_port;
- QString v_user, v_pass;
+ TQString v_user, v_pass;
int v_poll;
};
void setProxy(const Proxy &proxy);
- void setOptHostPort(const QString &host, Q_UINT16 port);
+ void setOptHostPort(const TQString &host, Q_UINT16 port);
void setOptProbe(bool);
void setOptSSL(bool);
void changePollInterval(int secs);
- void connectToServer(const QString &server);
+ void connectToServer(const TQString &server);
ByteStream *stream() const;
void done();
int errorCode() const;
signals:
- void srvLookup(const QString &server);
+ void srvLookup(const TQString &server);
void srvResult(bool success);
void httpSyncStarted();
void httpSyncFinished();
@@ -170,20 +170,20 @@ namespace XMPP
{
Q_OBJECT
public:
- TLSHandler(QObject *parent=0);
+ TLSHandler(TQObject *parent=0);
virtual ~TLSHandler();
virtual void reset()=0;
- virtual void startClient(const QString &host)=0;
- virtual void write(const QByteArray &a)=0;
- virtual void writeIncoming(const QByteArray &a)=0;
+ virtual void startClient(const TQString &host)=0;
+ virtual void write(const TQByteArray &a)=0;
+ virtual void writeIncoming(const TQByteArray &a)=0;
signals:
void success();
void fail();
void closed();
- void readyRead(const QByteArray &a);
- void readyReadOutgoing(const QByteArray &a, int plainBytes);
+ void readyRead(const TQByteArray &a);
+ void readyReadOutgoing(const TQByteArray &a, int plainBytes);
};
class QCATLSHandler : public TLSHandler
@@ -197,9 +197,9 @@ namespace XMPP
int tlsError() const;
void reset();
- void startClient(const QString &host);
- void write(const QByteArray &a);
- void writeIncoming(const QByteArray &a);
+ void startClient(const TQString &host);
+ void write(const TQByteArray &a);
+ void writeIncoming(const TQByteArray &a);
signals:
void tlsHandshaken();
@@ -225,45 +225,45 @@ namespace XMPP
Jid();
~Jid();
- Jid(const QString &s);
+ Jid(const TQString &s);
Jid(const char *s);
- Jid & operator=(const QString &s);
+ Jid & operator=(const TQString &s);
Jid & operator=(const char *s);
- void set(const QString &s);
- void set(const QString &domain, const QString &node, const QString &resource="");
+ void set(const TQString &s);
+ void set(const TQString &domain, const TQString &node, const TQString &resource="");
- void setDomain(const QString &s);
- void setNode(const QString &s);
- void setResource(const QString &s);
+ void setDomain(const TQString &s);
+ void setNode(const TQString &s);
+ void setResource(const TQString &s);
- const QString & domain() const { return d; }
- const QString & node() const { return n; }
- const QString & resource() const { return r; }
- const QString & bare() const { return b; }
- const QString & full() const { return f; }
+ const TQString & domain() const { return d; }
+ const TQString & node() const { return n; }
+ const TQString & resource() const { return r; }
+ const TQString & bare() const { return b; }
+ const TQString & full() const { return f; }
- Jid withNode(const QString &s) const;
- Jid withResource(const QString &s) const;
+ Jid withNode(const TQString &s) const;
+ Jid withResource(const TQString &s) const;
bool isValid() const;
bool isEmpty() const;
bool compare(const Jid &a, bool compareRes=true) const;
- static bool validDomain(const QString &s, QString *norm=0);
- static bool validNode(const QString &s, QString *norm=0);
- static bool validResource(const QString &s, QString *norm=0);
+ static bool validDomain(const TQString &s, TQString *norm=0);
+ static bool validNode(const TQString &s, TQString *norm=0);
+ static bool validResource(const TQString &s, TQString *norm=0);
// TODO: kill these later
- const QString & host() const { return d; }
- const QString & user() const { return n; }
- const QString & userHost() const { return b; }
+ const TQString & host() const { return d; }
+ const TQString & user() const { return n; }
+ const TQString & userHost() const { return b; }
private:
void reset();
void update();
- QString f, b, d, n, r;
+ TQString f, b, d, n, r;
bool valid;
};
@@ -303,42 +303,42 @@ namespace XMPP
class Error
{
public:
- Error(int type=Cancel, int condition=UndefinedCondition, const QString &text="", const QDomElement &appSpec=QDomElement());
+ Error(int type=Cancel, int condition=UndefinedCondition, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
int type;
int condition;
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
};
bool isNull() const;
- QDomElement element() const;
- QString toString() const;
+ TQDomElement element() const;
+ TQString toString() const;
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
- QDomElement createElement(const QString &ns, const QString &tagName);
- QDomElement createTextElement(const QString &ns, const QString &tagName, const QString &text);
- QDomElement createXHTMLElement(const QString &xHTML);
- void appendChild(const QDomElement &e);
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
+ TQDomElement createElement(const TQString &ns, const TQString &tagName);
+ TQDomElement createTextElement(const TQString &ns, const TQString &tagName, const TQString &text);
+ TQDomElement createXHTMLElement(const TQString &xHTML);
+ void appendChild(const TQDomElement &e);
Kind kind() const;
void setKind(Kind k);
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &id);
- void setType(const QString &type);
- void setLang(const QString &lang);
+ void setId(const TQString &id);
+ void setType(const TQString &type);
+ void setLang(const TQString &lang);
Error error() const;
void setError(const Error &err);
@@ -346,8 +346,8 @@ namespace XMPP
private:
friend class Stream;
- Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id);
- Stanza(Stream *s, const QDomElement &e);
+ Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id);
+ Stanza(Stream *s, const TQDomElement &e);
class Private;
Private *d;
@@ -370,13 +370,13 @@ namespace XMPP
SystemShutdown
};
- Stream(QObject *parent=0);
+ Stream(TQObject *parent=0);
virtual ~Stream();
- virtual QDomDocument & doc() const=0;
- virtual QString baseNS() const=0;
- virtual QString xhtmlImNS() const=0;
- virtual QString xhtmlNS() const=0;
+ virtual TQDomDocument & doc() const=0;
+ virtual TQString baseNS() const=0;
+ virtual TQString xhtmlImNS() const=0;
+ virtual TQString xhtmlNS() const=0;
virtual bool old() const=0;
virtual void close()=0;
@@ -385,13 +385,13 @@ namespace XMPP
virtual void write(const Stanza &s)=0;
virtual int errorCondition() const=0;
- virtual QString errorText() const=0;
- virtual QDomElement errorAppSpec() const=0;
+ virtual TQString errorText() const=0;
+ virtual TQDomElement errorAppSpec() const=0;
- Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id="");
- Stanza createStanza(const QDomElement &e);
+ Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id="");
+ Stanza createStanza(const TQDomElement &e);
- static QString xmlToString(const QDomElement &e, bool clip=false);
+ static TQString xmlToString(const TQDomElement &e, bool clip=false);
signals:
void connectionClosed();
@@ -450,8 +450,8 @@ namespace XMPP
BindConflict // resource in-use
};
- ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0);
- ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls=0, QObject *parent=0); // server
+ ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0);
+ ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *parent=0); // server
~ClientStream();
Jid jid() const;
@@ -461,13 +461,13 @@ namespace XMPP
bool isAuthenticated() const;
// login params
- void setUsername(const QString &s);
- void setPassword(const QString &s);
- void setRealm(const QString &s);
+ void setUsername(const TQString &s);
+ void setPassword(const TQString &s);
+ void setRealm(const TQString &s);
void continueAfterParams();
// SASL information
- QString saslMechanism() const;
+ TQString saslMechanism() const;
int saslSSF() const;
// binding
@@ -478,14 +478,14 @@ namespace XMPP
void setRequireMutualAuth(bool);
void setSSFRange(int low, int high);
void setOldOnly(bool);
- void setSASLMechanism(const QString &s);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setSASLMechanism(const TQString &s);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
// reimplemented
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
bool old() const;
void close();
@@ -494,11 +494,11 @@ namespace XMPP
void write(const Stanza &s);
int errorCondition() const;
- QString errorText() const;
- QDomElement errorAppSpec() const;
+ TQString errorText() const;
+ TQDomElement errorAppSpec() const;
// extra
- void writeDirect(const QString &s);
+ void writeDirect(const TQString &s);
void setNoopTime(int mills);
signals:
@@ -507,8 +507,8 @@ namespace XMPP
void needAuthParams(bool user, bool pass, bool realm);
void authenticated();
void warning(int);
- void incomingXml(const QString &s);
- void outgoingXml(const QString &s);
+ void incomingXml(const TQString &s);
+ void outgoingXml(const TQString &s);
public slots:
void continueAfterWarning();
@@ -527,10 +527,10 @@ namespace XMPP
void ss_tlsClosed();
void ss_error(int);
- void sasl_clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void sasl_nextStep(const QByteArray &stepData);
+ void sasl_clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void sasl_nextStep(const TQByteArray &stepData);
void sasl_needParams(bool user, bool authzid, bool pass, bool realm);
- void sasl_authCheck(const QString &user, const QString &authzid);
+ void sasl_authCheck(const TQString &user, const TQString &authzid);
void sasl_authenticated();
void sasl_error(int);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
index dd458ef0..87743e7f 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
@@ -20,10 +20,10 @@
#include"filetransfer.h"
-#include<qtimer.h>
-#include<qptrlist.h>
-#include<qguardedptr.h>
-#include<qfileinfo.h>
+#include<tqtimer.h>
+#include<tqptrlist.h>
+#include<tqguardedptr.h>
+#include<tqfileinfo.h>
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -34,13 +34,13 @@ using namespace XMPP;
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -52,23 +52,23 @@ public:
FileTransferManager *m;
JT_FT *ft;
Jid peer;
- QString fname;
+ TQString fname;
Q_LLONG size;
Q_LLONG sent;
- QString desc;
+ TQString desc;
bool rangeSupported;
Q_LLONG rangeOffset, rangeLength, length;
- QString streamType;
+ TQString streamType;
bool needStream;
- QString id, iq_id;
+ TQString id, iq_id;
S5BConnection *c;
Jid proxy;
int state;
bool sender;
};
-FileTransfer::FileTransfer(FileTransferManager *m, QObject *parent)
-:QObject(parent)
+FileTransfer::FileTransfer(FileTransferManager *m, TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->m = m;
@@ -104,7 +104,7 @@ void FileTransfer::setProxy(const Jid &proxy)
d->proxy = proxy;
}
-void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc)
+void FileTransfer::sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc)
{
d->state = Requesting;
d->peer = to;
@@ -115,8 +115,8 @@ void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, c
d->id = d->m->link(this);
d->ft = new JT_FT(d->m->client()->rootTask());
- connect(d->ft, SIGNAL(finished()), SLOT(ft_finished()));
- QStringList list;
+ connect(d->ft, TQT_SIGNAL(finished()), TQT_SLOT(ft_finished()));
+ TQStringList list;
list += "http://jabber.org/protocol/bytestreams";
d->ft->request(to, d->id, fname, size, desc, list);
d->ft->go(true);
@@ -134,14 +134,14 @@ int FileTransfer::dataSizeNeeded() const
return size;
}
-void FileTransfer::writeFileData(const QByteArray &a)
+void FileTransfer::writeFileData(const TQByteArray &a)
{
int pending = d->c->bytesToWrite();
Q_LLONG left = d->length - (d->sent + pending);
if(left == 0)
return;
- QByteArray block;
+ TQByteArray block;
if((Q_LLONG)a.size() > left) {
block = a.copy();
block.resize((uint)left);
@@ -156,7 +156,7 @@ Jid FileTransfer::peer() const
return d->peer;
}
-QString FileTransfer::fileName() const
+TQString FileTransfer::fileName() const
{
return d->fname;
}
@@ -166,7 +166,7 @@ Q_LLONG FileTransfer::fileSize() const
return d->size;
}
-QString FileTransfer::description() const
+TQString FileTransfer::description() const
{
return d->desc;
}
@@ -228,10 +228,10 @@ void FileTransfer::ft_finished()
d->length = d->size - d->rangeOffset;
d->streamType = ft->streamType();
d->c = d->m->client()->s5bManager()->createConnection();
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(bytesWritten(int)), SLOT(s5b_bytesWritten(int)));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(s5b_bytesWritten(int)));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
@@ -250,14 +250,14 @@ void FileTransfer::ft_finished()
void FileTransfer::takeConnection(S5BConnection *c)
{
d->c = c;
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(readyRead()), SLOT(s5b_readyRead()));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(readyRead()), TQT_SLOT(s5b_readyRead()));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
accepted();
- QTimer::singleShot(0, this, SLOT(doAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doAccept()));
}
void FileTransfer::s5b_connected()
@@ -274,7 +274,7 @@ void FileTransfer::s5b_connectionClosed()
void FileTransfer::s5b_readyRead()
{
- QByteArray a = d->c->read();
+ TQByteArray a = d->c->read();
Q_LLONG need = d->length - d->sent;
if((Q_LLONG)a.size() > need)
a.resize((uint)need);
@@ -327,18 +327,18 @@ class FileTransferManager::Private
{
public:
Client *client;
- QPtrList<FileTransfer> list, incoming;
+ TQPtrList<FileTransfer> list, incoming;
JT_PushFT *pft;
};
FileTransferManager::FileTransferManager(Client *client)
-:QObject(client)
+:TQObject(client)
{
d = new Private;
d->client = client;
d->pft = new JT_PushFT(d->client->rootTask());
- connect(d->pft, SIGNAL(incoming(const FTRequest &)), SLOT(pft_incoming(const FTRequest &)));
+ connect(d->pft, TQT_SIGNAL(incoming(const FTRequest &)), TQT_SLOT(pft_incoming(const FTRequest &)));
}
FileTransferManager::~FileTransferManager()
@@ -376,7 +376,7 @@ FileTransfer *FileTransferManager::takeIncoming()
void FileTransferManager::pft_incoming(const FTRequest &req)
{
bool found = false;
- for(QStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
if((*it) == "http://jabber.org/protocol/bytestreams") {
found = true;
break;
@@ -399,7 +399,7 @@ void FileTransferManager::pft_incoming(const FTRequest &req)
void FileTransferManager::s5b_incomingReady(S5BConnection *c)
{
- QPtrListIterator<FileTransfer> it(d->list);
+ TQPtrListIterator<FileTransfer> it(d->list);
FileTransfer *ft = 0;
for(FileTransfer *i; (i = it.current()); ++it) {
if(i->d->needStream && i->d->peer.compare(c->peer()) && i->d->id == c->sid()) {
@@ -415,7 +415,7 @@ void FileTransferManager::s5b_incomingReady(S5BConnection *c)
ft->takeConnection(c);
}
-QString FileTransferManager::link(FileTransfer *ft)
+TQString FileTransferManager::link(FileTransfer *ft)
{
d->list.append(ft);
return d->client->s5bManager()->genUniqueSID(ft->d->peer);
@@ -443,11 +443,11 @@ void FileTransferManager::unlink(FileTransfer *ft)
class JT_FT::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Q_LLONG size, rangeOffset, rangeLength;
- QString streamType;
- QStringList streamTypes;
+ TQString streamType;
+ TQStringList streamTypes;
};
JT_FT::JT_FT(Task *parent)
@@ -461,41 +461,41 @@ JT_FT::~JT_FT()
delete d;
}
-void JT_FT::request(const Jid &to, const QString &_id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes)
+void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes)
{
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement si = doc()->createElement("si");
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
si.setAttribute("id", _id);
si.setAttribute("profile", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
file.setAttribute("name", fname);
- file.setAttribute("size", QString::number(size));
+ file.setAttribute("size", TQString::number(size));
if(!desc.isEmpty()) {
- QDomElement de = doc()->createElement("desc");
+ TQDomElement de = doc()->createElement("desc");
de.appendChild(doc()->createTextNode(desc));
file.appendChild(de);
}
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
file.appendChild(range);
si.appendChild(file);
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "form");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
field.setAttribute("type", "list-single");
- for(QStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
- QDomElement option = doc()->createElement("option");
- QDomElement value = doc()->createElement("value");
+ for(TQStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
+ TQDomElement option = doc()->createElement("option");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(*it));
option.appendChild(value);
field.appendChild(option);
@@ -522,7 +522,7 @@ Q_LLONG JT_FT::rangeLength() const
return d->rangeLength;
}
-QString JT_FT::streamType() const
+TQString JT_FT::streamType() const
{
return d->streamType;
}
@@ -532,26 +532,26 @@ void JT_FT::onGo()
send(d->iq);
}
-bool JT_FT::take(const QDomElement &x)
+bool JT_FT::take(const TQDomElement &x)
{
if(!iqVerify(x, d->to, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement si = firstChildElement(x);
+ TQDomElement si = firstChildElement(x);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si") {
setError(900, "");
return true;
}
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
Q_LLONG range_offset = 0;
Q_LLONG range_length = 0;
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(!file.isNull()) {
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull()) {
int x;
bool ok;
@@ -587,14 +587,14 @@ bool JT_FT::take(const QDomElement &x)
return true;
}
- QString streamtype;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQString streamtype;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() && x.attribute("type") == "submit") {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method") {
- QDomElement value = field.elementsByTagName("value").item(0).toElement();
+ TQDomElement value = field.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamtype = value.text();
}
@@ -603,7 +603,7 @@ bool JT_FT::take(const QDomElement &x)
// must be one of the offered streamtypes
bool found = false;
- for(QStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
if((*it) == streamtype) {
found = true;
break;
@@ -636,33 +636,33 @@ JT_PushFT::~JT_PushFT()
{
}
-void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType)
+void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement si = doc()->createElement("si");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
if(rangeOffset != 0 || rangeLength != 0) {
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
if(rangeOffset > 0)
- range.setAttribute("offset", QString::number(rangeOffset));
+ range.setAttribute("offset", TQString::number(rangeOffset));
if(rangeLength > 0)
- range.setAttribute("length", QString::number(rangeLength));
+ range.setAttribute("length", TQString::number(rangeLength));
file.appendChild(range);
si.appendChild(file);
}
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "submit");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
- QDomElement value = doc()->createElement("value");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(streamType));
field.appendChild(value);
@@ -674,16 +674,16 @@ void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOf
send(iq);
}
-void JT_PushFT::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushFT::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-bool JT_PushFT::take(const QDomElement &e)
+bool JT_PushFT::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq")
@@ -691,20 +691,20 @@ bool JT_PushFT::take(const QDomElement &e)
if(e.attribute("type") != "set")
return false;
- QDomElement si = firstChildElement(e);
+ TQDomElement si = firstChildElement(e);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si")
return false;
if(si.attribute("profile") != "http://jabber.org/protocol/si/profile/file-transfer")
return false;
Jid from(e.attribute("from"));
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(file.isNull())
return true;
- QString fname = file.attribute("name");
+ TQString fname = file.attribute("name");
if(fname.isEmpty()) {
respondError(from, id, 400, "Bad file name");
return true;
@@ -712,7 +712,7 @@ bool JT_PushFT::take(const QDomElement &e)
// ensure kosher
{
- QFileInfo fi(fname);
+ TQFileInfo fi(fname);
fname = fi.fileName();
}
@@ -727,27 +727,27 @@ bool JT_PushFT::take(const QDomElement &e)
return true;
}
- QString desc;
- QDomElement de = file.elementsByTagName("desc").item(0).toElement();
+ TQString desc;
+ TQDomElement de = file.elementsByTagName("desc").item(0).toElement();
if(!de.isNull())
desc = de.text();
bool rangeSupported = false;
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull())
rangeSupported = true;
- QStringList streamTypes;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQStringList streamTypes;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() /*&& x.attribute("type") == "form"*/) {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method" && field.attribute("type") == "list-single") {
- QDomNodeList nl = field.elementsByTagName("option");
+ TQDomNodeList nl = field.elementsByTagName("option");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement e = nl.item(n).toElement();
- QDomElement value = e.elementsByTagName("value").item(0).toElement();
+ TQDomElement e = nl.item(n).toElement();
+ TQDomElement value = e.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamTypes += value.text();
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
index f31a4d10..9026b478 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
@@ -43,17 +43,17 @@ namespace XMPP
void setProxy(const Jid &proxy);
// send
- void sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc);
+ void sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc);
Q_LLONG offset() const;
Q_LLONG length() const;
int dataSizeNeeded() const;
- void writeFileData(const QByteArray &a);
+ void writeFileData(const TQByteArray &a);
// receive
Jid peer() const;
- QString fileName() const;
+ TQString fileName() const;
Q_LLONG fileSize() const;
- QString description() const;
+ TQString description() const;
bool rangeSupported() const;
void accept(Q_LLONG offset=0, Q_LLONG length=0);
@@ -64,7 +64,7 @@ namespace XMPP
signals:
void accepted(); // indicates S5BConnection has started
void connected();
- void readyRead(const QByteArray &a);
+ void readyRead(const TQByteArray &a);
void bytesWritten(int);
void error(int);
@@ -84,7 +84,7 @@ namespace XMPP
void reset();
friend class FileTransferManager;
- FileTransfer(FileTransferManager *, QObject *parent=0);
+ FileTransfer(FileTransferManager *, TQObject *parent=0);
void man_waitForAccept(const FTRequest &req);
void takeConnection(S5BConnection *c);
};
@@ -114,7 +114,7 @@ namespace XMPP
void s5b_incomingReady(S5BConnection *);
friend class FileTransfer;
- QString link(FileTransfer *);
+ TQString link(FileTransfer *);
void con_accept(FileTransfer *);
void con_reject(FileTransfer *);
void unlink(FileTransfer *);
@@ -127,13 +127,13 @@ namespace XMPP
JT_FT(Task *parent);
~JT_FT();
- void request(const Jid &to, const QString &id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes);
+ void request(const Jid &to, const TQString &id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes);
Q_LLONG rangeOffset() const;
Q_LLONG rangeLength() const;
- QString streamType() const;
+ TQString streamType() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -143,12 +143,12 @@ namespace XMPP
struct FTRequest
{
Jid from;
- QString iq_id, id;
- QString fname;
+ TQString iq_id, id;
+ TQString fname;
Q_LLONG size;
- QString desc;
+ TQString desc;
bool rangeSupported;
- QStringList streamTypes;
+ TQStringList streamTypes;
};
class JT_PushFT : public Task
{
@@ -157,10 +157,10 @@ namespace XMPP
JT_PushFT(Task *parent);
~JT_PushFT();
- void respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
+ void respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const FTRequest &req);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
index f48da694..df753925 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
@@ -22,8 +22,8 @@
#include"s5b.h"
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include<qca.h>
#include"xmpp_xmlcommon.h"
@@ -46,9 +46,9 @@
namespace XMPP {
-static QString makeKey(const QString &sid, const Jid &initiator, const Jid &target)
+static TQString makeKey(const TQString &sid, const Jid &initiator, const Jid &target)
{
- QString str = sid + initiator.full() + target.full();
+ TQString str = sid + initiator.full() + target.full();
return QCA::SHA1::hashToString(str.utf8());
}
@@ -70,7 +70,7 @@ public:
enum { Unknown, Fast, NotFast };
S5BManager *m;
int state;
- QString sid, key, out_key, out_id, in_id;
+ TQString sid, key, out_key, out_id, in_id;
Jid self, peer;
StreamHostList in_hosts;
JT_S5B *task, *proxy_task;
@@ -94,9 +94,9 @@ public:
~Item();
void reset();
- void startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
- void startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool fast, bool udp);
- void handleFast(const StreamHostList &hosts, const QString &iq_id);
+ void startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
+ void startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool fast, bool udp);
+ void handleFast(const StreamHostList &hosts, const TQString &iq_id);
void doOutgoing();
void doIncoming();
@@ -137,7 +137,7 @@ S5BDatagram::S5BDatagram()
_dest = 0;
}
-S5BDatagram::S5BDatagram(int source, int dest, const QByteArray &data)
+S5BDatagram::S5BDatagram(int source, int dest, const TQByteArray &data)
{
_source = source;
_dest = dest;
@@ -154,7 +154,7 @@ int S5BDatagram::destPort() const
return _dest;
}
-QByteArray S5BDatagram::data() const
+TQByteArray S5BDatagram::data() const
{
return _buf;
}
@@ -170,7 +170,7 @@ public:
SocksUDP *su;
int state;
Jid peer;
- QString sid;
+ TQString sid;
bool remote;
bool switched;
bool notifyRead, notifyClose;
@@ -178,13 +178,13 @@ public:
S5BRequest req;
Jid proxy;
Mode mode;
- QPtrList<S5BDatagram> dglist;
+ TQPtrList<S5BDatagram> dglist;
};
static int id_conn = 0;
static int num_conn = 0;
-S5BConnection::S5BConnection(S5BManager *m, QObject *parent)
+S5BConnection::S5BConnection(S5BManager *m, TQObject *parent)
:ByteStream(parent)
{
d = new Private;
@@ -229,7 +229,7 @@ void S5BConnection::reset(bool clear)
}
d->state = Idle;
d->peer = Jid();
- d->sid = QString();
+ d->sid = TQString();
d->remote = false;
d->switched = false;
d->notifyRead = false;
@@ -246,7 +246,7 @@ void S5BConnection::setProxy(const Jid &proxy)
d->proxy = proxy;
}
-void S5BConnection::connectToJid(const Jid &peer, const QString &sid, Mode m)
+void S5BConnection::connectToJid(const Jid &peer, const TQString &sid, Mode m)
{
reset(true);
if(!d->m->isAcceptableSID(peer, sid))
@@ -294,7 +294,7 @@ Jid S5BConnection::peer() const
return d->peer;
}
-QString S5BConnection::sid() const
+TQString S5BConnection::sid() const
{
return d->sid;
}
@@ -322,18 +322,18 @@ bool S5BConnection::isOpen() const
return false;
}
-void S5BConnection::write(const QByteArray &buf)
+void S5BConnection::write(const TQByteArray &buf)
{
if(d->state == Active && d->mode == Stream)
d->sc->write(buf);
}
-QByteArray S5BConnection::read(int bytes)
+TQByteArray S5BConnection::read(int bytes)
{
if(d->sc)
return d->sc->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int S5BConnection::bytesAvailable() const
@@ -354,10 +354,10 @@ int S5BConnection::bytesToWrite() const
void S5BConnection::writeDatagram(const S5BDatagram &i)
{
- QByteArray buf(i.data().size() + 4);
+ TQByteArray buf(i.data().size() + 4);
ushort ssp = htons(i.sourcePort());
ushort sdp = htons(i.destPort());
- QByteArray data = i.data();
+ TQByteArray data = i.data();
memcpy(buf.data(), &ssp, 2);
memcpy(buf.data() + 2, &sdp, 2);
memcpy(buf.data() + 4, data.data(), data.size());
@@ -393,15 +393,15 @@ void S5BConnection::man_waitForAccept(const S5BRequest &r)
void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
{
d->sc = sc;
- connect(d->sc, SIGNAL(connectionClosed()), SLOT(sc_connectionClosed()));
- connect(d->sc, SIGNAL(delayedCloseFinished()), SLOT(sc_delayedCloseFinished()));
- connect(d->sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(d->sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(d->sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(d->sc, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sc_connectionClosed()));
+ connect(d->sc, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sc_delayedCloseFinished()));
+ connect(d->sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(d->sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(d->sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
if(sc_udp) {
d->su = sc_udp;
- connect(d->su, SIGNAL(packetReady(const QByteArray &)), SLOT(su_packetReady(const QByteArray &)));
+ connect(d->su, TQT_SIGNAL(packetReady(const TQByteArray &)), TQT_SLOT(su_packetReady(const TQByteArray &)));
}
d->state = Active;
@@ -424,7 +424,7 @@ void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
d->notifyClose = true;
}
if(d->notifyRead || d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
connected();
}
@@ -432,14 +432,14 @@ void S5BConnection::doPending()
{
if(d->notifyRead) {
if(d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
sc_readyRead();
}
else if(d->notifyClose)
sc_connectionClosed();
}
-void S5BConnection::man_udpReady(const QByteArray &buf)
+void S5BConnection::man_udpReady(const TQByteArray &buf)
{
handleUDP(buf);
}
@@ -503,12 +503,12 @@ void S5BConnection::sc_error(int)
error(ErrSocket);
}
-void S5BConnection::su_packetReady(const QByteArray &buf)
+void S5BConnection::su_packetReady(const TQByteArray &buf)
{
handleUDP(buf);
}
-void S5BConnection::handleUDP(const QByteArray &buf)
+void S5BConnection::handleUDP(const TQByteArray &buf)
{
// must be at least 4 bytes, to accomodate virtual ports
if(buf.size() < 4)
@@ -519,14 +519,14 @@ void S5BConnection::handleUDP(const QByteArray &buf)
memcpy(&sdp, buf.data() + 2, 2);
int source = ntohs(ssp);
int dest = ntohs(sdp);
- QByteArray data(buf.size() - 4);
+ TQByteArray data(buf.size() - 4);
memcpy(data.data(), buf.data() + 4, data.size());
d->dglist.append(new S5BDatagram(source, dest, data));
datagramReady();
}
-void S5BConnection::sendUDP(const QByteArray &buf)
+void S5BConnection::sendUDP(const TQByteArray &buf)
{
if(d->su)
d->su->write(buf);
@@ -554,13 +554,13 @@ public:
S5BConnection *c;
Item *i;
- QString sid;
+ TQString sid;
JT_S5B *query;
StreamHost proxyInfo;
- QGuardedPtr<S5BServer> relatedServer;
+ TQGuardedPtr<S5BServer> relatedServer;
bool udp_init;
- QHostAddress udp_addr;
+ TQHostAddress udp_addr;
int udp_port;
};
@@ -569,13 +569,13 @@ class S5BManager::Private
public:
Client *client;
S5BServer *serv;
- QPtrList<Entry> activeList;
+ TQPtrList<Entry> activeList;
S5BConnectionList incomingConns;
JT_PushS5B *ps;
};
S5BManager::S5BManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
// S5B needs SHA1
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -587,9 +587,9 @@ S5BManager::S5BManager(Client *parent)
d->activeList.setAutoDelete(true);
d->ps = new JT_PushS5B(d->client->rootTask());
- connect(d->ps, SIGNAL(incoming(const S5BRequest &)), SLOT(ps_incoming(const S5BRequest &)));
- connect(d->ps, SIGNAL(incomingUDPSuccess(const Jid &, const QString &)), SLOT(ps_incomingUDPSuccess(const Jid &, const QString &)));
- connect(d->ps, SIGNAL(incomingActivate(const Jid &, const QString &, const Jid &)), SLOT(ps_incomingActivate(const Jid &, const QString &, const Jid &)));
+ connect(d->ps, TQT_SIGNAL(incoming(const S5BRequest &)), TQT_SLOT(ps_incoming(const S5BRequest &)));
+ connect(d->ps, TQT_SIGNAL(incomingUDPSuccess(const Jid &, const TQString &)), TQT_SLOT(ps_incomingUDPSuccess(const Jid &, const TQString &)));
+ connect(d->ps, TQT_SIGNAL(incomingActivate(const Jid &, const TQString &, const Jid &)), TQT_SLOT(ps_incomingActivate(const Jid &, const TQString &, const Jid &)));
}
S5BManager::~S5BManager()
@@ -697,7 +697,7 @@ void S5BManager::ps_incoming(const S5BRequest &req)
incomingReady();
}
-void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
+void S5BManager::ps_incomingUDPSuccess(const Jid &from, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(e && e->i) {
@@ -708,38 +708,38 @@ void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
}
}
-void S5BManager::ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost)
+void S5BManager::ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost)
{
Entry *e = findEntryBySID(from, sid);
if(e && e->i)
e->i->incomingActivate(streamHost);
}
-void S5BManager::doSuccess(const Jid &peer, const QString &id, const Jid &streamHost)
+void S5BManager::doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost)
{
d->ps->respondSuccess(peer, id, streamHost);
}
-void S5BManager::doError(const Jid &peer, const QString &id, int code, const QString &str)
+void S5BManager::doError(const Jid &peer, const TQString &id, int code, const TQString &str)
{
d->ps->respondError(peer, id, code, str);
}
-void S5BManager::doActivate(const Jid &peer, const QString &sid, const Jid &streamHost)
+void S5BManager::doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost)
{
d->ps->sendActivate(peer, sid, streamHost);
}
-QString S5BManager::genUniqueSID(const Jid &peer) const
+TQString S5BManager::genUniqueSID(const Jid &peer) const
{
// get unused key
- QString sid;
+ TQString sid;
do {
sid = "s5b_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
sid.append(s);
}
@@ -748,10 +748,10 @@ QString S5BManager::genUniqueSID(const Jid &peer) const
return sid;
}
-bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
+bool S5BManager::isAcceptableSID(const Jid &peer, const TQString &sid) const
{
- QString key = makeKey(sid, d->client->jid(), peer);
- QString key_out = makeKey(sid, peer, d->client->jid());
+ TQString key = makeKey(sid, d->client->jid(), peer);
+ TQString key_out = makeKey(sid, peer, d->client->jid());
// if we have a server, then check through it
if(d->serv) {
@@ -765,9 +765,9 @@ bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
return true;
}
-S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) const
+S5BConnection *S5BManager::findIncoming(const Jid &from, const TQString &sid) const
{
- QPtrListIterator<S5BConnection> it(d->incomingConns);
+ TQPtrListIterator<S5BConnection> it(d->incomingConns);
for(S5BConnection *c; (c = it.current()); ++it) {
if(c->d->peer.compare(from) && c->d->sid == sid)
return c;
@@ -777,7 +777,7 @@ S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) con
S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->c == c)
return e;
@@ -787,7 +787,7 @@ S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
S5BManager::Entry *S5BManager::findEntry(Item *i) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i == i)
return e;
@@ -795,9 +795,9 @@ S5BManager::Entry *S5BManager::findEntry(Item *i) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findEntryByHash(const TQString &key) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->key == key)
return e;
@@ -805,9 +805,9 @@ S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &sid) const
+S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const TQString &sid) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->peer.compare(peer) && e->sid == sid)
return e;
@@ -815,10 +815,10 @@ S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &si
return 0;
}
-S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findServerEntryByHash(const TQString &key) const
{
- const QPtrList<S5BManager> &manList = d->serv->managerList();
- QPtrListIterator<S5BManager> it(manList);
+ const TQPtrList<S5BManager> &manList = d->serv->managerList();
+ TQPtrListIterator<S5BManager> it(manList);
for(S5BManager *m; (m = it.current()); ++it) {
Entry *e = m->findEntryByHash(key);
if(e)
@@ -827,14 +827,14 @@ S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
return 0;
}
-bool S5BManager::srv_ownsHash(const QString &key) const
+bool S5BManager::srv_ownsHash(const TQString &key) const
{
if(findEntryByHash(key))
return true;
return false;
}
-void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
+void S5BManager::srv_incomingReady(SocksClient *sc, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(!e->i->allowIncoming) {
@@ -850,7 +850,7 @@ void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
e->i->setIncomingClient(sc);
}
-void S5BManager::srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data)
+void S5BManager::srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data)
{
Entry *e = findEntryByHash(key);
if(!e->c->d->mode != S5BConnection::Datagram)
@@ -935,7 +935,7 @@ void S5BManager::con_unlink(S5BConnection *c)
d->activeList.removeRef(e);
}
-void S5BManager::con_sendUDP(S5BConnection *c, const QByteArray &buf)
+void S5BManager::con_sendUDP(S5BConnection *c, const TQByteArray &buf)
{
Entry *e = findEntry(c);
if(!e)
@@ -1007,12 +1007,12 @@ void S5BManager::entryContinue(Entry *e)
e->i = new Item(this);
e->i->proxy = e->proxyInfo;
- connect(e->i, SIGNAL(accepted()), SLOT(item_accepted()));
- connect(e->i, SIGNAL(tryingHosts(const StreamHostList &)), SLOT(item_tryingHosts(const StreamHostList &)));
- connect(e->i, SIGNAL(proxyConnect()), SLOT(item_proxyConnect()));
- connect(e->i, SIGNAL(waitingForActivation()), SLOT(item_waitingForActivation()));
- connect(e->i, SIGNAL(connected()), SLOT(item_connected()));
- connect(e->i, SIGNAL(error(int)), SLOT(item_error(int)));
+ connect(e->i, TQT_SIGNAL(accepted()), TQT_SLOT(item_accepted()));
+ connect(e->i, TQT_SIGNAL(tryingHosts(const StreamHostList &)), TQT_SLOT(item_tryingHosts(const StreamHostList &)));
+ connect(e->i, TQT_SIGNAL(proxyConnect()), TQT_SLOT(item_proxyConnect()));
+ connect(e->i, TQT_SIGNAL(waitingForActivation()), TQT_SLOT(item_waitingForActivation()));
+ connect(e->i, TQT_SIGNAL(connected()), TQT_SLOT(item_connected()));
+ connect(e->i, TQT_SIGNAL(error(int)), TQT_SLOT(item_error(int)));
if(e->c->isRemote()) {
const S5BRequest &req = e->c->d->req;
@@ -1026,7 +1026,7 @@ void S5BManager::entryContinue(Entry *e)
void S5BManager::queryProxy(Entry *e)
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyQuery(); // signal
if(!self)
return;
@@ -1035,7 +1035,7 @@ void S5BManager::queryProxy(Entry *e)
printf("querying proxy: [%s]\n", e->c->d->proxy.full().latin1());
#endif
e->query = new JT_S5B(d->client->rootTask());
- connect(e->query, SIGNAL(finished()), SLOT(query_finished()));
+ connect(e->query, TQT_SIGNAL(finished()), TQT_SLOT(query_finished()));
e->query->requestProxyInfo(e->c->d->proxy);
e->query->go(true);
}
@@ -1045,7 +1045,7 @@ void S5BManager::query_finished()
JT_S5B *query = (JT_S5B *)sender();
Entry *e;
bool found = false;
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(; (e = it.current()); ++it) {
if(e->query == query) {
found = true;
@@ -1071,7 +1071,7 @@ void S5BManager::query_finished()
#endif
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyResult(query->success()); // signal
if(!self)
return;
@@ -1101,7 +1101,7 @@ bool S5BManager::targetShouldOfferProxy(Entry *e)
//----------------------------------------------------------------------------
// S5BManager::Item
//----------------------------------------------------------------------------
-S5BManager::Item::Item(S5BManager *manager) : QObject(0)
+S5BManager::Item::Item(S5BManager *manager) : TQObject(0)
{
m = manager;
task = 0;
@@ -1159,7 +1159,7 @@ void S5BManager::Item::reset()
udp = false;
}
-void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
+void S5BManager::Item::startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
{
sid = _sid;
self = _self;
@@ -1176,7 +1176,7 @@ void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, con
doOutgoing();
}
-void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool _fast, bool _udp)
+void S5BManager::Item::startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool _fast, bool _udp)
{
sid = _sid;
peer = _peer;
@@ -1197,11 +1197,11 @@ void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const
doIncoming();
}
-void S5BManager::Item::handleFast(const StreamHostList &hosts, const QString &iq_id)
+void S5BManager::Item::handleFast(const StreamHostList &hosts, const TQString &iq_id)
{
targetMode = Fast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1222,8 +1222,8 @@ void S5BManager::Item::doOutgoing()
StreamHostList hosts;
S5BServer *serv = m->server();
if(serv && serv->isActive() && !haveHost(in_hosts, m->client()->jid())) {
- QStringList hostList = serv->hostList();
- for(QStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
+ TQStringList hostList = serv->hostList();
+ for(TQStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
StreamHost h;
h.setJid(m->client()->jid());
h.setHost(*it);
@@ -1245,7 +1245,7 @@ void S5BManager::Item::doOutgoing()
allowIncoming = true;
task = new JT_S5B(m->client()->rootTask());
- connect(task, SIGNAL(finished()), SLOT(jt_finished()));
+ connect(task, TQT_SIGNAL(finished()), TQT_SLOT(jt_finished()));
task->request(peer, sid, hosts, state == Initiator ? wantFast : false, udp);
out_id = task->id();
task->go(true);
@@ -1291,9 +1291,9 @@ void S5BManager::Item::doIncoming()
}
conn = new S5BConnector;
- connect(conn, SIGNAL(result(bool)), SLOT(conn_result(bool)));
+ connect(conn, TQT_SIGNAL(result(bool)), TQT_SLOT(conn_result(bool)));
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
tryingHosts(list);
if(!self)
return;
@@ -1307,9 +1307,9 @@ void S5BManager::Item::setIncomingClient(SocksClient *sc)
printf("S5BManager::Item: %s [%s] successful incoming connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
allowIncoming = false;
@@ -1335,7 +1335,7 @@ void S5BManager::Item::jt_finished()
if(state == Initiator) {
if(targetMode == Unknown) {
targetMode = NotFast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1387,11 +1387,11 @@ void S5BManager::Item::jt_finished()
#endif
// connect to the proxy
proxy_conn = new S5BConnector;
- connect(proxy_conn, SIGNAL(result(bool)), SLOT(proxy_result(bool)));
+ connect(proxy_conn, TQT_SIGNAL(result(bool)), TQT_SLOT(proxy_result(bool)));
StreamHostList list;
list += proxy;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
proxyConnect();
if(!self)
return;
@@ -1441,9 +1441,9 @@ void S5BManager::Item::conn_result(bool b)
printf("S5BManager::Item: %s [%s] successful outgoing connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
m->doSuccess(peer, in_id, h.jid());
@@ -1492,9 +1492,9 @@ void S5BManager::Item::proxy_result(bool b)
delete proxy_conn;
proxy_conn = 0;
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
client_udp = sc_udp;
@@ -1504,7 +1504,7 @@ void S5BManager::Item::proxy_result(bool b)
printf("activating proxy stream\n");
#endif
proxy_task = new JT_S5B(m->client()->rootTask());
- connect(proxy_task, SIGNAL(finished()), SLOT(proxy_finished()));
+ connect(proxy_task, TQT_SIGNAL(finished()), TQT_SLOT(proxy_finished()));
proxy_task->requestActivation(proxy.jid(), sid, peer);
proxy_task->go(true);
}
@@ -1608,7 +1608,7 @@ void S5BManager::Item::tryActivation()
printf("sending extra CR\n");
#endif
// must send [CR] to activate target streamhost
- QByteArray a(1);
+ TQByteArray a(1);
a[0] = '\r';
client->write(a);
}
@@ -1617,12 +1617,12 @@ void S5BManager::Item::tryActivation()
void S5BManager::Item::checkForActivation()
{
- QPtrList<SocksClient> clientList;
+ TQPtrList<SocksClient> clientList;
if(client)
clientList.append(client);
if(client_out)
clientList.append(client_out);
- QPtrListIterator<SocksClient> it(clientList);
+ TQPtrListIterator<SocksClient> it(clientList);
for(SocksClient *sc; (sc = it.current()); ++it) {
#ifdef S5B_DEBUG
printf("checking for activation\n");
@@ -1641,7 +1641,7 @@ void S5BManager::Item::checkForActivation()
#endif
if(sc->bytesAvailable() >= 1) {
clientList.removeRef(sc);
- QByteArray a = sc->read(1);
+ TQByteArray a = sc->read(1);
if(a[0] != '\r') {
delete sc;
return;
@@ -1752,13 +1752,13 @@ public:
SocksClient *client;
SocksUDP *client_udp;
StreamHost host;
- QString key;
+ TQString key;
bool udp;
int udp_tries;
- QTimer t;
+ TQTimer t;
Jid jid;
- Item(const Jid &self, const StreamHost &_host, const QString &_key, bool _udp) : QObject(0)
+ Item(const Jid &self, const StreamHost &_host, const TQString &_key, bool _udp) : TQObject(0)
{
jid = self;
host = _host;
@@ -1766,9 +1766,9 @@ public:
udp = _udp;
client = new SocksClient;
client_udp = 0;
- connect(client, SIGNAL(connected()), SLOT(sc_connected()));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
- connect(&t, SIGNAL(timeout()), SLOT(trySendUDP()));
+ connect(client, TQT_SIGNAL(connected()), TQT_SLOT(sc_connected()));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
+ connect(&t, TQT_SIGNAL(timeout()), TQT_SLOT(trySendUDP()));
}
~Item()
@@ -1826,8 +1826,8 @@ private slots:
}
// send initialization with our JID
- QCString cs = jid.full().utf8();
- QByteArray a(cs.length());
+ TQCString cs = jid.full().utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
client_udp->write(a);
++udp_tries;
@@ -1857,20 +1857,20 @@ class S5BConnector::Private
public:
SocksClient *active;
SocksUDP *active_udp;
- QPtrList<Item> itemList;
- QString key;
+ TQPtrList<Item> itemList;
+ TQString key;
StreamHost activeHost;
- QTimer t;
+ TQTimer t;
};
-S5BConnector::S5BConnector(QObject *parent)
-:QObject(parent)
+S5BConnector::S5BConnector(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->active = 0;
d->active_udp = 0;
d->itemList.setAutoDelete(true);
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
S5BConnector::~S5BConnector()
@@ -1889,7 +1889,7 @@ void S5BConnector::reset()
d->itemList.clear();
}
-void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout)
+void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout)
{
reset();
@@ -1898,7 +1898,7 @@ void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QSt
#endif
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
Item *i = new Item(self, *it, key, udp);
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
i->start();
}
@@ -1964,7 +1964,7 @@ void S5BConnector::t_timeout()
void S5BConnector::man_udpSuccess(const Jid &streamHost)
{
// was anyone sending to this streamhost?
- QPtrListIterator<Item> it(d->itemList);
+ TQPtrListIterator<Item> it(d->itemList);
for(Item *i; (i = it.current()); ++it) {
if(i->host.jid().compare(streamHost) && i->client_udp) {
i->udpSuccess();
@@ -1981,17 +1981,17 @@ class S5BServer::Item : public QObject
Q_OBJECT
public:
SocksClient *client;
- QString host;
- QTimer expire;
+ TQString host;
+ TQTimer expire;
- Item(SocksClient *c) : QObject(0)
+ Item(SocksClient *c) : TQObject(0)
{
client = c;
- connect(client, SIGNAL(incomingMethods(int)), SLOT(sc_incomingMethods(int)));
- connect(client, SIGNAL(incomingConnectRequest(const QString &, int)), SLOT(sc_incomingConnectRequest(const QString &, int)));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(client, TQT_SIGNAL(incomingMethods(int)), TQT_SLOT(sc_incomingMethods(int)));
+ connect(client, TQT_SIGNAL(incomingConnectRequest(const TQString &, int)), TQT_SLOT(sc_incomingConnectRequest(const TQString &, int)));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
- connect(&expire, SIGNAL(timeout()), SLOT(doError()));
+ connect(&expire, TQT_SIGNAL(timeout()), TQT_SLOT(doError()));
resetExpiration();
}
@@ -2025,7 +2025,7 @@ private slots:
doError();
}
- void sc_incomingConnectRequest(const QString &_host, int port)
+ void sc_incomingConnectRequest(const TQString &_host, int port)
{
if(port == 0) {
host = _host;
@@ -2046,18 +2046,18 @@ class S5BServer::Private
{
public:
SocksServer serv;
- QStringList hostList;
- QPtrList<S5BManager> manList;
- QPtrList<Item> itemList;
+ TQStringList hostList;
+ TQPtrList<S5BManager> manList;
+ TQPtrList<Item> itemList;
};
-S5BServer::S5BServer(QObject *parent)
-:QObject(parent)
+S5BServer::S5BServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->itemList.setAutoDelete(true);
- connect(&d->serv, SIGNAL(incomingReady()), SLOT(ss_incomingReady()));
- connect(&d->serv, SIGNAL(incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)), SLOT(ss_incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)));
+ connect(&d->serv, TQT_SIGNAL(incomingReady()), TQT_SLOT(ss_incomingReady()));
+ connect(&d->serv, TQT_SIGNAL(incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)), TQT_SLOT(ss_incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)));
}
S5BServer::~S5BServer()
@@ -2082,12 +2082,12 @@ void S5BServer::stop()
d->serv.stop();
}
-void S5BServer::setHostList(const QStringList &list)
+void S5BServer::setHostList(const TQStringList &list)
{
d->hostList = list;
}
-QStringList S5BServer::hostList() const
+TQStringList S5BServer::hostList() const
{
return d->hostList;
}
@@ -2103,16 +2103,16 @@ void S5BServer::ss_incomingReady()
#ifdef S5B_DEBUG
printf("S5BServer: incoming connection from %s:%d\n", i->client->peerAddress().toString().latin1(), i->client->peerPort());
#endif
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
}
-void S5BServer::ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data)
+void S5BServer::ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data)
{
if(port != 0 || port != 1)
return;
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(host)) {
m->srv_incomingUDP(port == 1 ? true : false, addr, sourcePort, host, data);
@@ -2134,11 +2134,11 @@ void S5BServer::item_result(bool b)
SocksClient *c = i->client;
i->client = 0;
- QString key = i->host;
+ TQString key = i->host;
d->itemList.removeRef(i);
// find the appropriate manager for this incoming connection
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(key)) {
m->srv_incomingReady(c, key);
@@ -2162,18 +2162,18 @@ void S5BServer::unlink(S5BManager *m)
void S5BServer::unlinkAll()
{
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it)
m->srv_unlink();
d->manList.clear();
}
-const QPtrList<S5BManager> & S5BServer::managerList() const
+const TQPtrList<S5BManager> & S5BServer::managerList() const
{
return d->manList;
}
-void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void S5BServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
d->serv.writeUDP(addr, port, data);
}
@@ -2184,12 +2184,12 @@ void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &d
class JT_S5B::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Jid streamHost;
StreamHost proxyInfo;
int mode;
- QTimer t;
+ TQTimer t;
};
JT_S5B::JT_S5B(Task *parent)
@@ -2197,7 +2197,7 @@ JT_S5B::JT_S5B(Task *parent)
{
d = new Private;
d->mode = -1;
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
JT_S5B::~JT_S5B()
@@ -2205,32 +2205,32 @@ JT_S5B::~JT_S5B()
delete d;
}
-void JT_S5B::request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp)
+void JT_S5B::request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp)
{
d->mode = 0;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
query.setAttribute("mode", udp ? "udp" : "tcp" );
iq.appendChild(query);
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
- QDomElement shost = doc()->createElement("streamhost");
+ TQDomElement shost = doc()->createElement("streamhost");
shost.setAttribute("jid", (*it).jid().full());
shost.setAttribute("host", (*it).host());
- shost.setAttribute("port", QString::number((*it).port()));
+ shost.setAttribute("port", TQString::number((*it).port()));
if((*it).isProxy()) {
- QDomElement p = doc()->createElement("proxy");
+ TQDomElement p = doc()->createElement("proxy");
p.setAttribute("xmlns", "http://affinix.com/jabber/stream");
shost.appendChild(p);
}
query.appendChild(shost);
}
if(fast) {
- QDomElement e = doc()->createElement("fast");
+ TQDomElement e = doc()->createElement("fast");
e.setAttribute("xmlns", "http://affinix.com/jabber/stream");
query.appendChild(e);
}
@@ -2241,27 +2241,27 @@ void JT_S5B::requestProxyInfo(const Jid &to)
{
d->mode = 1;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
d->iq = iq;
}
-void JT_S5B::requestActivation(const Jid &to, const QString &sid, const Jid &target)
+void JT_S5B::requestActivation(const Jid &to, const TQString &sid, const Jid &target)
{
d->mode = 2;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
iq.appendChild(query);
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.appendChild(doc()->createTextNode(target.full()));
query.appendChild(act);
d->iq = iq;
@@ -2279,7 +2279,7 @@ void JT_S5B::onDisconnect()
d->t.stop();
}
-bool JT_S5B::take(const QDomElement &x)
+bool JT_S5B::take(const TQDomElement &x)
{
if(d->mode == -1)
return false;
@@ -2290,11 +2290,11 @@ bool JT_S5B::take(const QDomElement &x)
d->t.stop();
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
if(d->mode == 0) {
d->streamHost = "";
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
if(!shost.isNull())
d->streamHost = shost.attribute("jid");
}
@@ -2303,11 +2303,11 @@ bool JT_S5B::take(const QDomElement &x)
}
else if(d->mode == 1) {
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
if(!shost.isNull()) {
Jid j = shost.attribute("jid");
if(j.isValid()) {
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(!host.isEmpty()) {
int port = shost.attribute("port").toInt();
StreamHost h;
@@ -2367,11 +2367,11 @@ int JT_PushS5B::priority() const
return 1;
}
-bool JT_PushS5B::take(const QDomElement &e)
+bool JT_PushS5B::take(const TQDomElement &e)
{
// look for udpsuccess
if(e.tagName() == "message") {
- QDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
+ TQDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
if(!x.isNull() && x.attribute("xmlns") == "http://jabber.org/protocol/bytestreams") {
incomingUDPSuccess(Jid(x.attribute("from")), x.attribute("dstaddr"));
return true;
@@ -2393,22 +2393,22 @@ bool JT_PushS5B::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QDomElement q = queryTag(e);
- QString sid = q.attribute("sid");
+ TQDomElement q = queryTag(e);
+ TQString sid = q.attribute("sid");
StreamHostList hosts;
- QDomNodeList nl = q.elementsByTagName("streamhost");
+ TQDomNodeList nl = q.elementsByTagName("streamhost");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement shost = nl.item(n).toElement();
+ TQDomElement shost = nl.item(n).toElement();
if(hosts.count() < MAXSTREAMHOSTS) {
Jid j = shost.attribute("jid");
if(!j.isValid())
continue;
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(host.isEmpty())
continue;
int port = shost.attribute("port").toInt();
- QDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
+ TQDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
bool isProxy = false;
if(!p.isNull() && p.attribute("xmlns") == "http://affinix.com/jabber/stream")
isProxy = true;
@@ -2423,7 +2423,7 @@ bool JT_PushS5B::take(const QDomElement &e)
}
bool fast = false;
- QDomElement t;
+ TQDomElement t;
t = q.elementsByTagName("fast").item(0).toElement();
if(!t.isNull() && t.attribute("xmlns") == "http://affinix.com/jabber/stream")
fast = true;
@@ -2440,43 +2440,43 @@ bool JT_PushS5B::take(const QDomElement &e)
return true;
}
-void JT_PushS5B::respondSuccess(const Jid &to, const QString &id, const Jid &streamHost)
+void JT_PushS5B::respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
- QDomElement shost = doc()->createElement("streamhost-used");
+ TQDomElement shost = doc()->createElement("streamhost-used");
shost.setAttribute("jid", streamHost.full());
query.appendChild(shost);
send(iq);
}
-void JT_PushS5B::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushS5B::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_PushS5B::sendUDPSuccess(const Jid &to, const QString &dstaddr)
+void JT_PushS5B::sendUDPSuccess(const Jid &to, const TQString &dstaddr)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement u = doc()->createElement("udpsuccess");
+ TQDomElement u = doc()->createElement("udpsuccess");
u.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
u.setAttribute("dstaddr", dstaddr);
m.appendChild(u);
send(m);
}
-void JT_PushS5B::sendActivate(const Jid &to, const QString &sid, const Jid &streamHost)
+void JT_PushS5B::sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.setAttribute("xmlns", "http://affinix.com/jabber/stream");
act.setAttribute("sid", sid);
act.setAttribute("jid", streamHost.full());
@@ -2498,7 +2498,7 @@ const Jid & StreamHost::jid() const
return j;
}
-const QString & StreamHost::host() const
+const TQString & StreamHost::host() const
{
return v_host;
}
@@ -2518,7 +2518,7 @@ void StreamHost::setJid(const Jid &_j)
j = _j;
}
-void StreamHost::setHost(const QString &host)
+void StreamHost::setHost(const TQString &host)
{
v_host = host;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
index 353b5f75..d8c301c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
@@ -21,10 +21,10 @@
#ifndef XMPP_S5B_H
#define XMPP_S5B_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include"im.h"
#include"bytestream.h"
@@ -38,23 +38,23 @@ namespace XMPP
class S5BManager;
class S5BServer;
struct S5BRequest;
- typedef QValueList<StreamHost> StreamHostList;
- typedef QPtrList<S5BConnection> S5BConnectionList;
- typedef QPtrListIterator<S5BConnection> S5BConnectionListIt;
+ typedef TQValueList<StreamHost> StreamHostList;
+ typedef TQPtrList<S5BConnection> S5BConnectionList;
+ typedef TQPtrListIterator<S5BConnection> S5BConnectionListIt;
class S5BDatagram
{
public:
S5BDatagram();
- S5BDatagram(int source, int dest, const QByteArray &data);
+ S5BDatagram(int source, int dest, const TQByteArray &data);
int sourcePort() const;
int destPort() const;
- QByteArray data() const;
+ TQByteArray data() const;
private:
int _source, _dest;
- QByteArray _buf;
+ TQByteArray _buf;
};
class S5BConnection : public ByteStream
@@ -69,19 +69,19 @@ namespace XMPP
Jid proxy() const;
void setProxy(const Jid &proxy);
- void connectToJid(const Jid &peer, const QString &sid, Mode m = Stream);
+ void connectToJid(const Jid &peer, const TQString &sid, Mode m = Stream);
void accept();
void close();
Jid peer() const;
- QString sid() const;
+ TQString sid() const;
bool isRemote() const;
Mode mode() const;
int state() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -109,22 +109,22 @@ namespace XMPP
void sc_bytesWritten(int);
void sc_error(int);
- void su_packetReady(const QByteArray &buf);
+ void su_packetReady(const TQByteArray &buf);
private:
class Private;
Private *d;
void reset(bool clear=false);
- void handleUDP(const QByteArray &buf);
- void sendUDP(const QByteArray &buf);
+ void handleUDP(const TQByteArray &buf);
+ void sendUDP(const TQByteArray &buf);
friend class S5BManager;
void man_waitForAccept(const S5BRequest &r);
void man_clientReady(SocksClient *, SocksUDP *);
- void man_udpReady(const QByteArray &buf);
+ void man_udpReady(const TQByteArray &buf);
void man_failed(int);
- S5BConnection(S5BManager *, QObject *parent=0);
+ S5BConnection(S5BManager *, TQObject *parent=0);
};
class S5BManager : public QObject
@@ -138,8 +138,8 @@ namespace XMPP
S5BServer *server() const;
void setServer(S5BServer *s);
- bool isAcceptableSID(const Jid &peer, const QString &sid) const;
- QString genUniqueSID(const Jid &peer) const;
+ bool isAcceptableSID(const Jid &peer, const TQString &sid) const;
+ TQString genUniqueSID(const Jid &peer) const;
S5BConnection *createConnection();
S5BConnection *takeIncoming();
@@ -152,8 +152,8 @@ namespace XMPP
private slots:
void ps_incoming(const S5BRequest &req);
- void ps_incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void ps_incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
void item_accepted();
void item_tryingHosts(const StreamHostList &list);
void item_proxyConnect();
@@ -166,12 +166,12 @@ namespace XMPP
class Private;
Private *d;
- S5BConnection *findIncoming(const Jid &from, const QString &sid) const;
+ S5BConnection *findIncoming(const Jid &from, const TQString &sid) const;
Entry *findEntry(S5BConnection *) const;
Entry *findEntry(Item *) const;
- Entry *findEntryByHash(const QString &key) const;
- Entry *findEntryBySID(const Jid &peer, const QString &sid) const;
- Entry *findServerEntryByHash(const QString &key) const;
+ Entry *findEntryByHash(const TQString &key) const;
+ Entry *findEntryBySID(const Jid &peer, const TQString &sid) const;
+ Entry *findServerEntryByHash(const TQString &key) const;
void entryContinue(Entry *e);
void queryProxy(Entry *e);
@@ -182,29 +182,29 @@ namespace XMPP
void con_accept(S5BConnection *);
void con_reject(S5BConnection *);
void con_unlink(S5BConnection *);
- void con_sendUDP(S5BConnection *, const QByteArray &buf);
+ void con_sendUDP(S5BConnection *, const TQByteArray &buf);
friend class S5BServer;
- bool srv_ownsHash(const QString &key) const;
- void srv_incomingReady(SocksClient *sc, const QString &key);
- void srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data);
+ bool srv_ownsHash(const TQString &key) const;
+ void srv_incomingReady(SocksClient *sc, const TQString &key);
+ void srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data);
void srv_unlink();
friend class Item;
- void doSuccess(const Jid &peer, const QString &id, const Jid &streamHost);
- void doError(const Jid &peer, const QString &id, int, const QString &);
- void doActivate(const Jid &peer, const QString &sid, const Jid &streamHost);
+ void doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost);
+ void doError(const Jid &peer, const TQString &id, int, const TQString &);
+ void doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost);
};
class S5BConnector : public QObject
{
Q_OBJECT
public:
- S5BConnector(QObject *parent=0);
+ S5BConnector(TQObject *parent=0);
~S5BConnector();
void reset();
- void start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout);
+ void start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout);
SocksClient *takeClient();
SocksUDP *takeUDP();
StreamHost streamHostUsed() const;
@@ -231,21 +231,21 @@ namespace XMPP
{
Q_OBJECT
public:
- S5BServer(QObject *par=0);
+ S5BServer(TQObject *par=0);
~S5BServer();
bool isActive() const;
bool start(int port);
void stop();
int port() const;
- void setHostList(const QStringList &);
- QStringList hostList() const;
+ void setHostList(const TQStringList &);
+ TQStringList hostList() const;
class Item;
private slots:
void ss_incomingReady();
- void ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
void item_result(bool);
private:
@@ -256,8 +256,8 @@ namespace XMPP
void link(S5BManager *);
void unlink(S5BManager *);
void unlinkAll();
- const QPtrList<S5BManager> & managerList() const;
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ const TQPtrList<S5BManager> & managerList() const;
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
};
class JT_S5B : public Task
@@ -267,13 +267,13 @@ namespace XMPP
JT_S5B(Task *);
~JT_S5B();
- void request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
+ void request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
void requestProxyInfo(const Jid &to);
- void requestActivation(const Jid &to, const QString &sid, const Jid &target);
+ void requestActivation(const Jid &to, const TQString &sid, const Jid &target);
void onGo();
void onDisconnect();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid streamHostUsed() const;
StreamHost proxyInfo() const;
@@ -289,7 +289,7 @@ namespace XMPP
struct S5BRequest
{
Jid from;
- QString id, sid;
+ TQString id, sid;
StreamHostList hosts;
bool fast;
bool udp;
@@ -303,17 +303,17 @@ namespace XMPP
int priority() const;
- void respondSuccess(const Jid &to, const QString &id, const Jid &streamHost);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
- void sendUDPSuccess(const Jid &to, const QString &dstaddr);
- void sendActivate(const Jid &to, const QString &sid, const Jid &streamHost);
+ void respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
+ void sendUDPSuccess(const Jid &to, const TQString &dstaddr);
+ void sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const S5BRequest &req);
- void incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
};
class StreamHost
@@ -322,17 +322,17 @@ namespace XMPP
StreamHost();
const Jid & jid() const;
- const QString & host() const;
+ const TQString & host() const;
int port() const;
bool isProxy() const;
void setJid(const Jid &);
- void setHost(const QString &);
+ void setHost(const TQString &);
void setPort(int);
void setIsProxy(bool);
private:
Jid j;
- QString v_host;
+ TQString v_host;
int v_port;
bool proxy;
};
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
index ee6857e3..2ca012c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
@@ -20,7 +20,7 @@
#include"xmpp_ibb.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"xmpp_xmlcommon.h"
#include"base64.h"
@@ -44,14 +44,14 @@ public:
int state;
Jid peer;
- QString sid;
+ TQString sid;
IBBManager *m;
JT_IBB *j;
- QDomElement comment;
- QString iq_id;
+ TQDomElement comment;
+ TQString iq_id;
int blockSize;
- QByteArray recvbuf, sendbuf;
+ TQByteArray recvbuf, sendbuf;
bool closePending, closing;
int id;
@@ -67,7 +67,7 @@ IBBConnection::IBBConnection(IBBManager *m)
++num_conn;
d->id = id_conn++;
- QString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
}
@@ -91,13 +91,13 @@ IBBConnection::~IBBConnection()
reset(true);
--num_conn;
- QString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
delete d;
}
-void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
+void IBBConnection::connectToJid(const Jid &peer, const TQDomElement &comment)
{
close();
reset(true);
@@ -106,11 +106,11 @@ void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
d->peer = peer;
d->comment = comment;
- QString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
d->m->client()->debug(dstr);
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->request(d->peer, comment);
d->j->go(true);
}
@@ -120,7 +120,7 @@ void IBBConnection::accept()
if(d->state != WaitingForAccept)
return;
- QString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->m->doAccept(this, d->iq_id);
@@ -139,7 +139,7 @@ void IBBConnection::close()
return;
}
- QString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
d->m->client()->debug(dstr);
if(d->state == Active) {
@@ -152,7 +152,7 @@ void IBBConnection::close()
// send a close packet
JT_IBB *j = new JT_IBB(d->m->client()->rootTask());
- j->sendData(d->peer, d->sid, QByteArray(), true);
+ j->sendData(d->peer, d->sid, TQByteArray(), true);
j->go(true);
}
@@ -169,12 +169,12 @@ Jid IBBConnection::peer() const
return d->peer;
}
-QString IBBConnection::streamid() const
+TQString IBBConnection::streamid() const
{
return d->sid;
}
-QDomElement IBBConnection::comment() const
+TQDomElement IBBConnection::comment() const
{
return d->comment;
}
@@ -187,7 +187,7 @@ bool IBBConnection::isOpen() const
return false;
}
-void IBBConnection::write(const QByteArray &a)
+void IBBConnection::write(const TQByteArray &a)
{
if(d->state != Active || d->closePending || d->closing)
return;
@@ -200,10 +200,10 @@ void IBBConnection::write(const QByteArray &a)
trySend();
}
-QByteArray IBBConnection::read(int)
+TQByteArray IBBConnection::read(int)
{
// TODO: obey argument
- QByteArray a = d->recvbuf.copy();
+ TQByteArray a = d->recvbuf.copy();
d->recvbuf.resize(0);
return a;
}
@@ -218,7 +218,7 @@ int IBBConnection::bytesToWrite() const
return d->sendbuf.size();
}
-void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id)
+void IBBConnection::waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id)
{
close();
reset(true);
@@ -230,7 +230,7 @@ void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDo
d->iq_id = iq_id;
}
-void IBBConnection::takeIncomingData(const QByteArray &a, bool close)
+void IBBConnection::takeIncomingData(const TQByteArray &a, bool close)
{
// append to the end of our recv buffer
int oldsize = d->recvbuf.size();
@@ -254,7 +254,7 @@ void IBBConnection::ibb_finished()
if(j->mode() == JT_IBB::ModeRequest) {
d->sid = j->streamid();
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->state = Active;
@@ -270,12 +270,12 @@ void IBBConnection::ibb_finished()
}
if(!d->sendbuf.isEmpty() || d->closePending)
- QTimer::singleShot(IBB_PACKET_DELAY, this, SLOT(trySend()));
+ TQTimer::singleShot(IBB_PACKET_DELAY, this, TQT_SLOT(trySend()));
}
}
else {
if(j->mode() == JT_IBB::ModeRequest) {
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
d->m->client()->debug(dstr);
reset(true);
@@ -294,7 +294,7 @@ void IBBConnection::trySend()
if(d->j)
return;
- QByteArray a;
+ TQByteArray a;
if(!d->sendbuf.isEmpty()) {
// take a chunk
if(d->sendbuf.size() < IBB_PACKET_SIZE)
@@ -326,7 +326,7 @@ void IBBConnection::trySend()
d->blockSize = a.size();
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->sendData(d->peer, d->sid, a, doClose);
d->j->go(true);
}
@@ -347,14 +347,14 @@ public:
};
IBBManager::IBBManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
d = new Private;
d->client = parent;
d->ibb = new JT_IBB(d->client->rootTask(), true);
- connect(d->ibb, SIGNAL(incomingRequest(const Jid &, const QString &, const QDomElement &)), SLOT(ibb_incomingRequest(const Jid &, const QString &, const QDomElement &)));
- connect(d->ibb, SIGNAL(incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)), SLOT(ibb_incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)));
+ connect(d->ibb, TQT_SIGNAL(incomingRequest(const Jid &, const TQString &, const TQDomElement &)), TQT_SLOT(ibb_incomingRequest(const Jid &, const TQString &, const TQDomElement &)));
+ connect(d->ibb, TQT_SIGNAL(incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)), TQT_SLOT(ibb_incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)));
}
IBBManager::~IBBManager()
@@ -380,9 +380,9 @@ IBBConnection *IBBManager::takeIncoming()
return c;
}
-void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &comment)
+void IBBManager::ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &comment)
{
- QString sid = genUniqueKey();
+ TQString sid = genUniqueKey();
// create a "waiting" connection
IBBConnection *c = new IBBConnection(this);
@@ -391,7 +391,7 @@ void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const Q
incomingReady();
}
-void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close)
+void IBBManager::ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close)
{
IBBConnection *c = findConnection(streamid, from);
if(!c) {
@@ -403,14 +403,14 @@ void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, cons
}
}
-QString IBBManager::genKey() const
+TQString IBBManager::genKey() const
{
- QString key = "ibb_";
+ TQString key = "ibb_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
key.append(s);
}
@@ -419,10 +419,10 @@ QString IBBManager::genKey() const
return key;
}
-QString IBBManager::genUniqueKey() const
+TQString IBBManager::genUniqueKey() const
{
// get unused key
- QString key;
+ TQString key;
while(1) {
key = genKey();
@@ -443,7 +443,7 @@ void IBBManager::unlink(IBBConnection *c)
d->activeConns.removeRef(c);
}
-IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) const
+IBBConnection *IBBManager::findConnection(const TQString &sid, const Jid &peer) const
{
IBBConnectionListIt it(d->activeConns);
for(IBBConnection *c; (c = it.current()); ++it) {
@@ -453,12 +453,12 @@ IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) c
return 0;
}
-void IBBManager::doAccept(IBBConnection *c, const QString &id)
+void IBBManager::doAccept(IBBConnection *c, const TQString &id)
{
d->ibb->respondSuccess(c->peer(), id, c->streamid());
}
-void IBBManager::doReject(IBBConnection *c, const QString &id, int code, const QString &str)
+void IBBManager::doReject(IBBConnection *c, const TQString &id, int code, const TQString &str)
{
d->ibb->respondError(c->peer(), id, code, str);
}
@@ -472,11 +472,11 @@ class JT_IBB::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
int mode;
bool serve;
Jid to;
- QString streamid;
+ TQString streamid;
};
JT_IBB::JT_IBB(Task *parent, bool serve)
@@ -491,60 +491,60 @@ JT_IBB::~JT_IBB()
delete d;
}
-void JT_IBB::request(const Jid &to, const QDomElement &comment)
+void JT_IBB::request(const Jid &to, const TQDomElement &comment)
{
d->mode = ModeRequest;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(comment);
d->iq = iq;
}
-void JT_IBB::sendData(const Jid &to, const QString &streamid, const QByteArray &a, bool close)
+void JT_IBB::sendData(const Jid &to, const TQString &streamid, const TQByteArray &a, bool close)
{
d->mode = ModeSendData;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
if(!a.isEmpty())
query.appendChild(textTag(doc(), "data", Base64::arrayToString(a)));
if(close) {
- QDomElement c = doc()->createElement("close");
+ TQDomElement c = doc()->createElement("close");
query.appendChild(c);
}
d->iq = iq;
}
-void JT_IBB::respondSuccess(const Jid &to, const QString &id, const QString &streamid)
+void JT_IBB::respondSuccess(const Jid &to, const TQString &id, const TQString &streamid)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
send(iq);
}
-void JT_IBB::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_IBB::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_IBB::respondAck(const Jid &to, const QString &id)
+void JT_IBB::respondAck(const Jid &to, const TQString &id)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
send(iq);
}
@@ -553,7 +553,7 @@ void JT_IBB::onGo()
send(d->iq);
}
-bool JT_IBB::take(const QDomElement &e)
+bool JT_IBB::take(const TQDomElement &e)
{
if(d->serve) {
// must be an iq-set tag
@@ -564,18 +564,18 @@ bool JT_IBB::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QString id = e.attribute("id");
- QDomElement q = queryTag(e);
+ TQString id = e.attribute("id");
+ TQDomElement q = queryTag(e);
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(!found) {
- QDomElement comment = findSubTag(q, "comment", &found);
+ TQDomElement comment = findSubTag(q, "comment", &found);
incomingRequest(from, id, comment);
}
else {
- QString sid = tagContent(s);
- QByteArray a;
+ TQString sid = tagContent(s);
+ TQByteArray a;
bool close = false;
s = findSubTag(q, "data", &found);
if(found)
@@ -595,12 +595,12 @@ bool JT_IBB::take(const QDomElement &e)
return false;
if(e.attribute("type") == "result") {
- QDomElement q = queryTag(e);
+ TQDomElement q = queryTag(e);
// request
if(d->mode == ModeRequest) {
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(found)
d->streamid = tagContent(s);
else
@@ -621,7 +621,7 @@ bool JT_IBB::take(const QDomElement &e)
}
}
-QString JT_IBB::streamid() const
+TQString JT_IBB::streamid() const
{
return d->streamid;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
index 682c5a06..e5a0ed93 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
@@ -21,10 +21,10 @@
#ifndef JABBER_IBB_H
#define JABBER_IBB_H
-#include<qobject.h>
-#include<qdom.h>
-#include<qstring.h>
-#include<qptrlist.h>
+#include<tqobject.h>
+#include<tqdom.h>
+#include<tqstring.h>
+#include<tqptrlist.h>
#include"bytestream.h"
#include"im.h"
@@ -43,18 +43,18 @@ namespace XMPP
IBBConnection(IBBManager *);
~IBBConnection();
- void connectToJid(const Jid &peer, const QDomElement &comment);
+ void connectToJid(const Jid &peer, const TQDomElement &comment);
void accept();
void close();
int state() const;
Jid peer() const;
- QString streamid() const;
- QDomElement comment() const;
+ TQString streamid() const;
+ TQDomElement comment() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -72,12 +72,12 @@ namespace XMPP
void reset(bool clear=false);
friend class IBBManager;
- void waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id);
- void takeIncomingData(const QByteArray &, bool close);
+ void waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id);
+ void takeIncomingData(const TQByteArray &, bool close);
};
- typedef QPtrList<IBBConnection> IBBConnectionList;
- typedef QPtrListIterator<IBBConnection> IBBConnectionListIt;
+ typedef TQPtrList<IBBConnection> IBBConnectionList;
+ typedef TQPtrListIterator<IBBConnection> IBBConnectionListIt;
class IBBManager : public QObject
{
Q_OBJECT
@@ -93,22 +93,22 @@ namespace XMPP
void incomingReady();
private slots:
- void ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
Private *d;
- QString genKey() const;
+ TQString genKey() const;
friend class IBBConnection;
- IBBConnection *findConnection(const QString &sid, const Jid &peer="") const;
- QString genUniqueKey() const;
+ IBBConnection *findConnection(const TQString &sid, const Jid &peer="") const;
+ TQString genUniqueKey() const;
void link(IBBConnection *);
void unlink(IBBConnection *);
- void doAccept(IBBConnection *c, const QString &id);
- void doReject(IBBConnection *c, const QString &id, int, const QString &);
+ void doAccept(IBBConnection *c, const TQString &id);
+ void doReject(IBBConnection *c, const TQString &id, int, const TQString &);
};
class JT_IBB : public Task
@@ -119,22 +119,22 @@ namespace XMPP
JT_IBB(Task *, bool serve=false);
~JT_IBB();
- void request(const Jid &, const QDomElement &comment);
- void sendData(const Jid &, const QString &streamid, const QByteArray &data, bool close);
- void respondSuccess(const Jid &, const QString &id, const QString &streamid);
- void respondError(const Jid &, const QString &id, int code, const QString &str);
- void respondAck(const Jid &to, const QString &id);
+ void request(const Jid &, const TQDomElement &comment);
+ void sendData(const Jid &, const TQString &streamid, const TQByteArray &data, bool close);
+ void respondSuccess(const Jid &, const TQString &id, const TQString &streamid);
+ void respondError(const Jid &, const TQString &id, int code, const TQString &str);
+ void respondAck(const Jid &to, const TQString &id);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
- QString streamid() const;
+ TQString streamid() const;
Jid jid() const;
int mode() const;
signals:
- void incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
index 987ac0c7..a39d92b9 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
@@ -20,8 +20,8 @@
#include"xmpp_jidlink.h"
-#include<qdom.h>
-#include<qtimer.h>
+#include<tqdom.h>
+#include<tqtimer.h>
#include"im.h"
#include"s5b.h"
#include"xmpp_ibb.h"
@@ -42,7 +42,7 @@ public:
};
JidLink::JidLink(Client *client)
-:QObject(client->jidLinkManager())
+:TQObject(client->jidLinkManager())
{
d = new Private;
d->client = client;
@@ -73,7 +73,7 @@ void JidLink::reset(bool clear)
}
}
-void JidLink::connectToJid(const Jid &jid, int type, const QDomElement &comment)
+void JidLink::connectToJid(const Jid &jid, int type, const TQDomElement &comment)
{
reset(true);
if(type == DTCP)
@@ -105,18 +105,18 @@ void JidLink::link()
{
if(d->type == DTCP) {
S5BConnection *c = (S5BConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(dtcp_connected()));
- connect(c, SIGNAL(accepted()), SLOT(dtcp_accepted()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(dtcp_connected()));
+ connect(c, TQT_SIGNAL(accepted()), TQT_SLOT(dtcp_accepted()));
}
else {
IBBConnection *c = (IBBConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(ibb_connected()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(ibb_connected()));
}
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
}
void JidLink::unlink()
@@ -129,7 +129,7 @@ void JidLink::accept()
if(d->state != WaitingForAccept)
return;
- QTimer::singleShot(0, this, SLOT(doRealAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doRealAccept()));
}
void JidLink::doRealAccept()
@@ -202,18 +202,18 @@ void JidLink::close()
reset();
}
-void JidLink::write(const QByteArray &a)
+void JidLink::write(const TQByteArray &a)
{
if(d->state == Active)
d->bs->write(a);
}
-QByteArray JidLink::read(int bytes)
+TQByteArray JidLink::read(int bytes)
{
if(d->bs)
return d->bs->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int JidLink::bytesAvailable() const
@@ -283,11 +283,11 @@ public:
Private() {}
Client *client;
- QPtrList<JidLink> incomingList;
+ TQPtrList<JidLink> incomingList;
};
JidLinkManager::JidLinkManager(Client *par)
-:QObject(par)
+:TQObject(par)
{
d = new Private;
d->client = par;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
index ac852349..40d3d4eb 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
@@ -25,8 +25,8 @@
#ifndef JABBER_JIDLINK_H
#define JABBER_JIDLINK_H
-#include<qobject.h>
-#include<qstring.h>
+#include<tqobject.h>
+#include<tqstring.h>
#include"xmpp.h"
class ByteStream;
@@ -46,7 +46,7 @@ namespace XMPP
JidLink(Client *client);
~JidLink();
- void connectToJid(const Jid &jid, int type, const QDomElement &comment);
+ void connectToJid(const Jid &jid, int type, const TQDomElement &comment);
void accept();
int type() const;
@@ -55,8 +55,8 @@ namespace XMPP
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
index 55b43c06..3ba5cb16 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
@@ -31,12 +31,12 @@
#include"xmpp.h"
-#include<qguardedptr.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include"safedelete.h"
#ifdef NO_NDNS
-#include<qdns.h>
+#include<tqdns.h>
#else
#include"ndns.h"
#endif
@@ -55,8 +55,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// Connector
//----------------------------------------------------------------------------
-Connector::Connector(QObject *parent)
-:QObject(parent)
+Connector::Connector(TQObject *parent)
+:TQObject(parent)
{
setUseSSL(false);
setPeerAddressNone();
@@ -76,7 +76,7 @@ bool Connector::havePeerAddress() const
return haveaddr;
}
-QHostAddress Connector::peerAddress() const
+TQHostAddress Connector::peerAddress() const
{
return addr;
}
@@ -94,11 +94,11 @@ void Connector::setUseSSL(bool b)
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;
@@ -124,7 +124,7 @@ int AdvancedConnector::Proxy::type() const
return t;
}
-QString AdvancedConnector::Proxy::host() const
+TQString AdvancedConnector::Proxy::host() const
{
return v_host;
}
@@ -134,17 +134,17 @@ Q_UINT16 AdvancedConnector::Proxy::port() const
return v_port;
}
-QString AdvancedConnector::Proxy::url() const
+TQString AdvancedConnector::Proxy::url() const
{
return v_url;
}
-QString AdvancedConnector::Proxy::user() const
+TQString AdvancedConnector::Proxy::user() const
{
return v_user;
}
-QString AdvancedConnector::Proxy::pass() const
+TQString AdvancedConnector::Proxy::pass() const
{
return v_pass;
}
@@ -154,14 +154,14 @@ int AdvancedConnector::Proxy::pollInterval() const
return v_poll;
}
-void AdvancedConnector::Proxy::setHttpConnect(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, Q_UINT16 port)
{
t = HttpConnect;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, const QString &url)
+void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url)
{
t = HttpPoll;
v_host = host;
@@ -169,14 +169,14 @@ void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, c
v_url = url;
}
-void AdvancedConnector::Proxy::setSocks(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setSocks(const TQString &host, Q_UINT16 port)
{
t = Socks;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setUserPass(const QString &user, const QString &pass)
+void AdvancedConnector::Proxy::setUserPass(const TQString &user, const TQString &pass)
{
v_user = user;
v_pass = pass;
@@ -198,21 +198,21 @@ public:
int mode;
ByteStream *bs;
#ifdef NO_NDNS
- QDns *qdns;
+ TQDns *qdns;
#else
NDns dns;
#endif
SrvResolver srv;
- QString server;
- QString opt_host;
+ TQString server;
+ TQString opt_host;
int opt_port;
bool opt_probe, opt_ssl;
Proxy proxy;
- QString host;
+ TQString host;
int port;
- QValueList<QDns::Server> servers;
+ TQValueList<TQDns::Server> servers;
int errorCode;
bool multi, using_srv;
@@ -223,7 +223,7 @@ public:
SafeDelete sd;
};
-AdvancedConnector::AdvancedConnector(QObject *parent)
+AdvancedConnector::AdvancedConnector(TQObject *parent)
:Connector(parent)
{
d = new Private;
@@ -231,9 +231,9 @@ AdvancedConnector::AdvancedConnector(QObject *parent)
#ifdef NO_NDNS
d->qdns = 0;
#else
- connect(&d->dns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(&d->dns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
d->opt_probe = false;
d->opt_ssl = false;
cleanup();
@@ -285,7 +285,7 @@ void AdvancedConnector::setProxy(const Proxy &proxy)
d->proxy = proxy;
}
-void AdvancedConnector::setOptHostPort(const QString &host, Q_UINT16 _port)
+void AdvancedConnector::setOptHostPort(const TQString &host, Q_UINT16 _port)
{
if(d->mode != Idle)
return;
@@ -307,7 +307,7 @@ void AdvancedConnector::setOptSSL(bool b)
d->opt_ssl = b;
}
-void AdvancedConnector::connectToServer(const QString &server)
+void AdvancedConnector::connectToServer(const TQString &server)
{
if(d->mode != Idle)
return;
@@ -326,10 +326,10 @@ void AdvancedConnector::connectToServer(const QString &server)
HttpPoll *s = new HttpPoll;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(syncStarted()), SLOT(http_syncStarted()));
- connect(s, SIGNAL(syncFinished()), SLOT(http_syncFinished()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(syncStarted()), TQT_SLOT(http_syncStarted()));
+ connect(s, TQT_SIGNAL(syncFinished()), TQT_SLOT(http_syncFinished()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->setPollInterval(d->proxy.pollInterval());
@@ -348,7 +348,7 @@ void AdvancedConnector::connectToServer(const QString &server)
else {
d->multi = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
srvLookup(d->server);
if(!self)
return;
@@ -389,11 +389,11 @@ void AdvancedConnector::do_resolve()
#ifdef NO_NDNS
printf("resolving (aaaa=%d)\n", d->aaaa);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->host);
#else
d->dns.resolve(d->host);
@@ -403,7 +403,7 @@ void AdvancedConnector::do_resolve()
void AdvancedConnector::dns_done()
{
bool failed = false;
- QHostAddress addr;
+ TQHostAddress addr;
#ifdef NO_NDNS
//if(!d->qdns)
@@ -416,7 +416,7 @@ void AdvancedConnector::dns_done()
//SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list = d->qdns->addresses();
+ TQValueList<TQHostAddress> list = d->qdns->addresses();
d->qdns->disconnect(this);
d->qdns->deleteLater();
//d->sd.deleteLater(d->qdns);
@@ -438,7 +438,7 @@ void AdvancedConnector::dns_done()
if(d->dns.result() == 0)
failed = true;
else
- addr = QHostAddress(d->dns.result());
+ addr = TQHostAddress(d->dns.result());
#endif
if(failed) {
@@ -502,8 +502,8 @@ void AdvancedConnector::do_connect()
#endif
BSocket *s = new BSocket;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
s->connectToHost(d->host, d->port);
}
else if(t == Proxy::HttpConnect) {
@@ -512,8 +512,8 @@ void AdvancedConnector::do_connect()
#endif
HttpConnect *s = new HttpConnect;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -524,8 +524,8 @@ void AdvancedConnector::do_connect()
#endif
SocksClient *s = new SocksClient;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -545,7 +545,7 @@ void AdvancedConnector::tryNextSrv()
void AdvancedConnector::srv_done()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
#ifdef XMPP_DEBUG
printf("srv_done1\n");
#endif
@@ -591,7 +591,7 @@ void AdvancedConnector::srv_done()
void AdvancedConnector::bs_connected()
{
if(d->proxy.type() == Proxy::None) {
- QHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
+ TQHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
int p = (static_cast<BSocket*>(d->bs))->peerPort();
setPeerAddress(h, p);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
index 3c0389b5..4c8307cb 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
@@ -473,9 +473,9 @@ public:
sha1_update(&_context, (unsigned char *)in, (unsigned int)len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(20);
+ TQByteArray b(20);
sha1_final((unsigned char *)b.data(), &_context);
*out = b;
}
@@ -621,9 +621,9 @@ public:
md5_append(&md5, (const md5_byte_t *)in, len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(16);
+ TQByteArray b(16);
md5_finish(&md5, (md5_byte_t *)b.data());
*out = b;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
index 2a40f050..090cc9df 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qdict.h>
+#include<tqdict.h>
#include<stringprep.h>
using namespace XMPP;
@@ -31,12 +31,12 @@ using namespace XMPP;
class StringPrepCache
{
public:
- static bool nameprep(const QString &in, int maxbytes, QString *out)
+ static bool nameprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -52,7 +52,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
{
@@ -60,19 +60,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nameprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool nodeprep(const QString &in, int maxbytes, QString *out)
+ static bool nodeprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -88,7 +88,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
{
@@ -96,19 +96,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nodeprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool resourceprep(const QString &in, int maxbytes, QString *out)
+ static bool resourceprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -124,7 +124,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
{
@@ -132,7 +132,7 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->resourceprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
@@ -143,13 +143,13 @@ private:
class Result
{
public:
- QString *norm;
+ TQString *norm;
Result() : norm(0)
{
}
- Result(const QString &s) : norm(new QString(s))
+ Result(const TQString &s) : norm(new TQString(s))
{
}
@@ -159,9 +159,9 @@ private:
}
};
- QDict<Result> nameprep_table;
- QDict<Result> nodeprep_table;
- QDict<Result> resourceprep_table;
+ TQDict<Result> nameprep_table;
+ TQDict<Result> nodeprep_table;
+ TQDict<Result> resourceprep_table;
static StringPrepCache *instance;
@@ -194,17 +194,17 @@ Jid::~Jid()
{
}
-Jid::Jid(const QString &s)
+Jid::Jid(const TQString &s)
{
set(s);
}
Jid::Jid(const char *s)
{
- set(QString(s));
+ set(TQString(s));
}
-Jid & Jid::operator=(const QString &s)
+Jid & Jid::operator=(const TQString &s)
{
set(s);
return *this;
@@ -212,17 +212,17 @@ Jid & Jid::operator=(const QString &s)
Jid & Jid::operator=(const char *s)
{
- set(QString(s));
+ set(TQString(s));
return *this;
}
void Jid::reset()
{
- f = QString();
- b = QString();
- d = QString();
- n = QString();
- r = QString();
+ f = TQString();
+ b = TQString();
+ d = TQString();
+ n = TQString();
+ r = TQString();
valid = false;
}
@@ -244,10 +244,10 @@ void Jid::update()
valid = false;
}
-void Jid::set(const QString &s)
+void Jid::set(const TQString &s)
{
- QString rest, domain, node, resource;
- QString norm_domain, norm_node, norm_resource;
+ TQString rest, domain, node, resource;
+ TQString norm_domain, norm_node, norm_resource;
int x = s.find('/');
if(x != -1) {
rest = s.mid(0, x);
@@ -255,7 +255,7 @@ void Jid::set(const QString &s)
}
else {
rest = s;
- resource = QString();
+ resource = TQString();
}
if(!validResource(resource, &norm_resource)) {
reset();
@@ -268,7 +268,7 @@ void Jid::set(const QString &s)
domain = rest.mid(x+1);
}
else {
- node = QString();
+ node = TQString();
domain = rest;
}
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node)) {
@@ -283,9 +283,9 @@ void Jid::set(const QString &s)
update();
}
-void Jid::set(const QString &domain, const QString &node, const QString &resource)
+void Jid::set(const TQString &domain, const TQString &node, const TQString &resource)
{
- QString norm_domain, norm_node, norm_resource;
+ TQString norm_domain, norm_node, norm_resource;
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node) || !validResource(resource, &norm_resource)) {
reset();
return;
@@ -297,11 +297,11 @@ void Jid::set(const QString &domain, const QString &node, const QString &resourc
update();
}
-void Jid::setDomain(const QString &s)
+void Jid::setDomain(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validDomain(s, &norm)) {
reset();
return;
@@ -310,11 +310,11 @@ void Jid::setDomain(const QString &s)
update();
}
-void Jid::setNode(const QString &s)
+void Jid::setNode(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validNode(s, &norm)) {
reset();
return;
@@ -323,11 +323,11 @@ void Jid::setNode(const QString &s)
update();
}
-void Jid::setResource(const QString &s)
+void Jid::setResource(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validResource(s, &norm)) {
reset();
return;
@@ -336,14 +336,14 @@ void Jid::setResource(const QString &s)
update();
}
-Jid Jid::withNode(const QString &s) const
+Jid Jid::withNode(const TQString &s) const
{
Jid j = *this;
j.setNode(s);
return j;
}
-Jid Jid::withResource(const QString &s) const
+Jid Jid::withResource(const TQString &s) const
{
Jid j = *this;
j.setResource(s);
@@ -372,38 +372,38 @@ bool Jid::compare(const Jid &a, bool compareRes) const
return true;
}
-bool Jid::validDomain(const QString &s, QString *norm)
+bool Jid::validDomain(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nameprep(s, 1024, norm);
}
-bool Jid::validNode(const QString &s, QString *norm)
+bool Jid::validNode(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nodeprep(s, 1024, norm);
}
-bool Jid::validResource(const QString &s, QString *norm)
+bool Jid::validResource(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::resourceprep(s, 1024, norm);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
index 558a5fcd..2348c88e 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
@@ -24,12 +24,12 @@
For XMPP::Parser to be "perfect", some things must be solved/changed in the
Qt library:
- - Fix weird QDomElement::haveAttributeNS() bug (patch submitted to
+ - Fix weird TQDomElement::haveAttributeNS() bug (patch submitted to
Trolltech on Aug 31st, 2003).
- - Fix weird behavior in QXmlSimpleReader of reporting endElement() when
+ - Fix weird behavior in TQXmlSimpleReader of reporting endElement() when
the '/' character of a self-closing tag is reached, instead of when
the final '>' is reached.
- - Fix incremental parsing bugs in QXmlSimpleReader. At the moment, the
+ - Fix incremental parsing bugs in TQXmlSimpleReader. At the moment, the
only bug I've found is related to attribute parsing, but there might
be more (search for '###' in $QTDIR/src/xml/qxml.cpp).
@@ -38,10 +38,10 @@
- Deal with the <?xml?> processing instruction as an event type, so that we
can feed it back to the application properly. Right now it is completely
untrackable and is simply tacked into the first event's actualString. We
- can't easily do this because QXmlSimpleReader eats an extra byte beyond
+ can't easily do this because TQXmlSimpleReader eats an extra byte beyond
the processing instruction before reporting it.
- - Make QXmlInputSource capable of accepting data incrementally, to ensure
+ - Make TQXmlInputSource capable of accepting data incrementally, to ensure
proper text encoding detection and processing over a network. This is
technically not a bug, as we have our own subclass below to do it, but
it would be nice if Qt had this already.
@@ -49,8 +49,8 @@
#include"parser.h"
-#include<qtextcodec.h>
-#include<qptrlist.h>
+#include<tqtextcodec.h>
+#include<tqptrlist.h>
#include<string.h>
using namespace XMPP;
@@ -85,7 +85,7 @@ public:
paused = false;
mightChangeEncoding = true;
checkBad = true;
- last = QChar();
+ last = TQChar();
v_encoding = "";
resetLastData();
}
@@ -95,12 +95,12 @@ public:
last_string = "";
}
- QString lastString() const
+ TQString lastString() const
{
return last_string;
}
- void appendData(const QByteArray &a)
+ void appendData(const TQByteArray &a)
{
int oldsize = in.size();
in.resize(oldsize + a.size());
@@ -108,12 +108,12 @@ public:
processBuf();
}
- QChar lastRead()
+ TQChar lastRead()
{
return last;
}
- QChar next()
+ TQChar next()
{
if(paused)
return EndOfData;
@@ -123,14 +123,14 @@ public:
// NOTE: setting 'peek' to true allows the same char to be read again,
// however this still advances the internal byte processing.
- QChar readNext(bool peek=false)
+ TQChar readNext(bool peek=false)
{
- QChar c;
+ TQChar c;
if(mightChangeEncoding)
c = EndOfData;
else {
if(out.isEmpty()) {
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
c = EndOfData;
else {
@@ -158,9 +158,9 @@ public:
return c;
}
- QByteArray unprocessed() const
+ TQByteArray unprocessed() const
{
- QByteArray a(in.size() - at);
+ TQByteArray a(in.size() - at);
memcpy(a.data(), in.data() + at, a.size());
return a;
}
@@ -175,21 +175,21 @@ public:
return paused;
}
- QString encoding() const
+ TQString encoding() const
{
return v_encoding;
}
private:
- QTextDecoder *dec;
- QByteArray in;
- QString out;
+ TQTextDecoder *dec;
+ TQByteArray in;
+ TQString out;
int at;
bool paused;
bool mightChangeEncoding;
- QChar last;
- QString v_encoding;
- QString last_string;
+ TQChar last;
+ TQString v_encoding;
+ TQString last_string;
bool checkBad;
void processBuf()
@@ -198,7 +198,7 @@ private:
printf("processing. size=%d, at=%d\n", in.size(), at);
#endif
if(!dec) {
- QTextCodec *codec = 0;
+ TQTextCodec *codec = 0;
uchar *p = (uchar *)in.data() + at;
int size = in.size() - at;
@@ -216,9 +216,9 @@ private:
}
}
if(utf16)
- codec = QTextCodec::codecForMib(1000); // UTF-16
+ codec = TQTextCodec::codecForMib(1000); // UTF-16
else
- codec = QTextCodec::codecForMib(106); // UTF-8
+ codec = TQTextCodec::codecForMib(106); // UTF-8
v_encoding = codec->name();
dec = codec->makeDecoder();
@@ -238,11 +238,11 @@ private:
int n2 = out.find('>', n);
if(n2 != -1) {
++n2;
- QString h = out.mid(n, n2-n);
- QString enc = processXmlHeader(h);
- QTextCodec *codec = 0;
+ TQString h = out.mid(n, n2-n);
+ TQString enc = processXmlHeader(h);
+ TQTextCodec *codec = 0;
if(!enc.isEmpty())
- codec = QTextCodec::codecForName(enc.latin1());
+ codec = TQTextCodec::codecForName(enc.latin1());
// changing codecs
if(codec) {
@@ -257,7 +257,7 @@ private:
break;
}
}
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
break;
if(checkBad && checkForBadChars(s)) {
@@ -273,7 +273,7 @@ private:
}
}
- QString processXmlHeader(const QString &h)
+ TQString processXmlHeader(const TQString &h)
{
if(h.left(5) != "<?xml")
return "";
@@ -281,7 +281,7 @@ private:
int endPos = h.find(">");
int startPos = h.find("encoding");
if(startPos < endPos && startPos != -1) {
- QString encoding;
+ TQString encoding;
do {
startPos++;
if(startPos > endPos) {
@@ -302,13 +302,13 @@ private:
return "";
}
- bool tryExtractPart(QString *s)
+ bool tryExtractPart(TQString *s)
{
int size = in.size() - at;
if(size == 0)
return false;
uchar *p = (uchar *)in.data() + at;
- QString nextChars;
+ TQString nextChars;
while(1) {
nextChars = dec->toUnicode((const char *)p, 1);
++p;
@@ -333,7 +333,7 @@ private:
return true;
}
- bool checkForBadChars(const QString &s)
+ bool checkForBadChars(const TQString &s)
{
int len = s.find('<');
if(len == -1)
@@ -357,7 +357,7 @@ namespace XMPP
class ParserHandler : public QXmlDefaultHandler
{
public:
- ParserHandler(StreamInput *_in, QDomDocument *_doc)
+ ParserHandler(StreamInput *_in, TQDomDocument *_doc)
{
in = _in;
doc = _doc;
@@ -381,7 +381,7 @@ namespace XMPP
return true;
}
- bool startPrefixMapping(const QString &prefix, const QString &uri)
+ bool startPrefixMapping(const TQString &prefix, const TQString &uri)
{
if(depth == 0) {
nsnames += prefix;
@@ -390,14 +390,14 @@ namespace XMPP
return true;
}
- bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
+ bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts)
{
if(depth == 0) {
Parser::Event *e = new Parser::Event;
- QXmlAttributes a;
+ TQXmlAttributes a;
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
if(a.index(uri, ln) == -1)
a.append(atts.qName(n), uri, ln, atts.value(n));
}
@@ -411,10 +411,10 @@ namespace XMPP
in->pause(true);
}
else {
- QDomElement e = doc->createElementNS(namespaceURI, qName);
+ TQDomElement e = doc->createElementNS(namespaceURI, qName);
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
bool have;
if(!uri.isEmpty()) {
have = e.hasAttributeNS(uri, ln);
@@ -440,7 +440,7 @@ namespace XMPP
return true;
}
- bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
+ bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
--depth;
if(depth == 0) {
@@ -461,8 +461,8 @@ namespace XMPP
eventList.append(e);
in->pause(true);
- elem = QDomElement();
- current = QDomElement();
+ elem = TQDomElement();
+ current = TQDomElement();
}
else
current = current.parentNode().toElement();
@@ -474,22 +474,22 @@ namespace XMPP
return true;
}
- bool characters(const QString &str)
+ bool characters(const TQString &str)
{
if(depth >= 1) {
- QString content = str;
+ TQString content = str;
if(content.isEmpty())
return true;
if(!current.isNull()) {
- QDomText text = doc->createTextNode(content);
+ TQDomText text = doc->createTextNode(content);
current.appendChild(text);
}
}
return true;
}
- /*bool processingInstruction(const QString &target, const QString &data)
+ /*bool processingInstruction(const TQString &target, const TQString &data)
{
printf("Processing: [%s], [%s]\n", target.latin1(), data.latin1());
in->resetLastData();
@@ -498,22 +498,22 @@ namespace XMPP
void checkNeedMore()
{
- // Here we will work around QXmlSimpleReader strangeness and self-closing tags.
+ // Here we will work around TQXmlSimpleReader strangeness and self-closing tags.
// The problem is that endElement() is called when the '/' is read, not when
// the final '>' is read. This is a potential problem when obtaining unprocessed
// bytes from StreamInput after this event, as the '>' character will end up
// in the unprocessed chunk. To work around this, we need to advance StreamInput's
// internal byte processing, but not the xml character data. This way, the '>'
// will get processed and will no longer be in the unprocessed return, but
- // QXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
+ // TQXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
// with 'peek' mode.
- QChar c = in->readNext(true); // peek
- if(c == QXmlInputSource::EndOfData) {
+ TQChar c = in->readNext(true); // peek
+ if(c == TQXmlInputSource::EndOfData) {
needMore = true;
}
else {
// We'll assume the next char is a '>'. If it isn't, then
- // QXmlSimpleReader will deal with that problem on the next
+ // TQXmlSimpleReader will deal with that problem on the next
// parse. We don't need to take any action here.
needMore = false;
@@ -540,11 +540,11 @@ namespace XMPP
}
StreamInput *in;
- QDomDocument *doc;
+ TQDomDocument *doc;
int depth;
- QStringList nsnames, nsvalues;
- QDomElement elem, current;
- QPtrList<Parser::Event> eventList;
+ TQStringList nsnames, nsvalues;
+ TQDomElement elem, current;
+ TQPtrList<Parser::Event> eventList;
bool needMore;
};
}
@@ -557,11 +557,11 @@ class Parser::Event::Private
{
public:
int type;
- QString ns, ln, qn;
- QXmlAttributes a;
- QDomElement e;
- QString str;
- QStringList nsnames, nsvalues;
+ TQString ns, ln, qn;
+ TQXmlAttributes a;
+ TQDomElement e;
+ TQString str;
+ TQStringList nsnames, nsvalues;
};
Parser::Event::Event()
@@ -601,49 +601,49 @@ int Parser::Event::type() const
return d->type;
}
-QString Parser::Event::nsprefix(const QString &s) const
+TQString Parser::Event::nsprefix(const TQString &s) const
{
- QStringList::ConstIterator it = d->nsnames.begin();
- QStringList::ConstIterator it2 = d->nsvalues.begin();
+ TQStringList::ConstIterator it = d->nsnames.begin();
+ TQStringList::ConstIterator it2 = d->nsvalues.begin();
for(; it != d->nsnames.end(); ++it) {
if((*it) == s)
return (*it2);
++it2;
}
- return QString::null;
+ return TQString::null;
}
-QString Parser::Event::namespaceURI() const
+TQString Parser::Event::namespaceURI() const
{
return d->ns;
}
-QString Parser::Event::localName() const
+TQString Parser::Event::localName() const
{
return d->ln;
}
-QString Parser::Event::qName() const
+TQString Parser::Event::qName() const
{
return d->qn;
}
-QXmlAttributes Parser::Event::atts() const
+TQXmlAttributes Parser::Event::atts() const
{
return d->a;
}
-QString Parser::Event::actualString() const
+TQString Parser::Event::actualString() const
{
return d->str;
}
-QDomElement Parser::Event::element() const
+TQDomElement Parser::Event::element() const
{
return d->e;
}
-void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues)
+void Parser::Event::setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues)
{
if(!d)
d = new Private;
@@ -656,7 +656,7 @@ void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &
d->nsvalues = nsvalues;
}
-void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName)
+void Parser::Event::setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
if(!d)
d = new Private;
@@ -666,7 +666,7 @@ void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString
d->qn = qName;
}
-void Parser::Event::setElement(const QDomElement &elem)
+void Parser::Event::setElement(const TQDomElement &elem)
{
if(!d)
d = new Private;
@@ -681,7 +681,7 @@ void Parser::Event::setError()
d->type = Error;
}
-void Parser::Event::setActualString(const QString &str)
+void Parser::Event::setActualString(const TQString &str)
{
d->str = str;
}
@@ -727,10 +727,10 @@ public:
}
}
- QDomDocument *doc;
+ TQDomDocument *doc;
StreamInput *in;
ParserHandler *handler;
- QXmlSimpleReader *reader;
+ TQXmlSimpleReader *reader;
};
Parser::Parser()
@@ -740,7 +740,7 @@ Parser::Parser()
// check for evil bug in Qt <= 3.2.1
if(!qt_bug_check) {
qt_bug_check = true;
- QDomElement e = d->doc->createElementNS("someuri", "somename");
+ TQDomElement e = d->doc->createElementNS("someuri", "somename");
if(e.hasAttributeNS("someuri", "somename"))
qt_bug_have = true;
else
@@ -758,7 +758,7 @@ void Parser::reset()
d->reset();
}
-void Parser::appendData(const QByteArray &a)
+void Parser::appendData(const TQByteArray &a)
{
d->in->appendData(a);
@@ -787,12 +787,12 @@ Parser::Event Parser::readNext()
return e;
}
-QByteArray Parser::unprocessed() const
+TQByteArray Parser::unprocessed() const
{
return d->in->unprocessed();
}
-QString Parser::encoding() const
+TQString Parser::encoding() const
{
return d->in->encoding();
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
index b43be57e..b702ad55 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
@@ -21,8 +21,8 @@
#ifndef PARSER_H
#define PARSER_H
-#include<qdom.h>
-#include<qxml.h>
+#include<tqdom.h>
+#include<tqxml.h>
namespace XMPP
{
@@ -45,26 +45,26 @@ namespace XMPP
int type() const;
// for document open
- QString nsprefix(const QString &s=QString::null) const;
+ TQString nsprefix(const TQString &s=TQString::null) const;
// for document open / close
- QString namespaceURI() const;
- QString localName() const;
- QString qName() const;
- QXmlAttributes atts() const;
+ TQString namespaceURI() const;
+ TQString localName() const;
+ TQString qName() const;
+ TQXmlAttributes atts() const;
// for element
- QDomElement element() const;
+ TQDomElement element() const;
// for any
- QString actualString() const;
+ TQString actualString() const;
// setup
- void setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues);
- void setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName);
- void setElement(const QDomElement &elem);
+ void setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues);
+ void setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName);
+ void setElement(const TQDomElement &elem);
void setError();
- void setActualString(const QString &);
+ void setActualString(const TQString &);
private:
class Private;
@@ -72,10 +72,10 @@ namespace XMPP
};
void reset();
- void appendData(const QByteArray &a);
+ void appendData(const TQByteArray &a);
Event readNext();
- QByteArray unprocessed() const;
- QString encoding() const;
+ TQByteArray unprocessed() const;
+ TQString encoding() const;
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
index fd1e6cdc..76d3c781 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
@@ -40,13 +40,13 @@ using namespace XMPP;
// This function prints out an array of bytes as latin characters, converting
// non-printable bytes into hex values as necessary. Useful for displaying
// QByteArrays for debugging purposes.
-static QString printArray(const QByteArray &a)
+static TQString printArray(const TQByteArray &a)
{
- QString s;
+ TQString s;
for(uint n = 0; n < a.size(); ++n) {
unsigned char c = (unsigned char)a[(int)n];
if(c < 32 || c >= 127) {
- QString str;
+ TQString str;
str.sprintf("[%02x]", c);
s += str;
}
@@ -59,13 +59,13 @@ static QString printArray(const QByteArray &a)
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -159,30 +159,30 @@ void BasicProtocol::reset()
XmlProtocol::reset();
init();
- to = QString();
- from = QString();
- id = QString();
- lang = QString();
+ to = TQString();
+ from = TQString();
+ id = TQString();
+ lang = TQString();
version = Version(1,0);
- errText = QString();
- errAppSpec = QDomElement();
- otherHost = QString();
+ errText = TQString();
+ errAppSpec = TQDomElement();
+ otherHost = TQString();
spare.resize(0);
- sasl_mech = QString();
+ sasl_mech = TQString();
sasl_mechlist.clear();
sasl_step.resize(0);
- stanzaToRecv = QDomElement();
+ stanzaToRecv = TQDomElement();
sendList.clear();
}
-void BasicProtocol::sendStanza(const QDomElement &e)
+void BasicProtocol::sendStanza(const TQDomElement &e)
{
SendItem i;
i.stanzaToSend = e;
sendList += i;
}
-void BasicProtocol::sendDirect(const QString &s)
+void BasicProtocol::sendDirect(const TQString &s)
{
SendItem i;
i.stringToSend = s;
@@ -196,10 +196,10 @@ void BasicProtocol::sendWhitespace()
sendList += i;
}
-QDomElement BasicProtocol::recvStanza()
+TQDomElement BasicProtocol::recvStanza()
{
- QDomElement e = stanzaToRecv;
- stanzaToRecv = QDomElement();
+ TQDomElement e = stanzaToRecv;
+ stanzaToRecv = TQDomElement();
return e;
}
@@ -208,7 +208,7 @@ void BasicProtocol::shutdown()
doShutdown = true;
}
-void BasicProtocol::shutdownWithError(int cond, const QString &str)
+void BasicProtocol::shutdownWithError(int cond, const TQString &str)
{
otherHost = str;
delayErrorAndClose(cond);
@@ -224,28 +224,28 @@ void BasicProtocol::setReady(bool b)
ready = b;
}
-QString BasicProtocol::saslMech() const
+TQString BasicProtocol::saslMech() const
{
return sasl_mech;
}
-QByteArray BasicProtocol::saslStep() const
+TQByteArray BasicProtocol::saslStep() const
{
return sasl_step;
}
-void BasicProtocol::setSASLMechList(const QStringList &list)
+void BasicProtocol::setSASLMechList(const TQStringList &list)
{
sasl_mechlist = list;
}
-void BasicProtocol::setSASLFirst(const QString &mech, const QByteArray &step)
+void BasicProtocol::setSASLFirst(const TQString &mech, const TQByteArray &step)
{
sasl_mech = mech;
sasl_step = step;
}
-void BasicProtocol::setSASLNext(const QByteArray &step)
+void BasicProtocol::setSASLNext(const TQByteArray &step)
{
sasl_step = step;
}
@@ -255,7 +255,7 @@ void BasicProtocol::setSASLAuthed()
sasl_authed = true;
}
-int BasicProtocol::stringToSASLCond(const QString &s)
+int BasicProtocol::stringToSASLCond(const TQString &s)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(s == saslCondTable[n].str)
@@ -264,7 +264,7 @@ int BasicProtocol::stringToSASLCond(const QString &s)
return -1;
}
-int BasicProtocol::stringToStreamCond(const QString &s)
+int BasicProtocol::stringToStreamCond(const TQString &s)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(s == streamCondTable[n].str)
@@ -273,30 +273,30 @@ int BasicProtocol::stringToStreamCond(const QString &s)
return -1;
}
-QString BasicProtocol::saslCondToString(int x)
+TQString BasicProtocol::saslCondToString(int x)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(x == saslCondTable[n].cond)
return saslCondTable[n].str;
}
- return QString();
+ return TQString();
}
-QString BasicProtocol::streamCondToString(int x)
+TQString BasicProtocol::streamCondToString(int x)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(x == streamCondTable[n].cond)
return streamCondTable[n].str;
}
- return QString();
+ return TQString();
}
-void BasicProtocol::extractStreamError(const QDomElement &e)
+void BasicProtocol::extractStreamError(const TQDomElement &e)
{
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_STREAMS) {
// probably old-style error
errCond = -1;
@@ -314,9 +314,9 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
text = t.text();
// find first non-standard namespaced element
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STREAMS) {
appSpec = i.toElement();
break;
@@ -328,20 +328,20 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
}
}
-void BasicProtocol::send(const QDomElement &e, bool clip)
+void BasicProtocol::send(const TQDomElement &e, bool clip)
{
writeElement(e, TypeElement, false, clip);
}
-void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::sendStreamError(int cond, const TQString &text, const TQDomElement &appSpec)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
- QDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
if(!otherHost.isEmpty())
err.appendChild(doc.createTextNode(otherHost));
se.appendChild(err);
if(!text.isEmpty()) {
- QDomElement te = doc.createElementNS(NS_STREAMS, "text");
+ TQDomElement te = doc.createElementNS(NS_STREAMS, "text");
te.setAttributeNS(NS_XML, "xml:lang", "en");
te.appendChild(doc.createTextNode(text));
se.appendChild(te);
@@ -351,15 +351,15 @@ void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomEle
writeElement(se, 100, false);
}
-void BasicProtocol::sendStreamError(const QString &text)
+void BasicProtocol::sendStreamError(const TQString &text)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
se.appendChild(doc.createTextNode(text));
writeElement(se, 100, false);
}
-bool BasicProtocol::errorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+bool BasicProtocol::errorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
closeError = true;
errCond = cond;
@@ -376,7 +376,7 @@ bool BasicProtocol::error(int code)
return true;
}
-void BasicProtocol::delayErrorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::delayErrorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
errorCode = ErrStream;
errCond = cond;
@@ -391,21 +391,21 @@ void BasicProtocol::delayError(int code)
delayedError = true;
}
-QDomElement BasicProtocol::docElement()
+TQDomElement BasicProtocol::docElement()
{
// create the root element
- QDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
+ TQDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
- QString defns = defaultNamespace();
- QStringList list = extraNamespaces();
+ TQString defns = defaultNamespace();
+ TQStringList list = extraNamespaces();
// HACK: using attributes seems to be the only way to get additional namespaces in here
if(!defns.isEmpty())
e.setAttribute("xmlns", defns);
- for(QStringList::ConstIterator it = list.begin(); it != list.end();) {
- QString prefix = *(it++);
- QString uri = *(it++);
- e.setAttribute(QString("xmlns:") + prefix, uri);
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end();) {
+ TQString prefix = *(it++);
+ TQString uri = *(it++);
+ e.setAttribute(TQString("xmlns:") + prefix, uri);
}
// additional attributes
@@ -418,7 +418,7 @@ QDomElement BasicProtocol::docElement()
if(!lang.isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", lang);
if(version.major > 0 || version.minor > 0)
- e.setAttribute("version", QString::number(version.major) + '.' + QString::number(version.minor));
+ e.setAttribute("version", TQString::number(version.major) + '.' + TQString::number(version.minor));
return e;
}
@@ -433,12 +433,12 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
}
if(pe.namespaceURI() == NS_ETHERX && pe.localName() == "stream") {
- QXmlAttributes atts = pe.atts();
+ TQXmlAttributes atts = pe.atts();
// grab the version
int major = 0;
int minor = 0;
- QString verstr = atts.value("version");
+ TQString verstr = atts.value("version");
if(!verstr.isEmpty()) {
int n = verstr.find('.');
if(n != -1) {
@@ -454,7 +454,7 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
if(isIncoming()) {
to = atts.value("to");
- QString peerLang = atts.value(NS_XML, "lang");
+ TQString peerLang = atts.value(NS_XML, "lang");
if(!peerLang.isEmpty())
lang = peerLang;
}
@@ -495,7 +495,7 @@ bool BasicProtocol::handleCloseFinished()
return true;
}
-bool BasicProtocol::doStep(const QDomElement &e)
+bool BasicProtocol::doStep(const TQDomElement &e)
{
// handle pending error
if(delayedError) {
@@ -530,7 +530,7 @@ bool BasicProtocol::doStep(const QDomElement &e)
if(!sendList.isEmpty()) {
SendItem i;
{
- QValueList<SendItem>::Iterator it = sendList.begin();
+ TQValueList<SendItem>::Iterator it = sendList.begin();
i = (*it);
sendList.remove(it);
}
@@ -571,16 +571,16 @@ void BasicProtocol::itemWritten(int id, int)
}
}
-QString BasicProtocol::defaultNamespace()
+TQString BasicProtocol::defaultNamespace()
{
// default none
- return QString();
+ return TQString();
}
-QStringList BasicProtocol::extraNamespaces()
+TQStringList BasicProtocol::extraNamespaces()
{
// default none
- return QStringList();
+ return TQStringList();
}
void BasicProtocol::handleStreamOpen(const Parser::Event &)
@@ -612,7 +612,7 @@ void CoreProtocol::init()
// settings
jid = Jid();
- password = QString();
+ password = TQString();
oldOnly = false;
allowPlain = false;
doTLS = true;
@@ -620,8 +620,8 @@ void CoreProtocol::init()
doBinding = true;
// input
- user = QString();
- host = QString();
+ user = TQString();
+ host = TQString();
// status
old = false;
@@ -649,14 +649,14 @@ void CoreProtocol::startClientOut(const Jid &_jid, bool _oldOnly, bool tlsActive
startConnect();
}
-void CoreProtocol::startServerOut(const QString &_to)
+void CoreProtocol::startServerOut(const TQString &_to)
{
server = true;
to = _to;
startConnect();
}
-void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
+void CoreProtocol::startDialbackOut(const TQString &_to, const TQString &_from)
{
server = true;
dialback = true;
@@ -665,7 +665,7 @@ void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
startConnect();
}
-void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_from, const QString &id, const QString &key)
+void CoreProtocol::startDialbackVerifyOut(const TQString &_to, const TQString &_from, const TQString &id, const TQString &key)
{
server = true;
dialback = true;
@@ -677,20 +677,20 @@ void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_fr
startConnect();
}
-void CoreProtocol::startClientIn(const QString &_id)
+void CoreProtocol::startClientIn(const TQString &_id)
{
id = _id;
startAccept();
}
-void CoreProtocol::startServerIn(const QString &_id)
+void CoreProtocol::startServerIn(const TQString &_id)
{
server = true;
id = _id;
startAccept();
}
-void CoreProtocol::setLang(const QString &s)
+void CoreProtocol::setLang(const TQString &s)
{
lang = s;
}
@@ -710,17 +710,17 @@ void CoreProtocol::setAllowPlain(bool b)
allowPlain = b;
}
-void CoreProtocol::setPassword(const QString &s)
+void CoreProtocol::setPassword(const TQString &s)
{
password = s;
}
-void CoreProtocol::setFrom(const QString &s)
+void CoreProtocol::setFrom(const TQString &s)
{
from = s;
}
-void CoreProtocol::setDialbackKey(const QString &s)
+void CoreProtocol::setDialbackKey(const TQString &s)
{
dialback_key = s;
}
@@ -734,18 +734,18 @@ bool CoreProtocol::loginComplete()
return true;
}
-int CoreProtocol::getOldErrorCode(const QDomElement &e)
+int CoreProtocol::getOldErrorCode(const TQDomElement &e)
{
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(err.isNull() || !err.hasAttribute("code"))
return -1;
return err.attribute("code").toInt();
}
-/*QString CoreProtocol::xmlToString(const QDomElement &e, bool clip)
+/*TQString CoreProtocol::xmlToString(const TQDomElement &e, bool clip)
{
// determine an appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
if(e.prefix() == "stream")
ns = NS_ETHERX;
else if(e.prefix() == "db")
@@ -781,21 +781,21 @@ bool CoreProtocol::stepRequiresElement() const
return false;
}
-void CoreProtocol::stringSend(const QString &s)
+void CoreProtocol::stringSend(const TQString &s)
{
#ifdef XMPP_TEST
TD::outgoingTag(s);
#endif
}
-void CoreProtocol::stringRecv(const QString &s)
+void CoreProtocol::stringRecv(const TQString &s)
{
#ifdef XMPP_TEST
TD::incomingTag(s);
#endif
}
-QString CoreProtocol::defaultNamespace()
+TQString CoreProtocol::defaultNamespace()
{
if(server)
return NS_SERVER;
@@ -803,9 +803,9 @@ QString CoreProtocol::defaultNamespace()
return NS_CLIENT;
}
-QStringList CoreProtocol::extraNamespaces()
+TQStringList CoreProtocol::extraNamespaces()
{
- QStringList list;
+ TQStringList list;
if(dialback) {
list += "db";
list += NS_DIALBACK;
@@ -816,8 +816,8 @@ QStringList CoreProtocol::extraNamespaces()
void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
{
if(isIncoming()) {
- QString ns = pe.nsprefix();
- QString db;
+ TQString ns = pe.nsprefix();
+ TQString db;
if(server) {
db = pe.nsprefix("db");
if(!db.isEmpty())
@@ -846,21 +846,21 @@ void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
}
}
-void CoreProtocol::elementSend(const QDomElement &e)
+void CoreProtocol::elementSend(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::outgoingXml(e);
#endif
}
-void CoreProtocol::elementRecv(const QDomElement &e)
+void CoreProtocol::elementRecv(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::incomingXml(e);
#endif
}
-bool CoreProtocol::doStep2(const QDomElement &e)
+bool CoreProtocol::doStep2(const TQDomElement &e)
{
if(dialback)
return dialbackStep(e);
@@ -868,9 +868,9 @@ bool CoreProtocol::doStep2(const QDomElement &e)
return normalStep(e);
}
-bool CoreProtocol::isValidStanza(const QDomElement &e) const
+bool CoreProtocol::isValidStanza(const TQDomElement &e) const
{
- QString s = e.tagName();
+ TQString s = e.tagName();
if(e.namespaceURI() == (server ? NS_SERVER : NS_CLIENT) && (s == "message" || s == "presence" || s == "iq"))
return true;
else
@@ -879,7 +879,7 @@ bool CoreProtocol::isValidStanza(const QDomElement &e) const
bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item)
{
- for(QValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
+ for(TQValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
const DBItem &i = *it;
if(i.type == type && i.to.compare(to) && i.from.compare(from)) {
const DBItem &i = (*it);
@@ -891,7 +891,7 @@ bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBI
return false;
}
-bool CoreProtocol::dialbackStep(const QDomElement &e)
+bool CoreProtocol::dialbackStep(const TQDomElement &e)
{
if(step == Start) {
setReady(true);
@@ -904,12 +904,12 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
// process a request
DBItem i;
{
- QValueList<DBItem>::Iterator it = dbrequests.begin();
+ TQValueList<DBItem>::Iterator it = dbrequests.begin();
i = (*it);
dbrequests.remove(it);
}
- QDomElement r;
+ TQDomElement r;
if(i.type == DBItem::ResultRequest) {
r = doc.createElementNS(NS_DIALBACK, "db:result");
r.setAttribute("to", i.to.full());
@@ -959,7 +959,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -982,9 +982,9 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
Jid to, from;
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
- QString id = e.attribute("id");
+ TQString id = e.attribute("id");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -1019,7 +1019,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
return false;
}
-bool CoreProtocol::normalStep(const QDomElement &e)
+bool CoreProtocol::normalStep(const TQDomElement &e)
{
if(step == Start) {
if(isIncoming()) {
@@ -1043,7 +1043,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == HandleFeatures) {
// deal with TLS?
if(doTLS && !tls_started && !sasl_authed && features.tls_supported) {
- QDomElement e = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement e = doc.createElementNS(NS_TLS, "starttls");
send(e, true);
event = ESend;
@@ -1084,15 +1084,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("type", "set");
e.setAttribute("id", "bind_1");
- QDomElement b = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement b = doc.createElementNS(NS_BIND, "bind");
// request specific resource?
- QString resource = jid.resource();
+ TQString resource = jid.resource();
if(!resource.isEmpty()) {
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
b.appendChild(r);
}
@@ -1105,11 +1105,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == GetSASLFirst) {
- QDomElement e = doc.createElementNS(NS_SASL, "auth");
+ TQDomElement e = doc.createElementNS(NS_SASL, "auth");
e.setAttribute("mechanism", sasl_mech);
if(!sasl_step.isEmpty()) {
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
e.appendChild(doc.createTextNode(Base64::arrayToString(sasl_step)));
}
@@ -1122,15 +1122,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == GetSASLNext) {
if(isIncoming()) {
if(sasl_authed) {
- QDomElement e = doc.createElementNS(NS_SASL, "success");
+ TQDomElement e = doc.createElementNS(NS_SASL, "success");
writeElement(e, TypeElement, false, true);
event = ESend;
step = IncHandleSASLSuccess;
return true;
}
else {
- QByteArray stepData = sasl_step;
- QDomElement e = doc.createElementNS(NS_SASL, "challenge");
+ TQByteArray stepData = sasl_step;
+ TQDomElement e = doc.createElementNS(NS_SASL, "challenge");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1141,11 +1141,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
else {
- QByteArray stepData = sasl_step;
+ TQByteArray stepData = sasl_step;
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
- QDomElement e = doc.createElementNS(NS_SASL, "response");
+ TQDomElement e = doc.createElementNS(NS_SASL, "response");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1162,12 +1162,12 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return false;
}
else if(step == HandleAuthGet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "get");
e.setAttribute("id", "auth_1");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
e.appendChild(q);
@@ -1178,22 +1178,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == HandleAuthSet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "set");
e.setAttribute("id", "auth_2");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
- QDomElement p;
+ TQDomElement p;
if(digest) {
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
QCA::insertProvider(createProviderHash());
p = doc.createElement("digest");
- QCString cs = id.utf8() + password.utf8();
+ TQCString cs = id.utf8() + password.utf8();
p.appendChild(doc.createTextNode(QCA::SHA1::hashToString(cs)));
}
else {
@@ -1201,7 +1201,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
p.appendChild(doc.createTextNode(password));
}
q.appendChild(p);
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
q.appendChild(r);
e.appendChild(q);
@@ -1213,22 +1213,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
// server
else if(step == SendFeatures) {
- QDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
+ TQDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
if(!tls_started && !sasl_authed) { // don't offer tls if we are already sasl'd
- QDomElement tls = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement tls = doc.createElementNS(NS_TLS, "starttls");
f.appendChild(tls);
}
if(sasl_authed) {
if(!server) {
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
f.appendChild(bind);
}
}
else {
- QDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
- for(QStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
- QDomElement m = doc.createElement("mechanism");
+ TQDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
+ for(TQStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
+ TQDomElement m = doc.createElement("mechanism");
m.appendChild(doc.createTextNode(*it));
mechs.appendChild(m);
}
@@ -1261,25 +1261,25 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_ETHERX && e.tagName() == "features") {
// extract features
StreamFeatures f;
- QDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
+ TQDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
if(!s.isNull()) {
f.tls_supported = true;
f.tls_required = s.elementsByTagNameNS(NS_TLS, "required").count() > 0;
}
- QDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
+ TQDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
if(!m.isNull()) {
f.sasl_supported = true;
- QDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
+ TQDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
for(uint n = 0; n < l.count(); ++n)
f.sasl_mechs += l.item(n).toElement().text();
}
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull())
f.bind_supported = true;
if(f.tls_supported) {
#ifdef XMPP_TEST
- QString s = "STARTTLS is available";
+ TQString s = "STARTTLS is available";
if(f.tls_required)
s += " (required)";
TD::msg(s);
@@ -1287,9 +1287,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
if(f.sasl_supported) {
#ifdef XMPP_TEST
- QString s = "SASL mechs:";
- for(QStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
- s += QString(" [%1]").arg((*it));
+ TQString s = "SASL mechs:";
+ for(TQStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
+ s += TQString(" [%1]").arg((*it));
TD::msg(s);
#endif
}
@@ -1339,9 +1339,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for sasl challenge/success/fail
if(e.namespaceURI() == NS_SASL) {
if(e.tagName() == "challenge") {
- QByteArray a = Base64::stringToArray(e.text());
+ TQByteArray a = Base64::stringToArray(e.text());
#ifdef XMPP_TEST
- TD::msg(QString("SASL IN: [%1]").arg(printArray(a)));
+ TD::msg(TQString("SASL IN: [%1]").arg(printArray(a)));
#endif
sasl_step = a;
need = NSASLNext;
@@ -1355,7 +1355,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(e.tagName() == "failure") {
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_SASL)
errCond = -1;
else
@@ -1374,15 +1374,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
else if(step == GetBindResponse) {
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
if(id == "bind_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
Jid j;
if(!b.isNull()) {
- QDomElement je = e.elementsByTagName("jid").item(0).toElement();
+ TQDomElement je = e.elementsByTagName("jid").item(0).toElement();
j = je.text();
}
if(!j.isValid()) {
@@ -1396,20 +1396,20 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else {
errCond = -1;
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(!err.isNull()) {
// get error condition
- QDomNodeList nl = err.childNodes();
- QDomElement t;
+ TQDomNodeList nl = err.childNodes();
+ TQDomElement t;
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
}
}
if(!t.isNull() && t.namespaceURI() == NS_STANZAS) {
- QString cond = t.tagName();
+ TQString cond = t.tagName();
if(cond == "not-allowed")
errCond = BindNotAllowed;
else if(cond == "conflict")
@@ -1434,13 +1434,13 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
+ TQDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
if(q.isNull() || q.elementsByTagName("username").item(0).isNull() || q.elementsByTagName("resource").item(0).isNull()) {
event = EError;
errorCode = ErrProtocol;
@@ -1487,8 +1487,8 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_2" && (type == "result" || type == "error")) {
@@ -1517,7 +1517,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_TLS && e.localName() == "starttls") {
// TODO: don't let this be done twice
- QDomElement e = doc.createElementNS(NS_TLS, "proceed");
+ TQDomElement e = doc.createElementNS(NS_TLS, "proceed");
writeElement(e, TypeElement, false, true);
event = ESend;
step = HandleTLS;
@@ -1546,16 +1546,16 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull()) {
- QDomElement res = b.elementsByTagName("resource").item(0).toElement();
- QString resource = res.text();
+ TQDomElement res = b.elementsByTagName("resource").item(0).toElement();
+ TQString resource = res.text();
- QDomElement r = doc.createElement("iq");
+ TQDomElement r = doc.createElement("iq");
r.setAttribute("type", "result");
r.setAttribute("id", e.attribute("id"));
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
- QDomElement jid = doc.createElement("jid");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement jid = doc.createElement("jid");
Jid j = user + '@' + host + '/' + resource;
jid.appendChild(doc.createTextNode(j.full()));
bind.appendChild(jid);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
index 6cb82472..0c735192 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
@@ -21,7 +21,7 @@
#ifndef PROTOCOL_H
#define PROTOCOL_H
-#include<qpair.h>
+#include<tqpair.h>
#include"xmlprotocol.h"
#include"xmpp.h"
@@ -56,7 +56,7 @@ namespace XMPP
bool tls_supported, sasl_supported, bind_supported;
bool tls_required;
- QStringList sasl_mechs;
+ TQStringList sasl_mechs;
};
class BasicProtocol : public XmlProtocol
@@ -136,78 +136,78 @@ namespace XMPP
void reset();
// for outgoing xml
- QDomDocument doc;
+ TQDomDocument doc;
// sasl-related
- QString saslMech() const;
- QByteArray saslStep() const;
- void setSASLMechList(const QStringList &list);
- void setSASLFirst(const QString &mech, const QByteArray &step);
- void setSASLNext(const QByteArray &step);
+ TQString saslMech() const;
+ TQByteArray saslStep() const;
+ void setSASLMechList(const TQStringList &list);
+ void setSASLFirst(const TQString &mech, const TQByteArray &step);
+ void setSASLNext(const TQByteArray &step);
void setSASLAuthed();
// send / recv
- void sendStanza(const QDomElement &e);
- void sendDirect(const QString &s);
+ void sendStanza(const TQDomElement &e);
+ void sendDirect(const TQString &s);
void sendWhitespace();
- QDomElement recvStanza();
+ TQDomElement recvStanza();
// shutdown
void shutdown();
- void shutdownWithError(int cond, const QString &otherHost="");
+ void shutdownWithError(int cond, const TQString &otherHost="");
// <stream> information
- QString to, from, id, lang;
+ TQString to, from, id, lang;
Version version;
// error output
int errCond;
- QString errText;
- QDomElement errAppSpec;
- QString otherHost;
+ TQString errText;
+ TQDomElement errAppSpec;
+ TQString otherHost;
- QByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
+ TQByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
bool isReady() const;
enum { TypeElement, TypeStanza, TypeDirect, TypePing };
protected:
- static int stringToSASLCond(const QString &s);
- static int stringToStreamCond(const QString &s);
- static QString saslCondToString(int);
- static QString streamCondToString(int);
+ static int stringToSASLCond(const TQString &s);
+ static int stringToStreamCond(const TQString &s);
+ static TQString saslCondToString(int);
+ static TQString streamCondToString(int);
- void send(const QDomElement &e, bool clip=false);
- void sendStreamError(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
- void sendStreamError(const QString &text); // old-style
+ void send(const TQDomElement &e, bool clip=false);
+ void sendStreamError(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
+ void sendStreamError(const TQString &text); // old-style
- bool errorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ bool errorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
bool error(int code);
- void delayErrorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ void delayErrorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
void delayError(int code);
// reimplemented
- QDomElement docElement();
+ TQDomElement docElement();
void handleDocOpen(const Parser::Event &pe);
bool handleError();
bool handleCloseFinished();
- bool doStep(const QDomElement &e);
+ bool doStep(const TQDomElement &e);
void itemWritten(int id, int size);
- virtual QString defaultNamespace();
- virtual QStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
+ virtual TQString defaultNamespace();
+ virtual TQStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
virtual void handleStreamOpen(const Parser::Event &pe);
- virtual bool doStep2(const QDomElement &e)=0;
+ virtual bool doStep2(const TQDomElement &e)=0;
void setReady(bool b);
- QString sasl_mech;
- QStringList sasl_mechlist;
- QByteArray sasl_step;
+ TQString sasl_mech;
+ TQStringList sasl_mechlist;
+ TQByteArray sasl_step;
bool sasl_authed;
- QDomElement stanzaToRecv;
+ TQDomElement stanzaToRecv;
private:
struct SASLCondEntry
@@ -226,17 +226,17 @@ namespace XMPP
struct SendItem
{
- QDomElement stanzaToSend;
- QString stringToSend;
+ TQDomElement stanzaToSend;
+ TQString stringToSend;
bool doWhitespace;
};
- QValueList<SendItem> sendList;
+ TQValueList<SendItem> sendList;
bool doShutdown, delayedError, closeError, ready;
int stanzasPending, stanzasWritten;
void init();
- void extractStreamError(const QDomElement &e);
+ void extractStreamError(const TQDomElement &e);
};
class CoreProtocol : public BasicProtocol
@@ -254,30 +254,30 @@ namespace XMPP
void reset();
void startClientOut(const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth);
- void startServerOut(const QString &to);
- void startDialbackOut(const QString &to, const QString &from);
- void startDialbackVerifyOut(const QString &to, const QString &from, const QString &id, const QString &key);
- void startClientIn(const QString &id);
- void startServerIn(const QString &id);
+ void startServerOut(const TQString &to);
+ void startDialbackOut(const TQString &to, const TQString &from);
+ void startDialbackVerifyOut(const TQString &to, const TQString &from, const TQString &id, const TQString &key);
+ void startClientIn(const TQString &id);
+ void startServerIn(const TQString &id);
- void setLang(const QString &s);
+ void setLang(const TQString &s);
void setAllowTLS(bool b);
void setAllowBind(bool b);
void setAllowPlain(bool b); // old-mode
- void setPassword(const QString &s);
- void setFrom(const QString &s);
- void setDialbackKey(const QString &s);
+ void setPassword(const TQString &s);
+ void setFrom(const TQString &s);
+ void setDialbackKey(const TQString &s);
// input
- QString user, host;
+ TQString user, host;
// status
bool old;
StreamFeatures features;
- //static QString xmlToString(const QDomElement &e, bool clip=false);
+ //static TQString xmlToString(const TQDomElement &e, bool clip=false);
class DBItem
{
@@ -285,7 +285,7 @@ namespace XMPP
enum { ResultRequest, ResultGrant, VerifyRequest, VerifyGrant, Validated };
int type;
Jid to, from;
- QString key, id;
+ TQString key, id;
bool ok;
};
@@ -312,7 +312,7 @@ namespace XMPP
GetAuthSetResponse // read auth-set response
};
- QValueList<DBItem> dbrequests, dbpending, dbvalidated;
+ TQValueList<DBItem> dbrequests, dbpending, dbvalidated;
bool server, dialback, dialback_verify;
int step;
@@ -324,31 +324,31 @@ namespace XMPP
bool oldOnly;
bool allowPlain;
bool doTLS, doAuth, doBinding;
- QString password;
+ TQString password;
- QString dialback_id, dialback_key;
- QString self_from;
+ TQString dialback_id, dialback_key;
+ TQString self_from;
void init();
- static int getOldErrorCode(const QDomElement &e);
+ static int getOldErrorCode(const TQDomElement &e);
bool loginComplete();
- bool isValidStanza(const QDomElement &e) const;
+ bool isValidStanza(const TQDomElement &e) const;
bool grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item);
- bool normalStep(const QDomElement &e);
- bool dialbackStep(const QDomElement &e);
+ bool normalStep(const TQDomElement &e);
+ bool dialbackStep(const TQDomElement &e);
// reimplemented
bool stepAdvancesParser() const;
bool stepRequiresElement() const;
- void stringSend(const QString &s);
- void stringRecv(const QString &s);
- QString defaultNamespace();
- QStringList extraNamespaces();
+ void stringSend(const TQString &s);
+ void stringRecv(const TQString &s);
+ TQString defaultNamespace();
+ TQStringList extraNamespaces();
void handleStreamOpen(const Parser::Event &pe);
- bool doStep2(const QDomElement &e);
- void elementSend(const QDomElement &e);
- void elementRecv(const QDomElement &e);
+ bool doStep2(const TQDomElement &e);
+ void elementSend(const TQDomElement &e);
+ void elementRecv(const TQDomElement &e);
};
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
index 159c8058..f7d44db4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
@@ -28,9 +28,9 @@
#include"securestream.h"
-#include<qguardedptr.h>
-#include<qvaluelist.h>
-#include<qtimer.h>
+#include<tqguardedptr.h>
+#include<tqvaluelist.h>
+#include<tqtimer.h>
#ifdef USE_TLSHANDLER
#include"xmpp.h"
@@ -56,7 +56,7 @@ public:
int finished(int encoded);
int p;
- QValueList<Item> list;
+ TQValueList<Item> list;
};
LayerTracker::LayerTracker()
@@ -90,7 +90,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain)
int LayerTracker::finished(int encoded)
{
int plain = 0;
- for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) {
+ for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) {
Item &i = *it;
// not enough?
@@ -131,11 +131,11 @@ public:
type = TLS;
p.tls = t;
init();
- connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(p.tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
}
SecureLayer(QCA::SASL *s)
@@ -143,9 +143,9 @@ public:
type = SASL;
p.sasl = s;
init();
- connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
- connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
- connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead()));
+ connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int)));
+ connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
}
#ifdef USE_TLSHANDLER
@@ -154,11 +154,11 @@ public:
type = TLSH;
p.tlsHandler = t;
init();
- connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success()));
- connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail()));
- connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed()));
- connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &)));
- connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int)));
+ connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success()));
+ connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail()));
+ connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed()));
+ connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &)));
+ connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int)));
}
#endif
@@ -168,7 +168,7 @@ public:
prebytes = 0;
}
- void write(const QByteArray &a)
+ void write(const TQByteArray &a)
{
layer.addPlain(a.size());
switch(type) {
@@ -180,7 +180,7 @@ public:
}
}
- void writeIncoming(const QByteArray &a)
+ void writeIncoming(const TQByteArray &a)
{
switch(type) {
case TLS: { p.tls->writeIncoming(a); break; }
@@ -218,9 +218,9 @@ public:
signals:
void tlsHandshaken();
- void tlsClosed(const QByteArray &);
- void readyRead(const QByteArray &);
- void needWrite(const QByteArray &);
+ void tlsClosed(const TQByteArray &);
+ void readyRead(const TQByteArray &);
+ void needWrite(const TQByteArray &);
void error(int);
private slots:
@@ -232,13 +232,13 @@ private slots:
void tls_readyRead()
{
- QByteArray a = p.tls->read();
+ TQByteArray a = p.tls->read();
readyRead(a);
}
void tls_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.tls->readOutgoing();
+ TQByteArray a = p.tls->readOutgoing();
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
@@ -246,7 +246,7 @@ private slots:
void tls_closed()
{
- QByteArray a = p.tls->readUnprocessed();
+ TQByteArray a = p.tls->readUnprocessed();
tlsClosed(a);
}
@@ -257,13 +257,13 @@ private slots:
void sasl_readyRead()
{
- QByteArray a = p.sasl->read();
+ TQByteArray a = p.sasl->read();
readyRead(a);
}
void sasl_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.sasl->readOutgoing();
+ TQByteArray a = p.sasl->readOutgoing();
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
}
@@ -287,15 +287,15 @@ private slots:
void tlsHandler_closed()
{
- tlsClosed(QByteArray());
+ tlsClosed(TQByteArray());
}
- void tlsHandler_readyRead(const QByteArray &a)
+ void tlsHandler_readyRead(const TQByteArray &a)
{
readyRead(a);
}
- void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes)
+ void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes)
{
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
@@ -310,7 +310,7 @@ class SecureStream::Private
{
public:
ByteStream *bs;
- QPtrList<SecureLayer> layers;
+ TQPtrList<SecureLayer> layers;
int pending;
int errorCode;
bool active;
@@ -318,7 +318,7 @@ public:
bool haveTLS() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::TLS
#ifdef USE_TLSHANDLER
@@ -333,7 +333,7 @@ public:
bool haveSASL() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::SASL)
return true;
@@ -348,8 +348,8 @@ SecureStream::SecureStream(ByteStream *s)
d = new Private;
d->bs = s;
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
d->layers.setAutoDelete(true);
d->pending = 0;
@@ -362,25 +362,25 @@ SecureStream::~SecureStream()
delete d;
}
-void SecureStream::linkLayer(QObject *s)
+void SecureStream::linkLayer(TQObject *s)
{
- connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken()));
- connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &)));
- connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &)));
- connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &)));
- connect(s, SIGNAL(error(int)), SLOT(layer_error(int)));
+ connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken()));
+ connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int)));
}
int SecureStream::calcPrebytes() const
{
int x = 0;
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
x += s->prebytes;
return (d->pending - x);
}
-void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -394,7 +394,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -408,7 +408,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
+void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveSASL())
return;
@@ -422,7 +422,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
}
#ifdef USE_TLSHANDLER
-void SecureStream::startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare)
+void SecureStream::startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -459,7 +459,7 @@ bool SecureStream::isOpen() const
return d->active;
}
-void SecureStream::write(const QByteArray &a)
+void SecureStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -481,7 +481,7 @@ int SecureStream::bytesToWrite() const
void SecureStream::bs_readyRead()
{
- QByteArray a = d->bs->read();
+ TQByteArray a = d->bs->read();
// send to the first layer
SecureLayer *s = d->layers.getFirst();
@@ -493,7 +493,7 @@ void SecureStream::bs_readyRead()
void SecureStream::bs_bytesWritten(int bytes)
{
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
bytes = s->finished(bytes);
@@ -509,17 +509,17 @@ void SecureStream::layer_tlsHandshaken()
tlsHandshaken();
}
-void SecureStream::layer_tlsClosed(const QByteArray &)
+void SecureStream::layer_tlsClosed(const TQByteArray &)
{
d->active = false;
d->layers.clear();
tlsClosed();
}
-void SecureStream::layer_readyRead(const QByteArray &a)
+void SecureStream::layer_readyRead(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -532,10 +532,10 @@ void SecureStream::layer_readyRead(const QByteArray &a)
incomingData(a);
}
-void SecureStream::layer_needWrite(const QByteArray &a)
+void SecureStream::layer_needWrite(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -565,7 +565,7 @@ void SecureStream::layer_error(int x)
#endif
}
-void SecureStream::insertData(const QByteArray &a)
+void SecureStream::insertData(const TQByteArray &a)
{
if(!a.isEmpty()) {
SecureLayer *s = d->layers.getLast();
@@ -576,12 +576,12 @@ void SecureStream::insertData(const QByteArray &a)
}
}
-void SecureStream::writeRawData(const QByteArray &a)
+void SecureStream::writeRawData(const TQByteArray &a)
{
d->bs->write(a);
}
-void SecureStream::incomingData(const QByteArray &a)
+void SecureStream::incomingData(const TQByteArray &a)
{
appendRead(a);
if(bytesAvailable())
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
index 8ae9f761..844fd3d1 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
@@ -41,11 +41,11 @@ public:
SecureStream(ByteStream *s);
~SecureStream();
- void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray());
+ void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray());
#ifdef USE_TLSHANDLER
- void startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray());
+ void startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray());
#endif
void closeTLS();
@@ -53,7 +53,7 @@ public:
// reimplemented
bool isOpen() const;
- void write(const QByteArray &);
+ void write(const TQByteArray &);
int bytesToWrite() const;
signals:
@@ -65,17 +65,17 @@ private slots:
void bs_bytesWritten(int);
void layer_tlsHandshaken();
- void layer_tlsClosed(const QByteArray &);
- void layer_readyRead(const QByteArray &);
- void layer_needWrite(const QByteArray &);
+ void layer_tlsClosed(const TQByteArray &);
+ void layer_readyRead(const TQByteArray &);
+ void layer_needWrite(const TQByteArray &);
void layer_error(int);
private:
- void linkLayer(QObject *);
+ void linkLayer(TQObject *);
int calcPrebytes() const;
- void insertData(const QByteArray &a);
- void writeRawData(const QByteArray &a);
- void incomingData(const QByteArray &a);
+ void insertData(const TQByteArray &a);
+ void writeRawData(const TQByteArray &a);
+ void incomingData(const TQByteArray &a);
class Private;
Private *d;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
index 82a7aac4..c825a2ca 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
@@ -20,10 +20,10 @@
#include"simplesasl.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include<qca.h>
#include<stdlib.h>
#include"base64.h"
@@ -33,17 +33,17 @@ namespace XMPP
struct Prop
{
- QCString var, val;
+ TQCString var, val;
};
-class PropList : public QValueList<Prop>
+class PropList : public TQValueList<Prop>
{
public:
- PropList() : QValueList<Prop>()
+ PropList() : TQValueList<Prop>()
{
}
- void set(const QCString &var, const QCString &val)
+ void set(const TQCString &var, const TQCString &val)
{
Prop p;
p.var = var;
@@ -51,18 +51,18 @@ public:
append(p);
}
- QCString get(const QCString &var)
+ TQCString get(const TQCString &var)
{
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
return (*it).val;
}
- return QCString();
+ return TQCString();
}
- QCString toString() const
+ TQCString toString() const
{
- QCString str;
+ TQCString str;
bool first = true;
for(ConstIterator it = begin(); it != end(); ++it) {
if(!first)
@@ -73,7 +73,7 @@ public:
return str;
}
- bool fromString(const QCString &str)
+ bool fromString(const TQCString &str)
{
PropList list;
int at = 0;
@@ -81,7 +81,7 @@ public:
int n = str.find('=', at);
if(n == -1)
break;
- QCString var, val;
+ TQCString var, val;
var = str.mid(at, n-at);
at = n + 1;
if(str[at] == '\"') {
@@ -122,7 +122,7 @@ public:
return true;
}
- int varCount(const QCString &var)
+ int varCount(const TQCString &var)
{
int n = 0;
for(ConstIterator it = begin(); it != end(); ++it) {
@@ -132,9 +132,9 @@ public:
return n;
}
- QStringList getValues(const QCString &var)
+ TQStringList getValues(const TQCString &var)
{
- QStringList list;
+ TQStringList list;
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
list += (*it).val;
@@ -147,19 +147,19 @@ class SimpleSASLContext : public QCA_SASLContext
{
public:
// core props
- QString service, host;
+ TQString service, host;
// state
int step;
- QByteArray in_buf;
- QString out_mech;
- QByteArray out_buf;
+ TQByteArray in_buf;
+ TQString out_mech;
+ TQByteArray out_buf;
bool capable;
int err;
QCA_SASLNeedParams need;
QCA_SASLNeedParams have;
- QString user, authz, pass, realm;
+ TQString user, authz, pass, realm;
SimpleSASLContext()
{
@@ -179,7 +179,7 @@ public:
void resetState()
{
- out_mech = QString();
+ out_mech = TQString();
out_buf.resize(0);
err = -1;
}
@@ -195,19 +195,19 @@ public:
have.authzid = false;
have.pass = false;
have.realm = false;
- user = QString();
- authz = QString();
- pass = QString();
- realm = QString();
+ user = TQString();
+ authz = TQString();
+ pass = TQString();
+ realm = TQString();
}
- void setCoreProps(const QString &_service, const QString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
+ void setCoreProps(const TQString &_service, const TQString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
{
service = _service;
host = _host;
}
- void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const QString &, int)
+ void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const TQString &, int)
{
if(reqForward || reqCreds || reqMutual || ssfMin > 0)
capable = false;
@@ -225,10 +225,10 @@ public:
return err;
}
- bool clientStart(const QStringList &mechlist)
+ bool clientStart(const TQStringList &mechlist)
{
bool haveMech = false;
- for(QStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
+ for(TQStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
if((*it) == "DIGEST-MD5") {
haveMech = true;
break;
@@ -249,12 +249,12 @@ public:
return clientTryAgain();
}
- bool serverStart(const QString &, QStringList *, const QString &)
+ bool serverStart(const TQString &, TQStringList *, const TQString &)
{
return false;
}
- int serverFirstStep(const QString &, const QByteArray *)
+ int serverFirstStep(const TQString &, const TQByteArray *)
{
return Error;
}
@@ -264,7 +264,7 @@ public:
return need;
}
- void setClientParams(const QString *_user, const QString *_authzid, const QString *_pass, const QString *_realm)
+ void setClientParams(const TQString *_user, const TQString *_authzid, const TQString *_pass, const TQString *_realm)
{
if(_user) {
user = *_user;
@@ -288,17 +288,17 @@ public:
}
}
- QString username() const
+ TQString username() const
{
- return QString();
+ return TQString();
}
- QString authzid() const
+ TQString authzid() const
{
- return QString();
+ return TQString();
}
- int nextStep(const QByteArray &in)
+ int nextStep(const TQByteArray &in)
{
in_buf = in.copy();
return tryAgain();
@@ -309,17 +309,17 @@ public:
return clientTryAgain();
}
- QString mech() const
+ TQString mech() const
{
return out_mech;
}
- const QByteArray *clientInit() const
+ const TQByteArray *clientInit() const
{
return 0;
}
- QByteArray result() const
+ TQByteArray result() const
{
return out_buf;
}
@@ -349,7 +349,7 @@ public:
return NeedParams;
// get props
- QCString cs(in_buf.data(), in_buf.size()+1);
+ TQCString cs(in_buf.data(), in_buf.size()+1);
PropList in;
if(!in.fromString(cs)) {
err = QCA::SASL::BadProto;
@@ -357,30 +357,30 @@ public:
}
// make a cnonce
- QByteArray a(32);
+ TQByteArray a(32);
for(int n = 0; n < (int)a.size(); ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
- QCString cnonce = Base64::arrayToString(a).latin1();
+ TQCString cnonce = Base64::arrayToString(a).latin1();
// make other variables
realm = host;
- QCString nonce = in.get("nonce");
- QCString nc = "00000001";
- QCString uri = service.utf8() + '/' + host.utf8();
- QCString qop = "auth";
+ TQCString nonce = in.get("nonce");
+ TQCString nc = "00000001";
+ TQCString uri = service.utf8() + '/' + host.utf8();
+ TQCString qop = "auth";
// build 'response'
- QCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
- QByteArray Y = QCA::MD5::hash(X);
- QCString tmp = QCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
- QByteArray A1(Y.size() + tmp.length());
+ TQCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
+ TQByteArray Y = QCA::MD5::hash(X);
+ TQCString tmp = TQCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
+ TQByteArray A1(Y.size() + tmp.length());
memcpy(A1.data(), Y.data(), Y.size());
memcpy(A1.data() + Y.size(), tmp.data(), tmp.length());
- QCString A2 = "AUTHENTICATE:" + uri;
- QCString HA1 = QCA::MD5::hashToString(A1).latin1();
- QCString HA2 = QCA::MD5::hashToString(A2).latin1();
- QCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
- QCString Z = QCA::MD5::hashToString(KD).latin1();
+ TQCString A2 = "AUTHENTICATE:" + uri;
+ TQCString HA1 = QCA::MD5::hashToString(A1).latin1();
+ TQCString HA2 = QCA::MD5::hashToString(A2).latin1();
+ TQCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
+ TQCString Z = QCA::MD5::hashToString(KD).latin1();
// build output
PropList out;
@@ -396,7 +396,7 @@ public:
out.set("response", Z);
out.set("charset", "utf-8");
out.set("authzid", authz.utf8());
- QCString s = out.toString();
+ TQCString s = out.toString();
// done
out_buf.resize(s.length());
@@ -410,13 +410,13 @@ public:
}
}
- bool encode(const QByteArray &a, QByteArray *b)
+ bool encode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
}
- bool decode(const QByteArray &a, QByteArray *b)
+ bool decode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
index 5482e2b3..d3182ffe 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
@@ -44,9 +44,9 @@
#include"xmpp.h"
-#include<qtextstream.h>
-#include<qguardedptr.h>
-#include<qtimer.h>
+#include<tqtextstream.h>
+#include<tqguardedptr.h>
+#include<tqtimer.h>
#include<qca.h>
#include<stdlib.h>
#include"bytestream.h"
@@ -70,15 +70,15 @@ void XMPP::setDebug(Debug *p)
debug_ptr = p;
}
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
}
-static QString genId()
+static TQString genId()
{
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -90,7 +90,7 @@ static QString genId()
//----------------------------------------------------------------------------
// Stanza
//----------------------------------------------------------------------------
-Stanza::Error::Error(int _type, int _condition, const QString &_text, const QDomElement &_appSpec)
+Stanza::Error::Error(int _type, int _condition, const TQString &_text, const TQDomElement &_appSpec)
{
type = _type;
condition = _condition;
@@ -115,7 +115,7 @@ public:
};
static ErrorCondEntry errorCondTable[];
- static int stringToKind(const QString &s)
+ static int stringToKind(const TQString &s)
{
if(s == "message")
return Message;
@@ -127,7 +127,7 @@ public:
return -1;
}
- static QString kindToString(Kind k)
+ static TQString kindToString(Kind k)
{
if(k == Message)
return "message";
@@ -137,7 +137,7 @@ public:
return "iq";
}
- static int stringToErrorType(const QString &s)
+ static int stringToErrorType(const TQString &s)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(s == errorTypeTable[n].str)
@@ -146,16 +146,16 @@ public:
return -1;
}
- static QString errorTypeToString(int x)
+ static TQString errorTypeToString(int x)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(x == errorTypeTable[n].type)
return errorTypeTable[n].str;
}
- return QString();
+ return TQString();
}
- static int stringToErrorCond(const QString &s)
+ static int stringToErrorCond(const TQString &s)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(s == errorCondTable[n].str)
@@ -164,17 +164,17 @@ public:
return -1;
}
- static QString errorCondToString(int x)
+ static TQString errorCondToString(int x)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(x == errorCondTable[n].cond)
return errorCondTable[n].str;
}
- return QString();
+ return TQString();
}
Stream *s;
- QDomElement e;
+ TQDomElement e;
};
Stanza::Private::ErrorTypeEntry Stanza::Private::errorTypeTable[] =
@@ -215,7 +215,7 @@ Stanza::Stanza()
d = 0;
}
-Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza::Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id)
{
d = new Private;
@@ -235,7 +235,7 @@ Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QStr
setId(id);
}
-Stanza::Stanza(Stream *s, const QDomElement &e)
+Stanza::Stanza(Stream *s, const TQDomElement &e)
{
d = 0;
if(e.namespaceURI() != s->baseNS())
@@ -273,59 +273,59 @@ bool Stanza::isNull() const
return (d ? false: true);
}
-QDomElement Stanza::element() const
+TQDomElement Stanza::element() const
{
return d->e;
}
-QString Stanza::toString() const
+TQString Stanza::toString() const
{
return Stream::xmlToString(d->e);
}
-QDomDocument & Stanza::doc() const
+TQDomDocument & Stanza::doc() const
{
return d->s->doc();
}
-QString Stanza::baseNS() const
+TQString Stanza::baseNS() const
{
return d->s->baseNS();
}
-QString Stanza::xhtmlImNS() const
+TQString Stanza::xhtmlImNS() const
{
return d->s->xhtmlImNS();
}
-QString Stanza::xhtmlNS() const
+TQString Stanza::xhtmlNS() const
{
return d->s->xhtmlNS();
}
-QDomElement Stanza::createElement(const QString &ns, const QString &tagName)
+TQDomElement Stanza::createElement(const TQString &ns, const TQString &tagName)
{
return d->s->doc().createElementNS(ns, tagName);
}
-QDomElement Stanza::createTextElement(const QString &ns, const QString &tagName, const QString &text)
+TQDomElement Stanza::createTextElement(const TQString &ns, const TQString &tagName, const TQString &text)
{
- QDomElement e = d->s->doc().createElementNS(ns, tagName);
+ TQDomElement e = d->s->doc().createElementNS(ns, tagName);
e.appendChild(d->s->doc().createTextNode(text));
return e;
}
-QDomElement Stanza::createXHTMLElement(const QString &xHTML)
+TQDomElement Stanza::createXHTMLElement(const TQString &xHTML)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xHTML, true);
- QDomElement root = doc.documentElement();
- //QDomElement e;
+ TQDomElement root = doc.documentElement();
+ //TQDomElement e;
return (root);
}
-void Stanza::appendChild(const QDomElement &e)
+void Stanza::appendChild(const TQDomElement &e)
{
d->e.appendChild(e);
}
@@ -350,19 +350,19 @@ Jid Stanza::from() const
return Jid(d->e.attribute("from"));
}
-QString Stanza::id() const
+TQString Stanza::id() const
{
return d->e.attribute("id");
}
-QString Stanza::type() const
+TQString Stanza::type() const
{
return d->e.attribute("type");
}
-QString Stanza::lang() const
+TQString Stanza::lang() const
{
- return d->e.attributeNS(NS_XML, "lang", QString());
+ return d->e.attributeNS(NS_XML, "lang", TQString());
}
void Stanza::setTo(const Jid &j)
@@ -375,17 +375,17 @@ void Stanza::setFrom(const Jid &j)
d->e.setAttribute("from", j.full());
}
-void Stanza::setId(const QString &id)
+void Stanza::setId(const TQString &id)
{
d->e.setAttribute("id", id);
}
-void Stanza::setType(const QString &type)
+void Stanza::setType(const TQString &type)
{
d->e.setAttribute("type", type);
}
-void Stanza::setLang(const QString &lang)
+void Stanza::setLang(const TQString &lang)
{
d->e.setAttribute("xml:lang", lang);
}
@@ -393,7 +393,7 @@ void Stanza::setLang(const QString &lang)
Stanza::Error Stanza::error() const
{
Error err;
- QDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(e.isNull())
return err;
@@ -403,11 +403,11 @@ Stanza::Error Stanza::error() const
err.type = x;
// condition: find first element
- QDomNodeList nl = e.childNodes();
- QDomElement t;
+ TQDomNodeList nl = e.childNodes();
+ TQDomElement t;
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
@@ -429,7 +429,7 @@ Stanza::Error Stanza::error() const
// appspec: find first non-standard namespaced element
nl = e.childNodes();
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STANZAS) {
err.appSpec = i.toElement();
break;
@@ -441,7 +441,7 @@ Stanza::Error Stanza::error() const
void Stanza::setError(const Error &err)
{
// create the element if necessary
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(errElem.isNull()) {
errElem = d->e.ownerDocument().createElementNS(d->s->baseNS(), "error");
d->e.appendChild(errElem);
@@ -449,13 +449,13 @@ void Stanza::setError(const Error &err)
// error type/condition
if(d->s->old()) {
- errElem.setAttribute("code", QString::number(err.condition));
+ errElem.setAttribute("code", TQString::number(err.condition));
}
else {
- QString stype = Private::errorTypeToString(err.type);
+ TQString stype = Private::errorTypeToString(err.type);
if(stype.isEmpty())
return;
- QString scond = Private::errorCondToString(err.condition);
+ TQString scond = Private::errorCondToString(err.condition);
if(scond.isEmpty())
return;
@@ -468,7 +468,7 @@ void Stanza::setError(const Error &err)
errElem.appendChild(d->e.ownerDocument().createTextNode(err.text));
}
else {
- QDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
+ TQDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
te.appendChild(d->e.ownerDocument().createTextNode(err.text));
errElem.appendChild(te);
}
@@ -479,7 +479,7 @@ void Stanza::setError(const Error &err)
void Stanza::clearError()
{
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(!errElem.isNull())
d->e.removeChild(errElem);
}
@@ -488,8 +488,8 @@ void Stanza::clearError()
// Stream
//----------------------------------------------------------------------------
static XmlProtocol *foo = 0;
-Stream::Stream(QObject *parent)
-:QObject(parent)
+Stream::Stream(TQObject *parent)
+:TQObject(parent)
{
}
@@ -497,17 +497,17 @@ Stream::~Stream()
{
}
-Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const TQString &type, const TQString &id)
{
return Stanza(this, k, to, type, id);
}
-Stanza Stream::createStanza(const QDomElement &e)
+Stanza Stream::createStanza(const TQDomElement &e)
{
return Stanza(this, e);
}
-QString Stream::xmlToString(const QDomElement &e, bool clip)
+TQString Stream::xmlToString(const TQDomElement &e, bool clip)
{
if(!foo)
foo = new CoreProtocol;
@@ -569,14 +569,14 @@ public:
}
Jid jid;
- QString server;
+ TQString server;
bool oldOnly;
bool allowPlain, mutualAuth;
bool haveLocalAddr;
- QHostAddress localAddr;
+ TQHostAddress localAddr;
Q_UINT16 localPort;
int minimumSSF, maximumSSF;
- QString sasl_mech;
+ TQString sasl_mech;
bool doBinding;
bool in_rrsig;
@@ -590,7 +590,7 @@ public:
CoreProtocol client;
CoreProtocol srv;
- QString defRealm;
+ TQString defRealm;
int mode;
int state;
@@ -600,51 +600,51 @@ public:
bool tls_warned, using_tls;
bool doAuth;
- QStringList sasl_mechlist;
+ TQStringList sasl_mechlist;
int errCond;
- QString errText;
- QDomElement errAppSpec;
+ TQString errText;
+ TQDomElement errAppSpec;
- QPtrList<Stanza> in;
+ TQPtrList<Stanza> in;
- QTimer noopTimer;
+ TQTimer noopTimer;
int noop_time;
};
-ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent)
+ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Client;
d->conn = conn;
- connect(d->conn, SIGNAL(connected()), SLOT(cr_connected()));
- connect(d->conn, SIGNAL(error()), SLOT(cr_error()));
+ connect(d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()));
+ connect(d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()));
d->noop_time = 0;
- connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop()));
+ connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop()));
d->tlsHandler = tlsHandler;
}
-ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls, QObject *parent)
+ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Server;
d->bs = bs;
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
- 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(error(int)), TQT_SLOT(bs_error(int)));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
d->server = host;
d->defRealm = defRealm;
@@ -655,7 +655,7 @@ ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStr
//d->srv.startServerIn(genId());
//d->state = Connecting;
//d->jid = Jid();
- //d->server = QString();
+ //d->server = TQString();
}
ClientStream::~ClientStream()
@@ -761,13 +761,13 @@ bool ClientStream::isAuthenticated() const
return (d->state == Active) ? true: false;
}
-void ClientStream::setUsername(const QString &s)
+void ClientStream::setUsername(const TQString &s)
{
if(d->sasl)
d->sasl->setUsername(s);
}
-void ClientStream::setPassword(const QString &s)
+void ClientStream::setPassword(const TQString &s)
{
if(d->client.old) {
d->client.setPassword(s);
@@ -778,7 +778,7 @@ void ClientStream::setPassword(const QString &s)
}
}
-void ClientStream::setRealm(const QString &s)
+void ClientStream::setRealm(const TQString &s)
{
if(d->sasl)
d->sasl->setRealm(s);
@@ -817,7 +817,7 @@ void ClientStream::setNoopTime(int mills)
d->noopTimer.start(d->noop_time);
}
-QString ClientStream::saslMechanism() const
+TQString ClientStream::saslMechanism() const
{
return d->client.saslMech();
}
@@ -827,12 +827,12 @@ int ClientStream::saslSSF() const
return d->sasl_ssf;
}
-void ClientStream::setSASLMechanism(const QString &s)
+void ClientStream::setSASLMechanism(const TQString &s)
{
d->sasl_mech = s;
}
-void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->haveLocalAddr = true;
d->localAddr = addr;
@@ -844,12 +844,12 @@ int ClientStream::errorCondition() const
return d->errCond;
}
-QString ClientStream::errorText() const
+TQString ClientStream::errorText() const
{
return d->errText;
}
-QDomElement ClientStream::errorAppSpec() const
+TQDomElement ClientStream::errorAppSpec() const
{
return d->errAppSpec;
}
@@ -871,22 +871,22 @@ void ClientStream::close()
}
}
-QDomDocument & ClientStream::doc() const
+TQDomDocument & ClientStream::doc() const
{
return d->client.doc;
}
-QString ClientStream::baseNS() const
+TQString ClientStream::baseNS() const
{
return NS_CLIENT;
}
-QString ClientStream::xhtmlImNS() const
+TQString ClientStream::xhtmlImNS() const
{
return NS_XHTML_IM;
}
-QString ClientStream::xhtmlNS() const
+TQString ClientStream::xhtmlNS() const
{
return NS_XHTML;
}
@@ -940,17 +940,17 @@ void ClientStream::write(const Stanza &s)
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, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
//d->client.startDialbackOut("andbit.net", "im.pyxa.org");
//d->client.startServerOut(d->server);
@@ -968,7 +968,7 @@ void ClientStream::cr_connected()
d->client.doTLS = d->tlsHandler ? true: false;
d->client.doBinding = d->doBinding;*/
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -1008,10 +1008,10 @@ void ClientStream::bs_error(int)
void ClientStream::ss_readyRead()
{
- QByteArray a = d->ss->read();
+ TQByteArray a = d->ss->read();
#ifdef XMPP_DEBUG
- QCString cs(a.data(), a.size()+1);
+ TQCString cs(a.data(), a.size()+1);
fprintf(stderr, "ClientStream: recv: %d [%s]\n", a.size(), cs.data());
#endif
@@ -1044,7 +1044,7 @@ void ClientStream::ss_bytesWritten(int bytes)
void ClientStream::ss_tlsHandshaken()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerTLS);
if(!self)
return;
@@ -1070,17 +1070,17 @@ void ClientStream::ss_error(int x)
}
}
-void ClientStream::sasl_clientFirstStep(const QString &mech, const QByteArray *stepData)
+void ClientStream::sasl_clientFirstStep(const TQString &mech, const TQByteArray *stepData)
{
- d->client.setSASLFirst(mech, stepData ? *stepData : QByteArray());
+ d->client.setSASLFirst(mech, stepData ? *stepData : TQByteArray());
//d->client.sasl_mech = mech;
//d->client.sasl_firstStep = stepData ? true : false;
- //d->client.sasl_step = stepData ? *stepData : QByteArray();
+ //d->client.sasl_step = stepData ? *stepData : TQByteArray();
processNext();
}
-void ClientStream::sasl_nextStep(const QByteArray &stepData)
+void ClientStream::sasl_nextStep(const TQByteArray &stepData)
{
if(d->mode == Client)
d->client.setSASLNext(stepData);
@@ -1109,12 +1109,12 @@ void ClientStream::sasl_needParams(bool user, bool authzid, bool pass, bool real
d->sasl->continueAfterParams();
}
-void ClientStream::sasl_authCheck(const QString &user, const QString &)
+void ClientStream::sasl_authCheck(const TQString &user, const TQString &)
{
//#ifdef XMPP_DEBUG
// printf("authcheck: [%s], [%s]\n", user.latin1(), authzid.latin1());
//#endif
- QString u = user;
+ TQString u = user;
int n = u.find('@');
if(n != -1)
u.truncate(n);
@@ -1163,10 +1163,10 @@ void ClientStream::srvProcessNext()
else if(need == CoreProtocol::NSASLMechs) {
if(!d->sasl) {
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(authCheck(const QString &, const QString &)), SLOT(sasl_authCheck(const QString &, const QString &)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(authCheck(const TQString &, const TQString &)), TQT_SLOT(sasl_authCheck(const TQString &, const TQString &)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
//d->sasl->setAllowAnonymous(false);
//d->sasl->setRequirePassCredentials(true);
@@ -1175,7 +1175,7 @@ void ClientStream::srvProcessNext()
d->sasl->setMinimumSSF(0);
d->sasl->setMaximumSSF(256);
- QStringList list;
+ TQStringList list;
// TODO: d->server is probably wrong here
if(!d->sasl->startServer("xmpp", d->server, d->defRealm, &list)) {
printf("Error initializing SASL\n");
@@ -1193,18 +1193,18 @@ void ClientStream::srvProcessNext()
// TODO
return;
}
- QByteArray a = d->srv.spare;
+ TQByteArray a = d->srv.spare;
d->ss->startTLSServer(d->tls, a);
}
else if(need == CoreProtocol::NSASLFirst) {
printf("Need SASL First Step\n");
- QByteArray a = d->srv.saslStep();
+ TQByteArray a = d->srv.saslStep();
d->sasl->putServerFirstStep(d->srv.saslMech(), a);
}
else if(need == CoreProtocol::NSASLNext) {
printf("Need SASL Next Step\n");
- QByteArray a = d->srv.saslStep();
- QCString cs(a.data(), a.size()+1);
+ TQByteArray a = d->srv.saslStep();
+ TQCString cs(a.data(), a.size()+1);
printf("[%s]\n", cs.data());
d->sasl->putStep(a);
}
@@ -1230,8 +1230,8 @@ void ClientStream::srvProcessNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->srv.takeOutgoingData();
- QCString cs(a.size()+1);
+ TQByteArray a = d->srv.takeOutgoingData();
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
d->ss->write(a);
@@ -1241,7 +1241,7 @@ void ClientStream::srvProcessNext()
printf("Break (RecvOpen)\n");
// calculate key
- QCString str = QCA::SHA1::hashToString("secret").utf8();
+ TQCString str = QCA::SHA1::hashToString("secret").utf8();
str = QCA::SHA1::hashToString(str + "im.pyxa.org").utf8();
str = QCA::SHA1::hashToString(str + d->srv.id.utf8()).utf8();
d->srv.setDialbackKey(str);
@@ -1258,8 +1258,8 @@ void ClientStream::srvProcessNext()
}
case CoreProtocol::ESASLSuccess: {
printf("Break SASL Success\n");
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
- QByteArray a = d->srv.spare;
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
+ TQByteArray a = d->srv.spare;
d->ss->setLayerSASL(d->sasl, a);
break;
}
@@ -1276,7 +1276,7 @@ void ClientStream::srvProcessNext()
void ClientStream::doReadyRead()
{
- //QGuardedPtr<QObject> self = this;
+ //TQGuardedPtr<TQObject> self = this;
readyRead();
//if(!self)
// return;
@@ -1290,7 +1290,7 @@ void ClientStream::processNext()
return;
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
while(1) {
#ifdef XMPP_DEBUG
@@ -1298,11 +1298,11 @@ void ClientStream::processNext()
#endif
bool ok = d->client.processStep();
// deal with send/received items
- for(QValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
+ for(TQValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
const XmlProtocol::TransferItem &i = *it;
if(i.isExternal)
continue;
- QString str;
+ TQString str;
if(i.isString) {
// skip whitespace pings
if(i.str.stripWhiteSpace().isEmpty())
@@ -1324,7 +1324,7 @@ void ClientStream::processNext()
//if(!d->in_rrsig && !d->in.isEmpty()) {
if(!d->in.isEmpty()) {
//d->in_rrsig = true;
- QTimer::singleShot(0, this, SLOT(doReadyRead()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead()));
}
if(cont)
@@ -1343,9 +1343,9 @@ void ClientStream::processNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->client.takeOutgoingData();
+ TQByteArray a = d->client.takeOutgoingData();
#ifdef XMPP_DEBUG
- QCString cs(a.size()+1);
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
#endif
@@ -1358,9 +1358,9 @@ void ClientStream::processNext()
#endif
#ifdef XMPP_TEST
- QString s = QString("handshake success (lang=[%1]").arg(d->client.lang);
+ TQString s = TQString("handshake success (lang=[%1]").arg(d->client.lang);
if(!d->client.from.isEmpty())
- s += QString(", from=[%1]").arg(d->client.from);
+ s += TQString(", from=[%1]").arg(d->client.from);
s += ')';
TD::msg(s);
#endif
@@ -1480,11 +1480,11 @@ bool ClientStream::handleNeed()
}
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(clientFirstStep(const QString &, const QByteArray *)), SLOT(sasl_clientFirstStep(const QString &, const QByteArray *)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(needParams(bool, bool, bool, bool)), SLOT(sasl_needParams(bool, bool, bool, bool)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), TQT_SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(needParams(bool, bool, bool, bool)), TQT_SLOT(sasl_needParams(bool, bool, bool, bool)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
if(d->haveLocalAddr)
d->sasl->setLocalAddr(d->localAddr, d->localPort);
@@ -1506,7 +1506,7 @@ bool ClientStream::handleNeed()
d->sasl->setMinimumSSF(d->minimumSSF);
d->sasl->setMaximumSSF(d->maximumSSF);
- QStringList ml;
+ TQStringList ml;
if(!d->sasl_mech.isEmpty())
ml += d->sasl_mech;
else
@@ -1525,16 +1525,16 @@ bool ClientStream::handleNeed()
#ifdef XMPP_DEBUG
printf("Need SASL Next Step\n");
#endif
- QByteArray a = d->client.saslStep();
+ TQByteArray a = d->client.saslStep();
d->sasl->putStep(a);
return false;
}
case CoreProtocol::NSASLLayer: {
// SecureStream will handle the errors from this point
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
d->ss->setLayerSASL(d->sasl, d->client.spare);
if(d->sasl_ssf > 0) {
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerSASL);
if(!self)
return false;
@@ -1580,7 +1580,7 @@ void ClientStream::doNoop()
}
}
-void ClientStream::writeDirect(const QString &s)
+void ClientStream::writeDirect(const TQString &s)
{
if(d->state == Active) {
#ifdef XMPP_DEBUG
@@ -1604,8 +1604,8 @@ void ClientStream::handleError()
}
else if(c == CoreProtocol::ErrStream) {
int x = d->client.errCond;
- QString text = d->client.errText;
- QDomElement appSpec = d->client.errAppSpec;
+ TQString text = d->client.errText;
+ TQDomElement appSpec = d->client.errAppSpec;
int connErr = -1;
int strErr = -1;
@@ -1730,31 +1730,31 @@ TD::~TD()
{
}
-void TD::msg(const QString &s)
+void TD::msg(const TQString &s)
{
if(debug_ptr)
debug_ptr->msg(s);
}
-void TD::outgoingTag(const QString &s)
+void TD::outgoingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->outgoingTag(s);
}
-void TD::incomingTag(const QString &s)
+void TD::incomingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->incomingTag(s);
}
-void TD::outgoingXml(const QDomElement &e)
+void TD::outgoingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->outgoingXml(e);
}
-void TD::incomingXml(const QDomElement &e)
+void TD::incomingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->incomingXml(e);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
index b636e190..f4d560f4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
@@ -1,7 +1,7 @@
#ifndef TESTDEBUG_H
#define TESTDEBUG_H
-#include<qdom.h>
+#include<tqdom.h>
class TD
{
@@ -9,11 +9,11 @@ public:
TD();
~TD();
- static void msg(const QString &);
- static void outgoingTag(const QString &);
- static void incomingTag(const QString &);
- static void outgoingXml(const QDomElement &);
- static void incomingXml(const QDomElement &);
+ static void msg(const TQString &);
+ static void outgoingTag(const TQString &);
+ static void incomingTag(const TQString &);
+ static void outgoingXml(const TQDomElement &);
+ static void incomingXml(const TQDomElement &);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
index 24d77598..313c6b6a 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"qca.h"
using namespace XMPP;
@@ -28,8 +28,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// TLSHandler
//----------------------------------------------------------------------------
-TLSHandler::TLSHandler(QObject *parent)
-:QObject(parent)
+TLSHandler::TLSHandler(TQObject *parent)
+:TQObject(parent)
{
}
@@ -53,11 +53,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent)
{
d = new Private;
d->tls = parent;
- connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(d->tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
d->state = 0;
d->err = -1;
}
@@ -83,20 +83,20 @@ void QCATLSHandler::reset()
d->state = 0;
}
-void QCATLSHandler::startClient(const QString &host)
+void QCATLSHandler::startClient(const TQString &host)
{
d->state = 0;
d->err = -1;
if(!d->tls->startClient(host))
- QTimer::singleShot(0, this, SIGNAL(fail()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(fail()));
}
-void QCATLSHandler::write(const QByteArray &a)
+void QCATLSHandler::write(const TQByteArray &a)
{
d->tls->write(a);
}
-void QCATLSHandler::writeIncoming(const QByteArray &a)
+void QCATLSHandler::writeIncoming(const TQByteArray &a)
{
d->tls->writeIncoming(a);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
index 0ae15585..de321e7c 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
@@ -30,10 +30,10 @@ using namespace XMPP;
// display purposes only (the element is pretty much useless for processing
// after this). We do this because QXml is a bit overzealous about outputting
// redundant namespaces.
-static QDomElement stripExtraNS(const QDomElement &e)
+static TQDomElement stripExtraNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
@@ -41,13 +41,13 @@ static QDomElement stripExtraNS(const QDomElement &e)
noShowNS = true;
// build qName (prefix:localName)
- QString qName;
+ TQString qName;
if(!e.prefix().isEmpty())
qName = e.prefix() + ':' + e.localName();
else
qName = e.tagName();
- QDomElement i;
+ TQDomElement i;
uint x;
if(noShowNS)
i = e.ownerDocument().createElement(qName);
@@ -55,21 +55,21 @@ static QDomElement stripExtraNS(const QDomElement &e)
i = e.ownerDocument().createElementNS(e.namespaceURI(), qName);
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).cloneNode().toAttr();
+ TQDomAttr a = al.item(x).cloneNode().toAttr();
// don't show xml namespace
if(a.namespaceURI() == NS_XML)
- i.setAttribute(QString("xml:") + a.name(), a.value());
+ i.setAttribute(TQString("xml:") + a.name(), a.value());
else
i.setAttributeNodeNS(a);
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(stripExtraNS(n.toElement()));
else
@@ -80,20 +80,20 @@ static QDomElement stripExtraNS(const QDomElement &e)
// xmlToString
//
-// This function converts a QDomElement into a QString, using stripExtraNS
+// This function converts a TQDomElement into a TQString, using stripExtraNS
// to make it pretty.
-static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QString &fakeQName, bool clip)
+static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeQName, bool clip)
{
- QDomElement i = e.cloneNode().toElement();
+ TQDomElement i = e.cloneNode().toElement();
// It seems QDom can only have one namespace attribute at a time (see docElement 'HACK').
// Fortunately we only need one kind depending on the input, so it is specified here.
- QDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
+ TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
fake.appendChild(i);
fake = stripExtraNS(fake);
- QString out;
+ TQString out;
{
- QTextStream ts(&out, IO_WriteOnly);
+ TQTextStream ts(&out, IO_WriteOnly);
fake.firstChild().save(ts, 0);
}
// 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline
@@ -112,18 +112,18 @@ static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QS
// text needed to open/close an XML stream, without resorting to generating
// the XML ourselves. This function uses QDom to do the generation, which
// ensures proper encoding and entity output.
-static void createRootXmlTags(const QDomElement &root, QString *xmlHeader, QString *tagOpen, QString *tagClose)
+static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQString *tagOpen, TQString *tagClose)
{
- QDomElement e = root.cloneNode(false).toElement();
+ TQDomElement e = root.cloneNode(false).toElement();
// insert a dummy element to ensure open and closing tags are generated
- QDomElement dummy = e.ownerDocument().createElement("dummy");
+ TQDomElement dummy = e.ownerDocument().createElement("dummy");
e.appendChild(dummy);
// convert to xml->text
- QString str;
+ TQString str;
{
- QTextStream ts(&str, IO_WriteOnly);
+ TQTextStream ts(&str, IO_WriteOnly);
e.save(ts, 0);
}
@@ -148,7 +148,7 @@ XmlProtocol::TransferItem::TransferItem()
{
}
-XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQString &_str, bool sent, bool external)
{
isString = true;
isSent = sent;
@@ -156,7 +156,7 @@ XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool ext
str = _str;
}
-XmlProtocol::TransferItem::TransferItem(const QDomElement &_elem, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQDomElement &_elem, bool sent, bool external)
{
isString = false;
isSent = sent;
@@ -184,30 +184,30 @@ void XmlProtocol::reset()
{
init();
- elem = QDomElement();
- tagOpen = QString();
- tagClose = QString();
+ elem = TQDomElement();
+ tagOpen = TQString();
+ tagClose = TQString();
xml.reset();
outData.resize(0);
trackQueue.clear();
transferItemList.clear();
}
-void XmlProtocol::addIncomingData(const QByteArray &a)
+void XmlProtocol::addIncomingData(const TQByteArray &a)
{
xml.appendData(a);
}
-QByteArray XmlProtocol::takeOutgoingData()
+TQByteArray XmlProtocol::takeOutgoingData()
{
- QByteArray a = outData.copy();
+ TQByteArray a = outData.copy();
outData.resize(0);
return a;
}
void XmlProtocol::outgoingDataWritten(int bytes)
{
- for(QValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
+ for(TQValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
TrackItem &i = *it;
// enough bytes?
@@ -302,21 +302,21 @@ bool XmlProtocol::processStep()
return baseStep(pe);
}
-QString XmlProtocol::xmlEncoding() const
+TQString XmlProtocol::xmlEncoding() const
{
return xml.encoding();
}
-QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
+TQString XmlProtocol::elementToString(const TQDomElement &e, bool clip)
{
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
// Determine the appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
// first, check root namespace
- QString pre = e.prefix();
+ TQString pre = e.prefix();
if(pre.isNull())
pre = "";
if(pre == elem.prefix()) {
@@ -324,11 +324,11 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
else {
// scan the root attributes for 'xmlns' (oh joyous hacks)
- QDomNamedNodeMap al = elem.attributes();
+ TQDomNamedNodeMap al = elem.attributes();
uint n;
for(n = 0; n < al.count(); ++n) {
- QDomAttr a = al.item(n).toAttr();
- QString s = a.name();
+ TQDomAttr a = al.item(n).toAttr();
+ TQString s = a.name();
int x = s.find(':');
if(x != -1)
s = s.mid(x+1);
@@ -346,7 +346,7 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
// build qName
- QString qn;
+ TQString qn;
if(!elem.prefix().isEmpty())
qn = elem.prefix() + ':';
qn += elem.localName();
@@ -366,22 +366,22 @@ void XmlProtocol::itemWritten(int, int)
// default does nothing
}
-void XmlProtocol::stringSend(const QString &)
+void XmlProtocol::stringSend(const TQString &)
{
// default does nothing
}
-void XmlProtocol::stringRecv(const QString &)
+void XmlProtocol::stringRecv(const TQString &)
{
// default does nothing
}
-void XmlProtocol::elementSend(const QDomElement &)
+void XmlProtocol::elementSend(const TQDomElement &)
{
// default does nothing
}
-void XmlProtocol::elementRecv(const QDomElement &)
+void XmlProtocol::elementRecv(const TQDomElement &)
{
// default does nothing
}
@@ -406,24 +406,24 @@ bool XmlProtocol::close()
return true;
}
-int XmlProtocol::writeString(const QString &s, int id, bool external)
+int XmlProtocol::writeString(const TQString &s, int id, bool external)
{
transferItemList += TransferItem(s, true, external);
return internalWriteString(s, TrackItem::Custom, id);
}
-int XmlProtocol::writeElement(const QDomElement &e, int id, bool external, bool clip)
+int XmlProtocol::writeElement(const TQDomElement &e, int id, bool external, bool clip)
{
if(e.isNull())
return 0;
transferItemList += TransferItem(e, true, external);
//elementSend(e);
- QString out = elementToString(e, clip);
+ TQString out = elementToString(e, clip);
return internalWriteString(out, TrackItem::Custom, id);
}
-QByteArray XmlProtocol::resetStream()
+TQByteArray XmlProtocol::resetStream()
{
// reset the state
if(incoming)
@@ -432,12 +432,12 @@ QByteArray XmlProtocol::resetStream()
state = SendOpen;
// grab unprocessed data before resetting
- QByteArray spare = xml.unprocessed();
+ TQByteArray spare = xml.unprocessed();
xml.reset();
return spare;
}
-int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteData(const TQByteArray &a, TrackItem::Type t, int id)
{
TrackItem i;
i.type = t;
@@ -449,10 +449,10 @@ int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int i
return a.size();
}
-int XmlProtocol::internalWriteString(const QString &s, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteString(const TQString &s, TrackItem::Type t, int id)
{
- QCString cs = s.utf8();
- QByteArray a(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return internalWriteData(a, t, id);
}
@@ -462,10 +462,10 @@ void XmlProtocol::sendTagOpen()
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
- QString xmlHeader;
+ TQString xmlHeader;
createRootXmlTags(elem, &xmlHeader, &tagOpen, &tagClose);
- QString s;
+ TQString s;
s += xmlHeader + '\n';
s += tagOpen + '\n';
@@ -509,7 +509,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
return true;
}
else if(state == Open) {
- QDomElement e;
+ TQDomElement e;
if(pe.type() == Parser::Event::Element)
e = pe.element();
return doStep(e);
@@ -533,7 +533,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
void XmlProtocol::setIncomingAsExternal()
{
- for(QValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
+ for(TQValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
TransferItem &i = *it;
// look for elements received
if(!i.isString && !i.isSent)
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
index 16ff8e01..e3da8a09 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
@@ -21,8 +21,8 @@
#ifndef XMLPROTOCOL_H
#define XMLPROTOCOL_H
-#include<qdom.h>
-#include<qvaluelist.h>
+#include<tqdom.h>
+#include<tqvaluelist.h>
#include"parser.h"
#define NS_XML "http://www.w3.org/XML/1998/namespace"
@@ -59,8 +59,8 @@ namespace XMPP
virtual void reset();
// byte I/O for the stream
- void addIncomingData(const QByteArray &);
- QByteArray takeOutgoingData();
+ void addIncomingData(const TQByteArray &);
+ TQByteArray takeOutgoingData();
void outgoingDataWritten(int);
// advance the state machine
@@ -70,47 +70,47 @@ namespace XMPP
int need, event, errorCode, notify;
inline bool isIncoming() const { return incoming; }
- QString xmlEncoding() const;
- QString elementToString(const QDomElement &e, bool clip=false);
+ TQString xmlEncoding() const;
+ TQString elementToString(const TQDomElement &e, bool clip=false);
class TransferItem
{
public:
TransferItem();
- TransferItem(const QString &str, bool sent, bool external=false);
- TransferItem(const QDomElement &elem, bool sent, bool external=false);
+ TransferItem(const TQString &str, bool sent, bool external=false);
+ TransferItem(const TQDomElement &elem, bool sent, bool external=false);
bool isSent; // else, received
bool isString; // else, is element
bool isExternal; // not owned by protocol
- QString str;
- QDomElement elem;
+ TQString str;
+ TQDomElement elem;
};
- QValueList<TransferItem> transferItemList;
+ TQValueList<TransferItem> transferItemList;
void setIncomingAsExternal();
protected:
- virtual QDomElement docElement()=0;
+ virtual TQDomElement docElement()=0;
virtual void handleDocOpen(const Parser::Event &pe)=0;
virtual bool handleError()=0;
virtual bool handleCloseFinished()=0;
virtual bool stepAdvancesParser() const=0;
virtual bool stepRequiresElement() const;
- virtual bool doStep(const QDomElement &e)=0;
+ virtual bool doStep(const TQDomElement &e)=0;
virtual void itemWritten(int id, int size);
// 'debug'
- virtual void stringSend(const QString &s);
- virtual void stringRecv(const QString &s);
- virtual void elementSend(const QDomElement &e);
- virtual void elementRecv(const QDomElement &e);
+ virtual void stringSend(const TQString &s);
+ virtual void stringRecv(const TQString &s);
+ virtual void elementSend(const TQDomElement &e);
+ virtual void elementRecv(const TQDomElement &e);
void startConnect();
void startAccept();
bool close();
- int writeString(const QString &s, int id, bool external);
- int writeElement(const QDomElement &e, int id, bool external, bool clip=false);
- QByteArray resetStream();
+ int writeString(const TQString &s, int id, bool external);
+ int writeElement(const TQDomElement &e, int id, bool external, bool clip=false);
+ TQByteArray resetStream();
private:
enum { SendOpen, RecvOpen, Open, Closing };
@@ -122,20 +122,20 @@ namespace XMPP
};
bool incoming;
- QDomDocument elemDoc;
- QDomElement elem;
- QString tagOpen, tagClose;
+ TQDomDocument elemDoc;
+ TQDomElement elem;
+ TQString tagOpen, tagClose;
int state;
bool peerClosed;
bool closeWritten;
Parser xml;
- QByteArray outData;
- QValueList<TrackItem> trackQueue;
+ TQByteArray outData;
+ TQValueList<TrackItem> trackQueue;
void init();
- int internalWriteData(const QByteArray &a, TrackItem::Type t, int id=-1);
- int internalWriteString(const QString &s, TrackItem::Type t, int id=-1);
+ int internalWriteData(const TQByteArray &a, TrackItem::Type t, int id=-1);
+ int internalWriteString(const TQString &s, TrackItem::Type t, int id=-1);
void sendTagOpen();
void sendTagClose();
bool baseStep(const Parser::Event &pe);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
index a5affaa0..c78875bc 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
@@ -36,7 +36,7 @@
//!
//! The entire Task system is heavily founded on Qt. All Tasks have a parent,
//! except for the root Task, and are considered QObjects. By using Qt's RTTI
-//! facilities (QObject::sender(), QObject::isA(), etc), you can use a
+//! facilities (TQObject::sender(), TQObject::isA(), etc), you can use a
//! "fire and forget" approach with Tasks.
//!
//! \code
@@ -50,8 +50,8 @@
//! Session::Session()
//! {
//! client = new Client;
-//! connect(client, SIGNAL(handshaken()), SLOT(clientHandshaken()));
-//! connect(client, SIGNAL(authFinished(bool, int, const QString &)), SLOT(authFinished(bool, int, const QString &)));
+//! connect(client, TQT_SIGNAL(handshaken()), TQT_SLOT(clientHandshaken()));
+//! connect(client, TQT_SIGNAL(authFinished(bool, int, const TQString &)), TQT_SLOT(authFinished(bool, int, const TQString &)));
//! client->connectToHost("jabber.org");
//! }
//!
@@ -60,7 +60,7 @@
//! client->authDigest("jabtest", "12345", "Psi");
//! }
//!
-//! void Session::authFinished(bool success, int, const QString &err)
+//! void Session::authFinished(bool success, int, const TQString &err)
//! {
//! if(success)
//! printf("Login success!");
@@ -70,10 +70,10 @@
//! \endcode
#include<stdarg.h>
-#include<qmap.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqmap.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -83,10 +83,10 @@
/*#include<stdio.h>
#include<stdarg.h>
-#include<qstring.h>
-#include<qdom.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
+#include<tqstring.h>
+#include<tqdom.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
#include"xmpp_stream.h"
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
@@ -122,13 +122,13 @@ public:
ClientPrivate() {}
ClientStream *stream;
- QDomDocument doc;
+ TQDomDocument doc;
int id_seed;
Task *root;
- QString host, user, pass, resource;
- QString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
+ TQString host, user, pass, resource;
+ TQString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
DiscoItem::Identity identity;
- QMap<QString,Features> extension_features;
+ TQMap<TQString,Features> extension_features;
int tzoffset;
bool active;
@@ -139,12 +139,12 @@ public:
JidLinkManager *jlman;
FileTransferManager *ftman;
bool ftEnabled;
- QValueList<GroupChat> groupChatList;
+ TQValueList<GroupChat> groupChatList;
};
-Client::Client(QObject *par)
-:QObject(par)
+Client::Client(TQObject *par)
+:TQObject(par)
{
d = new ClientPrivate;
d->tzoffset = 0;
@@ -162,10 +162,10 @@ Client::Client(QObject *par)
d->stream = 0;
d->s5bman = new S5BManager(this);
- connect(d->s5bman, SIGNAL(incomingReady()), SLOT(s5b_incomingReady()));
+ connect(d->s5bman, TQT_SIGNAL(incomingReady()), TQT_SLOT(s5b_incomingReady()));
d->ibbman = new IBBManager(this);
- connect(d->ibbman, SIGNAL(incomingReady()), SLOT(ibb_incomingReady()));
+ connect(d->ibbman, TQT_SIGNAL(incomingReady()), TQT_SLOT(ibb_incomingReady()));
d->jlman = new JidLinkManager(this);
@@ -188,19 +188,19 @@ Client::~Client()
void Client::connectToServer(ClientStream *s, const Jid &j, bool auth)
{
d->stream = s;
- //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected()));
- //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken()));
- connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int)));
- //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &)));
- connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead()));
- //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished()));
- connect(d->stream, SIGNAL(incomingXml(const QString &)), SLOT(streamIncomingXml(const QString &)));
- connect(d->stream, SIGNAL(outgoingXml(const QString &)), SLOT(streamOutgoingXml(const QString &)));
+ //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected()));
+ //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken()));
+ connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int)));
+ //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &)));
+ connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead()));
+ //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished()));
+ connect(d->stream, TQT_SIGNAL(incomingXml(const TQString &)), TQT_SLOT(streamIncomingXml(const TQString &)));
+ connect(d->stream, TQT_SIGNAL(outgoingXml(const TQString &)), TQT_SLOT(streamOutgoingXml(const TQString &)));
d->stream->connectToServer(j, auth);
}
-void Client::start(const QString &host, const QString &user, const QString &pass, const QString &_resource)
+void Client::start(const TQString &host, const TQString &user, const TQString &pass, const TQString &_resource)
{
// TODO
d->host = host;
@@ -213,14 +213,14 @@ void Client::start(const QString &host, const QString &user, const QString &pass
d->resourceList += Resource(resource(), stat);
JT_PushPresence *pp = new JT_PushPresence(rootTask());
- connect(pp, SIGNAL(subscription(const Jid &, const QString &)), SLOT(ppSubscription(const Jid &, const QString &)));
- connect(pp, SIGNAL(presence(const Jid &, const Status &)), SLOT(ppPresence(const Jid &, const Status &)));
+ connect(pp, TQT_SIGNAL(subscription(const Jid &, const TQString &)), TQT_SLOT(ppSubscription(const Jid &, const TQString &)));
+ connect(pp, TQT_SIGNAL(presence(const Jid &, const Status &)), TQT_SLOT(ppPresence(const Jid &, const Status &)));
JT_PushMessage *pm = new JT_PushMessage(rootTask());
- connect(pm, SIGNAL(message(const Message &)), SLOT(pmMessage(const Message &)));
+ connect(pm, TQT_SIGNAL(message(const Message &)), TQT_SLOT(pmMessage(const Message &)));
JT_PushRoster *pr = new JT_PushRoster(rootTask());
- connect(pr, SIGNAL(roster(const Roster &)), SLOT(prRoster(const Roster &)));
+ connect(pr, TQT_SIGNAL(roster(const Roster &)), TQT_SLOT(prRoster(const Roster &)));
new JT_ServInfo(rootTask());
@@ -266,10 +266,10 @@ bool Client::isActive() const
return d->active;
}
-void Client::groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &_s)
+void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &_s)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
i.j = jid;
@@ -286,10 +286,10 @@ void Client::groupChatChangeNick(const QString &host, const QString &room, const
}
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -302,7 +302,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -315,10 +315,10 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -331,7 +331,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -344,11 +344,11 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-void Client::groupChatSetStatus(const QString &host, const QString &room, const Status &_s)
+void Client::groupChatSetStatus(const TQString &host, const TQString &room, const Status &_s)
{
Jid jid(room + "@" + host);
bool found = false;
- for(QValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(i.j.compare(jid, false)) {
found = true;
@@ -367,17 +367,17 @@ void Client::groupChatSetStatus(const QString &host, const QString &room, const
j->go(true);
}
-void Client::groupChatLeave(const QString &host, const QString &room)
+void Client::groupChatLeave(const TQString &host, const TQString &room)
{
Jid jid(room + "@" + host);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(!i.j.compare(jid, false))
continue;
i.status = GroupChat::Closing;
- debug(QString("Client: Leaving: [%1]\n").arg(i.j.full()));
+ debug(TQString("Client: Leaving: [%1]\n").arg(i.j.full()));
JT_Presence *j = new JT_Presence(rootTask());
Status s;
@@ -404,7 +404,7 @@ void Client::close(bool)
{
if(d->stream) {
if(d->active) {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
i.status = GroupChat::Closing;
@@ -467,17 +467,17 @@ void Client::streamCloseFinished()
closeFinished();
}*/
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -485,7 +485,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -493,9 +493,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -507,44 +507,44 @@ static QDomElement oldStyleNS(const QDomElement &e)
void Client::streamReadyRead()
{
// HACK HACK HACK
- QGuardedPtr<ClientStream> pstream = d->stream;
+ TQGuardedPtr<ClientStream> pstream = d->stream;
while(pstream && d->stream->stanzaAvailable()) {
Stanza s = d->stream->read();
- QString out = s.toString();
- debug(QString("Client: incoming: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: incoming: [\n%1]\n").arg(out));
xmlIncoming(out);
- QDomElement x = oldStyleNS(s.element());
+ TQDomElement x = oldStyleNS(s.element());
distribute(x);
}
}
-void Client::streamIncomingXml(const QString &s)
+void Client::streamIncomingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlIncoming(str);
}
-void Client::streamOutgoingXml(const QString &s)
+void Client::streamOutgoingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlOutgoing(str);
}
-void Client::debug(const QString &str)
+void Client::debug(const TQString &str)
{
debugText(str);
}
-QString Client::genUniqueId()
+TQString Client::genUniqueId()
{
- QString s;
+ TQString s;
s.sprintf("a%x", d->id_seed);
d->id_seed += 0x10;
return s;
@@ -555,12 +555,12 @@ Task *Client::rootTask()
return d->root;
}
-QDomDocument *Client::doc() const
+TQDomDocument *Client::doc() const
{
return &d->doc;
}
-void Client::distribute(const QDomElement &x)
+void Client::distribute(const TQDomElement &x)
{
if(x.hasAttribute("from")) {
Jid j(x.attribute("from"));
@@ -575,41 +575,41 @@ void Client::distribute(const QDomElement &x)
}
}
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(a.cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -620,40 +620,40 @@ static QDomElement addCorrectNS(const QDomElement &e)
return i;
}
-void Client::send(const QDomElement &x)
+void Client::send(const TQDomElement &x)
{
if(!d->stream)
return;
- //QString out;
- //QTextStream ts(&out, IO_WriteOnly);
+ //TQString out;
+ //TQTextStream ts(&out, IO_WriteOnly);
//x.save(ts, 0);
- //QString out = Stream::xmlToString(x);
- //debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ //TQString out = Stream::xmlToString(x);
+ //debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
//xmlOutgoing(out);
- QDomElement e = addCorrectNS(x);
+ TQDomElement e = addCorrectNS(x);
Stanza s = d->stream->createStanza(e);
if(s.isNull()) {
//printf("bad stanza??\n");
return;
}
- QString out = s.toString();
- debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
xmlOutgoing(out);
//printf("x[%s] x2[%s] s[%s]\n", Stream::xmlToString(x).latin1(), Stream::xmlToString(e).latin1(), s.toString().latin1());
d->stream->write(s);
}
-void Client::send(const QString &str)
+void Client::send(const TQString &str)
{
if(!d->stream)
return;
- debug(QString("Client: outgoing: [\n%1]\n").arg(str));
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(str));
xmlOutgoing(str);
static_cast<ClientStream*>(d->stream)->writeDirect(str);
}
@@ -673,29 +673,29 @@ const ResourceList & Client::resourceList() const
return d->resourceList;
}
-QString Client::host() const
+TQString Client::host() const
{
return d->host;
}
-QString Client::user() const
+TQString Client::user() const
{
return d->user;
}
-QString Client::pass() const
+TQString Client::pass() const
{
return d->pass;
}
-QString Client::resource() const
+TQString Client::resource() const
{
return d->resource;
}
Jid Client::jid() const
{
- QString s;
+ TQString s;
if(!d->user.isEmpty())
s += d->user + '@';
s += d->host;
@@ -707,7 +707,7 @@ Jid Client::jid() const
return Jid(s);
}
-void Client::ppSubscription(const Jid &j, const QString &s)
+void Client::ppSubscription(const Jid &j, const TQString &s)
{
subscription(j, s);
}
@@ -715,17 +715,17 @@ void Client::ppSubscription(const Jid &j, const QString &s)
void Client::ppPresence(const Jid &j, const Status &s)
{
if(s.isAvailable())
- debug(QString("Client: %1 is available.\n").arg(j.full()));
+ debug(TQString("Client: %1 is available.\n").arg(j.full()));
else
- debug(QString("Client: %1 is unavailable.\n").arg(j.full()));
+ debug(TQString("Client: %1 is unavailable.\n").arg(j.full()));
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(j, false)) {
bool us = (i.j.resource() == j.resource() || j.resource().isEmpty()) ? true: false;
- debug(QString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us));
+ debug(TQString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us));
switch(i.status) {
case GroupChat::Connecting:
if(us && s.hasError()) {
@@ -796,7 +796,7 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
// unavailable? remove the resource
if(!s.isAvailable()) {
if(found) {
- debug(QString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
(*rit).setStatus(s);
resourceUnavailable(j, *rit);
d->resourceList.remove(rit);
@@ -808,12 +808,12 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
if(!found) {
r = Resource(j.resource(), s);
d->resourceList += r;
- debug(QString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
}
resourceAvailable(j, r);
@@ -829,7 +829,7 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
if(!s.isAvailable()) {
if(found) {
(*rit).setStatus(s);
- debug(QString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
resourceUnavailable(j, *rit);
i->resourceList().remove(rit);
i->setLastUnavailableStatus(s);
@@ -841,12 +841,12 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
if(!found) {
r = Resource(j.resource(), s);
i->resourceList() += r;
- debug(QString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
}
resourceAvailable(j, r);
@@ -855,10 +855,10 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
void Client::pmMessage(const Message &m)
{
- debug(QString("Client: Message from %1\n").arg(m.from().full()));
+ debug(TQString("Client: Message from %1\n").arg(m.from().full()));
if(m.type() == "groupchat") {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(!i.j.compare(m.from(), false))
@@ -883,7 +883,7 @@ void Client::rosterRequest()
return;
JT_Roster *r = new JT_Roster(rootTask());
- connect(r, SIGNAL(finished()), SLOT(slotRosterRequestFinished()));
+ connect(r, TQT_SIGNAL(finished()), TQT_SLOT(slotRosterRequestFinished()));
r->get();
d->roster.flagAllForDelete(); // mod_groups patch
r->go(true);
@@ -927,7 +927,7 @@ void Client::importRoster(const Roster &r)
void Client::importRosterItem(const RosterItem &item)
{
- QString substr;
+ TQString substr;
switch(item.subscription().type()) {
case Subscription::Both:
substr = "<-->"; break;
@@ -942,10 +942,10 @@ void Client::importRosterItem(const RosterItem &item)
substr = "----"; break;
}
- QString dstr, str;
+ TQString dstr, str;
str.sprintf(" %s %-32s", substr.latin1(), item.jid().full().latin1());
if(!item.name().isEmpty())
- str += QString(" [") + item.name() + "]";
+ str += TQString(" [") + item.name() + "]";
str += '\n';
// Remove
@@ -986,7 +986,7 @@ void Client::sendMessage(const Message &m)
j->go(true);
}
-void Client::sendSubscription(const Jid &jid, const QString &type)
+void Client::sendSubscription(const Jid &jid, const TQString &type)
{
JT_Presence *j = new JT_Presence(rootTask());
j->sub(jid, type);
@@ -1006,12 +1006,12 @@ void Client::setPresence(const Status &s)
//r.setStatus(s);
}
-QString Client::OSName() const
+TQString Client::OSName() const
{
return d->osname;
}
-QString Client::timeZone() const
+TQString Client::timeZone() const
{
return d->tzname;
}
@@ -1021,58 +1021,58 @@ int Client::timeZoneOffset() const
return d->tzoffset;
}
-QString Client::clientName() const
+TQString Client::clientName() const
{
return d->clientName;
}
-QString Client::clientVersion() const
+TQString Client::clientVersion() const
{
return d->clientVersion;
}
-QString Client::capsNode() const
+TQString Client::capsNode() const
{
return d->capsNode;
}
-QString Client::capsVersion() const
+TQString Client::capsVersion() const
{
return d->capsVersion;
}
-QString Client::capsExt() const
+TQString Client::capsExt() const
{
return d->capsExt;
}
-void Client::setOSName(const QString &name)
+void Client::setOSName(const TQString &name)
{
d->osname = name;
}
-void Client::setTimeZone(const QString &name, int offset)
+void Client::setTimeZone(const TQString &name, int offset)
{
d->tzname = name;
d->tzoffset = offset;
}
-void Client::setClientName(const QString &s)
+void Client::setClientName(const TQString &s)
{
d->clientName = s;
}
-void Client::setClientVersion(const QString &s)
+void Client::setClientVersion(const TQString &s)
{
d->clientVersion = s;
}
-void Client::setCapsNode(const QString &s)
+void Client::setCapsNode(const TQString &s)
{
d->capsNode = s;
}
-void Client::setCapsVersion(const QString &s)
+void Client::setCapsVersion(const TQString &s)
{
d->capsVersion = s;
}
@@ -1087,7 +1087,7 @@ void Client::setIdentity(DiscoItem::Identity identity)
d->identity = identity;
}
-void Client::addExtension(const QString& ext, const Features& features)
+void Client::addExtension(const TQString& ext, const Features& features)
{
if (!ext.isEmpty()) {
d->extension_features[ext] = features;
@@ -1095,7 +1095,7 @@ void Client::addExtension(const QString& ext, const Features& features)
}
}
-void Client::removeExtension(const QString& ext)
+void Client::removeExtension(const TQString& ext)
{
if (d->extension_features.contains(ext)) {
d->extension_features.remove(ext);
@@ -1103,12 +1103,12 @@ void Client::removeExtension(const QString& ext)
}
}
-QStringList Client::extensions() const
+TQStringList Client::extensions() const
{
return d->extension_features.keys();
}
-const Features& Client::extension(const QString& ext) const
+const Features& Client::extension(const TQString& ext) const
{
return d->extension_features[ext];
}
@@ -1146,32 +1146,32 @@ class Task::TaskPrivate
public:
TaskPrivate() {}
- QString id;
+ TQString id;
bool success;
int statusCode;
- QString statusString;
+ TQString statusString;
Client *client;
bool insig, deleteme, autoDelete;
bool done;
};
Task::Task(Task *parent)
-:QObject(parent)
+:TQObject(parent)
{
init();
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()
@@ -1191,7 +1191,7 @@ void Task::init()
Task *Task::parent() const
{
- return (Task *)QObject::parent();
+ return (Task *)TQObject::parent();
}
Client *Task::client() const
@@ -1199,12 +1199,12 @@ Client *Task::client() const
return d->client;
}
-QDomDocument *Task::doc() const
+TQDomDocument *Task::doc() const
{
return client()->doc();
}
-QString Task::id() const
+TQString Task::id() const
{
return d->id;
}
@@ -1219,7 +1219,7 @@ int Task::statusCode() const
return d->statusCode;
}
-const QString & Task::statusString() const
+const TQString & Task::statusString() const
{
return d->statusString;
}
@@ -1231,17 +1231,17 @@ void Task::go(bool autoDelete)
onGo();
}
-bool Task::take(const QDomElement &x)
+bool Task::take(const TQDomElement &x)
{
- const QObjectList *p = children();
+ const TQObjectList *p = children();
if(!p)
return false;
// pass along the xml
- QObjectListIt it(*p);
+ TQObjectListIt it(*p);
Task *t;
for(; it.current(); ++it) {
- QObject *obj = it.current();
+ TQObject *obj = it.current();
if(!obj->inherits("XMPP::Task"))
continue;
@@ -1275,16 +1275,16 @@ 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()));
}
}
-void Task::send(const QDomElement &x)
+void Task::send(const TQDomElement &x)
{
client()->send(x);
}
-void Task::setSuccess(int code, const QString &str)
+void Task::setSuccess(int code, const TQString &str)
{
if(!d->done) {
d->success = true;
@@ -1294,7 +1294,7 @@ void Task::setSuccess(int code, const QString &str)
}
}
-void Task::setError(const QDomElement &e)
+void Task::setError(const TQDomElement &e)
{
if(!d->done) {
d->success = false;
@@ -1303,7 +1303,7 @@ void Task::setError(const QDomElement &e)
}
}
-void Task::setError(int code, const QString &str)
+void Task::setError(int code, const TQString &str)
{
if(!d->done) {
d->success = false;
@@ -1338,7 +1338,7 @@ void Task::clientDisconnected()
void Task::debug(const char *fmt, ...)
{
char *buf;
- QString str;
+ TQString str;
int size = 1024;
int r;
@@ -1350,7 +1350,7 @@ void Task::debug(const char *fmt, ...)
va_end(ap);
if(r != -1)
- str = QString(buf);
+ str = TQString(buf);
delete [] buf;
@@ -1360,12 +1360,12 @@ void Task::debug(const char *fmt, ...)
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::iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns)
+bool Task::iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns)
{
if(x.tagName() != "iq")
return false;
@@ -1485,7 +1485,7 @@ void LiveRosterItem::setFlagForDelete(bool b)
// LiveRoster
//---------------------------------------------------------------------------
LiveRoster::LiveRoster()
-:QValueList<LiveRosterItem>()
+:TQValueList<LiveRosterItem>()
{
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
index 512839c3..f2fcf7c9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
@@ -20,25 +20,25 @@
#include"im.h"
#include "protocol.h"
-#include<qmap.h>
-#include<qapplication.h>
+#include<tqmap.h>
+#include<tqapplication.h>
#define NS_XML "http://www.w3.org/XML/1998/namespace"
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QString tagContent(const QDomElement &e)
+static TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -47,10 +47,10 @@ static QString tagContent(const QDomElement &e)
return "";
}
-static QDateTime stamp2TS(const QString &ts)
+static TQDateTime stamp2TS(const TQString &ts)
{
if(ts.length() != 17)
- return QDateTime();
+ return TQDateTime();
int year = ts.mid(0,4).toInt();
int month = ts.mid(4,2).toInt();
@@ -60,22 +60,22 @@ static QDateTime stamp2TS(const QString &ts)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
- return QDateTime();
+ return TQDateTime();
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
- return QDateTime();
+ return TQDateTime();
- return QDateTime(xd, xt);
+ return TQDateTime(xd, xt);
}
-/*static QString TS2stamp(const QDateTime &d)
+/*static TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -97,17 +97,17 @@ namespace XMPP
class Url::Private
{
public:
- QString url;
- QString desc;
+ TQString url;
+ TQString desc;
};
//! \brief Construct Url object with a given URL and Description.
//!
//! This function will construct a Url object.
-//! \param QString - url (default: empty string)
-//! \param QString - description of url (default: empty string)
+//! \param TQString - url (default: empty string)
+//! \param TQString - description of url (default: empty string)
//! \sa setUrl() setDesc()
-Url::Url(const QString &url, const QString &desc)
+Url::Url(const TQString &url, const TQString &desc)
{
d = new Private;
d->url = url;
@@ -140,7 +140,7 @@ Url::~Url()
//! \brief Get url information.
//!
//! Returns url information.
-QString Url::url() const
+TQString Url::url() const
{
return d->url;
}
@@ -148,7 +148,7 @@ QString Url::url() const
//! \brief Get Description information.
//!
//! Returns desction of the URL.
-QString Url::desc() const
+TQString Url::desc() const
{
return d->desc;
}
@@ -157,7 +157,7 @@ QString Url::desc() const
//!
//! Set url information.
//! \param url - url string (eg: http://psi.affinix.com/)
-void Url::setUrl(const QString &url)
+void Url::setUrl(const TQString &url)
{
d->url = url;
}
@@ -166,7 +166,7 @@ void Url::setUrl(const QString &url)
//!
//! Set description of the url.
//! \param desc - description of url
-void Url::setDesc(const QString &desc)
+void Url::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -178,19 +178,19 @@ class Message::Private
{
public:
Jid to, from;
- QString id, type, lang;
+ TQString id, type, lang;
StringMap subject, body, xHTMLBody;
- QString thread;
+ TQString thread;
Stanza::Error error;
// extensions
- QDateTime timeStamp;
+ TQDateTime timeStamp;
UrlList urlList;
- QValueList<MsgEvent> eventList;
- QString eventId;
- QString xencrypted, invite;
+ TQValueList<MsgEvent> eventList;
+ TQString eventId;
+ TQString xencrypted, invite;
bool spooled, wasEncrypted;
};
@@ -247,24 +247,24 @@ Jid Message::from() const
return d->from;
}
-QString Message::id() const
+TQString Message::id() const
{
return d->id;
}
//! \brief Return type information
-QString Message::type() const
+TQString Message::type() const
{
return d->type;
}
-QString Message::lang() const
+TQString Message::lang() const
{
return d->lang;
}
//! \brief Return subject information.
-QString Message::subject(const QString &lang) const
+TQString Message::subject(const TQString &lang) const
{
return d->subject[lang];
}
@@ -275,17 +275,17 @@ QString Message::subject(const QString &lang) const
//! it exists.
//! \param rich - Returns richtext if true and plain text if false. (default: false)
//! \note Richtext is in Qt's richtext format and not in xhtml.
-QString Message::body(const QString &lang) const
+TQString Message::body(const TQString &lang) const
{
return d->body[lang];
}
-QString Message::xHTMLBody(const QString &lang) const
+TQString Message::xHTMLBody(const TQString &lang) const
{
return d->xHTMLBody[lang];
}
-QString Message::thread() const
+TQString Message::thread() const
{
return d->thread;
}
@@ -310,7 +310,7 @@ void Message::setFrom(const Jid &j)
//d->flag = false;
}
-void Message::setId(const QString &s)
+void Message::setId(const TQString &s)
{
d->id = s;
}
@@ -318,13 +318,13 @@ void Message::setId(const QString &s)
//! \brief Set Type of message
//!
//! \param type - type of message your going to send
-void Message::setType(const QString &s)
+void Message::setType(const TQString &s)
{
d->type = s;
//d->flag = false;
}
-void Message::setLang(const QString &s)
+void Message::setLang(const TQString &s)
{
d->lang = s;
}
@@ -332,7 +332,7 @@ void Message::setLang(const QString &s)
//! \brief Set subject
//!
//! \param subject - Subject information
-void Message::setSubject(const QString &s, const QString &lang)
+void Message::setSubject(const TQString &s, const TQString &lang)
{
d->subject[lang] = s;
//d->flag = false;
@@ -343,20 +343,20 @@ void Message::setSubject(const QString &s, const QString &lang)
//! \param body - body information
//! \param rich - set richtext if true and set plaintext if false.
//! \note Richtext support will be implemented in the future... Sorry.
-void Message::setBody(const QString &s, const QString &lang)
+void Message::setBody(const TQString &s, const TQString &lang)
{
d->body[lang] = s;
}
-void Message::setXHTMLBody(const QString &s, const QString &lang, const QString &attr)
+void Message::setXHTMLBody(const TQString &s, const TQString &lang, const TQString &attr)
{
//ugly but needed if s is not a node but a list of leaf
- QString content = "<body xmlns='" + QString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
+ TQString content = "<body xmlns='" + TQString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
d->xHTMLBody[lang] = content;
}
-void Message::setThread(const QString &s)
+void Message::setThread(const TQString &s)
{
d->thread = s;
}
@@ -366,12 +366,12 @@ void Message::setError(const Stanza::Error &err)
d->error = err;
}
-QDateTime Message::timeStamp() const
+TQDateTime Message::timeStamp() const
{
return d->timeStamp;
}
-void Message::setTimeStamp(const QDateTime &ts)
+void Message::setTimeStamp(const TQDateTime &ts)
{
d->timeStamp = ts;
}
@@ -404,12 +404,12 @@ void Message::setUrlList(const UrlList &list)
d->urlList = list;
}
-QString Message::eventId() const
+TQString Message::eventId() const
{
return d->eventId;
}
-void Message::setEventId(const QString& id)
+void Message::setEventId(const TQString& id)
{
d->eventId = id;
}
@@ -433,22 +433,22 @@ void Message::addEvent(MsgEvent e)
}
}
-QString Message::xencrypted() const
+TQString Message::xencrypted() const
{
return d->xencrypted;
}
-void Message::setXEncrypted(const QString &s)
+void Message::setXEncrypted(const TQString &s)
{
d->xencrypted = s;
}
-QString Message::invite() const
+TQString Message::invite() const
{
return d->invite;
}
-void Message::setInvite(const QString &s)
+void Message::setInvite(const TQString &s)
{
d->invite = s;
}
@@ -485,29 +485,29 @@ Stanza Message::toStanza(Stream *stream) const
StringMap::ConstIterator it;
for(it = d->subject.begin(); it != d->subject.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "subject", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "subject", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
for(it = d->body.begin(); it != d->body.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "body", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "body", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
if ( !d->xHTMLBody.isEmpty()) {
- QDomElement parent = s.createElement(s.xhtmlImNS(), "html");
+ TQDomElement parent = s.createElement(s.xhtmlImNS(), "html");
for(it = d->xHTMLBody.begin(); it != d->xHTMLBody.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement child = s.createXHTMLElement(str);
+ TQDomElement child = s.createXHTMLElement(str);
if(!it.key().isEmpty())
child.setAttributeNS(NS_XML, "xml:lang", it.key());
parent.appendChild(child);
@@ -520,14 +520,14 @@ Stanza Message::toStanza(Stream *stream) const
// timestamp
/*if(!d->timeStamp.isNull()) {
- QDomElement e = s.createElement("jabber:x:delay", "x");
+ TQDomElement e = s.createElement("jabber:x:delay", "x");
e.setAttribute("stamp", TS2stamp(d->timeStamp));
s.appendChild(e);
}*/
// urls
- for(QValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
- QDomElement x = s.createElement("jabber:x:oob", "x");
+ for(TQValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
+ TQDomElement x = s.createElement("jabber:x:oob", "x");
x.appendChild(s.createTextElement("jabber:x:oob", "url", (*uit).url()));
if(!(*uit).desc().isEmpty())
x.appendChild(s.createTextElement("jabber:x:oob", "desc", (*uit).desc()));
@@ -536,7 +536,7 @@ Stanza Message::toStanza(Stream *stream) const
// events
if (!d->eventList.isEmpty()) {
- QDomElement x = s.createElement("jabber:x:event", "x");
+ TQDomElement x = s.createElement("jabber:x:event", "x");
if (d->body.isEmpty()) {
if (d->eventId.isEmpty())
@@ -548,7 +548,7 @@ Stanza Message::toStanza(Stream *stream) const
s.appendChild( s.createElement(NS_CHATSTATES , "active" ) );
bool need_x_event=false;
- for(QValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
+ for(TQValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
switch (*ev) {
case OfflineEvent:
x.appendChild(s.createElement("jabber:x:event", "offline"));
@@ -594,7 +594,7 @@ Stanza Message::toStanza(Stream *stream) const
// invite
if(!d->invite.isEmpty()) {
- QDomElement e = s.createElement("jabber:x:conference", "x");
+ TQDomElement e = s.createElement("jabber:x:conference", "x");
e.setAttribute("jid", d->invite);
s.appendChild(e);
}
@@ -615,24 +615,24 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->subject.clear();
d->body.clear();
- d->thread = QString();
+ d->thread = TQString();
d->eventList.clear();
- QDomElement root = s.element();
+ TQDomElement root = s.element();
- QDomNodeList nl = root.childNodes();
+ TQDomNodeList nl = root.childNodes();
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
- QDomElement e = i.toElement();
+ TQDomElement e = i.toElement();
if(e.namespaceURI() == s.baseNS()) {
if(e.tagName() == "subject") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->subject[lang] = e.text();
}
else if(e.tagName() == "body") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->body[lang] = e.text();
}
else if(e.tagName() == "thread")
@@ -640,13 +640,13 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
}
else if (e.namespaceURI() == s.xhtmlImNS()) {
if (e.tagName() == "html") {
- QDomNodeList htmlNL= e.childNodes();
+ TQDomNodeList htmlNL= e.childNodes();
for (unsigned int x = 0; x < htmlNL.count(); x++) {
- QDomElement i = htmlNL.item(x).toElement();
+ TQDomElement i = htmlNL.item(x).toElement();
if (i.tagName() == "body") {
- QDomDocument RichText;
- QString lang = i.attributeNS(NS_XML, "lang", "");
+ TQDomDocument RichText;
+ TQString lang = i.attributeNS(NS_XML, "lang", "");
RichText.appendChild(i);
d-> xHTMLBody[lang] = RichText.toString();
}
@@ -690,14 +690,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->error = s.error();
// timestamp
- QDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
+ TQDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
if(!t.isNull()) {
d->timeStamp = stamp2TS(t.attribute("stamp"));
d->timeStamp = d->timeStamp.addSecs(timeZoneOffset * 3600);
d->spooled = true;
}
else {
- d->timeStamp = QDateTime::currentDateTime();
+ d->timeStamp = TQDateTime::currentDateTime();
d->spooled = false;
}
@@ -705,7 +705,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->urlList.clear();
nl = root.elementsByTagNameNS("jabber:x:oob", "x");
for(n = 0; n < nl.count(); ++n) {
- QDomElement t = nl.item(n).toElement();
+ TQDomElement t = nl.item(n).toElement();
Url u;
u.setUrl(t.elementsByTagName("url").item(0).toElement().text());
u.setDesc(t.elementsByTagName("desc").item(0).toElement().text());
@@ -717,7 +717,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if (nl.count()) {
nl = nl.item(0).childNodes();
for(n = 0; n < nl.count(); ++n) {
- QString evtag = nl.item(n).toElement().tagName();
+ TQString evtag = nl.item(n).toElement().tagName();
if (evtag == "id") {
d->eventId = nl.item(n).toElement().text();
}
@@ -739,14 +739,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if(!t.isNull())
d->xencrypted = t.text();
else
- d->xencrypted = QString();
+ d->xencrypted = TQString();
// invite
t = root.elementsByTagNameNS("jabber:x:conference", "x").item(0).toElement();
if(!t.isNull())
d->invite = t.attribute("jid");
else
- d->invite = QString();
+ d->invite = TQString();
return true;
}
@@ -764,7 +764,7 @@ int Subscription::type() const
return value;
}
-QString Subscription::toString() const
+TQString Subscription::toString() const
{
switch(value) {
case Remove:
@@ -781,7 +781,7 @@ QString Subscription::toString() const
}
}
-bool Subscription::fromString(const QString &s)
+bool Subscription::fromString(const TQString &s)
{
if(s == "remove")
value = Remove;
@@ -803,13 +803,13 @@ bool Subscription::fromString(const QString &s)
//---------------------------------------------------------------------------
// Status
//---------------------------------------------------------------------------
-Status::Status(const QString &show, const QString &status, int priority, bool available)
+Status::Status(const TQString &show, const TQString &status, int priority, bool available)
{
v_isAvailable = available;
v_show = show;
v_status = status;
v_priority = priority;
- v_timeStamp = QDateTime::currentDateTime();
+ v_timeStamp = TQDateTime::currentDateTime();
v_isInvisible = false;
ecode = -1;
}
@@ -823,7 +823,7 @@ bool Status::hasError() const
return (ecode != -1);
}
-void Status::setError(int code, const QString &str)
+void Status::setError(int code, const TQString &str)
{
ecode = code;
estr = str;
@@ -844,47 +844,47 @@ void Status::setPriority(int x)
v_priority = x;
}
-void Status::setShow(const QString & _show)
+void Status::setShow(const TQString & _show)
{
v_show = _show;
}
-void Status::setStatus(const QString & _status)
+void Status::setStatus(const TQString & _status)
{
v_status = _status;
}
-void Status::setTimeStamp(const QDateTime & _timestamp)
+void Status::setTimeStamp(const TQDateTime & _timestamp)
{
v_timeStamp = _timestamp;
}
-void Status::setKeyID(const QString &key)
+void Status::setKeyID(const TQString &key)
{
v_key = key;
}
-void Status::setXSigned(const QString &s)
+void Status::setXSigned(const TQString &s)
{
v_xsigned = s;
}
-void Status::setSongTitle(const QString & _songtitle)
+void Status::setSongTitle(const TQString & _songtitle)
{
v_songTitle = _songtitle;
}
-void Status::setCapsNode(const QString & _capsNode)
+void Status::setCapsNode(const TQString & _capsNode)
{
v_capsNode = _capsNode;
}
-void Status::setCapsVersion(const QString & _capsVersion)
+void Status::setCapsVersion(const TQString & _capsVersion)
{
v_capsVersion = _capsVersion;
}
-void Status::setCapsExt(const QString & _capsExt)
+void Status::setCapsExt(const TQString & _capsExt)
{
v_capsExt = _capsExt;
}
@@ -912,46 +912,46 @@ int Status::priority() const
return v_priority;
}
-const QString & Status::show() const
+const TQString & Status::show() const
{
return v_show;
}
-const QString & Status::status() const
+const TQString & Status::status() const
{
return v_status;
}
-QDateTime Status::timeStamp() const
+TQDateTime Status::timeStamp() const
{
return v_timeStamp;
}
-const QString & Status::keyID() const
+const TQString & Status::keyID() const
{
return v_key;
}
-const QString & Status::xsigned() const
+const TQString & Status::xsigned() const
{
return v_xsigned;
}
-const QString & Status::songTitle() const
+const TQString & Status::songTitle() const
{
return v_songTitle;
}
-const QString & Status::capsNode() const
+const TQString & Status::capsNode() const
{
return v_capsNode;
}
-const QString & Status::capsVersion() const
+const TQString & Status::capsVersion() const
{
return v_capsVersion;
}
-const QString & Status::capsExt() const
+const TQString & Status::capsExt() const
{
return v_capsExt;
}
@@ -961,7 +961,7 @@ int Status::errorCode() const
return ecode;
}
-const QString & Status::errorString() const
+const TQString & Status::errorString() const
{
return estr;
}
@@ -970,7 +970,7 @@ const QString & Status::errorString() const
//---------------------------------------------------------------------------
// Resource
//---------------------------------------------------------------------------
-Resource::Resource(const QString &name, const Status &stat)
+Resource::Resource(const TQString &name, const Status &stat)
{
v_name = name;
v_status = stat;
@@ -980,7 +980,7 @@ Resource::~Resource()
{
}
-const QString & Resource::name() const
+const TQString & Resource::name() const
{
return v_name;
}
@@ -995,7 +995,7 @@ const Status & Resource::status() const
return v_status;
}
-void Resource::setName(const QString & _name)
+void Resource::setName(const TQString & _name)
{
v_name = _name;
}
@@ -1010,7 +1010,7 @@ void Resource::setStatus(const Status & _status)
// ResourceList
//---------------------------------------------------------------------------
ResourceList::ResourceList()
-:QValueList<Resource>()
+:TQValueList<Resource>()
{
}
@@ -1018,7 +1018,7 @@ ResourceList::~ResourceList()
{
}
-ResourceList::Iterator ResourceList::find(const QString & _find)
+ResourceList::Iterator ResourceList::find(const TQString & _find)
{
for(ResourceList::Iterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1040,7 +1040,7 @@ ResourceList::Iterator ResourceList::priority()
return highest;
}
-ResourceList::ConstIterator ResourceList::find(const QString & _find) const
+ResourceList::ConstIterator ResourceList::find(const TQString & _find) const
{
for(ResourceList::ConstIterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1080,12 +1080,12 @@ const Jid & RosterItem::jid() const
return v_jid;
}
-const QString & RosterItem::name() const
+const TQString & RosterItem::name() const
{
return v_name;
}
-const QStringList & RosterItem::groups() const
+const TQStringList & RosterItem::groups() const
{
return v_groups;
}
@@ -1095,7 +1095,7 @@ const Subscription & RosterItem::subscription() const
return v_subscription;
}
-const QString & RosterItem::ask() const
+const TQString & RosterItem::ask() const
{
return v_ask;
}
@@ -1105,9 +1105,9 @@ bool RosterItem::isPush() const
return v_push;
}
-bool RosterItem::inGroup(const QString &g) const
+bool RosterItem::inGroup(const TQString &g) const
{
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g)
return true;
}
@@ -1119,12 +1119,12 @@ void RosterItem::setJid(const Jid &_jid)
v_jid = _jid;
}
-void RosterItem::setName(const QString &_name)
+void RosterItem::setName(const TQString &_name)
{
v_name = _name;
}
-void RosterItem::setGroups(const QStringList &_groups)
+void RosterItem::setGroups(const TQStringList &_groups)
{
v_groups = _groups;
}
@@ -1134,7 +1134,7 @@ void RosterItem::setSubscription(const Subscription &type)
v_subscription = type;
}
-void RosterItem::setAsk(const QString &_ask)
+void RosterItem::setAsk(const TQString &_ask)
{
v_ask = _ask;
}
@@ -1144,7 +1144,7 @@ void RosterItem::setIsPush(bool b)
v_push = b;
}
-bool RosterItem::addGroup(const QString &g)
+bool RosterItem::addGroup(const TQString &g)
{
if(inGroup(g))
return false;
@@ -1153,9 +1153,9 @@ bool RosterItem::addGroup(const QString &g)
return true;
}
-bool RosterItem::removeGroup(const QString &g)
+bool RosterItem::removeGroup(const TQString &g)
{
- for(QStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g) {
v_groups.remove(it);
return true;
@@ -1165,40 +1165,40 @@ bool RosterItem::removeGroup(const QString &g)
return false;
}
-QDomElement RosterItem::toXml(QDomDocument *doc) const
+TQDomElement RosterItem::toXml(TQDomDocument *doc) const
{
- QDomElement item = doc->createElement("item");
+ TQDomElement item = doc->createElement("item");
item.setAttribute("jid", v_jid.full());
item.setAttribute("name", v_name);
item.setAttribute("subscription", v_subscription.toString());
if(!v_ask.isEmpty())
item.setAttribute("ask", v_ask);
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
item.appendChild(textTag(doc, "group", *it));
return item;
}
-bool RosterItem::fromXml(const QDomElement &item)
+bool RosterItem::fromXml(const TQDomElement &item)
{
if(item.tagName() != "item")
return false;
Jid j(item.attribute("jid"));
if(!j.isValid())
return false;
- QString na = item.attribute("name");
+ TQString na = item.attribute("name");
Subscription s;
if(!s.fromString(item.attribute("subscription")) )
return false;
- QStringList g;
- for(QDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList g;
+ for(TQDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "group")
g += tagContent(i);
}
- QString a = item.attribute("ask");
+ TQString a = item.attribute("ask");
v_jid = j;
v_name = na;
@@ -1214,7 +1214,7 @@ bool RosterItem::fromXml(const QDomElement &item)
// Roster
//---------------------------------------------------------------------------
Roster::Roster()
-:QValueList<RosterItem>()
+:TQValueList<RosterItem>()
{
}
@@ -1246,7 +1246,7 @@ Roster::ConstIterator Roster::find(const Jid &j) const
//---------------------------------------------------------------------------
// FormField
//---------------------------------------------------------------------------
-FormField::FormField(const QString &type, const QString &value)
+FormField::FormField(const TQString &type, const TQString &value)
{
v_type = misc;
if(!type.isEmpty()) {
@@ -1266,29 +1266,29 @@ int FormField::type() const
return v_type;
}
-QString FormField::realName() const
+TQString FormField::realName() const
{
return typeToTagName(v_type);
}
-QString FormField::fieldName() const
+TQString FormField::fieldName() const
{
switch(v_type) {
- case username: return QObject::tr("Username");
- case nick: return QObject::tr("Nickname");
- case password: return QObject::tr("Password");
- case name: return QObject::tr("Name");
- case first: return QObject::tr("First Name");
- case last: return QObject::tr("Last Name");
- case email: return QObject::tr("E-mail");
- case address: return QObject::tr("Address");
- case city: return QObject::tr("City");
- case state: return QObject::tr("State");
- case zip: return QObject::tr("Zipcode");
- case phone: return QObject::tr("Phone");
- case url: return QObject::tr("URL");
- case date: return QObject::tr("Date");
- case misc: return QObject::tr("Misc");
+ case username: return TQObject::tr("Username");
+ case nick: return TQObject::tr("Nickname");
+ case password: return TQObject::tr("Password");
+ case name: return TQObject::tr("Name");
+ case first: return TQObject::tr("First Name");
+ case last: return TQObject::tr("Last Name");
+ case email: return TQObject::tr("E-mail");
+ case address: return TQObject::tr("Address");
+ case city: return TQObject::tr("City");
+ case state: return TQObject::tr("State");
+ case zip: return TQObject::tr("Zipcode");
+ case phone: return TQObject::tr("Phone");
+ case url: return TQObject::tr("URL");
+ case date: return TQObject::tr("Date");
+ case misc: return TQObject::tr("Misc");
default: return "";
};
}
@@ -1298,7 +1298,7 @@ bool FormField::isSecret() const
return (type() == password);
}
-const QString & FormField::value() const
+const TQString & FormField::value() const
{
return v_value;
}
@@ -1308,7 +1308,7 @@ void FormField::setType(int x)
v_type = x;
}
-bool FormField::setType(const QString &in)
+bool FormField::setType(const TQString &in)
{
int x = tagNameToType(in);
if(x == -1)
@@ -1318,12 +1318,12 @@ bool FormField::setType(const QString &in)
return true;
}
-void FormField::setValue(const QString &in)
+void FormField::setValue(const TQString &in)
{
v_value = in;
}
-int FormField::tagNameToType(const QString &in) const
+int FormField::tagNameToType(const TQString &in) const
{
if(!in.compare("username")) return username;
if(!in.compare("nick")) return nick;
@@ -1344,7 +1344,7 @@ int FormField::tagNameToType(const QString &in) const
return -1;
}
-QString FormField::typeToTagName(int type) const
+TQString FormField::typeToTagName(int type) const
{
switch(type) {
case username: return "username";
@@ -1371,7 +1371,7 @@ QString FormField::typeToTagName(int type) const
// Form
//---------------------------------------------------------------------------
Form::Form(const Jid &j)
-:QValueList<FormField>()
+:TQValueList<FormField>()
{
setJid(j);
}
@@ -1385,12 +1385,12 @@ Jid Form::jid() const
return v_jid;
}
-QString Form::instructions() const
+TQString Form::instructions() const
{
return v_instructions;
}
-QString Form::key() const
+TQString Form::key() const
{
return v_key;
}
@@ -1400,12 +1400,12 @@ void Form::setJid(const Jid &j)
v_jid = j;
}
-void Form::setInstructions(const QString &s)
+void Form::setInstructions(const TQString &s)
{
v_instructions = s;
}
-void Form::setKey(const QString &s)
+void Form::setKey(const TQString &s)
{
v_key = s;
}
@@ -1428,22 +1428,22 @@ const Jid & SearchResult::jid() const
return v_jid;
}
-const QString & SearchResult::nick() const
+const TQString & SearchResult::nick() const
{
return v_nick;
}
-const QString & SearchResult::first() const
+const TQString & SearchResult::first() const
{
return v_first;
}
-const QString & SearchResult::last() const
+const TQString & SearchResult::last() const
{
return v_last;
}
-const QString & SearchResult::email() const
+const TQString & SearchResult::email() const
{
return v_email;
}
@@ -1453,22 +1453,22 @@ void SearchResult::setJid(const Jid &jid)
v_jid = jid;
}
-void SearchResult::setNick(const QString &nick)
+void SearchResult::setNick(const TQString &nick)
{
v_nick = nick;
}
-void SearchResult::setFirst(const QString &first)
+void SearchResult::setFirst(const TQString &first)
{
v_first = first;
}
-void SearchResult::setLast(const QString &last)
+void SearchResult::setLast(const TQString &last)
{
v_last = last;
}
-void SearchResult::setEmail(const QString &email)
+void SearchResult::setEmail(const TQString &email)
{
v_email = email;
}
@@ -1481,14 +1481,14 @@ Features::Features()
{
}
-Features::Features(const QStringList &l)
+Features::Features(const TQStringList &l)
{
setList(l);
}
-Features::Features(const QString &str)
+Features::Features(const TQString &str)
{
- QStringList l;
+ TQStringList l;
l << str;
setList(l);
@@ -1498,19 +1498,19 @@ Features::~Features()
{
}
-QStringList Features::list() const
+TQStringList Features::list() const
{
return _list;
}
-void Features::setList(const QStringList &l)
+void Features::setList(const TQStringList &l)
{
_list = l;
}
-bool Features::test(const QStringList &ns) const
+bool Features::test(const TQStringList &ns) const
{
- QStringList::ConstIterator it = ns.begin();
+ TQStringList::ConstIterator it = ns.begin();
for ( ; it != ns.end(); ++it)
if ( _list.find( *it ) != _list.end() )
return true;
@@ -1521,7 +1521,7 @@ bool Features::test(const QStringList &ns) const
#define FID_REGISTER "jabber:iq:register"
bool Features::canRegister() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_REGISTER;
return test(ns);
@@ -1530,7 +1530,7 @@ bool Features::canRegister() const
#define FID_SEARCH "jabber:iq:search"
bool Features::canSearch() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_SEARCH;
return test(ns);
@@ -1539,7 +1539,7 @@ bool Features::canSearch() const
#define FID_XHTML "http://jabber.org/protocol/xhtml-im"
bool Features::canXHTML() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_XHTML;
@@ -1549,7 +1549,7 @@ bool Features::canXHTML() const
#define FID_GROUPCHAT "jabber:iq:conference"
bool Features::canGroupchat() const
{
- QStringList ns;
+ TQStringList ns;
ns << "http://jabber.org/protocol/muc";
ns << FID_GROUPCHAT;
@@ -1559,7 +1559,7 @@ bool Features::canGroupchat() const
#define FID_VOICE "http://www.google.com/xmpp/protocol/voice/v1"
bool Features::canVoice() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VOICE;
return test(ns);
@@ -1568,7 +1568,7 @@ bool Features::canVoice() const
#define FID_GATEWAY "jabber:iq:gateway"
bool Features::isGateway() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_GATEWAY;
return test(ns);
@@ -1577,7 +1577,7 @@ bool Features::isGateway() const
#define FID_DISCO "http://jabber.org/protocol/disco"
bool Features::canDisco() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_DISCO;
ns << "http://jabber.org/protocol/disco#info";
ns << "http://jabber.org/protocol/disco#items";
@@ -1588,7 +1588,7 @@ bool Features::canDisco() const
#define FID_VCARD "vcard-temp"
bool Features::haveVCard() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VCARD;
return test(ns);
@@ -1602,7 +1602,7 @@ class Features::FeatureName : public QObject
Q_OBJECT
public:
FeatureName()
- : QObject(qApp)
+ : TQObject(qApp)
{
id2s[FID_Invalid] = tr("ERROR: Incorrect usage of Features class");
id2s[FID_None] = tr("None");
@@ -1617,7 +1617,7 @@ public:
id2s[FID_Add] = tr("Add to roster");
// compute reverse map
- //QMap<QString, long>::Iterator it = id2s.begin();
+ //TQMap<TQString, long>::Iterator it = id2s.begin();
//for ( ; it != id2s.end(); ++it)
// s2id[it.data()] = it.key();
@@ -1632,9 +1632,9 @@ public:
id2f[FID_Add] = FID_ADD;
}
- //QMap<QString, long> s2id;
- QMap<long, QString> id2s;
- QMap<long, QString> id2f;
+ //TQMap<TQString, long> s2id;
+ TQMap<long, TQString> id2s;
+ TQMap<long, TQString> id2f;
};
static Features::FeatureName *featureName = 0;
@@ -1661,13 +1661,13 @@ long Features::id() const
return FID_None;
}
-long Features::id(const QString &feature)
+long Features::id(const TQString &feature)
{
Features f(feature);
return f.id();
}
-QString Features::feature(long id)
+TQString Features::feature(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1675,7 +1675,7 @@ QString Features::feature(long id)
return featureName->id2f[id];
}
-QString Features::name(long id)
+TQString Features::name(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1683,12 +1683,12 @@ QString Features::name(long id)
return featureName->id2s[id];
}
-QString Features::name() const
+TQString Features::name() const
{
return name(id());
}
-QString Features::name(const QString &feature)
+TQString Features::name(const TQString &feature)
{
Features f(feature);
return f.name(f.id());
@@ -1706,8 +1706,8 @@ public:
}
Jid jid;
- QString name;
- QString node;
+ TQString name;
+ TQString node;
Action action;
Features features;
@@ -1789,22 +1789,22 @@ void DiscoItem::setJid(const Jid &j)
d->jid = j;
}
-const QString &DiscoItem::name() const
+const TQString &DiscoItem::name() const
{
return d->name;
}
-void DiscoItem::setName(const QString &n)
+void DiscoItem::setName(const TQString &n)
{
d->name = n;
}
-const QString &DiscoItem::node() const
+const TQString &DiscoItem::node() const
{
return d->node;
}
-void DiscoItem::setNode(const QString &n)
+void DiscoItem::setNode(const TQString &n)
{
d->node = n;
}
@@ -1843,7 +1843,7 @@ void DiscoItem::setIdentities(const Identities &i)
}
-DiscoItem::Action DiscoItem::string2action(QString s)
+DiscoItem::Action DiscoItem::string2action(TQString s)
{
Action a;
@@ -1857,16 +1857,16 @@ DiscoItem::Action DiscoItem::string2action(QString s)
return a;
}
-QString DiscoItem::action2string(Action a)
+TQString DiscoItem::action2string(Action a)
{
- QString s;
+ TQString s;
if ( a == Update )
s = "update";
else if ( a == Remove )
s = "remove";
else
- s = QString::null;
+ s = TQString::null;
return s;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
index 4c937dd0..95f61e69 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
@@ -27,23 +27,23 @@
//#include"xmpp_types.h"
#include"xmpp_vcard.h"
-#include<qregexp.h>
-#include<qvaluelist.h>
+#include<tqregexp.h>
+#include<tqvaluelist.h>
using namespace XMPP;
-static QString lineEncode(QString str)
+static TQString lineEncode(TQString str)
{
- str.replace(QRegExp("\\\\"), "\\\\"); // backslash to double-backslash
- str.replace(QRegExp("\\|"), "\\p"); // pipe to \p
- str.replace(QRegExp("\n"), "\\n"); // newline to \n
+ str.replace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash
+ str.replace(TQRegExp("\\|"), "\\p"); // pipe to \p
+ str.replace(TQRegExp("\n"), "\\n"); // newline to \n
return str;
}
-static QString lineDecode(const QString &str)
+static TQString lineDecode(const TQString &str)
{
- QString ret;
+ TQString ret;
for(unsigned int n = 0; n < str.length(); ++n) {
if(str.at(n) == '\\') {
@@ -66,12 +66,12 @@ static QString lineDecode(const QString &str)
return ret;
}
-static Roster xmlReadRoster(const QDomElement &q, bool push)
+static Roster xmlReadRoster(const TQDomElement &q, bool push)
{
Roster r;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -115,24 +115,24 @@ JT_Register::~JT_Register()
delete d;
}
-void JT_Register::reg(const QString &user, const QString &pass)
+void JT_Register::reg(const TQString &user, const TQString &pass)
{
d->type = 0;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", user));
query.appendChild(textTag(doc(), "password", pass));
}
-void JT_Register::changepw(const QString &pass)
+void JT_Register::changepw(const TQString &pass)
{
d->type = 1;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", client()->user()));
@@ -144,7 +144,7 @@ void JT_Register::unreg(const Jid &j)
d->type = 2;
to = j.isEmpty() ? client()->host() : j.full();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -160,7 +160,7 @@ void JT_Register::getForm(const Jid &j)
d->type = 3;
to = j;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
}
@@ -170,7 +170,7 @@ void JT_Register::setForm(const Form &form)
d->type = 4;
to = form.jid();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -195,7 +195,7 @@ void JT_Register::onGo()
send(iq);
}
-bool JT_Register::take(const QDomElement &x)
+bool JT_Register::take(const TQDomElement &x)
{
if(!iqVerify(x, to, id()))
return false;
@@ -206,9 +206,9 @@ bool JT_Register::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -270,7 +270,7 @@ void JT_UnRegister::onGo()
d->jt_reg = new JT_Register(this);
d->jt_reg->getForm(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(getFormFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(getFormFinished()));
d->jt_reg->go(false);
}
@@ -279,7 +279,7 @@ void JT_UnRegister::getFormFinished()
disconnect(d->jt_reg, 0, this, 0);
d->jt_reg->unreg(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(unregFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(unregFinished()));
d->jt_reg->go(false);
}
@@ -303,7 +303,7 @@ public:
Private() {}
Roster roster;
- QValueList<QDomElement> itemList;
+ TQValueList<TQDomElement> itemList;
};
JT_Roster::JT_Roster(Task *parent)
@@ -323,20 +323,20 @@ void JT_Roster::get()
type = 0;
//to = client()->host();
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
}
-void JT_Roster::set(const Jid &jid, const QString &name, const QStringList &groups)
+void JT_Roster::set(const Jid &jid, const TQString &name, const TQStringList &groups)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
if(!name.isEmpty())
item.setAttribute("name", name);
- for(QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
+ for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
item.appendChild(textTag(doc(), "group", *it));
d->itemList += item;
}
@@ -345,7 +345,7 @@ void JT_Roster::remove(const Jid &jid)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
item.setAttribute("subscription", "remove");
d->itemList += item;
@@ -358,10 +358,10 @@ void JT_Roster::onGo()
else if(type == 1) {
//to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
query.appendChild(*it);
send(iq);
}
@@ -372,25 +372,25 @@ const Roster & JT_Roster::roster() const
return d->roster;
}
-QString JT_Roster::toString() const
+TQString JT_Roster::toString() const
{
if(type != 1)
return "";
- QDomElement i = doc()->createElement("request");
+ TQDomElement i = doc()->createElement("request");
i.setAttribute("type", "JT_Roster");
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
i.appendChild(*it);
return lineEncode(Stream::xmlToString(i));
return "";
}
-bool JT_Roster::fromString(const QString &str)
+bool JT_Roster::fromString(const TQString &str)
{
- QDomDocument *dd = new QDomDocument;
+ TQDomDocument *dd = new QDomDocument;
if(!dd->setContent(lineDecode(str).utf8()))
return false;
- QDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
+ TQDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
delete dd;
if(e.tagName() != "request" || e.attribute("type") != "JT_Roster")
@@ -398,8 +398,8 @@ bool JT_Roster::fromString(const QString &str)
type = 1;
d->itemList.clear();
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->itemList += i;
@@ -408,7 +408,7 @@ bool JT_Roster::fromString(const QString &str)
return true;
}
-bool JT_Roster::take(const QDomElement &x)
+bool JT_Roster::take(const TQDomElement &x)
{
if(!iqVerify(x, client()->host(), id()))
return false;
@@ -416,7 +416,7 @@ bool JT_Roster::take(const QDomElement &x)
// get
if(type == 0) {
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->roster = xmlReadRoster(q, false);
setSuccess();
}
@@ -457,7 +457,7 @@ JT_PushRoster::~JT_PushRoster()
{
}
-bool JT_PushRoster::take(const QDomElement &e)
+bool JT_PushRoster::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq" || e.attribute("type") != "set")
@@ -504,21 +504,21 @@ void JT_Presence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -535,7 +535,7 @@ void JT_Presence::pres(const Jid &to, const Status &s)
tag.setAttribute("to", to.full());
}
-void JT_Presence::sub(const Jid &to, const QString &subType)
+void JT_Presence::sub(const Jid &to, const TQString &subType)
{
type = 1;
@@ -563,7 +563,7 @@ JT_PushPresence::~JT_PushPresence()
{
}
-bool JT_PushPresence::take(const QDomElement &e)
+bool JT_PushPresence::take(const TQDomElement &e)
{
if(e.tagName() != "presence")
return false;
@@ -572,12 +572,12 @@ bool JT_PushPresence::take(const QDomElement &e)
Status p;
if(e.hasAttribute("type")) {
- QString type = e.attribute("type");
+ TQString type = e.attribute("type");
if(type == "unavailable") {
p.setIsAvailable(false);
}
else if(type == "error") {
- QString str = "";
+ TQString str = "";
int code = 0;
getErrorFromElement(e, &code, &str);
p.setError(code, str);
@@ -588,7 +588,7 @@ bool JT_PushPresence::take(const QDomElement &e)
}
}
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(e, "status", &found);
@@ -601,23 +601,23 @@ bool JT_PushPresence::take(const QDomElement &e)
if(found)
p.setPriority(tagContent(tag).toInt());
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "x" && i.attribute("xmlns") == "jabber:x:delay") {
if(i.hasAttribute("stamp")) {
- QDateTime dt;
+ TQDateTime dt;
if(stamp2TS(i.attribute("stamp"), &dt))
dt = dt.addSecs(client()->timeZoneOffset() * 3600);
p.setTimeStamp(dt);
}
}
else if(i.tagName() == "x" && i.attribute("xmlns") == "gabber:x:music:info") {
- QDomElement t;
+ TQDomElement t;
bool found;
- QString title, state;
+ TQString title, state;
t = findSubTag(i, "title", &found);
if(found)
@@ -651,17 +651,17 @@ bool JT_PushPresence::take(const QDomElement &e)
//----------------------------------------------------------------------------
// JT_Message
//----------------------------------------------------------------------------
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -669,7 +669,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -677,9 +677,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -702,7 +702,7 @@ JT_Message::~JT_Message()
void JT_Message::onGo()
{
Stanza s = m.toStanza(&(client()->stream()));
- QDomElement e = oldStyleNS(s.element());
+ TQDomElement e = oldStyleNS(s.element());
send(e);
setSuccess();
}
@@ -711,41 +711,41 @@ void JT_Message::onGo()
//----------------------------------------------------------------------------
// JT_PushMessage
//----------------------------------------------------------------------------
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(al.item(x).cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -765,7 +765,7 @@ JT_PushMessage::~JT_PushMessage()
{
}
-bool JT_PushMessage::take(const QDomElement &e)
+bool JT_PushMessage::take(const TQDomElement &e)
{
if(e.tagName() != "message")
return false;
@@ -796,7 +796,7 @@ public:
Private() {}
int seconds;
- QString message;
+ TQString message;
};
JT_GetLastActivity::JT_GetLastActivity(Task *parent)
@@ -814,7 +814,7 @@ void JT_GetLastActivity::get(const Jid &j)
{
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:last");
iq.appendChild(query);
}
@@ -824,7 +824,7 @@ int JT_GetLastActivity::seconds() const
return d->seconds;
}
-const QString &JT_GetLastActivity::message() const
+const TQString &JT_GetLastActivity::message() const
{
return d->message;
}
@@ -834,13 +834,13 @@ void JT_GetLastActivity::onGo()
send(iq);
}
-bool JT_GetLastActivity::take(const QDomElement &x)
+bool JT_GetLastActivity::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->message = q.text();
bool ok;
@@ -869,7 +869,7 @@ void JT_GetServices::get(const Jid &j)
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:agents");
iq.appendChild(query);
}
@@ -884,17 +884,17 @@ void JT_GetServices::onGo()
send(iq);
}
-bool JT_GetServices::take(const QDomElement &x)
+bool JT_GetServices::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
// agents
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -903,7 +903,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setJid(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "name", &found);
@@ -911,7 +911,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setName(tagContent(tag));
// determine which namespaces does item support
- QStringList ns;
+ TQStringList ns;
tag = findSubTag(i, "register", &found);
if(found)
@@ -950,7 +950,7 @@ class JT_VCard::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
VCard vcard;
};
@@ -972,7 +972,7 @@ void JT_VCard::get(const Jid &_jid)
type = 0;
d->jid = _jid;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement v = doc()->createElement("vCard");
+ TQDomElement v = doc()->createElement("vCard");
v.setAttribute("xmlns", "vcard-temp");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
@@ -1003,7 +1003,7 @@ void JT_VCard::onGo()
send(d->iq);
}
-bool JT_VCard::take(const QDomElement &x)
+bool JT_VCard::take(const TQDomElement &x)
{
Jid to = d->jid;
if (to.userHost() == client()->jid().userHost())
@@ -1013,8 +1013,8 @@ bool JT_VCard::take(const QDomElement &x)
if(x.attribute("type") == "result") {
if(type == 0) {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement q = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement q = n.toElement();
if(q.isNull())
continue;
@@ -1052,7 +1052,7 @@ public:
Jid jid;
Form form;
- QValueList<SearchResult> resultList;
+ TQValueList<SearchResult> resultList;
};
JT_Search::JT_Search(Task *parent)
@@ -1072,7 +1072,7 @@ void JT_Search::get(const Jid &jid)
type = 0;
d->jid = jid;
iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
}
@@ -1082,7 +1082,7 @@ void JT_Search::set(const Form &form)
type = 1;
d->jid = form.jid();
iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
@@ -1102,7 +1102,7 @@ const Form & JT_Search::form() const
return d->form;
}
-const QValueList<SearchResult> & JT_Search::results() const
+const TQValueList<SearchResult> & JT_Search::results() const
{
return d->resultList;
}
@@ -1112,7 +1112,7 @@ void JT_Search::onGo()
send(iq);
}
-bool JT_Search::take(const QDomElement &x)
+bool JT_Search::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1123,9 +1123,9 @@ bool JT_Search::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1145,16 +1145,16 @@ bool JT_Search::take(const QDomElement &x)
else {
d->resultList.clear();
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item") {
SearchResult r(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "nick", &found);
@@ -1196,7 +1196,7 @@ void JT_ClientVersion::get(const Jid &jid)
{
j = jid;
iq = createIQ(doc(), "get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
}
@@ -1206,15 +1206,15 @@ void JT_ClientVersion::onGo()
send(iq);
}
-bool JT_ClientVersion::take(const QDomElement &x)
+bool JT_ClientVersion::take(const TQDomElement &x)
{
if(!iqVerify(x, j, id()))
return false;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "name", &found);
if(found)
v_name = tagContent(tag);
@@ -1239,17 +1239,17 @@ const Jid & JT_ClientVersion::jid() const
return j;
}
-const QString & JT_ClientVersion::name() const
+const TQString & JT_ClientVersion::name() const
{
return v_name;
}
-const QString & JT_ClientVersion::version() const
+const TQString & JT_ClientVersion::version() const
{
return v_ver;
}
-const QString & JT_ClientVersion::os() const
+const TQString & JT_ClientVersion::os() const
{
return v_os;
}
@@ -1263,7 +1263,7 @@ const QString & JT_ClientVersion::os() const
{
j = _j;
iq = createIQ("get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:time");
iq.appendChild(query);
}
@@ -1273,15 +1273,15 @@ void JT_ClientTime::go()
send(iq);
}
-bool JT_ClientTime::take(const QDomElement &x)
+bool JT_ClientTime::take(const TQDomElement &x)
{
if(x.attribute("id") != id())
return FALSE;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "utc", &found);
if(found)
stamp2TS(tagContent(tag), &utc);
@@ -1316,15 +1316,15 @@ JT_ServInfo::~JT_ServInfo()
{
}
-bool JT_ServInfo::take(const QDomElement &e)
+bool JT_ServInfo::take(const TQDomElement &e)
{
if(e.tagName() != "iq" || e.attribute("type") != "get")
return false;
- QString ns = queryNS(e);
+ TQString ns = queryNS(e);
if(ns == "jabber:iq:version") {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
query.appendChild(textTag(doc(), "name", client()->clientName()));
@@ -1334,29 +1334,29 @@ bool JT_ServInfo::take(const QDomElement &e)
return true;
}
//else if(ns == "jabber:iq:time") {
- // QDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
- // QDomElement query = doc()->createElement("query");
+ // TQDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
+ // TQDomElement query = doc()->createElement("query");
// query.setAttribute("xmlns", "jabber:iq:time");
// iq.appendChild(query);
- // QDateTime local = QDateTime::currentDateTime();
- // QDateTime utc = local.addSecs(-getTZOffset() * 3600);
- // QString str = getTZString();
+ // TQDateTime local = TQDateTime::currentDateTime();
+ // TQDateTime utc = local.addSecs(-getTZOffset() * 3600);
+ // TQString str = getTZString();
// query.appendChild(textTag("utc", TS2stamp(utc)));
// query.appendChild(textTag("tz", str));
- // query.appendChild(textTag("display", QString("%1 %2").arg(local.toString()).arg(str)));
+ // query.appendChild(textTag("display", TQString("%1 %2").arg(local.toString()).arg(str)));
// send(iq);
// return TRUE;
//}
else if(ns == "http://jabber.org/protocol/disco#info") {
// Find out the node
- QString node;
+ TQString node;
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found) // NOTE: Should always be true, since a NS was found above
node = q.attribute("node");
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if (!node.isEmpty())
query.setAttribute("node", node);
@@ -1364,7 +1364,7 @@ bool JT_ServInfo::take(const QDomElement &e)
// Identity
DiscoItem::Identity identity = client()->identity();
- QDomElement id = doc()->createElement("identity");
+ TQDomElement id = doc()->createElement("identity");
if (!identity.category.isEmpty() && !identity.type.isEmpty()) {
id.setAttribute("category",identity.category);
id.setAttribute("type",identity.type);
@@ -1379,7 +1379,7 @@ bool JT_ServInfo::take(const QDomElement &e)
}
query.appendChild(id);
- QDomElement feature;
+ TQDomElement feature;
if (node.isEmpty() || node == client()->capsNode() + "#" + client()->capsVersion()) {
// Standard features
feature = doc()->createElement("feature");
@@ -1404,10 +1404,10 @@ bool JT_ServInfo::take(const QDomElement &e)
if (node.isEmpty()) {
// Extended features
- QStringList exts = client()->extensions();
- for (QStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
- const QStringList& l = client()->extension(*i).list();
- for ( QStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
+ TQStringList exts = client()->extensions();
+ for (TQStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
+ const TQStringList& l = client()->extension(*i).list();
+ for ( TQStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *j);
query.appendChild(feature);
@@ -1416,10 +1416,10 @@ bool JT_ServInfo::take(const QDomElement &e)
}
}
else if (node.startsWith(client()->capsNode() + "#")) {
- QString ext = node.right(node.length()-client()->capsNode().length()-1);
+ TQString ext = node.right(node.length()-client()->capsNode().length()-1);
if (client()->extensions().contains(ext)) {
- const QStringList& l = client()->extension(ext).list();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ const TQStringList& l = client()->extension(ext).list();
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *it);
query.appendChild(feature);
@@ -1455,18 +1455,18 @@ void JT_Gateway::get(const Jid &jid)
type = 0;
v_jid = jid;
iq = createIQ(doc(), "get", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
}
-void JT_Gateway::set(const Jid &jid, const QString &prompt)
+void JT_Gateway::set(const Jid &jid, const TQString &prompt)
{
type = 1;
v_jid = jid;
v_prompt = prompt;
iq = createIQ(doc(), "set", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
query.appendChild(textTag(doc(), "prompt", v_prompt));
@@ -1482,26 +1482,26 @@ Jid JT_Gateway::jid() const
return v_jid;
}
-QString JT_Gateway::desc() const
+TQString JT_Gateway::desc() const
{
return v_desc;
}
-QString JT_Gateway::prompt() const
+TQString JT_Gateway::prompt() const
{
return v_prompt;
}
-bool JT_Gateway::take(const QDomElement &x)
+bool JT_Gateway::take(const TQDomElement &x)
{
if(!iqVerify(x, v_jid, id()))
return false;
if(x.attribute("type") == "result") {
if(type == 0) {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "desc", &found);
if(found)
v_desc = tagContent(tag);
@@ -1510,9 +1510,9 @@ bool JT_Gateway::take(const QDomElement &x)
v_prompt = tagContent(tag);
}
else {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "prompt", &found);
if(found)
v_prompt = tagContent(tag);
@@ -1533,7 +1533,7 @@ bool JT_Gateway::take(const QDomElement &x)
class JT_Browse::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
AgentItem root;
@@ -1556,7 +1556,7 @@ void JT_Browse::get (const Jid &j)
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("item");
+ TQDomElement query = doc()->createElement("item");
query.setAttribute("xmlns", "jabber:iq:browse");
d->iq.appendChild(query);
}
@@ -1576,7 +1576,7 @@ void JT_Browse::onGo ()
send(d->iq);
}
-AgentItem JT_Browse::browseHelper (const QDomElement &i)
+AgentItem JT_Browse::browseHelper (const TQDomElement &i)
{
AgentItem a;
@@ -1598,9 +1598,9 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
a.setType ( i.attribute("type") );
- QStringList ns;
- for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList ns;
+ for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1618,21 +1618,21 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
return a;
}
-bool JT_Browse::take(const QDomElement &x)
+bool JT_Browse::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->root = browseHelper (i);
- for(QDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
- QDomElement e = nn.toElement();
+ for(TQDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
+ TQDomElement e = nn.toElement();
if ( e.isNull() )
continue;
if ( e.tagName() == "ns" )
@@ -1659,7 +1659,7 @@ class JT_DiscoItems::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList items;
};
@@ -1680,13 +1680,13 @@ void JT_DiscoItems::get(const DiscoItem &item)
get(item.jid(), item.node());
}
-void JT_DiscoItems::get (const Jid &j, const QString &node)
+void JT_DiscoItems::get (const Jid &j, const TQString &node)
{
d->items.clear();
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
if ( !node.isEmpty() )
@@ -1705,16 +1705,16 @@ void JT_DiscoItems::onGo ()
send(d->iq);
}
-bool JT_DiscoItems::take(const QDomElement &x)
+bool JT_DiscoItems::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1747,9 +1747,9 @@ class JT_DiscoInfo::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
- QString node;
+ TQString node;
DiscoItem item;
};
@@ -1772,21 +1772,21 @@ void JT_DiscoInfo::get(const DiscoItem &item)
get(item.jid(), item.node(), id);
}
-void JT_DiscoInfo::get (const Jid &j, const QString &node, DiscoItem::Identity ident)
+void JT_DiscoInfo::get (const Jid &j, const TQString &node, DiscoItem::Identity ident)
{
d->item = DiscoItem(); // clear item
d->jid = j;
d->node = node;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if ( !node.isEmpty() )
query.setAttribute("node", node);
if ( !ident.category.isEmpty() && !ident.type.isEmpty() ) {
- QDomElement i = doc()->createElement("item");
+ TQDomElement i = doc()->createElement("item");
i.setAttribute("category", ident.category);
i.setAttribute("type", ident.type);
@@ -1816,7 +1816,7 @@ const Jid& JT_DiscoInfo::jid() const
* Is here because sometimes the responder does not include this information
* in the reply.
*/
-const QString& JT_DiscoInfo::node() const
+const TQString& JT_DiscoInfo::node() const
{
return d->node;
}
@@ -1833,24 +1833,24 @@ void JT_DiscoInfo::onGo ()
send(d->iq);
}
-bool JT_DiscoInfo::take(const QDomElement &x)
+bool JT_DiscoInfo::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
DiscoItem item;
item.setJid( d->jid );
item.setNode( q.attribute("node") );
- QStringList features;
+ TQStringList features;
DiscoItem::Identities identities;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1890,7 +1890,7 @@ class JT_DiscoPublish::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList list;
};
@@ -1912,7 +1912,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
d->jid = j;
d->iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
// FIXME: unsure about this
@@ -1921,7 +1921,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
DiscoList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it) {
- QDomElement w = doc()->createElement("item");
+ TQDomElement w = doc()->createElement("item");
w.setAttribute("jid", (*it).jid().full());
if ( !(*it).name().isEmpty() )
@@ -1941,7 +1941,7 @@ void JT_DiscoPublish::onGo ()
send(d->iq);
}
-bool JT_DiscoPublish::take(const QDomElement &x)
+bool JT_DiscoPublish::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1988,21 +1988,21 @@ void JT_MucPresence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -2013,11 +2013,11 @@ void JT_MucPresence::pres(const Status &s)
}
}
-void JT_MucPresence::pres(const Jid &to, const Status &s, const QString &password)
+void JT_MucPresence::pres(const Jid &to, const Status &s, const TQString &password)
{
pres(s);
tag.setAttribute("to", to.full());
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "http://jabber.org/protocol/muc");
x.appendChild( textTag(doc(), "password", password.latin1()) );
tag.appendChild(x);
@@ -2038,8 +2038,8 @@ class JT_PrivateStorage::Private
public:
Private() : type(-1) {}
- QDomElement iq;
- QDomElement elem;
+ TQDomElement iq;
+ TQDomElement elem;
int type;
};
@@ -2054,27 +2054,27 @@ JT_PrivateStorage::~JT_PrivateStorage()
delete d;
}
-void JT_PrivateStorage::get(const QString& tag, const QString& xmlns)
+void JT_PrivateStorage::get(const TQString& tag, const TQString& xmlns)
{
d->type = 0;
- d->iq = createIQ(doc(), "get" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "get" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
- QDomElement s = doc()->createElement(tag);
+ TQDomElement s = doc()->createElement(tag);
if(!xmlns.isEmpty())
s.setAttribute("xmlns", xmlns);
query.appendChild(s);
}
-void JT_PrivateStorage::set(const QDomElement& element)
+void JT_PrivateStorage::set(const TQDomElement& element)
{
d->type = 1;
d->elem=element;
- QDomNode n=doc()->importNode(element,true);
+ TQDomNode n=doc()->importNode(element,true);
- d->iq = createIQ(doc(), "set" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "set" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
query.appendChild(n);
@@ -2085,17 +2085,17 @@ void JT_PrivateStorage::onGo()
send(d->iq);
}
-bool JT_PrivateStorage::take(const QDomElement &x)
+bool JT_PrivateStorage::take(const TQDomElement &x)
{
- QString to = client()->host();
+ TQString to = client()->host();
if(!iqVerify(x, to, id()))
return false;
if(x.attribute("type") == "result") {
if(d->type == 0) {
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->elem=i;
@@ -2113,7 +2113,7 @@ bool JT_PrivateStorage::take(const QDomElement &x)
}
-QDomElement JT_PrivateStorage::element( )
+TQDomElement JT_PrivateStorage::element( )
{
return d->elem;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
index bf1cc44d..c8085013 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
@@ -21,8 +21,8 @@
#ifndef JABBER_TASKS_H
#define JABBER_TASKS_H
-#include<qstring.h>
-#include<qdom.h>
+#include<tqstring.h>
+#include<tqdom.h>
#include"im.h"
#include"xmpp_vcard.h"
@@ -39,8 +39,8 @@ namespace XMPP
JT_Register(Task *parent);
~JT_Register();
- void reg(const QString &user, const QString &pass);
- void changepw(const QString &pass);
+ void reg(const TQString &user, const TQString &pass);
+ void changepw(const TQString &pass);
void unreg(const Jid &j="");
const Form & form() const;
@@ -48,10 +48,10 @@ namespace XMPP
void setForm(const Form &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -86,20 +86,20 @@ namespace XMPP
~JT_Roster();
void get();
- void set(const Jid &, const QString &name, const QStringList &groups);
+ void set(const Jid &, const TQString &name, const TQStringList &groups);
void remove(const Jid &);
const Roster & roster() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -113,7 +113,7 @@ namespace XMPP
JT_PushRoster(Task *parent);
~JT_PushRoster();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void roster(const Roster &);
@@ -132,12 +132,12 @@ namespace XMPP
void pres(const Status &);
void pres(const Jid &, const Status &);
- void sub(const Jid &, const QString &subType);
+ void sub(const Jid &, const TQString &subType);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -151,11 +151,11 @@ namespace XMPP
JT_PushPresence(Task *parent);
~JT_PushPresence();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void presence(const Jid &, const Status &);
- void subscription(const Jid &, const QString &);
+ void subscription(const Jid &, const TQString &);
private:
class Private;
@@ -185,7 +185,7 @@ namespace XMPP
JT_PushMessage(Task *parent);
~JT_PushMessage();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void message(const Message &);
@@ -205,16 +205,16 @@ namespace XMPP
void get(const Jid &);
int seconds() const;
- const QString &message() const;
+ const TQString &message() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
};
@@ -229,13 +229,13 @@ namespace XMPP
const AgentList & agents() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
};
@@ -254,7 +254,7 @@ namespace XMPP
const VCard & vcard() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
@@ -271,16 +271,16 @@ namespace XMPP
~JT_Search();
const Form & form() const;
- const QValueList<SearchResult> & results() const;
+ const TQValueList<SearchResult> & results() const;
void get(const Jid &);
void set(const Form &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
class Private;
@@ -295,18 +295,18 @@ namespace XMPP
void get(const Jid &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
const Jid & jid() const;
- const QString & name() const;
- const QString & version() const;
- const QString & os() const;
+ const TQString & name() const;
+ const TQString & version() const;
+ const TQString & os() const;
private:
- QDomElement iq;
+ TQDomElement iq;
Jid j;
- QString v_name, v_ver, v_os;
+ TQString v_name, v_ver, v_os;
};
/*
class JT_ClientTime : public Task
@@ -316,14 +316,14 @@ namespace XMPP
JT_ClientTime(Task *, const Jid &);
void go();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid j;
- QDateTime utc;
- QString timezone, display;
+ TQDateTime utc;
+ TQString timezone, display;
private:
- QDomElement iq;
+ TQDomElement iq;
};
*/
class JT_ServInfo : public Task
@@ -333,7 +333,7 @@ namespace XMPP
JT_ServInfo(Task *);
~JT_ServInfo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
class JT_Gateway : public Task
@@ -343,20 +343,20 @@ namespace XMPP
JT_Gateway(Task *);
void get(const Jid &);
- void set(const Jid &, const QString &prompt);
+ void set(const Jid &, const TQString &prompt);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid jid() const;
- QString desc() const;
- QString prompt() const;
+ TQString desc() const;
+ TQString prompt() const;
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
Jid v_jid;
- QString v_prompt, v_desc;
+ TQString v_prompt, v_desc;
};
class JT_Browse : public Task
@@ -372,13 +372,13 @@ namespace XMPP
const AgentItem & root() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
Private *d;
- AgentItem browseHelper (const QDomElement &i);
+ AgentItem browseHelper (const TQDomElement &i);
};
class JT_DiscoItems : public Task
@@ -388,13 +388,13 @@ namespace XMPP
JT_DiscoItems(Task *);
~JT_DiscoItems();
- void get(const Jid &, const QString &node = QString::null);
+ void get(const Jid &, const TQString &node = TQString::null);
void get(const DiscoItem &);
const DiscoList &items() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -408,15 +408,15 @@ namespace XMPP
JT_DiscoInfo(Task *);
~JT_DiscoInfo();
- void get(const Jid &, const QString &node = QString::null, const DiscoItem::Identity = DiscoItem::Identity());
+ void get(const Jid &, const TQString &node = TQString::null, const DiscoItem::Identity = DiscoItem::Identity());
void get(const DiscoItem &);
const DiscoItem &item() const;
const Jid& jid() const;
- const QString& node() const;
+ const TQString& node() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -433,7 +433,7 @@ namespace XMPP
void set(const Jid &, const DiscoList &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -448,12 +448,12 @@ namespace XMPP
~JT_MucPresence();
void pres(const Status &);
- void pres(const Jid &, const Status &, const QString &password);
+ void pres(const Jid &, const Status &, const TQString &password);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -467,13 +467,13 @@ namespace XMPP
JT_PrivateStorage(Task *parent);
~JT_PrivateStorage();
- void set(const QDomElement &);
- void get(const QString &tag, const QString& xmlns);
+ void set(const TQDomElement &);
+ void get(const TQString &tag, const TQString& xmlns);
- QDomElement element();
+ TQDomElement element();
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
index e79d9b9f..5f5214fd 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
@@ -22,30 +22,30 @@
#include "base64.h"
-#include <qdom.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
-#include <qimage.h> // needed for image format recognition
-#include <qbuffer.h>
+#include <tqimage.h> // needed for image format recognition
+#include <tqbuffer.h>
// Justin's XML helper functions
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+static TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName().upper() == name.upper()) { // mblsha: ignore case when searching
@@ -55,33 +55,33 @@ static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *f
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
// mblsha's own functions
-static QDomElement emptyTag(QDomDocument *doc, const QString &name)
+static TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-static bool hasSubTag(const QDomElement &e, const QString &name)
+static bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-static QString subTagText(const QDomElement &e, const QString &name)
+static TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text().stripWhiteSpace();
- return QString::null;
+ return TQString::null;
}
using namespace XMPP;
@@ -89,11 +89,11 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// VCard
//----------------------------------------------------------------------------
-static QString image2type(const QByteArray &ba)
+static TQString image2type(const TQByteArray &ba)
{
- QBuffer buf(ba);
+ TQBuffer buf(ba);
buf.open(IO_ReadOnly);
- QString format = QImageIO::imageFormat( &buf );
+ TQString format = TQImageIO::imageFormat( &buf );
// TODO: add more formats
if ( format == "PNG" || format == "PsiPNG" )
@@ -117,9 +117,9 @@ static QString image2type(const QByteArray &ba)
}
// Long lines of encoded binary data SHOULD BE folded to 75 characters using the folding method defined in [MIME-DIR].
-static QString foldString(const QString &s)
+static TQString foldString(const TQString &s)
{
- QString ret;
+ TQString ret;
for (int i = 0; i < (int)s.length(); i++) {
if ( !(i % 75) )
@@ -136,47 +136,47 @@ public:
Private();
~Private();
- QString version;
- QString fullName;
- QString familyName, givenName, middleName, prefixName, suffixName;
- QString nickName;
+ TQString version;
+ TQString fullName;
+ TQString familyName, givenName, middleName, prefixName, suffixName;
+ TQString nickName;
- QByteArray photo;
- QString photoURI;
+ TQByteArray photo;
+ TQString photoURI;
- QString bday;
+ TQString bday;
AddressList addressList;
LabelList labelList;
PhoneList phoneList;
EmailList emailList;
- QString jid;
- QString mailer;
- QString timezone;
+ TQString jid;
+ TQString mailer;
+ TQString timezone;
Geo geo;
- QString title;
- QString role;
+ TQString title;
+ TQString role;
- QByteArray logo;
- QString logoURI;
+ TQByteArray logo;
+ TQString logoURI;
VCard *agent;
- QString agentURI;
+ TQString agentURI;
Org org;
- QStringList categories;
- QString note;
- QString prodId;
- QString rev;
- QString sortString;
-
- QByteArray sound;
- QString soundURI, soundPhonetic;
-
- QString uid;
- QString url;
- QString desc;
+ TQStringList categories;
+ TQString note;
+ TQString prodId;
+ TQString rev;
+ TQString sortString;
+
+ TQByteArray sound;
+ TQString soundURI, soundPhonetic;
+
+ TQString uid;
+ TQString url;
+ TQString desc;
PrivacyClass privacyClass;
- QByteArray key;
+ TQByteArray key;
bool isEmpty();
};
@@ -263,9 +263,9 @@ VCard::~VCard()
delete d;
}
-QDomElement VCard::toXml(QDomDocument *doc) const
+TQDomElement VCard::toXml(TQDomDocument *doc) const
{
- QDomElement v = doc->createElement("vCard");
+ TQDomElement v = doc->createElement("vCard");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
v.setAttribute("xmlns", "vcard-temp");
@@ -277,7 +277,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->familyName.isEmpty() || !d->givenName.isEmpty() || !d->middleName.isEmpty() ||
!d->prefixName.isEmpty() || !d->suffixName.isEmpty() ) {
- QDomElement w = doc->createElement("N");
+ TQDomElement w = doc->createElement("N");
if ( !d->familyName.isEmpty() )
w.appendChild( textTag(doc, "FAMILY", d->familyName) );
@@ -297,7 +297,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "NICKNAME", d->nickName) );
if ( !d->photo.isEmpty() || !d->photoURI.isEmpty() ) {
- QDomElement w = doc->createElement("PHOTO");
+ TQDomElement w = doc->createElement("PHOTO");
if ( !d->photo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->photo)) );
@@ -315,7 +315,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->addressList.isEmpty() ) {
AddressList::Iterator it = d->addressList.begin();
for ( ; it != d->addressList.end(); ++it ) {
- QDomElement w = doc->createElement("ADR");
+ TQDomElement w = doc->createElement("ADR");
Address a = *it;
if ( a.home )
@@ -355,7 +355,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->labelList.isEmpty() ) {
LabelList::Iterator it = d->labelList.begin();
for ( ; it != d->labelList.end(); ++it ) {
- QDomElement w = doc->createElement("LABEL");
+ TQDomElement w = doc->createElement("LABEL");
Label l = *it;
if ( l.home )
@@ -374,7 +374,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
w.appendChild( emptyTag(doc, "PREF") );
if ( !l.lines.isEmpty() ) {
- QStringList::Iterator it = l.lines.begin();
+ TQStringList::Iterator it = l.lines.begin();
for ( ; it != l.lines.end(); ++it )
w.appendChild( textTag(doc, "LINE", *it) );
}
@@ -386,7 +386,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->phoneList.isEmpty() ) {
PhoneList::Iterator it = d->phoneList.begin();
for ( ; it != d->phoneList.end(); ++it ) {
- QDomElement w = doc->createElement("TEL");
+ TQDomElement w = doc->createElement("TEL");
Phone p = *it;
if ( p.home )
@@ -426,7 +426,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->emailList.isEmpty() ) {
EmailList::Iterator it = d->emailList.begin();
for ( ; it != d->emailList.end(); ++it ) {
- QDomElement w = doc->createElement("EMAIL");
+ TQDomElement w = doc->createElement("EMAIL");
Email e = *it;
if ( e.home )
@@ -453,7 +453,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "TZ", d->timezone) );
if ( !d->geo.lat.isEmpty() || !d->geo.lon.isEmpty() ) {
- QDomElement w = doc->createElement("GEO");
+ TQDomElement w = doc->createElement("GEO");
if ( !d->geo.lat.isEmpty() )
w.appendChild( textTag(doc, "LAT", d->geo.lat) );
@@ -469,7 +469,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "ROLE", d->role) );
if ( !d->logo.isEmpty() || !d->logoURI.isEmpty() ) {
- QDomElement w = doc->createElement("LOGO");
+ TQDomElement w = doc->createElement("LOGO");
if ( !d->logo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->logo)) );
@@ -482,7 +482,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->agentURI.isEmpty() || (d->agent && d->agent->isEmpty()) ) {
- QDomElement w = doc->createElement("AGENT");
+ TQDomElement w = doc->createElement("AGENT");
if ( d->agent && !d->agent->isEmpty() )
w.appendChild( d->agent->toXml(doc) );
@@ -493,13 +493,13 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->org.name.isEmpty() || !d->org.unit.isEmpty() ) {
- QDomElement w = doc->createElement("ORG");
+ TQDomElement w = doc->createElement("ORG");
if ( !d->org.name.isEmpty() )
w.appendChild( textTag(doc, "ORGNAME", d->org.name) );
if ( !d->org.unit.isEmpty() ) {
- QStringList::Iterator it = d->org.unit.begin();
+ TQStringList::Iterator it = d->org.unit.begin();
for ( ; it != d->org.unit.end(); ++it )
w.appendChild( textTag(doc, "ORGUNIT", *it) );
}
@@ -508,9 +508,9 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->categories.isEmpty() ) {
- QDomElement w = doc->createElement("CATEGORIES");
+ TQDomElement w = doc->createElement("CATEGORIES");
- QStringList::Iterator it = d->categories.begin();
+ TQStringList::Iterator it = d->categories.begin();
for ( ; it != d->categories.end(); ++it )
w.appendChild( textTag(doc, "KEYWORD", *it) );
@@ -527,7 +527,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "SORT-STRING", d->sortString) );
if ( !d->sound.isEmpty() || !d->soundURI.isEmpty() || !d->soundPhonetic.isEmpty() ) {
- QDomElement w = doc->createElement("SOUND");
+ TQDomElement w = doc->createElement("SOUND");
if ( !d->sound.isEmpty() )
w.appendChild( textTag(doc, "BINVAL", foldString( Base64::arrayToString(d->sound)) ) );
@@ -547,7 +547,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "DESC", d->desc) );
if ( d->privacyClass != pcNone ) {
- QDomElement w = doc->createElement("CLASS");
+ TQDomElement w = doc->createElement("CLASS");
if ( d->privacyClass == pcPublic )
w.appendChild( emptyTag(doc, "PUBLIC") );
@@ -560,11 +560,11 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->key.isEmpty() ) {
- QDomElement w = doc->createElement("KEY");
+ TQDomElement w = doc->createElement("KEY");
// TODO: Justin, please check out this code
w.appendChild( textTag(doc, "TYPE", "text/plain")); // FIXME
- w.appendChild( textTag(doc, "CRED", QString::fromUtf8(d->key)) ); // FIXME
+ w.appendChild( textTag(doc, "CRED", TQString::fromUtf8(d->key)) ); // FIXME
v.appendChild(w);
}
@@ -572,21 +572,21 @@ QDomElement VCard::toXml(QDomDocument *doc) const
return v;
}
-bool VCard::fromXml(const QDomElement &q)
+bool VCard::fromXml(const TQDomElement &q)
{
if ( q.tagName().upper() != "VCARD" )
return false;
- QDomNode n = q.firstChild();
+ TQDomNode n = q.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() ) {
- QDomElement i = n.toElement();
+ TQDomElement i = n.toElement();
if ( i.isNull() )
continue;
- QString tag = i.tagName().upper();
+ TQString tag = i.tagName().upper();
bool found;
- QDomElement e;
+ TQDomElement e;
if ( tag == "VERSION" )
d->version = i.text().stripWhiteSpace();
@@ -647,9 +647,9 @@ bool VCard::fromXml(const QDomElement &q)
l.intl = hasSubTag(i, "INTL");
l.pref = hasSubTag(i, "PREF");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -734,9 +734,9 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "ORG" ) {
d->org.name = subTagText(i, "ORGNAME");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -745,9 +745,9 @@ bool VCard::fromXml(const QDomElement &q)
}
}
else if ( tag == "CATEGORIES") {
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ee = nn.toElement();
+ TQDomElement ee = nn.toElement();
if ( ee.isNull() )
continue;
@@ -785,7 +785,7 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "KEY" ) {
// TODO: Justin, please check out this code
e = findSubTag(i, "TYPE", &found);
- QString type = "text/plain";
+ TQString type = "text/plain";
if ( found )
type = e.text().stripWhiteSpace();
@@ -838,122 +838,122 @@ VCard::Org::Org()
// vCard properties...
-const QString &VCard::version() const
+const TQString &VCard::version() const
{
return d->version;
}
-void VCard::setVersion(const QString &v)
+void VCard::setVersion(const TQString &v)
{
d->version = v;
}
-const QString &VCard::fullName() const
+const TQString &VCard::fullName() const
{
return d->fullName;
}
-void VCard::setFullName(const QString &n)
+void VCard::setFullName(const TQString &n)
{
d->fullName = n;
}
-const QString &VCard::familyName() const
+const TQString &VCard::familyName() const
{
return d->familyName;
}
-void VCard::setFamilyName(const QString &n)
+void VCard::setFamilyName(const TQString &n)
{
d->familyName = n;
}
-const QString &VCard::givenName() const
+const TQString &VCard::givenName() const
{
return d->givenName;
}
-void VCard::setGivenName(const QString &n)
+void VCard::setGivenName(const TQString &n)
{
d->givenName = n;
}
-const QString &VCard::middleName() const
+const TQString &VCard::middleName() const
{
return d->middleName;
}
-void VCard::setMiddleName(const QString &n)
+void VCard::setMiddleName(const TQString &n)
{
d->middleName = n;
}
-const QString &VCard::prefixName() const
+const TQString &VCard::prefixName() const
{
return d->prefixName;
}
-void VCard::setPrefixName(const QString &p)
+void VCard::setPrefixName(const TQString &p)
{
d->prefixName = p;
}
-const QString &VCard::suffixName() const
+const TQString &VCard::suffixName() const
{
return d->suffixName;
}
-void VCard::setSuffixName(const QString &s)
+void VCard::setSuffixName(const TQString &s)
{
d->suffixName = s;
}
-const QString &VCard::nickName() const
+const TQString &VCard::nickName() const
{
return d->nickName;
}
-void VCard::setNickName(const QString &n)
+void VCard::setNickName(const TQString &n)
{
d->nickName = n;
}
-const QByteArray &VCard::photo() const
+const TQByteArray &VCard::photo() const
{
return d->photo;
}
-void VCard::setPhoto(const QByteArray &i)
+void VCard::setPhoto(const TQByteArray &i)
{
d->photo = i;
}
-const QString &VCard::photoURI() const
+const TQString &VCard::photoURI() const
{
return d->photoURI;
}
-void VCard::setPhotoURI(const QString &p)
+void VCard::setPhotoURI(const TQString &p)
{
d->photoURI = p;
}
-const QDate VCard::bday() const
+const TQDate VCard::bday() const
{
- return QDate::fromString(d->bday);
+ return TQDate::fromString(d->bday);
}
-void VCard::setBday(const QDate &date)
+void VCard::setBday(const TQDate &date)
{
d->bday = date.toString();
}
-const QString &VCard::bdayStr() const
+const TQString &VCard::bdayStr() const
{
return d->bday;
}
-void VCard::setBdayStr(const QString &date)
+void VCard::setBdayStr(const TQString &date)
{
d->bday = date;
}
@@ -998,32 +998,32 @@ void VCard::setEmailList(const VCard::EmailList &e)
d->emailList = e;
}
-const QString &VCard::jid() const
+const TQString &VCard::jid() const
{
return d->jid;
}
-void VCard::setJid(const QString &j)
+void VCard::setJid(const TQString &j)
{
d->jid = j;
}
-const QString &VCard::mailer() const
+const TQString &VCard::mailer() const
{
return d->mailer;
}
-void VCard::setMailer(const QString &m)
+void VCard::setMailer(const TQString &m)
{
d->mailer = m;
}
-const QString &VCard::timezone() const
+const TQString &VCard::timezone() const
{
return d->timezone;
}
-void VCard::setTimezone(const QString &t)
+void VCard::setTimezone(const TQString &t)
{
d->timezone = t;
}
@@ -1038,42 +1038,42 @@ void VCard::setGeo(const VCard::Geo &g)
d->geo = g;
}
-const QString &VCard::title() const
+const TQString &VCard::title() const
{
return d->title;
}
-void VCard::setTitle(const QString &t)
+void VCard::setTitle(const TQString &t)
{
d->title = t;
}
-const QString &VCard::role() const
+const TQString &VCard::role() const
{
return d->role;
}
-void VCard::setRole(const QString &r)
+void VCard::setRole(const TQString &r)
{
d->role = r;
}
-const QByteArray &VCard::logo() const
+const TQByteArray &VCard::logo() const
{
return d->logo;
}
-void VCard::setLogo(const QByteArray &i)
+void VCard::setLogo(const TQByteArray &i)
{
d->logo = i;
}
-const QString &VCard::logoURI() const
+const TQString &VCard::logoURI() const
{
return d->logoURI;
}
-void VCard::setLogoURI(const QString &l)
+void VCard::setLogoURI(const TQString &l)
{
d->logoURI = l;
}
@@ -1090,12 +1090,12 @@ void VCard::setAgent(const VCard &v)
*(d->agent) = v;
}
-const QString VCard::agentURI() const
+const TQString VCard::agentURI() const
{
return d->agentURI;
}
-void VCard::setAgentURI(const QString &a)
+void VCard::setAgentURI(const TQString &a)
{
d->agentURI = a;
}
@@ -1110,112 +1110,112 @@ void VCard::setOrg(const VCard::Org &o)
d->org = o;
}
-const QStringList &VCard::categories() const
+const TQStringList &VCard::categories() const
{
return d->categories;
}
-void VCard::setCategories(const QStringList &c)
+void VCard::setCategories(const TQStringList &c)
{
d->categories = c;
}
-const QString &VCard::note() const
+const TQString &VCard::note() const
{
return d->note;
}
-void VCard::setNote(const QString &n)
+void VCard::setNote(const TQString &n)
{
d->note = n;
}
-const QString &VCard::prodId() const
+const TQString &VCard::prodId() const
{
return d->prodId;
}
-void VCard::setProdId(const QString &p)
+void VCard::setProdId(const TQString &p)
{
d->prodId = p;
}
-const QString &VCard::rev() const
+const TQString &VCard::rev() const
{
return d->rev;
}
-void VCard::setRev(const QString &r)
+void VCard::setRev(const TQString &r)
{
d->rev = r;
}
-const QString &VCard::sortString() const
+const TQString &VCard::sortString() const
{
return d->sortString;
}
-void VCard::setSortString(const QString &s)
+void VCard::setSortString(const TQString &s)
{
d->sortString = s;
}
-const QByteArray &VCard::sound() const
+const TQByteArray &VCard::sound() const
{
return d->sound;
}
-void VCard::setSound(const QByteArray &s)
+void VCard::setSound(const TQByteArray &s)
{
d->sound = s;
}
-const QString &VCard::soundURI() const
+const TQString &VCard::soundURI() const
{
return d->soundURI;
}
-void VCard::setSoundURI(const QString &s)
+void VCard::setSoundURI(const TQString &s)
{
d->soundURI = s;
}
-const QString &VCard::soundPhonetic() const
+const TQString &VCard::soundPhonetic() const
{
return d->soundPhonetic;
}
-void VCard::setSoundPhonetic(const QString &s)
+void VCard::setSoundPhonetic(const TQString &s)
{
d->soundPhonetic = s;
}
-const QString &VCard::uid() const
+const TQString &VCard::uid() const
{
return d->uid;
}
-void VCard::setUid(const QString &u)
+void VCard::setUid(const TQString &u)
{
d->uid = u;
}
-const QString &VCard::url() const
+const TQString &VCard::url() const
{
return d->url;
}
-void VCard::setUrl(const QString &u)
+void VCard::setUrl(const TQString &u)
{
d->url = u;
}
-const QString &VCard::desc() const
+const TQString &VCard::desc() const
{
return d->desc;
}
-void VCard::setDesc(const QString &desc)
+void VCard::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -1230,12 +1230,12 @@ void VCard::setPrivacyClass(const VCard::PrivacyClass &c)
d->privacyClass = c;
}
-const QByteArray &VCard::key() const
+const TQByteArray &VCard::key() const
{
return d->key;
}
-void VCard::setKey(const QByteArray &k)
+void VCard::setKey(const TQByteArray &k)
{
d->key = k;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
index 4a097251..885e08a9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
@@ -21,12 +21,12 @@
#ifndef JABBER_VCARD_H
#define JABBER_VCARD_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
class QDate;
@@ -40,49 +40,49 @@ namespace XMPP
VCard & operator=(const VCard &);
~VCard();
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
bool isEmpty() const;
- const QString &version() const;
- void setVersion(const QString &);
+ const TQString &version() const;
+ void setVersion(const TQString &);
- const QString &fullName() const;
- void setFullName(const QString &);
+ const TQString &fullName() const;
+ void setFullName(const TQString &);
- const QString &familyName() const;
- void setFamilyName(const QString &);
+ const TQString &familyName() const;
+ void setFamilyName(const TQString &);
- const QString &givenName() const;
- void setGivenName(const QString &);
+ const TQString &givenName() const;
+ void setGivenName(const TQString &);
- const QString &middleName() const;
- void setMiddleName(const QString &);
+ const TQString &middleName() const;
+ void setMiddleName(const TQString &);
- const QString &prefixName() const;
- void setPrefixName(const QString &);
+ const TQString &prefixName() const;
+ void setPrefixName(const TQString &);
- const QString &suffixName() const;
- void setSuffixName(const QString &);
+ const TQString &suffixName() const;
+ void setSuffixName(const TQString &);
- const QString &nickName() const;
- void setNickName(const QString &);
+ const TQString &nickName() const;
+ void setNickName(const TQString &);
- const QByteArray &photo() const;
- void setPhoto(const QByteArray &);
+ const TQByteArray &photo() const;
+ void setPhoto(const TQByteArray &);
- const QString &photoURI() const;
- void setPhotoURI(const QString &);
+ const TQString &photoURI() const;
+ void setPhotoURI(const TQString &);
- const QDate bday() const;
- void setBday(const QDate &);
+ const TQDate bday() const;
+ void setBday(const TQDate &);
- const QString &bdayStr() const;
- void setBdayStr(const QString &);
+ const TQString &bdayStr() const;
+ void setBdayStr(const TQString &);
class Address {
@@ -99,15 +99,15 @@ namespace XMPP
bool pref;
- QString pobox;
- QString extaddr;
- QString street;
- QString locality;
- QString region;
- QString pcode;
- QString country;
+ TQString pobox;
+ TQString extaddr;
+ TQString street;
+ TQString locality;
+ TQString region;
+ TQString pcode;
+ TQString country;
};
- typedef QValueList<Address> AddressList;
+ typedef TQValueList<Address> AddressList;
const AddressList &addressList() const;
void setAddressList(const AddressList &);
@@ -125,9 +125,9 @@ namespace XMPP
bool pref;
- QStringList lines;
+ TQStringList lines;
};
- typedef QValueList<Label> LabelList;
+ typedef TQValueList<Label> LabelList;
const LabelList &labelList() const;
void setLabelList(const LabelList &);
@@ -150,9 +150,9 @@ namespace XMPP
bool pcs;
bool pref;
- QString number;
+ TQString number;
};
- typedef QValueList<Phone> PhoneList;
+ typedef TQValueList<Phone> PhoneList;
const PhoneList &phoneList() const;
void setPhoneList(const PhoneList &);
@@ -166,100 +166,100 @@ namespace XMPP
bool internet;
bool x400;
- QString userid;
+ TQString userid;
};
- typedef QValueList<Email> EmailList;
+ typedef TQValueList<Email> EmailList;
const EmailList &emailList() const;
void setEmailList(const EmailList &);
- const QString &jid() const;
- void setJid(const QString &);
+ const TQString &jid() const;
+ void setJid(const TQString &);
- const QString &mailer() const;
- void setMailer(const QString &);
+ const TQString &mailer() const;
+ void setMailer(const TQString &);
- const QString &timezone() const;
- void setTimezone(const QString &);
+ const TQString &timezone() const;
+ void setTimezone(const TQString &);
class Geo {
public:
Geo();
- QString lat;
- QString lon;
+ TQString lat;
+ TQString lon;
};
const Geo &geo() const;
void setGeo(const Geo &);
- const QString &title() const;
- void setTitle(const QString &);
+ const TQString &title() const;
+ void setTitle(const TQString &);
- const QString &role() const;
- void setRole(const QString &);
+ const TQString &role() const;
+ void setRole(const TQString &);
- const QByteArray &logo() const;
- void setLogo(const QByteArray &);
+ const TQByteArray &logo() const;
+ void setLogo(const TQByteArray &);
- const QString &logoURI() const;
- void setLogoURI(const QString &);
+ const TQString &logoURI() const;
+ void setLogoURI(const TQString &);
const VCard *agent() const;
void setAgent(const VCard &);
- const QString agentURI() const;
- void setAgentURI(const QString &);
+ const TQString agentURI() const;
+ void setAgentURI(const TQString &);
class Org {
public:
Org();
- QString name;
- QStringList unit;
+ TQString name;
+ TQStringList unit;
};
const Org &org() const;
void setOrg(const Org &);
- const QStringList &categories() const;
- void setCategories(const QStringList &);
+ const TQStringList &categories() const;
+ void setCategories(const TQStringList &);
- const QString &note() const;
- void setNote(const QString &);
+ const TQString &note() const;
+ void setNote(const TQString &);
- const QString &prodId() const; // it must equal to "Psi" ;-)
- void setProdId(const QString &);
+ const TQString &prodId() const; // it must equal to "Psi" ;-)
+ void setProdId(const TQString &);
- const QString &rev() const;
- void setRev(const QString &);
+ const TQString &rev() const;
+ void setRev(const TQString &);
- const QString &sortString() const;
- void setSortString(const QString &);
+ const TQString &sortString() const;
+ void setSortString(const TQString &);
- const QByteArray &sound() const;
- void setSound(const QByteArray &);
+ const TQByteArray &sound() const;
+ void setSound(const TQByteArray &);
- const QString &soundURI() const;
- void setSoundURI(const QString &);
+ const TQString &soundURI() const;
+ void setSoundURI(const TQString &);
- const QString &soundPhonetic() const;
- void setSoundPhonetic(const QString &);
+ const TQString &soundPhonetic() const;
+ void setSoundPhonetic(const TQString &);
- const QString &uid() const;
- void setUid(const QString &);
+ const TQString &uid() const;
+ void setUid(const TQString &);
- const QString &url() const;
- void setUrl(const QString &);
+ const TQString &url() const;
+ void setUrl(const TQString &);
- const QString &desc() const;
- void setDesc(const QString &);
+ const TQString &desc() const;
+ void setDesc(const TQString &);
enum PrivacyClass {
@@ -272,8 +272,8 @@ namespace XMPP
void setPrivacyClass(const PrivacyClass &);
- const QByteArray &key() const;
- void setKey(const QByteArray &);
+ const TQByteArray &key() const;
+ void setKey(const TQByteArray &);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
index e22fc12d..d7b5c82d 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
@@ -20,17 +20,17 @@
#include"xmpp_xmlcommon.h"
-#include <qstring.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qstringlist.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
#include"im.h"
-bool stamp2TS(const QString &ts, QDateTime *d)
+bool stamp2TS(const TQString &ts, TQDateTime *d)
{
if(ts.length() != 17)
return false;
@@ -43,12 +43,12 @@ bool stamp2TS(const QString &ts, QDateTime *d)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
return false;
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
return false;
@@ -59,9 +59,9 @@ bool stamp2TS(const QString &ts, QDateTime *d)
return true;
}
-QString TS2stamp(const QDateTime &d)
+TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -74,20 +74,20 @@ QString TS2stamp(const QDateTime &d)
return str;
}
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-QString tagContent(const QDomElement &e)
+TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -96,13 +96,13 @@ QString tagContent(const QDomElement &e)
return "";
}
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = false;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -112,13 +112,13 @@ QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id)
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id)
{
- QDomElement iq = doc->createElement("iq");
+ TQDomElement iq = doc->createElement("iq");
if(!type.isEmpty())
iq.setAttribute("type", type);
if(!to.isEmpty())
@@ -129,27 +129,27 @@ QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to,
return iq;
}
-QDomElement queryTag(const QDomElement &e)
+TQDomElement queryTag(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
return q;
}
-QString queryNS(const QDomElement &e)
+TQString queryNS(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found)
return q.attribute("xmlns");
return "";
}
-void getErrorFromElement(const QDomElement &e, int *code, QString *str)
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str)
{
bool found;
- QDomElement tag = findSubTag(e, "error", &found);
+ TQDomElement tag = findSubTag(e, "error", &found);
if(!found)
return;
@@ -165,94 +165,94 @@ void getErrorFromElement(const QDomElement &e, int *code, QString *str)
namespace XMLHelper {
-QDomElement emptyTag(QDomDocument *doc, const QString &name)
+TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-bool hasSubTag(const QDomElement &e, const QString &name)
+bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-QString subTagText(const QDomElement &e, const QString &name)
+TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text();
- return QString::null;
+ return TQString::null;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, int content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(QString::number(content));
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(TQString::number(content));
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, bool content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content ? "true" : "false");
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content ? "true" : "false");
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d", s.width(), s.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d,%d,%d", r.x(), r.y(), r.width(), r.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l)
+TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l)
{
- QDomElement tag = doc.createElement(name);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ TQDomElement tag = doc.createElement(name);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
tag.appendChild(textTag(doc, "item", *it));
return tag;
}
-/*QString tagContent(const QDomElement &e)
+/*TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -261,13 +261,13 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
return "";
}*/
-/*QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+/*TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -277,62 +277,62 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}*/
-void readEntry(const QDomElement &e, const QString &name, QString *v)
+void readEntry(const TQDomElement &e, const TQString &name, TQString *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag);
}
-void readNumEntry(const QDomElement &e, const QString &name, int *v)
+void readNumEntry(const TQDomElement &e, const TQString &name, int *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag).toInt();
}
-void readBoolEntry(const QDomElement &e, const QString &name, bool *v)
+void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = (tagContent(tag) == "true") ? TRUE: FALSE;
}
-void readSizeEntry(const QDomElement &e, const QString &name, QSize *v)
+void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 2)
return;
- QSize s;
+ TQSize s;
s.setWidth(list[0].toInt());
s.setHeight(list[1].toInt());
*v = s;
}
-void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
+void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 4)
return;
- QRect r;
+ TQRect r;
r.setX(list[0].toInt());
r.setY(list[1].toInt());
r.setWidth(list[2].toInt());
@@ -340,27 +340,27 @@ void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
*v = r;
}
-void readColorEntry(const QDomElement &e, const QString &name, QColor *v)
+void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QColor c;
+ TQColor c;
c.setNamedColor(tagContent(tag));
if(c.isValid())
*v = c;
}
-void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
+void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v)
{
bool found = false;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list;
- for(QDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList list;
+ for(TQDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item")
@@ -369,15 +369,15 @@ void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
*v = list;
}
-void setBoolAttribute(QDomElement e, const QString &name, bool b)
+void setBoolAttribute(TQDomElement e, const TQString &name, bool b)
{
e.setAttribute(name, b ? "true" : "false");
}
-void readBoolAttribute(QDomElement e, const QString &name, bool *v)
+void readBoolAttribute(TQDomElement e, const TQString &name, bool *v)
{
if(e.hasAttribute(name)) {
- QString s = e.attribute(name);
+ TQString s = e.attribute(name);
*v = (s == "true") ? TRUE: FALSE;
}
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
index c3f089c7..926395e9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
@@ -21,7 +21,7 @@
#ifndef JABBER_XMLCOMMON_H
#define JABBER_XMLCOMMON_H
-#include<qdom.h>
+#include<tqdom.h>
class QDateTime;
class QRect;
@@ -29,43 +29,43 @@ class QSize;
class QColor;
class QStringList;
-bool stamp2TS(const QString &ts, QDateTime *d);
-QString TS2stamp(const QDateTime &d);
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content);
-QString tagContent(const QDomElement &e);
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id);
-QDomElement queryTag(const QDomElement &e);
-QString queryNS(const QDomElement &e);
-void getErrorFromElement(const QDomElement &e, int *code, QString *str);
+bool stamp2TS(const TQString &ts, TQDateTime *d);
+TQString TS2stamp(const TQDateTime &d);
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content);
+TQString tagContent(const TQDomElement &e);
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id);
+TQDomElement queryTag(const TQDomElement &e);
+TQString queryNS(const TQDomElement &e);
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str);
namespace XMLHelper {
- //QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
- bool hasSubTag(const QDomElement &e, const QString &name);
+ //TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+ bool hasSubTag(const TQDomElement &e, const TQString &name);
- QDomElement emptyTag(QDomDocument *doc, const QString &name);
- QString subTagText(const QDomElement &e, const QString &name);
+ TQDomElement emptyTag(TQDomDocument *doc, const TQString &name);
+ TQString subTagText(const TQDomElement &e, const TQString &name);
- QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content);
- QDomElement textTag(QDomDocument &doc, const QString &name, int content);
- QDomElement textTag(QDomDocument &doc, const QString &name, bool content);
- QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s);
- QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r);
- QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r);
+ TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l);
- void readEntry(const QDomElement &e, const QString &name, QString *v);
- void readNumEntry(const QDomElement &e, const QString &name, int *v);
- void readBoolEntry(const QDomElement &e, const QString &name, bool *v);
- void readSizeEntry(const QDomElement &e, const QString &name, QSize *v);
- void readRectEntry(const QDomElement &e, const QString &name, QRect *v);
- void readColorEntry(const QDomElement &e, const QString &name, QColor *v);
+ void readEntry(const TQDomElement &e, const TQString &name, TQString *v);
+ void readNumEntry(const TQDomElement &e, const TQString &name, int *v);
+ void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v);
+ void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v);
+ void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v);
+ void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v);
- void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v);
+ void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v);
- void setBoolAttribute(QDomElement e, const QString &name, bool b);
- void readBoolAttribute(QDomElement e, const QString &name, bool *v);
+ void setBoolAttribute(TQDomElement e, const TQString &name, bool b);
+ void readBoolAttribute(TQDomElement e, const TQString &name, bool *v);
- //QString tagContent(const QDomElement &e); // obsolete;
+ //TQString tagContent(const TQDomElement &e); // obsolete;
}
#endif
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.cpp b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
index 51f8533b..4a197527 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.cpp
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
@@ -20,15 +20,15 @@
#include"qca.h"
-#include<qptrlist.h>
-#include<qdir.h>
-#include<qfileinfo.h>
-#include<qstringlist.h>
-#include<qlibrary.h>
-#include<qtimer.h>
-#include<qhostaddress.h>
-#include<qapplication.h>
-#include<qguardedptr.h>
+#include<tqptrlist.h>
+#include<tqdir.h>
+#include<tqfileinfo.h>
+#include<tqstringlist.h>
+#include<tqlibrary.h>
+#include<tqtimer.h>
+#include<tqhostaddress.h>
+#include<tqapplication.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include"qcaprovider.h"
@@ -46,11 +46,11 @@ class ProviderItem
{
public:
QCAProvider *p;
- QString fname;
+ TQString fname;
- static ProviderItem *load(const QString &fname)
+ static ProviderItem *load(const TQString &fname)
{
- QLibrary *lib = new QLibrary(fname);
+ TQLibrary *lib = new TQLibrary(fname);
if(!lib->load()) {
delete lib;
return 0;
@@ -92,10 +92,10 @@ public:
}
private:
- QLibrary *lib;
+ TQLibrary *lib;
bool init_done;
- ProviderItem(QLibrary *_lib, QCAProvider *_p)
+ ProviderItem(TQLibrary *_lib, QCAProvider *_p)
{
lib = _lib;
p = _p;
@@ -103,12 +103,12 @@ private:
}
};
-static QPtrList<ProviderItem> providerList;
+static TQPtrList<ProviderItem> providerList;
static bool qca_init = false;
-static bool plugin_have(const QString &fname)
+static bool plugin_have(const TQString &fname)
{
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->fname == fname)
return true;
@@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname)
static void plugin_scan()
{
- QStringList dirs = QApplication::libraryPaths();
- for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
- QDir libpath(*it);
- QDir dir(libpath.filePath("crypto"));
+ TQStringList dirs = TQApplication::libraryPaths();
+ for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
+ TQDir libpath(*it);
+ TQDir dir(libpath.filePath("crypto"));
if(!dir.exists())
continue;
- QStringList list = dir.entryList();
- for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QFileInfo fi(dir.filePath(*it));
+ TQStringList list = dir.entryList();
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQFileInfo fi(dir.filePath(*it));
if(fi.isDir())
continue;
if(fi.extension() != PLUGIN_EXT)
continue;
- QString fname = fi.filePath();
+ TQString fname = fi.filePath();
// don't load the same plugin again!
if(plugin_have(fname))
@@ -166,26 +166,26 @@ static void plugin_unloadall()
static int plugin_caps()
{
int caps = 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it)
caps |= i->p->capabilities();
return caps;
}
-QString QCA::arrayToHex(const QByteArray &a)
+TQString QCA::arrayToHex(const TQByteArray &a)
{
- QString out;
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
return out;
}
-QByteArray QCA::hexToArray(const QString &str)
+TQByteArray QCA::hexToArray(const TQString &str)
{
- QByteArray out(str.length() / 2);
+ TQByteArray out(str.length() / 2);
int at = 0;
for(int n = 0; n + 1 < (int)str.length(); n += 2) {
uchar a = str[n];
@@ -239,7 +239,7 @@ static void *getContext(int cap)
if(!QCA::isSupported(cap))
return 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->p->capabilities() & cap) {
i->ensureInit();
@@ -303,14 +303,14 @@ void Hash::clear()
d->reset();
}
-void Hash::update(const QByteArray &a)
+void Hash::update(const TQByteArray &a)
{
d->c->update(a.data(), a.size());
}
-QByteArray Hash::final()
+TQByteArray Hash::final()
{
- QByteArray buf;
+ TQByteArray buf;
d->c->final(&buf);
return buf;
}
@@ -343,11 +343,11 @@ public:
QCA_CipherContext *c;
int dir;
int mode;
- QByteArray key, iv;
+ TQByteArray key, iv;
bool err;
};
-Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d = new Private;
d->c = c;
@@ -377,27 +377,27 @@ Cipher::~Cipher()
delete d;
}
-QByteArray Cipher::dyn_generateKey(int size) const
+TQByteArray Cipher::dyn_generateKey(int size) const
{
- QByteArray buf;
+ TQByteArray buf;
if(size != -1)
buf.resize(size);
else
buf.resize(d->c->keySize());
if(!d->c->generateKey(buf.data(), size))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-QByteArray Cipher::dyn_generateIV() const
+TQByteArray Cipher::dyn_generateIV() const
{
- QByteArray buf(d->c->blockSize());
+ TQByteArray buf(d->c->blockSize());
if(!d->c->generateIV(buf.data()))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d->reset();
@@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i
}
}
-bool Cipher::update(const QByteArray &a)
+bool Cipher::update(const TQByteArray &a)
{
if(d->err)
return false;
@@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a)
return true;
}
-QByteArray Cipher::final(bool *ok)
+TQByteArray Cipher::final(bool *ok)
{
if(ok)
*ok = false;
if(d->err)
- return QByteArray();
+ return TQByteArray();
- QByteArray out;
+ TQByteArray out;
if(!d->c->final(&out)) {
d->err = true;
- return QByteArray();
+ return TQByteArray();
}
if(ok)
*ok = true;
@@ -473,7 +473,7 @@ MD5::MD5()
//----------------------------------------------------------------------------
// BlowFish
//----------------------------------------------------------------------------
-BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad)
{
}
@@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i
//----------------------------------------------------------------------------
// TripleDES
//----------------------------------------------------------------------------
-TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad)
{
}
@@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray
//----------------------------------------------------------------------------
// AES128
//----------------------------------------------------------------------------
-AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad)
{
}
@@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b
//----------------------------------------------------------------------------
// AES256
//----------------------------------------------------------------------------
-AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad)
{
}
@@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const
return d->c->havePrivate();
}
-QByteArray RSAKey::toDER(bool publicOnly) const
+TQByteArray RSAKey::toDER(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool RSAKey::fromDER(const QByteArray &a)
+bool RSAKey::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString RSAKey::toPEM(bool publicOnly) const
+TQString RSAKey::toPEM(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool RSAKey::fromPEM(const QString &str)
+bool RSAKey::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p)
return d->c->createFromNative(p);
}
-bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->encrypt(a, &out, oaep))
return false;
*b = out;
return true;
}
-bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->decrypt(a, &out, oaep))
return false;
*b = out;
@@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k)
v_key = k;
}
-bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
return v_key.encrypt(a, b, oaep);
}
-bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
@@ -723,84 +723,84 @@ bool Cert::isNull() const
return d->c->isNull();
}
-QString Cert::commonName() const
+TQString Cert::commonName() const
{
CertProperties props = subject();
return props["CN"];
}
-QString Cert::serialNumber() const
+TQString Cert::serialNumber() const
{
return d->c->serialNumber();
}
-QString Cert::subjectString() const
+TQString Cert::subjectString() const
{
return d->c->subjectString();
}
-QString Cert::issuerString() const
+TQString Cert::issuerString() const
{
return d->c->issuerString();
}
CertProperties Cert::subject() const
{
- QValueList<QCA_CertProperty> list = d->c->subject();
+ TQValueList<QCA_CertProperty> list = d->c->subject();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
CertProperties Cert::issuer() const
{
- QValueList<QCA_CertProperty> list = d->c->issuer();
+ TQValueList<QCA_CertProperty> list = d->c->issuer();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
-QDateTime Cert::notBefore() const
+TQDateTime Cert::notBefore() const
{
return d->c->notBefore();
}
-QDateTime Cert::notAfter() const
+TQDateTime Cert::notAfter() const
{
return d->c->notAfter();
}
-QByteArray Cert::toDER() const
+TQByteArray Cert::toDER() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool Cert::fromDER(const QByteArray &a)
+bool Cert::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString Cert::toPEM() const
+TQString Cert::toPEM() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool Cert::fromPEM(const QString &str)
+bool Cert::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -837,7 +837,7 @@ public:
tryMore = false;
}
- void appendArray(QByteArray *a, const QByteArray &b)
+ void appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -846,21 +846,21 @@ public:
Cert cert;
QCA_TLSContext *c;
- QByteArray in, out, to_net, from_net;
+ TQByteArray in, out, to_net, from_net;
int bytesEncoded;
bool tryMore;
bool handshaken;
- QString host;
+ TQString host;
bool hostMismatch;
bool closing;
Cert ourCert;
RSAKey ourKey;
- QPtrList<QCA_CertContext> store;
+ TQPtrList<QCA_CertContext> store;
};
-TLS::TLS(QObject *parent)
-:QObject(parent)
+TLS::TLS(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -876,11 +876,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key)
d->ourKey = key;
}
-void TLS::setCertificateStore(const QPtrList<Cert> &store)
+void TLS::setCertificateStore(const TQPtrList<Cert> &store)
{
// convert the cert list into a context list
d->store.clear();
- QPtrListIterator<Cert> it(store);
+ TQPtrListIterator<Cert> it(store);
for(Cert *cert; (cert = it.current()); ++it)
d->store.append(cert->d->c);
}
@@ -890,14 +890,14 @@ void TLS::reset()
d->reset();
}
-bool TLS::startClient(const QString &host)
+bool TLS::startClient(const TQString &host)
{
d->reset();
d->host = host;
if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -907,7 +907,7 @@ bool TLS::startServer()
if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -917,7 +917,7 @@ void TLS::close()
return;
d->closing = true;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
}
bool TLS::isHandshaken() const
@@ -925,35 +925,35 @@ bool TLS::isHandshaken() const
return d->handshaken;
}
-void TLS::write(const QByteArray &a)
+void TLS::write(const TQByteArray &a)
{
d->appendArray(&d->out, a);
update();
}
-QByteArray TLS::read()
+TQByteArray TLS::read()
{
- QByteArray a = d->in.copy();
+ TQByteArray a = d->in.copy();
d->in.resize(0);
return a;
}
-void TLS::writeIncoming(const QByteArray &a)
+void TLS::writeIncoming(const TQByteArray &a)
{
d->appendArray(&d->from_net, a);
update();
}
-QByteArray TLS::readOutgoing()
+TQByteArray TLS::readOutgoing()
{
- QByteArray a = d->to_net.copy();
+ TQByteArray a = d->to_net.copy();
d->to_net.resize(0);
return a;
}
-QByteArray TLS::readUnprocessed()
+TQByteArray TLS::readUnprocessed()
{
- QByteArray a = d->from_net.copy();
+ TQByteArray a = d->from_net.copy();
d->from_net.resize(0);
return a;
}
@@ -976,10 +976,10 @@ void TLS::update()
bool force_read = false;
bool eof = false;
bool done = false;
- QGuardedPtr<TLS> self = this;
+ TQGuardedPtr<TLS> self = this;
if(d->closing) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->shutdown(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -995,7 +995,7 @@ void TLS::update()
}
else {
if(!d->handshaken) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->handshake(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -1024,7 +1024,7 @@ void TLS::update()
if(d->handshaken) {
if(!d->out.isEmpty() || d->tryMore) {
d->tryMore = false;
- QByteArray a;
+ TQByteArray a;
int enc;
bool more = false;
bool ok = d->c->encode(d->out, &a, &enc);
@@ -1045,7 +1045,7 @@ void TLS::update()
}
}
if(!d->from_net.isEmpty() || force_read) {
- QByteArray a, b;
+ TQByteArray a, b;
bool ok = d->c->decode(d->from_net, &a, &b);
eof = d->c->eof();
d->from_net.resize(0);
@@ -1091,7 +1091,7 @@ void TLS::update()
//----------------------------------------------------------------------------
// SASL
//----------------------------------------------------------------------------
-QString saslappname = "qca";
+TQString saslappname = "qca";
class SASL::Private
{
public:
@@ -1113,22 +1113,22 @@ public:
// security opts
bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual;
int ssfmin, ssfmax;
- QString ext_authid;
+ TQString ext_authid;
int ext_ssf;
bool tried;
QCA_SASLContext *c;
- QHostAddress localAddr, remoteAddr;
+ TQHostAddress localAddr, remoteAddr;
int localPort, remotePort;
- QByteArray stepData;
+ TQByteArray stepData;
bool allowCSF;
bool first, server;
- QByteArray inbuf, outbuf;
+ TQByteArray inbuf, outbuf;
};
-SASL::SASL(QObject *parent)
-:QObject(parent)
+SASL::SASL(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
reset();
@@ -1139,7 +1139,7 @@ SASL::~SASL()
delete d;
}
-void SASL::setAppName(const QString &name)
+void SASL::setAppName(const TQString &name)
{
saslappname = name;
}
@@ -1217,7 +1217,7 @@ void SASL::setMaximumSSF(int x)
d->ssfmax = x;
}
-void SASL::setExternalAuthID(const QString &authid)
+void SASL::setExternalAuthID(const TQString &authid)
{
d->ext_authid = authid;
}
@@ -1227,19 +1227,19 @@ void SASL::setExternalSSF(int x)
d->ext_ssf = x;
}
-void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->localAddr = addr;
d->localPort = port;
}
-void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->remoteAddr = addr;
d->remotePort = port;
}
-bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst)
+bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1260,11 +1260,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin
d->first = true;
d->server = false;
d->tried = false;
- QTimer::singleShot(0, this, SLOT(tryAgain()));
+ TQTimer::singleShot(0, this, TQT_SLOT(tryAgain()));
return true;
}
-bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist)
+bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1287,13 +1287,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin
return true;
}
-void SASL::putServerFirstStep(const QString &mech)
+void SASL::putServerFirstStep(const TQString &mech)
{
int r = d->c->serverFirstStep(mech, 0);
handleServerFirstStep(r);
}
-void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit)
+void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit)
{
int r = d->c->serverFirstStep(mech, &clientInit);
handleServerFirstStep(r);
@@ -1311,28 +1311,28 @@ void SASL::handleServerFirstStep(int r)
error(ErrAuth);
}
-void SASL::putStep(const QByteArray &stepData)
+void SASL::putStep(const TQByteArray &stepData)
{
d->stepData = stepData.copy();
tryAgain();
}
-void SASL::setUsername(const QString &user)
+void SASL::setUsername(const TQString &user)
{
d->c->setClientParams(&user, 0, 0, 0);
}
-void SASL::setAuthzid(const QString &authzid)
+void SASL::setAuthzid(const TQString &authzid)
{
d->c->setClientParams(0, &authzid, 0, 0);
}
-void SASL::setPassword(const QString &pass)
+void SASL::setPassword(const TQString &pass)
{
d->c->setClientParams(0, 0, &pass, 0);
}
-void SASL::setRealm(const QString &realm)
+void SASL::setRealm(const TQString &realm)
{
d->c->setClientParams(0, 0, 0, &realm);
}
@@ -1394,8 +1394,8 @@ void SASL::tryAgain()
return;
}
- QString mech = d->c->mech();
- const QByteArray *clientInit = d->c->clientInit();
+ TQString mech = d->c->mech();
+ const TQByteArray *clientInit = d->c->clientInit();
d->first = false;
d->tried = false;
@@ -1438,9 +1438,9 @@ int SASL::ssf() const
return d->c->security();
}
-void SASL::write(const QByteArray &a)
+void SASL::write(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->encode(a, &b)) {
error(ErrCrypt);
return;
@@ -1451,16 +1451,16 @@ void SASL::write(const QByteArray &a)
readyReadOutgoing(a.size());
}
-QByteArray SASL::read()
+TQByteArray SASL::read()
{
- QByteArray a = d->inbuf.copy();
+ TQByteArray a = d->inbuf.copy();
d->inbuf.resize(0);
return a;
}
-void SASL::writeIncoming(const QByteArray &a)
+void SASL::writeIncoming(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->decode(a, &b)) {
error(ErrCrypt);
return;
@@ -1471,9 +1471,9 @@ void SASL::writeIncoming(const QByteArray &a)
readyRead();
}
-QByteArray SASL::readOutgoing()
+TQByteArray SASL::readOutgoing()
{
- QByteArray a = d->outbuf.copy();
+ TQByteArray a = d->outbuf.copy();
d->outbuf.resize(0);
return a;
}
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.h b/kopete/protocols/jabber/libiris/qca/src/qca.h
index 1a52a826..46b25cc9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.h
@@ -21,12 +21,12 @@
#ifndef QCA_H
#define QCA_H
-#include<qstring.h>
-#include<qcstring.h>
-#include<qdatetime.h>
-#include<qmap.h>
-#include<qptrlist.h>
-#include<qobject.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqdatetime.h>
+#include<tqmap.h>
+#include<tqptrlist.h>
+#include<tqobject.h>
#ifdef Q_OS_WIN32
# ifndef QCA_STATIC
@@ -91,8 +91,8 @@ namespace QCA
QCA_EXPORT void insertProvider(QCAProvider *);
QCA_EXPORT void unloadAllPlugins();
- QCA_EXPORT QString arrayToHex(const QByteArray &);
- QCA_EXPORT QByteArray hexToArray(const QString &);
+ QCA_EXPORT TQString arrayToHex(const TQByteArray &);
+ QCA_EXPORT TQByteArray hexToArray(const TQString &);
class QCA_EXPORT Hash
{
@@ -102,8 +102,8 @@ namespace QCA
~Hash();
void clear();
- void update(const QByteArray &a);
- QByteArray final();
+ void update(const TQByteArray &a);
+ TQByteArray final();
protected:
Hash(QCA_HashContext *);
@@ -119,26 +119,26 @@ namespace QCA
public:
HashStatic<T>() {}
- static QByteArray hash(const QByteArray &a)
+ static TQByteArray hash(const TQByteArray &a)
{
T obj;
obj.update(a);
return obj.final();
}
- static QByteArray hash(const QCString &cs)
+ static TQByteArray hash(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return hash(a);
}
- static QString hashToString(const QByteArray &a)
+ static TQString hashToString(const TQByteArray &a)
{
return arrayToHex(hash(a));
}
- static QString hashToString(const QCString &cs)
+ static TQString hashToString(const TQCString &cs)
{
return arrayToHex(hash(cs));
}
@@ -151,14 +151,14 @@ namespace QCA
Cipher & operator=(const Cipher &);
~Cipher();
- QByteArray dyn_generateKey(int size=-1) const;
- QByteArray dyn_generateIV() const;
- void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true);
- bool update(const QByteArray &a);
- QByteArray final(bool *ok=0);
+ TQByteArray dyn_generateKey(int size=-1) const;
+ TQByteArray dyn_generateIV() const;
+ void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true);
+ bool update(const TQByteArray &a);
+ TQByteArray final(bool *ok=0);
protected:
- Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad);
+ Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad);
private:
class Private;
@@ -171,13 +171,13 @@ namespace QCA
public:
CipherStatic<T>() {}
- static QByteArray generateKey(int size=-1)
+ static TQByteArray generateKey(int size=-1)
{
T obj;
return obj.dyn_generateKey(size);
}
- static QByteArray generateIV()
+ static TQByteArray generateIV()
{
T obj;
return obj.dyn_generateIV();
@@ -205,25 +205,25 @@ namespace QCA
class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish>
{
public:
- BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES>
{
public:
- TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128>
{
public:
- AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256>
{
public:
- AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class RSA;
@@ -239,11 +239,11 @@ namespace QCA
bool havePublic() const;
bool havePrivate() const;
- QByteArray toDER(bool publicOnly=false) const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER(bool publicOnly=false) const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM(bool publicOnly=false) const;
- bool fromPEM(const QString &);
+ TQString toPEM(bool publicOnly=false) const;
+ bool fromPEM(const TQString &);
// only call if you know what you are doing
bool fromNative(void *);
@@ -254,8 +254,8 @@ namespace QCA
friend class RSA;
friend class TLS;
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
bool generate(unsigned int bits);
};
@@ -268,8 +268,8 @@ namespace QCA
RSAKey key() const;
void setKey(const RSAKey &);
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
static RSAKey generateKey(unsigned int bits);
@@ -277,7 +277,7 @@ namespace QCA
RSAKey v_key;
};
- typedef QMap<QString, QString> CertProperties;
+ typedef TQMap<TQString, TQString> CertProperties;
class QCA_EXPORT Cert
{
public:
@@ -288,20 +288,20 @@ namespace QCA
bool isNull() const;
- QString commonName() const;
- QString serialNumber() const;
- QString subjectString() const;
- QString issuerString() const;
+ TQString commonName() const;
+ TQString serialNumber() const;
+ TQString subjectString() const;
+ TQString issuerString() const;
CertProperties subject() const;
CertProperties issuer() const;
- QDateTime notBefore() const;
- QDateTime notAfter() const;
+ TQDateTime notBefore() const;
+ TQDateTime notAfter() const;
- QByteArray toDER() const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER() const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM() const;
- bool fromPEM(const QString &);
+ TQString toPEM() const;
+ bool fromPEM(const TQString &);
private:
class Private;
@@ -332,26 +332,26 @@ namespace QCA
};
enum Error { ErrHandshake, ErrCrypt };
- TLS(QObject *parent=0);
+ TLS(TQObject *parent=0);
~TLS();
void setCertificate(const Cert &cert, const RSAKey &key);
- void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist
+ void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist
void reset();
- bool startClient(const QString &host="");
+ bool startClient(const TQString &host="");
bool startServer();
void close();
bool isHandshaken() const;
// plain (application side)
- void write(const QByteArray &a);
- QByteArray read();
+ void write(const TQByteArray &a);
+ TQByteArray read();
// encoded (socket side)
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
- QByteArray readUnprocessed();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
+ TQByteArray readUnprocessed();
// cert related
const Cert & peerCertificate() const;
@@ -390,10 +390,10 @@ namespace QCA
NoUser,
RemoteUnavail
};
- SASL(QObject *parent=0);
+ SASL(TQObject *parent=0);
~SASL();
- static void setAppName(const QString &name);
+ static void setAppName(const TQString &name);
void reset();
int errorCondition() const;
@@ -409,40 +409,40 @@ namespace QCA
void setMinimumSSF(int);
void setMaximumSSF(int);
- void setExternalAuthID(const QString &authid);
+ void setExternalAuthID(const TQString &authid);
void setExternalSSF(int);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
- void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
+ void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port);
// initialize
- bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true);
- bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist);
+ bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true);
+ bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist);
// authentication
- void putStep(const QByteArray &stepData);
- void putServerFirstStep(const QString &mech);
- void putServerFirstStep(const QString &mech, const QByteArray &clientInit);
- void setUsername(const QString &user);
- void setAuthzid(const QString &auth);
- void setPassword(const QString &pass);
- void setRealm(const QString &realm);
+ void putStep(const TQByteArray &stepData);
+ void putServerFirstStep(const TQString &mech);
+ void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit);
+ void setUsername(const TQString &user);
+ void setAuthzid(const TQString &auth);
+ void setPassword(const TQString &pass);
+ void setRealm(const TQString &realm);
void continueAfterParams();
void continueAfterAuthCheck();
// security layer
int ssf() const;
- void write(const QByteArray &a);
- QByteArray read();
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
+ void write(const TQByteArray &a);
+ TQByteArray read();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
signals:
// for authentication
- void clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void nextStep(const QByteArray &stepData);
+ void clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void nextStep(const TQByteArray &stepData);
void needParams(bool user, bool authzid, bool pass, bool realm);
- void authCheck(const QString &user, const QString &authzid);
+ void authCheck(const TQString &user, const TQString &authzid);
void authenticated();
// for security layer
diff --git a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
index f8e2b4ce..be558388 100644
--- a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
@@ -17,9 +17,9 @@
***************************************************************************/
#include <kpushbutton.h>
-#include <qgroupbox.h>
-#include <qtable.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqtable.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
#include "jabberformtranslator.h"
#include "dlgjabberbrowse.h"
-dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgBrowse (parent, name)
+dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgBrowse (parent, name)
{
m_account = account;
@@ -41,11 +41,11 @@ dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid,
tblResults->setNumRows (0);
// disable user selections
- tblResults->setSelectionMode (QTable::NoSelection);
+ tblResults->setSelectionMode (TQTable::NoSelection);
XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ()));
task->get (jid);
task->go (true);
@@ -83,7 +83,7 @@ void dlgJabberBrowse::slotGotForm ()
tblResults->setColumnStretchable (i, true);
}
- connect (btnSearch, SIGNAL (clicked ()), this, SLOT (slotSendForm ()));
+ connect (btnSearch, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ()));
}
@@ -92,7 +92,7 @@ void dlgJabberBrowse::slotSendForm ()
XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ()));
task->set (translator->resultData ());
task->go (true);
@@ -120,7 +120,7 @@ void dlgJabberBrowse::slotSentForm ()
int row = 0;
- for (QValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it)
+ for (TQValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it)
{
tblResults->setText (row, 0, (*it).jid ().userHost ());
tblResults->setText (row, 1, (*it).first ());
diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.h b/kopete/protocols/jabber/ui/dlgjabberbrowse.h
index 8a8b6cc1..20886005 100644
--- a/kopete/protocols/jabber/ui/dlgjabberbrowse.h
+++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.h
@@ -19,7 +19,7 @@
#ifndef DLGJABBERBROWSE_H
#define DLGJABBERBROWSE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "xmpp_tasks.h"
@@ -37,7 +37,7 @@ class dlgJabberBrowse:public dlgBrowse
Q_OBJECT
public:
- dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0);
+ dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0);
~dlgJabberBrowse ();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
index 9f6ae65d..948a594e 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
@@ -23,14 +23,14 @@
#include <klocale.h>
#include <kpassdlg.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <kopetepassword.h>
#include <xmpp_tasks.h>
#include "jabberaccount.h"
#include "dlgchangepassword.h"
-DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, QWidget *parent, const char *name )
+DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent, const char *name )
: KDialogBase ( parent, name, true, i18n("Change Jabber Password"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true )
{
@@ -80,7 +80,7 @@ void DlgJabberChangePassword::slotOk ()
i18n ( "Your account needs to be connected before the password can be changed. Do you want to try to connect now?" ),
i18n ( "Jabber Password Change" ), i18n("Connect"), i18n("Stay Offline") ) == KMessageBox::Yes )
{
- connect ( m_account, SIGNAL ( isConnectedChanged () ), this, SLOT ( slotChangePassword () ) );
+ connect ( m_account, TQT_SIGNAL ( isConnectedChanged () ), this, TQT_SLOT ( slotChangePassword () ) );
m_account->connect ();
}
}
@@ -102,7 +102,7 @@ void DlgJabberChangePassword::slotChangePassword ()
{
XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotChangePasswordDone () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotChangePasswordDone () ) );
task->changepw ( m_mainWidget->peNewPassword1->password () );
task->go ( true );
@@ -116,7 +116,7 @@ void DlgJabberChangePassword::slotChangePasswordDone ()
if ( task->success () )
{
- KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Information,
+ KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Information,
i18n ( "Your password has been changed successfully. Please note that the change may not be instantaneous. If you have problems logging in with your new password, please contact the administrator." ),
i18n ( "Jabber Password Change" ) );
@@ -124,7 +124,7 @@ void DlgJabberChangePassword::slotChangePasswordDone ()
}
else
{
- KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Sorry,
+ KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Sorry,
i18n ( "Your password could not be changed. Either your server does not support this feature or the administrator does not allow you to change your password." ) );
}
diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
index 84e880c5..023485ec 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
@@ -34,7 +34,7 @@ class DlgJabberChangePassword : public KDialogBase
Q_OBJECT
public:
- DlgJabberChangePassword ( JabberAccount *account, QWidget *parent = 0, const char *name = 0);
+ DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent = 0, const char *name = 0);
~DlgJabberChangePassword();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
index 620bff03..9d69beae 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
@@ -18,8 +18,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "jabberaccount.h"
#include "jabberclient.h"
@@ -27,7 +27,7 @@
#include "dlgjabberchatjoin.h"
-dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, QWidget* parent, const char* name) :
+dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, TQWidget* parent, const char* name) :
dlgChatJoin(parent, name),
m_account(account)
{
@@ -77,7 +77,7 @@ void dlgJabberChatJoin::slotBowse()
void dlgJabberChatJoin::checkDefaultChatroomServer()
{
XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices(m_account->client()->rootTask());
- connect(serviceTask, SIGNAL (finished()), this, SLOT (slotQueryFinished()));
+ connect(serviceTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotQueryFinished()));
serviceTask->get(m_account->server());
serviceTask->go(true);
@@ -97,7 +97,7 @@ void dlgJabberChatJoin::slotQueryFinished()
for (XMPP::AgentList::const_iterator it = task->agents().begin(); it != task->agents().end(); ++it)
{
XMPP::JT_DiscoInfo *discoTask = new XMPP::JT_DiscoInfo(m_account->client()->rootTask());
- connect(discoTask, SIGNAL (finished()), this, SLOT (slotDiscoFinished()));
+ connect(discoTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotDiscoFinished()));
discoTask->get((*it).jid().full());
discoTask->go(true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
index fad58fcb..d68ae78e 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
@@ -27,7 +27,7 @@ class dlgJabberChatJoin : public dlgChatJoin
Q_OBJECT
public:
- dlgJabberChatJoin(JabberAccount *account, QWidget* parent = 0, const char* name = 0);
+ dlgJabberChatJoin(JabberAccount *account, TQWidget* parent = 0, const char* name = 0);
~dlgJabberChatJoin();
/*$PUBLIC_FUNCTIONS$*/
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
index aea2843f..1803a013 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
@@ -13,15 +13,15 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtable.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqtable.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include "dlgjabberchatroomslist.h"
#include "jabberprotocol.h"
-dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const QString& server, const QString &nick, QWidget *parent, const char *name) :
+dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const TQString& server, const TQString &nick, TQWidget *parent, const char *name) :
dlgChatRoomsList(parent, name),
m_account(account) , m_selectedRow(-1) , m_nick(nick)
{
@@ -74,7 +74,7 @@ void dlgJabberChatRoomsList::slotQuery()
tblChatRoomsList->setNumRows(0);
XMPP::JT_DiscoItems *discoTask = new XMPP::JT_DiscoItems(m_account->client()->rootTask());
- connect (discoTask, SIGNAL(finished()), this, SLOT(slotQueryFinished()));
+ connect (discoTask, TQT_SIGNAL(finished()), this, TQT_SLOT(slotQueryFinished()));
m_chatServer = leServer->text();
discoTask->get(leServer->text());
@@ -102,13 +102,13 @@ void dlgJabberChatRoomsList::slotQueryFinished()
}
}
-void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/)
+void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/)
{
m_selectedRow = row;
slotJoin();
}
-void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/)
+void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/)
{
m_selectedRow = row;
}
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
index 1db296d7..6b1dce7b 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
@@ -23,7 +23,7 @@ class dlgJabberChatRoomsList : public dlgChatRoomsList
Q_OBJECT
public:
- dlgJabberChatRoomsList(JabberAccount* account, const QString& server = QString::null, const QString& nick = QString::null, QWidget* parent = 0, const char* name = 0);
+ dlgJabberChatRoomsList(JabberAccount* account, const TQString& server = TQString::null, const TQString& nick = TQString::null, TQWidget* parent = 0, const char* name = 0);
~dlgJabberChatRoomsList();
/*$PUBLIC_FUNCTIONS$*/
@@ -31,8 +31,8 @@ public slots:
/*$PUBLIC_SLOTS$*/
virtual void slotJoin();
virtual void slotQuery();
- virtual void slotDoubleClick(int row, int col, int button, const QPoint& mousePos);
- virtual void slotClick(int row, int col, int button, const QPoint& mousePos);
+ virtual void slotDoubleClick(int row, int col, int button, const TQPoint& mousePos);
+ virtual void slotClick(int row, int col, int button, const TQPoint& mousePos);
protected:
/*$PROTECTED_FUNCTIONS$*/
@@ -46,8 +46,8 @@ private:
JabberAccount *m_account;
int m_selectedRow;
- QString m_chatServer;
- QString m_nick;
+ TQString m_chatServer;
+ TQString m_nick;
};
#endif
diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.cpp b/kopete/protocols/jabber/ui/dlgjabberregister.cpp
index e16b5652..ff324085 100644
--- a/kopete/protocols/jabber/ui/dlgjabberregister.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberregister.cpp
@@ -16,7 +16,7 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -26,13 +26,13 @@
#include "jabberclient.h"
#include "dlgjabberregister.h"
-dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgRegister (parent, name)
+dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgRegister (parent, name)
{
m_account = account;
XMPP::JT_Register * task = new XMPP::JT_Register(m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ()));
task->getForm (jid);
task->go (true);
@@ -59,14 +59,14 @@ void dlgJabberRegister::slotGotForm ()
// translate the form and create it inside the box widget
translator = new JabberFormTranslator (task->form (), grpForm);
- static_cast<QBoxLayout*>(grpForm->layout())->insertWidget(1, translator);
+ static_cast<TQBoxLayout*>(grpForm->layout())->insertWidget(1, translator);
translator->show();
resize(sizeHint());
// enable the send button
btnRegister->setEnabled (true);
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotSendForm ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ()));
}
@@ -76,7 +76,7 @@ void dlgJabberRegister::slotSendForm ()
return;
XMPP::JT_Register * task = new XMPP::JT_Register (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ()));
task->setForm (translator->resultData ());
task->go (true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.h b/kopete/protocols/jabber/ui/dlgjabberregister.h
index 36bc0bab..5cb0af67 100644
--- a/kopete/protocols/jabber/ui/dlgjabberregister.h
+++ b/kopete/protocols/jabber/ui/dlgjabberregister.h
@@ -19,10 +19,10 @@
#ifndef DLGJABBERREGISTER_H
#define DLGJABBERREGISTER_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include "im.h"
#include "xmpp.h"
@@ -41,7 +41,7 @@ class dlgJabberRegister:public dlgRegister
Q_OBJECT
public:
- dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0);
+ dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0);
~dlgJabberRegister ();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
index 17b2d181..4b9192dc 100644
--- a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
@@ -18,20 +18,20 @@
#include "dlgjabbersendraw.h"
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
#include <kdebug.h>
#include "jabberclient.h"
-dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, QWidget *parent, const char *name )
+dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, TQWidget *parent, const char *name )
: DlgSendRaw (parent, name)
{
// Connect the GUI elements to things that do stuff
- connect (btnSend, SIGNAL (clicked ()), this, SLOT (slotSend ()));
- connect (btnClose, SIGNAL (clicked ()), this, SLOT (slotCancel ()));
- connect (btnClear, SIGNAL (clicked ()), this, SLOT (slotClear ()));
- connect (inputWidget, SIGNAL (activated (int)), this, SLOT (slotCreateMessage (int)));
+ connect (btnSend, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSend ()));
+ connect (btnClose, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotCancel ()));
+ connect (btnClear, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotClear ()));
+ connect (inputWidget, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotCreateMessage (int)));
m_client = client;
@@ -58,7 +58,7 @@ void dlgJabberSendRaw::slotCreateMessage(int index)
{
switch (index) {
case 1:
- tePacket->setText(QString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>")
+ tePacket->setText(TQString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>")
.arg ( m_client->jid().domain () ) );
break;
case 2:
@@ -68,11 +68,11 @@ void dlgJabberSendRaw::slotCreateMessage(int index)
tePacket->setText("<iq type='get' to='USER@DOMAIN'>\n<query xmlns='jabber:iq:last'/></iq>");
break;
case 4:
- tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>")
+ tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>")
.arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) );
break;
case 5:
- tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>")
+ tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>")
.arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) );
break;
diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.h b/kopete/protocols/jabber/ui/dlgjabbersendraw.h
index 6570363b..44e1a9ad 100644
--- a/kopete/protocols/jabber/ui/dlgjabbersendraw.h
+++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.h
@@ -19,7 +19,7 @@
#ifndef DLGJABBERSENDRAW_H
#define DLGJABBERSENDRAW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "dlgsendraw.h"
class JabberClient;
@@ -27,7 +27,7 @@ class JabberClient;
/**
* A dialog to send raw strings to the jabber server.
*
- * It comes with a QComboBox to choose some "template" strings
+ * It comes with a TQComboBox to choose some "template" strings
* like "Availability Status", "Subscription",...
*
* @author Till Gerken <till@tantalo.net>
@@ -38,7 +38,7 @@ class dlgJabberSendRaw:public DlgSendRaw
Q_OBJECT
public:
- dlgJabberSendRaw ( JabberClient *client, QWidget * parent = 0, const char *name = 0);
+ dlgJabberSendRaw ( JabberClient *client, TQWidget * parent = 0, const char *name = 0);
virtual ~ dlgJabberSendRaw ();
public slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.cpp b/kopete/protocols/jabber/ui/dlgjabberservices.cpp
index 00e99f45..1bd1310c 100644
--- a/kopete/protocols/jabber/ui/dlgjabberservices.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberservices.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qtable.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqtable.h>
#include "jabberaccount.h"
#include "jabberclient.h"
@@ -32,7 +32,7 @@
#include "dlgjabberservices.moc"
-dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, const char *name):dlgServices (parent, name)
+dlgJabberServices::dlgJabberServices (JabberAccount *account, TQWidget *parent, const char *name):dlgServices (parent, name)
{
m_account = account;
@@ -57,22 +57,22 @@ dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, c
//tblServices->setColumnStretchable (1, true);
// disable user selections
- //tblServices->setSelectionMode (QTable::NoSelection);
+ //tblServices->setSelectionMode (TQTable::NoSelection);
// name table headers
//tblServices->horizontalHeader ()->setLabel (0, i18n ("Name"));
//tblServices->horizontalHeader ()->setLabel (1, i18n ("Address"));
- connect (btnQuery, SIGNAL (clicked ()), this, SLOT (slotDisco ()));
- //connect (tblServices, SIGNAL (clicked (int, int, int, const QPoint &)), this, SLOT (slotSetSelection (int, int, int, const QPoint &)));
- connect (lvServices, SIGNAL (selectionChanged (QListViewItem *)), this, SLOT (slotSetSelection (QListViewItem *)));
+ connect (btnQuery, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDisco ()));
+ //connect (tblServices, TQT_SIGNAL (clicked (int, int, int, const TQPoint &)), this, TQT_SLOT (slotSetSelection (int, int, int, const TQPoint &)));
+ connect (lvServices, TQT_SIGNAL (selectionChanged (TQListViewItem *)), this, TQT_SLOT (slotSetSelection (TQListViewItem *)));
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotRegister ()));
- connect (btnBrowse, SIGNAL (clicked ()), this, SLOT (slotBrowse ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotRegister ()));
+ connect (btnBrowse, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotBrowse ()));
}
-void dlgJabberServices::slotSetSelection (QListViewItem *it)
+void dlgJabberServices::slotSetSelection (TQListViewItem *it)
{
dlgJabberServies_item *item=dynamic_cast<dlgJabberServies_item*>(it);
if(!item)
@@ -99,7 +99,7 @@ void dlgJabberServices::slotService ()
}
XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices (m_account->client()->rootTask ());
- connect (serviceTask, SIGNAL (finished ()), this, SLOT (slotServiceFinished ()));
+ connect (serviceTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotServiceFinished ()));
/* populate server field if it is empty */
if(leServer->text().isEmpty())
@@ -121,7 +121,7 @@ void dlgJabberServices::slotServiceFinished ()
if (!task->success ())
{
- QString error = task->statusString();
+ TQString error = task->statusString();
KMessageBox::queuedMessageBox (this, KMessageBox::Error, i18n ("Unable to retrieve the list of services.\nReason: %1").arg(error), i18n ("Jabber Error"));
return;
}
@@ -148,13 +148,13 @@ void dlgJabberServices::slotDisco()
}
JT_DiscoItems *jt = new JT_DiscoItems(m_account->client()->rootTask());
- connect(jt, SIGNAL(finished()), this, SLOT(slotDiscoFinished()));
+ connect(jt, TQT_SIGNAL(finished()), this, TQT_SLOT(slotDiscoFinished()));
/* populate server field if it is empty */
if(leServer->text().isEmpty())
leServer->setText(m_account->server());
- jt->get(leServer->text() , QString());
+ jt->get(leServer->text() , TQString());
jt->go(true);
}
@@ -168,11 +168,11 @@ void dlgJabberServices::slotDiscoFinished( )
if ( jt->success() )
{
- QValueList<XMPP::DiscoItem> list = jt->items();
+ TQValueList<XMPP::DiscoItem> list = jt->items();
lvServices->clear();
- for(QValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
const XMPP::DiscoItem a = *it;
dlgJabberServies_item *item=new dlgJabberServies_item( lvServices , (*it).jid ().userHost () , (*it).name ());
@@ -211,10 +211,10 @@ dlgJabberServices::~dlgJabberServices ()
{
}
-void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const QString & node , JabberAccount *account )
+void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const TQString & node , JabberAccount *account )
{
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account->client()->rootTask());
- connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
+ connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
jt->get(jid, node);
jt->go(true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.h b/kopete/protocols/jabber/ui/dlgjabberservices.h
index f2d4cedc..c64fb045 100644
--- a/kopete/protocols/jabber/ui/dlgjabberservices.h
+++ b/kopete/protocols/jabber/ui/dlgjabberservices.h
@@ -19,13 +19,13 @@
#ifndef DLGJABBERSERVICES_H
#define DLGJABBERSERVICES_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "jabberaccount.h"
#include "xmpp_tasks.h"
#include "dlgservices.h"
-#include <qlistview.h>
+#include <tqlistview.h>
/**
*@author Till Gerken <till@tantalo.net>
@@ -36,11 +36,11 @@ class dlgJabberServices:public dlgServices
Q_OBJECT
public:
- dlgJabberServices (JabberAccount *account, QWidget *parent = 0, const char *name = 0);
+ dlgJabberServices (JabberAccount *account, TQWidget *parent = 0, const char *name = 0);
~dlgJabberServices ();
private slots:
- void slotSetSelection (QListViewItem *);
+ void slotSetSelection (TQListViewItem *);
void slotService ();
void slotServiceFinished ();
void slotRegister ();
@@ -56,16 +56,16 @@ private:
};
-class dlgJabberServies_item : protected QObject, public QListViewItem
+class dlgJabberServies_item : protected TQObject, public TQListViewItem
{
Q_OBJECT
public:
- dlgJabberServies_item( QListView *parent , const QString &s1 , const QString &s2 )
- : QListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {}
+ dlgJabberServies_item( TQListView *parent , const TQString &s1 , const TQString &s2 )
+ : TQListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {}
bool can_browse, can_register;
XMPP::Jid jid;
- void updateInfo(const XMPP::Jid& jid, const QString &node , JabberAccount *account);
+ void updateInfo(const XMPP::Jid& jid, const TQString &node , JabberAccount *account);
private slots:
void slotDiscoFinished();
};
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
index b35e091a..19070798 100644
--- a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
@@ -23,10 +23,10 @@
#include "dlgjabbervcard.h"
// Qt includes
-#include <qtextedit.h>
-#include <qwidgetstack.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqtextedit.h>
+#include <tqwidgetstack.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
// KDE includes
#include <kdebug.h>
@@ -60,7 +60,7 @@
* name 'name'
*
*/
-dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent, const char *name)
+dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent, const char *name)
: KDialogBase (parent, name, false, i18n("Jabber vCard"), Close | User1 | User2, Close, false, i18n("&Save User Info"), i18n("&Fetch vCard") )
{
@@ -70,14 +70,14 @@ dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *conta
m_mainWidget = new dlgVCard(this);
setMainWidget(m_mainWidget);
- connect (this, SIGNAL (user1Clicked()), this, SLOT (slotSaveVCard ()));
- connect (this, SIGNAL( user2Clicked()), this, SLOT (slotGetVCard ()));
+ connect (this, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSaveVCard ()));
+ connect (this, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT (slotGetVCard ()));
- connect (m_mainWidget->btnSelectPhoto, SIGNAL (clicked()), this, SLOT (slotSelectPhoto()));
- connect (m_mainWidget->btnClearPhoto, SIGNAL (clicked()), this, SLOT (slotClearPhoto()));
- connect (m_mainWidget->urlHomeEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
- connect (m_mainWidget->urlWorkEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
- connect (m_mainWidget->urlHomepage, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
+ connect (m_mainWidget->btnSelectPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotSelectPhoto()));
+ connect (m_mainWidget->btnClearPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotClearPhoto()));
+ connect (m_mainWidget->urlHomeEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
+ connect (m_mainWidget->urlWorkEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
+ connect (m_mainWidget->urlHomepage, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
assignContactProperties();
@@ -120,7 +120,7 @@ void dlgJabberVCard::assignContactProperties ()
m_mainWidget->leBirthday->setText (m_contact->property(m_account->protocol()->propBirthday).value().toString());
m_mainWidget->leTimezone->setText (m_contact->property(m_account->protocol()->propTimezone).value().toString());
- QString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString();
+ TQString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString();
m_mainWidget->leHomepage->setText (homepage);
m_mainWidget->urlHomepage->setText (homepage);
m_mainWidget->urlHomepage->setURL (homepage);
@@ -130,7 +130,7 @@ void dlgJabberVCard::assignContactProperties ()
m_photoPath = m_contact->property(m_account->protocol()->propPhoto).value().toString();
if( !m_photoPath.isEmpty() )
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap(m_photoPath) );
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap(m_photoPath) );
}
// addresses
@@ -152,8 +152,8 @@ void dlgJabberVCard::assignContactProperties ()
m_mainWidget->urlWorkEmail->setUseCursor ( false );
m_mainWidget->urlHomeEmail->setUseCursor ( false );
- QString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString();
- QString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString();
+ TQString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString();
+ TQString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString();
m_mainWidget->leWorkEmail->setText (workEmail);
m_mainWidget->urlWorkEmail->setText (workEmail);
m_mainWidget->urlWorkEmail->setURL ("mailto:" + workEmail);
@@ -358,7 +358,7 @@ void dlgJabberVCard::slotSaveVCard()
// work information tab
XMPP::VCard::Org org;
org.name = m_mainWidget->leCompany->text();
- org.unit = QStringList::split(",", m_mainWidget->leDepartment->text());
+ org.unit = TQStringList::split(",", m_mainWidget->leDepartment->text());
vCard.setOrg(org);
vCard.setTitle( m_mainWidget->lePosition->text() );
vCard.setRole( m_mainWidget->leRole->text() );
@@ -393,10 +393,10 @@ void dlgJabberVCard::slotSaveVCard()
// Set contact photo as a binary value (if he has set a photo)
if( !m_photoPath.isEmpty() )
{
- QString photoPath = m_photoPath;
- QImage image( photoPath );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQString photoPath = m_photoPath;
+ TQImage image( photoPath );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, "PNG" );
vCard.setPhoto( ba );
@@ -407,7 +407,7 @@ void dlgJabberVCard::slotSaveVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard( m_account->client()->rootTask() );
// signal to ourselves when the vCard data arrived
- QObject::connect(task, SIGNAL(finished()), this, SLOT(slotVCardSaved()));
+ TQObject::connect(task, TQT_SIGNAL(finished()), this, TQT_SLOT(slotVCardSaved()));
task->set(vCard);
task->go(true);
}
@@ -438,7 +438,7 @@ void dlgJabberVCard::slotGetVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard ( m_account->client()->rootTask() );
// signal to ourselves when the vCard data arrived
- QObject::connect( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) );
+ TQObject::connect( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) );
task->get ( m_contact->rosterItem().jid().full() );
task->go ( true );
}
@@ -467,9 +467,9 @@ void dlgJabberVCard::slotGotVCard()
void dlgJabberVCard::slotSelectPhoto()
{
- QString path;
+ TQString path;
bool remoteFile = false;
- KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Jabber Photo" ) );
+ KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Jabber Photo" ) );
if( filePath.isEmpty() )
return;
@@ -485,15 +485,15 @@ void dlgJabberVCard::slotSelectPhoto()
else
path = filePath.path();
- QImage img( path );
- img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this );
+ TQImage img( path );
+ img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this );
if( !img.isNull() )
{
if(img.width() > 96 || img.height() > 96)
{
// Scale and crop the picture.
- img = img.smoothScale( 96, 96, QImage::ScaleMin );
+ img = img.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
img = img.copy((img.width()-img.height())/2, 0, 96, 96);
@@ -504,7 +504,7 @@ void dlgJabberVCard::slotSelectPhoto()
else if (img.width() < 32 || img.height() < 32)
{
// Scale and crop the picture.
- img = img.smoothScale( 32, 32, QImage::ScaleMin );
+ img = img.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
img = img.copy((img.width()-img.height())/2, 0, 32, 32);
@@ -520,14 +520,14 @@ void dlgJabberVCard::slotSelectPhoto()
img = img.copy(0, (img.height()-img.width())/2, img.height(), img.height());
}
- m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(QRegExp("[./~]"),"-") +".png");
+ m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(TQRegExp("[./~]"),"-") +".png");
if( img.save(m_photoPath, "PNG") )
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap(img) );
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap(img) );
}
else
{
- m_photoPath = QString::null;
+ m_photoPath = TQString::null;
}
}
else
@@ -541,13 +541,13 @@ void dlgJabberVCard::slotSelectPhoto()
void dlgJabberVCard::slotClearPhoto()
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap() );
- m_photoPath = QString::null;
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap() );
+ m_photoPath = TQString::null;
}
-void dlgJabberVCard::slotOpenURL(const QString &url)
+void dlgJabberVCard::slotOpenURL(const TQString &url)
{
- if ( !url.isEmpty () || (url == QString::fromLatin1("mailto:") ) )
+ if ( !url.isEmpty () || (url == TQString::fromLatin1("mailto:") ) )
new KRun(KURL( url ) );
}
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.h b/kopete/protocols/jabber/ui/dlgjabbervcard.h
index 2bea5a2b..05a80940 100644
--- a/kopete/protocols/jabber/ui/dlgjabbervcard.h
+++ b/kopete/protocols/jabber/ui/dlgjabbervcard.h
@@ -55,7 +55,7 @@ public:
* @param widget Parent widget.
* @param name widget name.
*/
- dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent = 0, const char *name = 0);
+ dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent = 0, const char *name = 0);
~dlgJabberVCard ();
private slots:
@@ -83,7 +83,7 @@ private slots:
/**
* Open a link. (ex: the homepage link or the email address)
*/
- void slotOpenURL(const QString &url);
+ void slotOpenURL(const TQString &url);
/**
* Retrieve vCard information for the current contact.
@@ -99,7 +99,7 @@ private:
JabberAccount *m_account;
JabberBaseContact *m_contact;
dlgVCard *m_mainWidget;
- QString m_photoPath;
+ TQString m_photoPath;
void assignContactProperties();
void setReadOnly(bool state);
diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
index 950d5680..076b92b8 100644
--- a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
+++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
@@ -20,11 +20,11 @@
#include "jabberaddcontactpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <klocale.h>
#include <kopeteaccount.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kopetegroup.h>
#include <kopetemetacontact.h>
@@ -35,9 +35,9 @@
#include "jabberclient.h"
#include "xmpp_tasks.h"
-JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * parent, const char *name):AddContactPage (parent, name)
+JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, TQWidget * parent, const char *name):AddContactPage (parent, name)
{
- (new QVBoxLayout (this))->setAutoAdd (true);
+ (new TQVBoxLayout (this))->setAutoAdd (true);
JabberTransport *transport=dynamic_cast<JabberTransport*>(owner);
JabberAccount *jaccount= transport ? transport->account() : dynamic_cast<JabberAccount*>(owner);
@@ -51,7 +51,7 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p
{
jabData->textLabel1->setText( i18n("Loading instruction from gateway...") );
XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () );
- QObject::connect (gatewayTask, SIGNAL (finished ()), this, SLOT (slotPromtReceived()));
+ TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotPromtReceived()));
gatewayTask->get ( transport->myself()->contactId() );
gatewayTask->go ( true );
}
@@ -59,8 +59,8 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p
}
else
{
- noaddMsg1 = new QLabel (i18n ("You need to be connected to be able to add contacts."), this);
- noaddMsg2 = new QLabel (i18n ("Connect to the Jabber 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 Jabber network and try again."), this);
canadd = false;
}
@@ -84,26 +84,26 @@ bool JabberAddContactPage::apply ( Kopete::Account *account, Kopete::MetaContact
JabberTransport *transport=dynamic_cast<JabberTransport*>(account);
JabberAccount *jaccount=transport?transport->account():dynamic_cast<JabberAccount*>(account);
- QString contactId = jabData->addID->text ();
+ TQString contactId = jabData->addID->text ();
if(transport)
{
XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () );
JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND *workaround =
new JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( transport , parentContact , gatewayTask );
- QObject::connect (gatewayTask, SIGNAL (finished ()), workaround, SLOT (slotJidReceived()));
+ TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), workaround, TQT_SLOT (slotJidReceived()));
gatewayTask->set ( transport->myself()->contactId() , contactId );
gatewayTask->go ( true );
return true;
}
- QString displayName = parentContact->displayName ();
+ TQString displayName = parentContact->displayName ();
/*
if ( displayName.isEmpty () )
displayName = contactId;
*/
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -151,8 +151,8 @@ void JabberAddContactPage::slotPromtReceived( )
}
}
-JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, QObject* task )
- : QObject(task) , metacontact(mc) , transport(t)
+JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, TQObject* task )
+ : TQObject(task) , metacontact(mc) , transport(t)
{}
void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slotJidReceived( )
@@ -165,7 +165,7 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot
// maybe we should show an error message, but i don't like showing error message - Olivier
}
- QString contactId=task->prompt();
+ TQString contactId=task->prompt();
Kopete::MetaContact* parentContact=metacontact;
JabberAccount *jaccount=transport->account();;
@@ -174,13 +174,13 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot
* this is a copy of the end of JabberAddContactPage::apply
\*/
- QString displayName = parentContact->displayName ();
+ TQString displayName = parentContact->displayName ();
/*
if ( displayName.isEmpty () )
displayName = contactId;
*/
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.h b/kopete/protocols/jabber/ui/jabberaddcontactpage.h
index 8081d0ad..77109c3d 100644
--- a/kopete/protocols/jabber/ui/jabberaddcontactpage.h
+++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.h
@@ -34,13 +34,13 @@ class JabberAddContactPage:public AddContactPage
Q_OBJECT
public:
- JabberAddContactPage (Kopete::Account * owner, QWidget * parent = 0, const char *name = 0);
+ JabberAddContactPage (Kopete::Account * owner, TQWidget * parent = 0, const char *name = 0);
~JabberAddContactPage ();
virtual bool validateData ();
virtual bool apply (Kopete::Account *, Kopete::MetaContact *);
dlgAddContact *jabData;
- QLabel *noaddMsg1;
- QLabel *noaddMsg2;
+ TQLabel *noaddMsg1;
+ TQLabel *noaddMsg2;
bool canadd;
public slots:
void slotPromtReceived();
@@ -55,7 +55,7 @@ class JabberTransport;
class JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND : public QObject
{ Q_OBJECT
public:
- JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, QObject *parent);
+ JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, TQObject *parent);
Kopete::MetaContact *metacontact;
JabberTransport *transport;
public slots:
diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.cpp b/kopete/protocols/jabber/ui/jabberchooseserver.cpp
index 66598432..63339158 100644
--- a/kopete/protocols/jabber/ui/jabberchooseserver.cpp
+++ b/kopete/protocols/jabber/ui/jabberchooseserver.cpp
@@ -24,8 +24,8 @@
#include <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qtable.h>
-#include <qlabel.h>
+#include <tqtable.h>
+#include <tqlabel.h>
#include "jabberprotocol.h"
#include "dlgjabberchooseserver.h"
#include "jabberregisteraccount.h"
@@ -48,11 +48,11 @@ JabberChooseServer::JabberChooseServer ( JabberRegisterAccount *parent, const ch
// retrieve server list
mTransferJob = KIO::get ( "http://www.jabber.org/servers.xml" );
- 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& ) ) );
- connect ( mMainWidget->listServers, SIGNAL ( pressed ( int, int, int, const QPoint & ) ), this, SLOT ( slotSetSelection ( int ) ) );
- connect ( mMainWidget->listServers, SIGNAL ( doubleClicked ( int, int, int, const QPoint & ) ), this, SLOT ( slotOk () ) );
+ connect ( mMainWidget->listServers, TQT_SIGNAL ( pressed ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotSetSelection ( int ) ) );
+ connect ( mMainWidget->listServers, TQT_SIGNAL ( doubleClicked ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotOk () ) );
enableButtonOK ( false );
@@ -90,7 +90,7 @@ void JabberChooseServer::slotSetSelection ( int row )
}
-void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const QByteArray &data )
+void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data )
{
unsigned oldSize = xmlServerList.size ();
@@ -119,7 +119,7 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job )
mMainWidget->lblStatus->setText ( "" );
// parse XML list
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent ( xmlServerList ) )
{
@@ -127,14 +127,14 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job )
return;
}
- QDomElement docElement = doc.documentElement ();
+ TQDomElement docElement = doc.documentElement ();
mMainWidget->listServers->setNumRows ( docElement.childNodes().count () );
int listIndex = 0;
- for( QDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ )
+ for( TQDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ )
{
- QDomNamedNodeMap attributes = node.attributes ();
+ TQDomNamedNodeMap attributes = node.attributes ();
mMainWidget->listServers->setText ( listIndex, 0, attributes.namedItem ( "jid" ).nodeValue () );
mMainWidget->listServers->setText ( listIndex, 1, attributes.namedItem ( "name" ).nodeValue () );
}
diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.h b/kopete/protocols/jabber/ui/jabberchooseserver.h
index 0cc8045d..cc64040b 100644
--- a/kopete/protocols/jabber/ui/jabberchooseserver.h
+++ b/kopete/protocols/jabber/ui/jabberchooseserver.h
@@ -21,7 +21,7 @@
#define JABBERCHOOSESERVER_H
#include <kdialogbase.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class JabberRegisterAccount;
class DlgJabberChooseServer;
@@ -48,7 +48,7 @@ public:
private slots:
void slotOk ();
void slotCancel ();
- void slotTransferData ( KIO::Job *job, const QByteArray &data );
+ void slotTransferData ( KIO::Job *job, const TQByteArray &data );
void slotTransferResult ( KIO::Job *job );
void slotSetSelection ( int row );
@@ -56,7 +56,7 @@ private:
DlgJabberChooseServer *mMainWidget;
JabberRegisterAccount *mParentWidget;
KIO::TransferJob *mTransferJob;
- QByteArray xmlServerList;
+ TQByteArray xmlServerList;
int mSelectedRow;
diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
index b0284e41..6c928ad6 100644
--- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
+++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
@@ -18,12 +18,12 @@
***************************************************************************/
#include <kdebug.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -40,18 +40,18 @@
#include "jabberregisteraccount.h"
#include "dlgjabberchangepassword.h"
-JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, QWidget * parent, const char *name)
+JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, TQWidget * parent, const char *name)
: DlgJabberEditAccountWidget (parent, name), KopeteEditAccountWidget (ident)
{
m_protocol = proto;
- connect (mID, SIGNAL (textChanged (const QString &)), this, SLOT (updateServerField ()));
- connect (cbCustomServer, SIGNAL (toggled (bool)), this, SLOT (updateServerField ()));
+ connect (mID, TQT_SIGNAL (textChanged (const TQString &)), this, TQT_SLOT (updateServerField ()));
+ connect (cbCustomServer, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (updateServerField ()));
- connect (cbUseSSL, SIGNAL (toggled (bool)), this, SLOT (sslToggled (bool)));
+ connect (cbUseSSL, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (sslToggled (bool)));
- connect (btnChangePassword, SIGNAL ( clicked() ), this, SLOT ( slotChangePasswordClicked () ));
+ connect (btnChangePassword, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( slotChangePasswordClicked () ));
if (account())
{
@@ -63,7 +63,7 @@ JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, Jabber
{
// this is a new account
btnChangePassword->setEnabled ( false );
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (registerClicked ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (registerClicked ()));
}
}
@@ -88,15 +88,15 @@ void JabberEditAccountWidget::reopen ()
mPass->load (&account()->password ());
cbAutoConnect->setChecked (account()->excludeConnect());
- mResource->setText (account()->configGroup()->readEntry ("Resource", QString::fromLatin1("Kopete")));
+ mResource->setText (account()->configGroup()->readEntry ("Resource", TQString::fromLatin1("Kopete")));
mPriority->setValue (account()->configGroup()->readNumEntry ("Priority", 5));
- mServer->setText (account()->configGroup()->readEntry ("Server", QString::null));
+ mServer->setText (account()->configGroup()->readEntry ("Server", TQString::null));
cbUseSSL->setChecked (account()->configGroup()->readBoolEntry( "UseSSL", false));
mPort->setValue (account()->configGroup()->readNumEntry("Port", 5222));
- QString auth = account()->configGroup()->readEntry("AuthType", QString::null);
+ TQString auth = account()->configGroup()->readEntry("AuthType", TQString::null);
cbCustomServer->setChecked (account()->configGroup()->readBoolEntry("CustomServer",false));
@@ -119,7 +119,7 @@ void JabberEditAccountWidget::reopen ()
leLocalIP->setText (KGlobal::config()->readEntry("LocalIP", ""));
sbLocalPort->setValue (KGlobal::config()->readNumEntry("LocalPort", 8010));
- leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", QString::null));
+ leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", TQString::null));
// Privacy
cbSendEvents->setChecked( account()->configGroup()->readBoolEntry("SendEvents", true) );
@@ -173,8 +173,8 @@ void JabberEditAccountWidget::writeConfig ()
account()->configGroup()->writeEntry("AllowPlainTextPassword", cbAllowPlainTextPassword->isChecked());
account()->configGroup()->writeEntry("Server", mServer->text ());
account()->configGroup()->writeEntry("Resource", mResource->text ());
- account()->configGroup()->writeEntry("Priority", QString::number (mPriority->value ()));
- account()->configGroup()->writeEntry("Port", QString::number (mPort->value ()));
+ account()->configGroup()->writeEntry("Priority", TQString::number (mPriority->value ()));
+ account()->configGroup()->writeEntry("Port", TQString::number (mPort->value ()));
account()->setExcludeConnect(cbAutoConnect->isChecked());
@@ -217,7 +217,7 @@ void JabberEditAccountWidget::updateServerField ()
if(!cbCustomServer->isChecked())
{
- QString newServer = mID->text().section("@", 1);
+ TQString newServer = mID->text().section("@", 1);
mPort->setValue(5222);
// check if ssl is enabled and set the port correctly
sslToggled(cbUseSSL->isChecked());
@@ -258,7 +258,7 @@ void JabberEditAccountWidget::slotChangePasswordClicked ()
DlgJabberChangePassword *passwordDlg = new DlgJabberChangePassword ( account (), this );
- connect ( passwordDlg, SIGNAL ( destroyed () ), this, SLOT ( slotChangePasswordFinished () ) );
+ connect ( passwordDlg, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotChangePasswordFinished () ) );
passwordDlg->show ();
diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
index 1f3ba378..e56dcbd2 100644
--- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
+++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
@@ -20,7 +20,7 @@
#ifndef JABBEREDITACCOUNTWIDEGET_H
#define JABBEREDITACCOUNTWIDEGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprogress.h>
#include "editaccountwidget.h"
#include "jabberaccount.h"
@@ -37,7 +37,7 @@ class JabberEditAccountWidget:public DlgJabberEditAccountWidget, public KopeteEd
Q_OBJECT
public:
- JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, QWidget * parent = 0, const char *name = 0);
+ JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, TQWidget * parent = 0, const char *name = 0);
~JabberEditAccountWidget ();
virtual bool validateData ();
virtual Kopete::Account *apply ();
diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
index f5142736..bb20611b 100644
--- a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
+++ b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
@@ -28,10 +28,10 @@
#include <kpassdlg.h>
#include <knuminput.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include "qca.h"
#include "xmpp.h"
@@ -68,9 +68,9 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent,
// clear variables
jabberClient = new JabberClient ();
- connect ( jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- connect ( jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- connect ( jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
+ connect ( jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ connect ( jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ connect ( jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
jidRegExp.setPattern ( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" );
hintPixmap = KGlobal::iconLoader()->loadIcon ( "jabber_online", KIcon::Small );
@@ -86,16 +86,16 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent,
mMainWidget->cbUseSSL->setChecked ( parent->cbUseSSL->isChecked () );
// connect buttons to slots, ok is already connected by default
- connect ( this, SIGNAL ( cancelClicked () ), this, SLOT ( slotDeleteDialog () ) );
- connect ( mMainWidget->btnChooseServer, SIGNAL ( clicked () ), this, SLOT ( slotChooseServer () ) );
- connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) );
- connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) );
- connect ( mMainWidget->cbUseSSL, SIGNAL ( toggled ( bool ) ), this, SLOT ( slotSSLToggled () ) );
+ connect ( this, TQT_SIGNAL ( cancelClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) );
+ connect ( mMainWidget->btnChooseServer, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotChooseServer () ) );
+ connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) );
+ connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) );
+ connect ( mMainWidget->cbUseSSL, TQT_SIGNAL ( toggled ( bool ) ), this, TQT_SLOT ( slotSSLToggled () ) );
- connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->lePassword, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->lePasswordVerify, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
+ connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->lePassword, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->lePasswordVerify, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
// display JID info now
slotJIDInformation ();
@@ -146,8 +146,8 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( QString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () ||
- QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) )
+ ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () ||
+ TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Please enter the same password twice." ) );
valid = false;
@@ -155,8 +155,8 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( QString::fromLatin1 ( mMainWidget->lePassword->password () ) !=
- QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) )
+ ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ) !=
+ TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Password entries do not match." ) );
valid = false;
@@ -228,11 +228,11 @@ void JabberRegisterAccount::slotChooseServer ()
}
-void JabberRegisterAccount::setServer ( const QString &server )
+void JabberRegisterAccount::setServer ( const TQString &server )
{
mMainWidget->leServer->setText ( server );
- mMainWidget->leJID->setText ( QString ( "@%1" ).arg ( server ) );
+ mMainWidget->leJID->setText ( TQString ( "@%1" ).arg ( server ) );
}
@@ -259,7 +259,7 @@ void JabberRegisterAccount::slotOk ()
jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () );
// start connection, no authentication
- switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), QString::null, false ) )
+ switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString::null, false ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -327,7 +327,7 @@ void JabberRegisterAccount::slotConnected ()
mMainWidget->lblStatusMessage->setText ( i18n ( "Connected successfully, registering new account..." ) );
XMPP::JT_Register * task = new XMPP::JT_Register (jabberClient->rootTask ());
- QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotRegisterUserDone ()));
+ TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotRegisterUserDone ()));
task->reg (mMainWidget->leJID->text().section("@", 0, 0), mMainWidget->lePassword->password ());
task->go (true);
@@ -369,7 +369,7 @@ void JabberRegisterAccount::slotRegisterUserDone ()
// rewire buttons
enableButtonOK ( false );
setButtonCancel ( KStdGuiItem::close () );
- connect ( this, SIGNAL ( closeClicked () ), this, SLOT ( slotDeleteDialog () ) );
+ connect ( this, TQT_SIGNAL ( closeClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) );
}
else
{
@@ -382,7 +382,7 @@ void JabberRegisterAccount::slotRegisterUserDone ()
// FIXME: this is required because Iris crashes if we try
// to disconnect here. Hopefully Justin can fix this.
- QTimer::singleShot(0, this, SLOT(disconnect ()));
+ TQTimer::singleShot(0, this, TQT_SLOT(disconnect ()));
}
diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.h b/kopete/protocols/jabber/ui/jabberregisteraccount.h
index 40d643a7..727d61fb 100644
--- a/kopete/protocols/jabber/ui/jabberregisteraccount.h
+++ b/kopete/protocols/jabber/ui/jabberregisteraccount.h
@@ -21,8 +21,8 @@
#define JABBERREGISTER_H
#include <kdialogbase.h>
-#include <qregexp.h>
-#include <qpixmap.h>
+#include <tqregexp.h>
+#include <tqpixmap.h>
class DlgJabberRegisterAccount;
class JabberProtocol;
@@ -42,7 +42,7 @@ public:
~JabberRegisterAccount ();
- void setServer ( const QString &server );
+ void setServer ( const TQString &server );
private slots:
void slotChooseServer ();
@@ -64,8 +64,8 @@ private:
DlgJabberRegisterAccount *mMainWidget;
JabberEditAccountWidget *mParentWidget;
- QRegExp jidRegExp;
- QPixmap hintPixmap;
+ TQRegExp jidRegExp;
+ TQPixmap hintPixmap;
JabberClient *jabberClient;
diff --git a/kopete/protocols/meanwhile/meanwhileaccount.cpp b/kopete/protocols/meanwhile/meanwhileaccount.cpp
index c130475b..9dba56f2 100644
--- a/kopete/protocols/meanwhile/meanwhileaccount.cpp
+++ b/kopete/protocols/meanwhile/meanwhileaccount.cpp
@@ -32,11 +32,11 @@
#include "kopeteaway.h"
#include <kinputdialog.h>
#include <kmessagebox.h>
-#include <qdict.h>
+#include <tqdict.h>
MeanwhileAccount::MeanwhileAccount(
MeanwhileProtocol *parent,
- const QString &accountID,
+ const TQString &accountID,
const char *name)
: Kopete::PasswordedAccount(parent, accountID, 0, name)
{
@@ -62,7 +62,7 @@ void MeanwhileAccount::setPlugin(MeanwhilePlugin *plugin)
}
bool MeanwhileAccount::createContact(
- const QString & contactId ,
+ const TQString & contactId ,
Kopete::MetaContact * parentContact)
{
MeanwhileContact* newContact = new MeanwhileContact(contactId,
@@ -78,7 +78,7 @@ bool MeanwhileAccount::createContact(
return newContact != 0L;
}
-void MeanwhileAccount::connectWithPassword(const QString &password)
+void MeanwhileAccount::connectWithPassword(const TQString &password)
{
if (password.isEmpty()) {
disconnect(Kopete::Account::Manual);
@@ -92,12 +92,12 @@ void MeanwhileAccount::connectWithPassword(const QString &password)
return;
}
- QObject::connect(m_session,
- SIGNAL(sessionStateChange(Kopete::OnlineStatus)),
- this, SLOT(slotSessionStateChange(Kopete::OnlineStatus)));
- QObject::connect(m_session,
- SIGNAL(serverNotification(const QString &)),
- this, SLOT(slotServerNotification(const QString&)));
+ TQObject::connect(m_session,
+ TQT_SIGNAL(sessionStateChange(Kopete::OnlineStatus)),
+ this, TQT_SLOT(slotSessionStateChange(Kopete::OnlineStatus)));
+ TQObject::connect(m_session,
+ TQT_SIGNAL(serverNotification(const TQString &)),
+ this, TQT_SLOT(slotServerNotification(const TQString&)));
}
@@ -138,15 +138,15 @@ KActionMenu * MeanwhileAccount::actionMenu()
menu->popupMenu()->insertSeparator();
#if 0
- menu->insert(new KAction(i18n("&Change Status Message"), QString::null, 0,
- this, SLOT(meanwhileChangeStatus()), this,
+ menu->insert(new KAction(i18n("&Change Status Message"), TQString::null, 0,
+ this, TQT_SLOT(meanwhileChangeStatus()), this,
"meanwhileChangeStatus"));
//infoPlugin->addCustomMenus(theMenu);
#endif
return menu;
}
-QString MeanwhileAccount::getServerName()
+TQString MeanwhileAccount::getServerName()
{
return configGroup()->readEntry("Server");
}
@@ -156,7 +156,7 @@ int MeanwhileAccount::getServerPort()
return configGroup()->readNumEntry("Port");
}
-void MeanwhileAccount::setServerName(const QString &server)
+void MeanwhileAccount::setServerName(const TQString &server)
{
configGroup()->writeEntry("Server", server);
}
@@ -198,25 +198,25 @@ bool MeanwhileAccount::getClientIDParams(int *clientID,
return custom_id;
}
-void MeanwhileAccount::slotServerNotification(const QString &mesg)
+void MeanwhileAccount::slotServerNotification(const TQString &mesg)
{
KMessageBox::queuedMessageBox(0, KMessageBox::Error , mesg,
i18n("Meanwhile Plugin: Message from server"), KMessageBox::Notify);
}
-QString MeanwhileAccount::meanwhileId() const
+TQString MeanwhileAccount::meanwhileId() const
{
return m_meanwhileId;
}
-void MeanwhileAccount::setAway(bool away, const QString &reason)
+void MeanwhileAccount::setAway(bool away, const TQString &reason)
{
MeanwhileProtocol *p = static_cast<MeanwhileProtocol *>(protocol());
setOnlineStatus(away ? p->statusIdle : p->statusOnline, reason);
}
void MeanwhileAccount::setOnlineStatus(const Kopete::OnlineStatus &status,
- const QString &reason)
+ const TQString &reason)
{
HERE;
Kopete::OnlineStatus oldstatus = myself()->onlineStatus();
diff --git a/kopete/protocols/meanwhile/meanwhileaccount.h b/kopete/protocols/meanwhile/meanwhileaccount.h
index d08b07c5..ba747212 100644
--- a/kopete/protocols/meanwhile/meanwhileaccount.h
+++ b/kopete/protocols/meanwhile/meanwhileaccount.h
@@ -37,15 +37,15 @@ public:
* @param accountID The (meanwhile) account id of this account
* @param name The name of this account
*/
- MeanwhileAccount(MeanwhileProtocol *protocol, const QString &accountID,
+ MeanwhileAccount(MeanwhileProtocol *protocol, const TQString &accountID,
const char *name = 0L);
~MeanwhileAccount();
- virtual bool createContact(const QString &contactId,
+ virtual bool createContact(const TQString &contactId,
Kopete::MetaContact *parentContact);
- virtual void connectWithPassword(const QString &password);
+ virtual void connectWithPassword(const TQString &password);
virtual void disconnect();
@@ -54,11 +54,11 @@ public:
virtual KActionMenu *actionMenu();
/** Get the server host name */
- QString getServerName();
+ TQString getServerName();
/** Get the server port */
int getServerPort();
/** Set the server host name */
- void setServerName(const QString &server);
+ void setServerName(const TQString &server);
/** Set the server port */
void setServerPort(int port);
/** Provide an information plugin for this account */
@@ -89,7 +89,7 @@ public:
* Get the meanwhile id for this account
* @return The meanwhile ID for the account
*/
- QString meanwhileId() const;
+ TQString meanwhileId() const;
public slots:
/**
@@ -100,12 +100,12 @@ public slots:
/**
* Called by the session when a notification message has been received
*/
- void slotServerNotification(const QString &mesg);
+ void slotServerNotification(const TQString &mesg);
/** Reimplemented from Kopete::Account */
void setOnlineStatus(const Kopete::OnlineStatus& status,
- const QString &reason = QString::null);
- void setAway(bool away, const QString&reason = QString::null);
+ const TQString &reason = TQString::null);
+ void setAway(bool away, const TQString&reason = TQString::null);
private:
/** Current online status */
@@ -115,7 +115,7 @@ private:
MeanwhileSession *m_session;
/* The user id for this account */
- QString m_meanwhileId;
+ TQString m_meanwhileId;
};
#endif
diff --git a/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp b/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp
index 8709700b..44b10bbc 100644
--- a/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp
+++ b/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp
@@ -15,30 +15,30 @@
*************************************************************************
*/
#include "meanwhileaddcontactpage.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kopeteaccount.h>
#include <kopetemetacontact.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "meanwhileprotocol.h"
#include "meanwhileaccount.h"
#include "meanwhileplugin.h"
MeanwhileAddContactPage::MeanwhileAddContactPage(
- QWidget* parent,
+ TQWidget* parent,
Kopete::Account *_account)
: AddContactPage(parent, 0L), theAccount(_account),
theParent(parent)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
theDialog = new MeanwhileAddContactBase(this);
MeanwhileAccount *account =
static_cast<MeanwhileAccount *>(_account);
if (account->infoPlugin->canProvideMeanwhileId())
{
- QObject::connect(theDialog->btnFindUser, SIGNAL(clicked()),
- SLOT(slotFindUser()));
+ TQObject::connect(theDialog->btnFindUser, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotFindUser()));
}
else
theDialog->btnFindUser->setDisabled(true);
@@ -61,7 +61,7 @@ bool MeanwhileAddContactPage::apply(
Kopete::Account* a,
Kopete::MetaContact* m )
{
- QString displayName = theDialog->contactID->text();
+ TQString displayName = theDialog->contactID->text();
MeanwhileAccount* myAccount = static_cast<MeanwhileAccount*>(a);
return myAccount->addContact(displayName, m, Kopete::Account::ChangeKABC );
}
diff --git a/kopete/protocols/meanwhile/meanwhileaddcontactpage.h b/kopete/protocols/meanwhile/meanwhileaddcontactpage.h
index 889b2707..fdf6445c 100644
--- a/kopete/protocols/meanwhile/meanwhileaddcontactpage.h
+++ b/kopete/protocols/meanwhile/meanwhileaddcontactpage.h
@@ -27,7 +27,7 @@ class MeanwhileAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- MeanwhileAddContactPage( QWidget* parent = 0,
+ MeanwhileAddContactPage( TQWidget* parent = 0,
Kopete::Account *account=0);
~MeanwhileAddContactPage();
@@ -37,7 +37,7 @@ public:
protected:
MeanwhileAddContactBase *theDialog;
Kopete::Account *theAccount;
- QWidget *theParent;
+ TQWidget *theParent;
public slots:
void slotFindUser();
};
diff --git a/kopete/protocols/meanwhile/meanwhilecontact.cpp b/kopete/protocols/meanwhile/meanwhilecontact.cpp
index fd30bc46..e77d470a 100644
--- a/kopete/protocols/meanwhile/meanwhilecontact.cpp
+++ b/kopete/protocols/meanwhile/meanwhilecontact.cpp
@@ -29,7 +29,7 @@
#include "meanwhilecontact.h"
#include "meanwhileplugin.h"
-MeanwhileContact::MeanwhileContact(QString userId, QString nickname,
+MeanwhileContact::MeanwhileContact(TQString userId, TQString nickname,
MeanwhileAccount *account, Kopete::MetaContact *parent)
: Kopete::Contact(account, userId, parent)
{
@@ -49,8 +49,8 @@ bool MeanwhileContact::isReachable()
return isOnline();
}
-void MeanwhileContact::serialize(QMap<QString, QString> &serializedData,
- QMap<QString, QString> &addressBookData)
+void MeanwhileContact::serialize(TQMap<TQString, TQString> &serializedData,
+ TQMap<TQString, TQString> &addressBookData)
{
Kopete::Contact::serialize(serializedData, addressBookData);
}
@@ -70,25 +70,25 @@ Kopete::ChatSession* MeanwhileContact::manager(CanCreateFlags canCreate)
if (m_msgManager != 0L || canCreate == Kopete::Contact::CannotCreate)
return m_msgManager;
- QPtrList<Kopete::Contact> contacts;
+ TQPtrList<Kopete::Contact> 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&)));
+ TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)),
+ this, TQT_SLOT(sendMessage(Kopete::Message&)));
- connect(m_msgManager, SIGNAL(myselfTyping(bool)),
- this, SLOT(slotSendTyping(bool)));
+ connect(m_msgManager, TQT_SIGNAL(myselfTyping(bool)),
+ this, TQT_SLOT(slotSendTyping(bool)));
- connect(m_msgManager, SIGNAL(destroyed()),
- this, SLOT(slotChatSessionDestroyed()));
+ connect(m_msgManager, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(slotChatSessionDestroyed()));
return m_msgManager;
}
-QString MeanwhileContact::meanwhileId() const
+TQString MeanwhileContact::meanwhileId() const
{
return m_meanwhileId;
}
@@ -104,7 +104,7 @@ void MeanwhileContact::slotSendTyping(bool isTyping)
sendTyping(this, isTyping);
}
-void MeanwhileContact::receivedMessage(const QString &message)
+void MeanwhileContact::receivedMessage(const TQString &message)
{
Kopete::ContactPtrList contactList;
contactList.append(account()->myself());
diff --git a/kopete/protocols/meanwhile/meanwhilecontact.h b/kopete/protocols/meanwhile/meanwhilecontact.h
index eface094..048a4b0f 100644
--- a/kopete/protocols/meanwhile/meanwhilecontact.h
+++ b/kopete/protocols/meanwhile/meanwhilecontact.h
@@ -17,7 +17,7 @@
#ifndef MEANWHILECONTACT_H
#define MEANWHILECONTACT_H
-#include <qmap.h>
+#include <tqmap.h>
#include "kopetecontact.h"
#include "kopetemessage.h"
#include "meanwhileaccount.h"
@@ -33,26 +33,26 @@ class MeanwhileContact : public Kopete::Contact
Q_OBJECT
public:
- MeanwhileContact(QString userId, QString nickname,
+ MeanwhileContact(TQString userId, TQString nickname,
MeanwhileAccount *account, Kopete::MetaContact *parent);
~MeanwhileContact();
virtual bool isReachable();
- virtual void serialize(QMap<QString, QString> &serializedData,
- QMap<QString, QString> &addressBookData);
+ virtual void serialize(TQMap<TQString, TQString> &serializedData,
+ TQMap<TQString, TQString> &addressBookData);
virtual Kopete::ChatSession *manager(
CanCreateFlags canCreate = CanCreate);
- QString meanwhileId() const;
+ TQString meanwhileId() const;
virtual void sync(unsigned int changed = 0xff);
public slots:
void sendMessage( Kopete::Message &message );
- void receivedMessage( const QString &message );
+ void receivedMessage( const TQString &message );
virtual void slotUserInfo();
protected slots:
@@ -61,7 +61,7 @@ protected slots:
void slotSendTyping(bool isTyping);
private:
- QString m_meanwhileId;
+ TQString m_meanwhileId;
Kopete::ChatSession *m_msgManager;
};
diff --git a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp
index f3d05710..edaa66f6 100644
--- a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp
+++ b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp
@@ -14,12 +14,12 @@
* *
*************************************************************************
*/
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
#include <kdebug.h>
#include <kopeteaccount.h>
#include <kopetepasswordwidget.h>
@@ -39,8 +39,8 @@ void MeanwhileEditAccountWidget::setupClientList()
int i = 0;
for (id = MeanwhileSession::getClientIDs(); id->name; id++, i++) {
- QString name = QString("%1 (0x%2)")
- .arg(QString(id->name))
+ TQString name = TQString("%1 (0x%2)")
+ .arg(TQString(id->name))
.arg(id->id, 0, 16);
mClientID->insertItem(name, i);
@@ -64,7 +64,7 @@ void MeanwhileEditAccountWidget::selectClientListItem(int selectedID)
}
MeanwhileEditAccountWidget::MeanwhileEditAccountWidget(
- QWidget* parent,
+ TQWidget* parent,
Kopete::Account* theAccount,
MeanwhileProtocol *theProtocol)
: MeanwhileEditAccountBase(parent),
@@ -106,8 +106,8 @@ MeanwhileEditAccountWidget::MeanwhileEditAccountWidget(
slotSetServer2Default();
}
- QObject::connect(btnServerDefaults, SIGNAL(clicked()),
- SLOT(slotSetServer2Default()));
+ TQObject::connect(btnServerDefaults, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSetServer2Default()));
show();
}
diff --git a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h
index 9e05465b..e71a8bcc 100644
--- a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h
+++ b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h
@@ -17,7 +17,7 @@
#ifndef MEANWHILEEDITACCOUNTWIDGET_H
#define MEANWHILEEDITACCOUNTWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <editaccountwidget.h>
#include "meanwhileeditaccountbase.h"
@@ -30,7 +30,7 @@ class MeanwhileEditAccountWidget :
{
Q_OBJECT
public:
- MeanwhileEditAccountWidget( QWidget* parent,
+ MeanwhileEditAccountWidget( TQWidget* parent,
Kopete::Account* account,
MeanwhileProtocol *protocol);
diff --git a/kopete/protocols/meanwhile/meanwhileplugin.cpp b/kopete/protocols/meanwhile/meanwhileplugin.cpp
index d8f617cb..4ee995dd 100644
--- a/kopete/protocols/meanwhile/meanwhileplugin.cpp
+++ b/kopete/protocols/meanwhile/meanwhileplugin.cpp
@@ -14,12 +14,12 @@
* *
*************************************************************************
*/
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#include "meanwhileplugin.h"
-void MeanwhilePlugin::getMeanwhileId(QWidget * /*parent*/,
- QLineEdit * /*fillThis*/)
+void MeanwhilePlugin::getMeanwhileId(TQWidget * /*parent*/,
+ TQLineEdit * /*fillThis*/)
{
}
@@ -28,7 +28,7 @@ bool MeanwhilePlugin::canProvideMeanwhileId()
return false;
}
-void MeanwhilePlugin::showUserInfo(const QString &/*userid*/)
+void MeanwhilePlugin::showUserInfo(const TQString &/*userid*/)
{
}
diff --git a/kopete/protocols/meanwhile/meanwhileplugin.h b/kopete/protocols/meanwhile/meanwhileplugin.h
index b2ddbdcb..a5c82829 100644
--- a/kopete/protocols/meanwhile/meanwhileplugin.h
+++ b/kopete/protocols/meanwhile/meanwhileplugin.h
@@ -17,7 +17,7 @@
#ifndef __MEANWHILE_PLUGIN_H__
#define __MEANWHILE_PLUGIN_H__
-#include "qstring.h"
+#include "tqstring.h"
#include <kaction.h>
class QLineEdit;
@@ -29,14 +29,14 @@ public:
* - like do lookups in company databases
* when done fill 'fillThis' with the id of the contact
*/
- virtual void getMeanwhileId(QWidget *parent,QLineEdit *fillThis);
+ virtual void getMeanwhileId(TQWidget *parent,TQLineEdit *fillThis);
/* can this plugin provide the above functionality */
virtual bool canProvideMeanwhileId();
/* show user info has been selected - the meanwhile server doesnt
* seem to have any info...maybe you can find it somewhere else
*/
- virtual void showUserInfo(const QString &userid);
+ virtual void showUserInfo(const TQString &userid);
/* if you want to provide more functions on the rightclick dropdown
* menu...implement this
diff --git a/kopete/protocols/meanwhile/meanwhileprotocol.cpp b/kopete/protocols/meanwhile/meanwhileprotocol.cpp
index 434de2f3..b9915e94 100644
--- a/kopete/protocols/meanwhile/meanwhileprotocol.cpp
+++ b/kopete/protocols/meanwhile/meanwhileprotocol.cpp
@@ -29,17 +29,17 @@ typedef KGenericFactory<MeanwhileProtocol> MeanwhileProtocolFactory;
K_EXPORT_COMPONENT_FACTORY(kopete_meanwhile,
MeanwhileProtocolFactory("kopete_meanwhile"))
-MeanwhileProtocol::MeanwhileProtocol(QObject* parent, const char *name,
- const QStringList &/*args*/)
+MeanwhileProtocol::MeanwhileProtocol(TQObject* parent, const char *name,
+ const TQStringList &/*args*/)
: Kopete::Protocol(MeanwhileProtocolFactory::instance(), parent, name),
- statusOffline(Kopete::OnlineStatus::Offline, 25, this, 0, QString::null,
+ statusOffline(Kopete::OnlineStatus::Offline, 25, this, 0, TQString::null,
i18n("Offline"), i18n("Offline"),
Kopete::OnlineStatusManager::Offline,
Kopete::OnlineStatusManager::DisabledIfOffline),
statusOnline(Kopete::OnlineStatus::Online, 25, this, mwStatus_ACTIVE,
- QString::null, i18n("Online"), i18n("Online"),
+ TQString::null, i18n("Online"), i18n("Online"),
Kopete::OnlineStatusManager::Online, 0),
statusAway(Kopete::OnlineStatus::Away, 20, this, mwStatus_AWAY,
@@ -57,10 +57,10 @@ MeanwhileProtocol::MeanwhileProtocol(QObject* parent, const char *name,
Kopete::OnlineStatusManager::Idle, 0),
statusAccountOffline(Kopete::OnlineStatus::Offline, 0, this, 0,
- QString::null, i18n("Account Offline")),
+ TQString::null, i18n("Account Offline")),
- statusMessage(QString::fromLatin1("statusMessage"),
- i18n("Status Message"), QString::null, false, true),
+ statusMessage(TQString::fromLatin1("statusMessage"),
+ i18n("Status Message"), TQString::null, false, true),
awayMessage(Kopete::Global::Properties::self()->awayMessage())
{
@@ -73,31 +73,31 @@ MeanwhileProtocol::~MeanwhileProtocol()
{
}
-AddContactPage * MeanwhileProtocol::createAddContactWidget(QWidget *parent,
+AddContactPage * MeanwhileProtocol::createAddContactWidget(TQWidget *parent,
Kopete::Account *account )
{
return new MeanwhileAddContactPage(parent, account);
}
KopeteEditAccountWidget * MeanwhileProtocol::createEditAccountWidget(
- Kopete::Account *account, QWidget *parent )
+ Kopete::Account *account, TQWidget *parent )
{
return new MeanwhileEditAccountWidget(parent, account, this);
}
-Kopete::Account *MeanwhileProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *MeanwhileProtocol::createNewAccount(const TQString &accountId)
{
return new MeanwhileAccount(this, accountId, accountId.ascii());
}
Kopete::Contact *MeanwhileProtocol::deserializeContact(
Kopete::MetaContact *metaContact,
- const QMap<QString,
- QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+ const TQMap<TQString,
+ TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
- QString contactId = serializedData[ "contactId" ];
- QString accountId = serializedData[ "accountId" ];
+ TQString contactId = serializedData[ "contactId" ];
+ TQString accountId = serializedData[ "accountId" ];
MeanwhileAccount *theAccount =
static_cast<MeanwhileAccount*>(
diff --git a/kopete/protocols/meanwhile/meanwhileprotocol.h b/kopete/protocols/meanwhile/meanwhileprotocol.h
index aa7a9861..343d443f 100644
--- a/kopete/protocols/meanwhile/meanwhileprotocol.h
+++ b/kopete/protocols/meanwhile/meanwhileprotocol.h
@@ -39,23 +39,23 @@ class MeanwhileProtocol : public Kopete::Protocol
{
Q_OBJECT
public:
- MeanwhileProtocol(QObject *parent, const char *name,
- const QStringList &args);
+ MeanwhileProtocol(TQObject *parent, const char *name,
+ const TQStringList &args);
~MeanwhileProtocol();
- virtual AddContactPage *createAddContactWidget(QWidget *parent,
+ virtual AddContactPage *createAddContactWidget(TQWidget *parent,
Kopete::Account *account);
virtual KopeteEditAccountWidget *createEditAccountWidget(
- Kopete::Account *account, QWidget *parent);
+ Kopete::Account *account, TQWidget *parent);
- virtual Kopete::Account *createNewAccount(const QString &accountId);
+ virtual Kopete::Account *createNewAccount(const TQString &accountId);
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);
const Kopete::OnlineStatus accountOfflineStatus();
diff --git a/kopete/protocols/meanwhile/meanwhilesession.cpp b/kopete/protocols/meanwhile/meanwhilesession.cpp
index 974ca4af..c7121875 100644
--- a/kopete/protocols/meanwhile/meanwhilesession.cpp
+++ b/kopete/protocols/meanwhile/meanwhilesession.cpp
@@ -181,11 +181,11 @@ void MeanwhileSession::getDefaultClientIDParams(int *clientID,
}
/* external interface called by meanwhileaccount */
-void MeanwhileSession::connect(QString password)
+void MeanwhileSession::connect(TQString password)
{
int port, clientID, versionMajor, versionMinor;
bool useCustomID;
- QString host;
+ TQString host;
HERE;
@@ -207,10 +207,10 @@ void MeanwhileSession::connect(QString password)
socket = sock;
/* we want to receive signals when there is data to read */
sock->enableRead(true);
- QObject::connect(sock, SIGNAL(readyRead()), this,
- SLOT(slotSocketDataAvailable()));
- QObject::connect(sock, SIGNAL(closed(int)), this,
- SLOT(slotSocketClosed(int)));
+ TQObject::connect(sock, TQT_SIGNAL(readyRead()), this,
+ TQT_SLOT(slotSocketDataAvailable()));
+ TQObject::connect(sock, TQT_SIGNAL(closed(int)), this,
+ TQT_SLOT(slotSocketClosed(int)));
/* set login details */
mwSession_setProperty(session, mwSession_AUTH_USER_ID,
@@ -266,13 +266,13 @@ static void free_id_block(void *data, void *p)
free(id);
}
-void MeanwhileSession::addContacts(const QDict<Kopete::Contact>& contacts)
+void MeanwhileSession::addContacts(const TQDict<Kopete::Contact>& contacts)
{
HERE;
- QDictIterator<Kopete::Contact> it(contacts);
+ TQDictIterator<Kopete::Contact> it(contacts);
GList *buddies = 0L;
- /** Convert our QDict of kopete contact to a GList of meanwhile buddies */
+ /** Convert our TQDict of kopete contact to a GList of meanwhile buddies */
for( ; it.current(); ++it) {
MeanwhileContact *contact =
static_cast<MeanwhileContact *>(it.current());
@@ -370,7 +370,7 @@ void MeanwhileSession::sendTyping(MeanwhileContact *contact, bool isTyping)
}
void MeanwhileSession::setStatus(Kopete::OnlineStatus status,
- const QString msg)
+ const TQString msg)
{
HERE;
mwDebug() << "setStatus: " << status.description() << "("
@@ -404,7 +404,7 @@ void MeanwhileSession::syncContactsToServer()
mwSametimeGroup_DYNAMIC, "People");
mwSametimeGroup_setOpen(topstgroup, true);
- QDictIterator<Kopete::Contact> it(account->contacts());
+ TQDictIterator<Kopete::Contact> it(account->contacts());
for( ; it.current(); ++it ) {
MeanwhileContact *contact =
static_cast<MeanwhileContact *>(it.current());
@@ -498,7 +498,7 @@ void MeanwhileSession::slotSocketClosed(int reason)
if (reason & KExtendedSocket::involuntary)
emit serverNotification(
- QString("Lost connection with Meanwhile server"));
+ TQString("Lost connection with Meanwhile server"));
if (socket) {
delete socket;
@@ -545,14 +545,14 @@ void MeanwhileSession::resolveContactNickname(MeanwhileContact *contact)
_handleResolveLookupResults, contact, NULL);
}
-QString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo)
+TQString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo)
{
if (logininfo == 0L || logininfo->user_name == 0L)
- return QString::null;
+ return TQString::null;
return getNickName(logininfo->user_name);
}
-QString MeanwhileSession::getNickName(QString name)
+TQString MeanwhileSession::getNickName(TQString name)
{
int index = name.find(" - ");
@@ -572,13 +572,13 @@ MeanwhileContact *MeanwhileSession::conversationContact(
if (target == 0L || target->user == 0L) {
return 0L;
}
- QString user(target->user);
+ TQString user(target->user);
MeanwhileContact *contact =
static_cast<MeanwhileContact *>(account->contacts()[user]);
struct mwLoginInfo *logininfo = mwConversation_getTargetInfo(conv);
- QString name = getNickName(logininfo);
+ TQString name = getNickName(logininfo);
if (!contact) {
account->addContact(user, name, 0L, Kopete::Account::Temporary);
@@ -625,7 +625,7 @@ void MeanwhileSession::handleSessionStateChange(
if (info == INCORRECT_LOGIN)
account->password().setWrong();
char *reason = mwError(info);
- emit serverNotification(QString(reason));
+ emit serverNotification(TQString(reason));
free(reason);
}
}
@@ -665,14 +665,14 @@ int MeanwhileSession::handleSessionIOWrite(const guchar *buffer,
void MeanwhileSession::handleSessionAdmin(const char *text)
{
HERE;
- emit serverNotification(QString(text));
+ emit serverNotification(TQString(text));
}
void MeanwhileSession::handleSessionAnnounce(struct mwLoginInfo *from,
gboolean /* may_reply */, const char *text)
{
HERE;
- QString message;
+ TQString message;
message.sprintf("Announcement from %s:\n%s", from->user_id, text);
emit serverNotification(message);
}
@@ -694,8 +694,8 @@ void MeanwhileSession::handleSessionIOClose()
if (socket == 0L)
return;
- QObject::disconnect(socket, SIGNAL(closed(int)),
- this, SLOT(slotSocketClosed(int)));
+ TQObject::disconnect(socket, TQT_SIGNAL(closed(int)),
+ this, TQT_SLOT(slotSocketClosed(int)));
socket->flush();
socket->closeNow();
@@ -748,7 +748,7 @@ void MeanwhileSession::handleAwareListAware(struct mwAwareSnapshot *snapshot)
0 : snapshot->status.time;
if (idletime != 0) {
contact->setStatusDescription(statusDesc + "[" +
- QString::number(idletime/60)+" mins]");
+ TQString::number(idletime/60)+" mins]");
}
} else
contact->setStatusDescription(snapshot->status.desc);
@@ -775,7 +775,7 @@ struct MeanwhileSession::ConversationData
cd->chat = contact->manager(Kopete::Contact::CanCreate);
cd->chat->ref();
if (createQueue)
- cd->queue = new QValueList<Kopete::Message>();
+ cd->queue = new TQValueList<Kopete::Message>();
mwConversation_setClientData(conv, cd, 0L);
@@ -800,7 +800,7 @@ void MeanwhileSession::handleImConvOpened(struct mwConversation *conv)
} else if (convdata->queue && !convdata->queue->isEmpty()) {
/* send any messages that were waiting for the conversation to open */
- QValueList<Kopete::Message>::iterator it;
+ TQValueList<Kopete::Message>::iterator it;
for (it = convdata->queue->begin(); it != convdata->queue->end();
++it) {
mwConversation_send(conv, mwImSend_PLAIN,
@@ -853,7 +853,7 @@ void MeanwhileSession::handleImConvReceived(struct mwConversation *conv,
case mwImSend_PLAIN:
{
Kopete::Message message(convdata->contact, account->myself(),
- QString((char *)msg), Kopete::Message::Inbound);
+ TQString((char *)msg), Kopete::Message::Inbound);
convdata->chat->appendMessage(message);
}
break;
@@ -948,7 +948,7 @@ MEANWHILE_HOOK_CONFERENCE(conference_invite,
(conf, inviter, invite))
{
HERE;
- QString message;
+ TQString message;
message.sprintf("%s has invited you to a conference called \"%s\"\n"
"However, this version of the meanwhile plugin does "
diff --git a/kopete/protocols/meanwhile/meanwhilesession.h b/kopete/protocols/meanwhile/meanwhilesession.h
index 0e2a3558..b7d7f8c7 100644
--- a/kopete/protocols/meanwhile/meanwhilesession.h
+++ b/kopete/protocols/meanwhile/meanwhilesession.h
@@ -55,7 +55,7 @@ public:
* the connection process is ascychronous - a loginDone() signal will be
* emitted when sucessfully logged in.
*/
- void connect(QString password);
+ void connect(TQString password);
/**
* Disconnect from the server.
@@ -70,7 +70,7 @@ public:
* @param msg a custom message to use, if required
*/
void setStatus(Kopete::OnlineStatus status,
- const QString msg = QString::null);
+ const TQString msg = TQString::null);
/**
* Add a single contact to be registered for status updates
@@ -82,7 +82,7 @@ public:
* Add a list of contacts to be registered for status updates
* @param contact The list of contacts to register
*/
- void addContacts(const QDict<Kopete::Contact>& contacts);
+ void addContacts(const TQDict<Kopete::Contact>& contacts);
/**
* Send a message (with recipient specified).
@@ -126,7 +126,7 @@ signals:
* out-of-band data (eg, the password is incorrect).
* @param mesgString A description of the notification
*/
- void serverNotification(const QString &mesgString);
+ void serverNotification(const TQString &mesgString);
private:
/** Main libmeanwhile session object */
@@ -174,7 +174,7 @@ private:
struct ConversationData {
MeanwhileContact *contact;
Kopete::ChatSession *chat;
- QValueList<Kopete::Message> *queue;
+ TQValueList<Kopete::Message> *queue;
};
/** (To be) stored in the mwConference struct */
@@ -217,7 +217,7 @@ private:
* @param name the extened username to parse
* @return just the name part of the username info
*/
- QString getNickName(QString name);
+ TQString getNickName(TQString name);
/**
* Convenience method to call the above from a mwLoginInfo struct. All is
@@ -225,7 +225,7 @@ private:
* @param logininfo the login info for a contact
* @return just the name part of the login info data
*/
- QString getNickName(struct mwLoginInfo *logininfo);
+ TQString getNickName(struct mwLoginInfo *logininfo);
/**
* Resolve a contact to find (and set) the display name. This requires the
diff --git a/kopete/protocols/msn/config/msnpreferences.cpp b/kopete/protocols/msn/config/msnpreferences.cpp
index b28c2ea3..a6f5371f 100644
--- a/kopete/protocols/msn/config/msnpreferences.cpp
+++ b/kopete/protocols/msn/config/msnpreferences.cpp
@@ -26,7 +26,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_msn, MSNProtocolConfigFactory( "kcm_kopet
class MSNPreferences : public KCAutoConfigModule
{
public:
- MSNPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args )
+ MSNPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args )
{
setMainWidget( new msnPrefsUI( this ) , "MSN");
}
diff --git a/kopete/protocols/msn/dispatcher.cpp b/kopete/protocols/msn/dispatcher.cpp
index 8b8bbed6..fb88e8bc 100644
--- a/kopete/protocols/msn/dispatcher.cpp
+++ b/kopete/protocols/msn/dispatcher.cpp
@@ -37,11 +37,11 @@ using P2P::OutgoingTransfer;
#include <ktempfile.h>
// Qt includes
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
// Kopete includes
#include <kopetechatsession.h> // Just for getting the contact
@@ -50,8 +50,8 @@ using P2P::OutgoingTransfer;
#include <stdlib.h>
-Dispatcher::Dispatcher(QObject *parent, const QString& contact, const QStringList &ip)
- : QObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip)
+Dispatcher::Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip)
+ : TQObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip)
{}
Dispatcher::~Dispatcher()
@@ -71,12 +71,12 @@ void Dispatcher::detach(TransferContext* transfer)
transfer->deleteLater();
}
-QString Dispatcher::localContact()
+TQString Dispatcher::localContact()
{
return m_contact;
}
-void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObject)
+void Dispatcher::requestDisplayIcon(const TQString& from, const TQString& msnObject)
{
Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4;
TransferContext* current =
@@ -91,13 +91,13 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec
kdDebug(14140) << k_funcinfo << "Requesting, " << msnObject << endl;
- QString context = QString::fromUtf8(KCodecs::base64Encode(msnObject.utf8()));
+ TQString context = TQString::fromUtf8(KCodecs::base64Encode(msnObject.utf8()));
// NOTE remove the \0 character automatically
- // appended to a QCString.
- context.replace("=", QString::null);
- QString content =
+ // appended to a TQCString.
+ context.replace("=", TQString::null);
+ TQString content =
"EUF-GUID: {A4268EEC-FEC5-49E5-95C3-F126696BDBF6}\r\n"
- "SessionID: " + QString::number(sessionId) + "\r\n"
+ "SessionID: " + TQString::number(sessionId) + "\r\n"
"AppID: 1\r\n"
"Context: " + context + "\r\n"
"\r\n";
@@ -105,7 +105,7 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec
current->sendMessage(INVITE, content);
}
-void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& to)
+void Dispatcher::sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to)
{
// Create a new transfer context that will handle
// the file transfer.
@@ -119,14 +119,14 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
m_sessions.insert(sessionId, current);
// Set the transfer context file.
- current->m_file = new QFile(path);
+ current->m_file = new TQFile(path);
// Create the file context data.
- QString context;
+ TQString context;
- QByteArray header(638);
+ TQByteArray header(638);
header.fill('\0');
- QDataStream writer(header, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(header, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
// Write the header length to the stream.
writer << (Q_INT32)638;
@@ -138,8 +138,8 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
// TODO support file preview. For now disable file preview.
writer << (Q_INT32)1;
// Write the file name in utf-16 to the stream.
- QTextStream ts(header, IO_WriteOnly);
- ts.setEncoding(QTextStream::RawUnicode);
+ TQTextStream ts(header, IO_WriteOnly);
+ ts.setEncoding(TQTextStream::RawUnicode);
ts.device()->at(20);
ts << path.section('/', -1);
// NOTE Background Sharing base64 [540..569]
@@ -151,21 +151,21 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
writer << (Q_UINT32)0xFFFFFFFF;
// Encode the file context header to base64 encoding.
- context = QString::fromUtf8(KCodecs::base64Encode(header));
+ context = TQString::fromUtf8(KCodecs::base64Encode(header));
// Send an INVITE message to the recipient.
- QString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n"
- "SessionID: " + QString::number(sessionId) + "\r\n"
+ TQString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n"
+ "SessionID: " + TQString::number(sessionId) + "\r\n"
"AppID: 2\r\n"
"Context: " + context + "\r\n"
"\r\n";
current->sendMessage(INVITE, content);
}
-void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/)
+void Dispatcher::sendImage(const TQString& /*fileName*/, const TQString& /*to*/)
{
// TODO kdDebug(14140) << k_funcinfo << endl;
-// QFile imageFile(fileName);
+// TQFile imageFile(fileName);
// if(!imageFile.open(IO_ReadOnly))
// {
// kdDebug(14140) << k_funcinfo << "Error opening image file."
@@ -180,7 +180,7 @@ void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/)
}
#if MSN_WEBCAM
-void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHandle, bool wantToReceive)
+void Dispatcher::startWebcam(const TQString &/*myHandle*/, const TQString &msgHandle, bool wantToReceive)
{
Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4;
Webcam::Who who= wantToReceive ? Webcam::wViewer : Webcam::wProducer;
@@ -195,10 +195,10 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand
// {4BD96FC0-AB17-4425-A14A-439185962DC8} <- i want to show you my webcam
// {1C9AA97E-9C05-4583-A3BD-908A196F1E92} <- i want to see your webcam
- QString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ;
+ TQString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ;
- QString content="EUF-GUID: {"+GUID+"}\r\n"
- "SessionID: "+ QString::number(sessionId)+"\r\n"
+ TQString content="EUF-GUID: {"+GUID+"}\r\n"
+ "SessionID: "+ TQString::number(sessionId)+"\r\n"
"AppID: 4\r\n"
"Context: ewBCADgAQgBFADcAMABEAEUALQBFADIAQwBBAC0ANAA0ADAAMAAtAEEARQAwADMALQA4ADgARgBGADgANQBCADkARgA0AEUAOAB9AA==\r\n\r\n";
@@ -210,7 +210,7 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand
-void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
+void Dispatcher::slotReadMessage(const TQString &from, const TQByteArray& stream)
{
P2P::Message receivedMessage =
m_messageFormatter.readMessage(stream);
@@ -222,7 +222,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
if((receivedMessage.header.dataSize == 0)/* && ((receivedMessage.header.flag & 0x02) == 0x02)*/)
{
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
if(receivedMessage.header.ackSessionIdentifier == it.data()->m_identifier){
@@ -250,7 +250,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
if(m_messageBuffer.contains(receivedMessage.header.identifier))
{
kdDebug(14140) << k_funcinfo
- << QString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier)
+ << TQString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier)
<< endl;
// The message was split, try to reconstruct the message
@@ -288,9 +288,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
}
else
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
- QRegExp regex("SessionID: ([0-9]*)\r\n");
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
+ TQRegExp regex("SessionID: ([0-9]*)\r\n");
if(regex.search(body) > 0)
{
Q_UINT32 sessionId = regex.cap(1).toUInt();
@@ -312,12 +312,12 @@ void Dispatcher::dispatch(const P2P::Message& message)
{
// If the message handler still has not been found,
// try to retrieve the handler based on the call id.
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString callId = regex.cap(1);
+ TQString callId = regex.cap(1);
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
current = it.data();
@@ -347,14 +347,14 @@ void Dispatcher::dispatch(const P2P::Message& message)
// The entire message has not been received;
// buffer the recevied portion of the original message.
kdDebug(14140) << k_funcinfo
- << QString("Buffering messsage, %1").arg(message.header.identifier)
+ << TQString("Buffering messsage, %1").arg(message.header.identifier)
<< endl;
m_messageBuffer.insert(message.header.identifier, message);
return;
}
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("INVITE"))
@@ -362,23 +362,23 @@ void Dispatcher::dispatch(const P2P::Message& message)
// Retrieve the branch, call id, and session id.
// These fields will be used later on in the p2p
// transaction.
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString branch = regex.cap(1);
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ TQString branch = regex.cap(1);
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString callId = regex.cap(1);
- regex = QRegExp("SessionID: ([0-9]*)\r\n");
+ TQString callId = regex.cap(1);
+ regex = TQRegExp("SessionID: ([0-9]*)\r\n");
regex.search(body);
- QString sessionId = regex.cap(1);
+ TQString sessionId = regex.cap(1);
// Retrieve the contact that requested the session.
- regex = QRegExp("From: <msnmsgr:([^>]*)>");
+ regex = TQRegExp("From: <msnmsgr:([^>]*)>");
regex.search(body);
- QString from = regex.cap(1);
+ TQString from = regex.cap(1);
// Retrieve the application identifier which
// is used to determine what type of session
// is being requested.
- regex = QRegExp("AppID: ([0-9]*)\r\n");
+ regex = TQRegExp("AppID: ([0-9]*)\r\n");
regex.search(body);
Q_UINT32 applicationId = regex.cap(1).toUInt();
@@ -387,9 +387,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
// A contact has requested a session to download
// a display icon (User Display Icon or CustomEmotion).
- regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)");
regex.search(body);
- QCString msnobj;
+ TQCString msnobj;
// Decode the msn object from base64 encoding.
KCodecs::base64Decode(regex.cap(1).utf8() , msnobj);
@@ -407,10 +407,10 @@ void Dispatcher::dispatch(const P2P::Message& message)
m_sessions.insert(sessionId.toUInt(), current);
// Determine the display icon being requested.
- QString fileName = objectList.contains(msnobj)
+ TQString fileName = objectList.contains(msnobj)
? objectList[msnobj]
: m_pictureUrl;
- QFile *source = new QFile(fileName);
+ TQFile *source = new TQFile(fileName);
// Try to open the source file for reading.
// If an error occurs, send an internal
// error message to the recipient.
@@ -427,7 +427,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
current->m_ackSessionIdentifier = message.header.identifier;
current->m_ackUniqueIdentifier = message.header.ackSessionIdentifier;
// Send a 200 OK message to the recipient.
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
current->sendMessage(OK, content);
}
else if(applicationId == 2)
@@ -447,14 +447,14 @@ void Dispatcher::dispatch(const P2P::Message& message)
// Add the transfer to the list.
m_sessions.insert(sessionId.toUInt(), transfer);
- regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)");
regex.search(body);
- QByteArray context;
+ TQByteArray context;
// Decode the file context from base64 encoding.
KCodecs::base64Decode(regex.cap(1).utf8(), context);
- QDataStream reader(context, IO_ReadOnly);
- reader.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream reader(context, IO_ReadOnly);
+ reader.setByteOrder(TQDataStream::LittleEndian);
//Retrieve the file info from the context field.
// File Size [8..15] Int64
reader.device()->at(8);
@@ -468,17 +468,17 @@ void Dispatcher::dispatch(const P2P::Message& message)
reader >> flag;
kdDebug(14140) << flag << endl;
// FileName UTF16 (Unicode) [19..539]
- QByteArray bytes(520);
+ TQByteArray bytes(520);
reader.readRawBytes(bytes.data(), bytes.size());
- QTextStream ts(bytes, IO_ReadOnly);
- ts.setEncoding(QTextStream::Unicode);
- QString fileName;
+ TQTextStream ts(bytes, IO_ReadOnly);
+ ts.setEncoding(TQTextStream::Unicode);
+ TQString fileName;
fileName = ts.readLine().utf8();
emit incomingTransfer(from, fileName, fileSize);
kdDebug(14140) <<
- QString("%1, %2 bytes.").arg(fileName, QString::number(fileSize))
+ TQString("%1, %2 bytes.").arg(fileName, TQString::number(fileSize))
<< endl
<< endl;
@@ -493,11 +493,11 @@ void Dispatcher::dispatch(const P2P::Message& message)
transfer->m_ackSessionIdentifier = message.header.identifier;
transfer->m_ackUniqueIdentifier = message.header.ackSessionIdentifier;
- QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer*, const QString&)), transfer, SLOT(slotTransferAccepted(Kopete::Transfer*, const QString&)));
- QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, SLOT(slotTransferRefused(const Kopete::FileTransferInfo&)));
+ TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer*, const TQString&)), transfer, TQT_SLOT(slotTransferAccepted(Kopete::Transfer*, const TQString&)));
+ TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, TQT_SLOT(slotTransferRefused(const Kopete::FileTransferInfo&)));
// Show the file transfer accept/decline dialog.
- Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, QString::null, sessionId);
+ Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, TQString::null, sessionId);
}
else
{
@@ -512,9 +512,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
else if(applicationId == 4)
{
#if MSN_WEBCAM
- regex = QRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}");
+ regex = TQRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}");
regex.search(body);
- QString GUID=regex.cap(1);
+ TQString GUID=regex.cap(1);
kdDebug(14140) << k_funcinfo << "webcam " << GUID << endl;
@@ -542,7 +542,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
m_sessions.insert(sessionId.toUInt(), current);
// Acknowledge the session request.
current->acknowledge(message);
- QTimer::singleShot(0,current, SLOT(askIncommingInvitation()) );
+ TQTimer::singleShot(0,current, TQT_SLOT(askIncommingInvitation()) );
#endif
}
}
@@ -550,26 +550,26 @@ void Dispatcher::dispatch(const P2P::Message& message)
{
// A contact has sent an inkformat (handwriting) gif.
// NOTE The entire message body is UTF16 encoded.
- QString body = "";
+ TQString body = "";
for (Q_UINT32 i=0; i < message.header.totalDataSize; i++){
- if (message.body[i] != QChar('\0')){
- body += QChar(message.body[i]);
+ if (message.body[i] != TQChar('\0')){
+ body += TQChar(message.body[i]);
}
}
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(body);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType == "image/gif")
{
IncomingTransfer transfer(message.source, this, message.header.sessionId);
transfer.acknowledge(message);
- regex = QRegExp("base64:([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)");
regex.search(body);
- QString base64 = regex.cap(1);
- QByteArray image;
+ TQString base64 = regex.cap(1);
+ TQByteArray image;
// Convert from base64 encoding to byte array.
KCodecs::base64Decode(base64.utf8(), image);
// Create a temporary file to store the image data.
@@ -590,7 +590,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv
if(fullReceive)
{
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
current = it.data();
@@ -604,7 +604,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv
}
}
-Kopete::Contact* Dispatcher::getContactByAccountId(const QString& accountId)
+Kopete::Contact* Dispatcher::getContactByAccountId(const TQString& accountId)
{
Kopete::Contact *contact = 0l;
if(parent())
@@ -628,7 +628,7 @@ Dispatcher::CallbackChannel::CallbackChannel(MSNSwitchBoardSocket *switchboard)
Dispatcher::CallbackChannel::~CallbackChannel()
{}
-Q_UINT32 Dispatcher::CallbackChannel::send(const QByteArray& stream)
+Q_UINT32 Dispatcher::CallbackChannel::send(const TQByteArray& stream)
{
return m_switchboard->sendCommand("MSG", "D", true, stream, true);
}
diff --git a/kopete/protocols/msn/dispatcher.h b/kopete/protocols/msn/dispatcher.h
index 56bd1856..72a9cc12 100644
--- a/kopete/protocols/msn/dispatcher.h
+++ b/kopete/protocols/msn/dispatcher.h
@@ -17,8 +17,8 @@
#ifndef DISPATCHER_H
#define DISPATCHER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "kopete_export.h"
@@ -41,30 +41,30 @@ namespace P2P{
class KOPETE_EXPORT Dispatcher : public QObject
{ Q_OBJECT
public:
- Dispatcher(QObject *parent, const QString& contact, const QStringList &ip);
+ Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip);
~Dispatcher();
void detach(TransferContext* transfer);
- QString localContact();
- void requestDisplayIcon(const QString& from, const QString& msnObject);
- void sendFile(const QString& path, Q_INT64 fileSize, const QString& to);
- void sendImage(const QString& fileName, const QString& to);
- QString m_pictureUrl;
- QMap<QString, QString> objectList;
+ TQString localContact();
+ void requestDisplayIcon(const TQString& from, const TQString& msnObject);
+ void sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to);
+ void sendImage(const TQString& fileName, const TQString& to);
+ TQString m_pictureUrl;
+ TQMap<TQString, TQString> objectList;
#if MSN_WEBCAM
- void startWebcam(const QString &myHandle, const QString &msgHandle, bool wantToReceive);
+ void startWebcam(const TQString &myHandle, const TQString &msgHandle, bool wantToReceive);
#endif
public slots:
- void slotReadMessage(const QString &from, const QByteArray& stream);
+ void slotReadMessage(const TQString &from, const TQByteArray& stream);
void messageAcknowledged(unsigned int correlationId, bool fullReceive);
signals:
- void sendCommand(const QString &cmd, const QString &args = QString::null, bool addId = true, const QByteArray &body = QByteArray(), bool binary=false);
- void displayIconReceived(KTempFile* file, const QString& msnObject);
- void incomingTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize);
+ void sendCommand(const TQString &cmd, const TQString &args = TQString::null, bool addId = true, const TQByteArray &body = TQByteArray(), bool binary=false);
+ void displayIconReceived(KTempFile* file, const TQString& msnObject);
+ void incomingTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize);
private:
class CallbackChannel
@@ -73,7 +73,7 @@ namespace P2P{
CallbackChannel(MSNSwitchBoardSocket *switchboard);
~CallbackChannel();
- Q_UINT32 send(const QByteArray& stream);
+ Q_UINT32 send(const TQByteArray& stream);
private:
MSNSwitchBoardSocket *m_switchboard;
@@ -84,19 +84,19 @@ namespace P2P{
/**
* IP's of this compiter, the first one is the one seen by the server.
*/
- QStringList localIp() { return m_ip; }
+ TQStringList localIp() { return m_ip; }
private:
void dispatch(const P2P::Message& message);
- Kopete::Contact* getContactByAccountId(const QString& accountId);
+ Kopete::Contact* getContactByAccountId(const TQString& accountId);
P2P::MessageFormatter m_messageFormatter;
- QMap<Q_UINT32, P2P::TransferContext*> m_sessions;
- QMap<Q_UINT32, P2P::Message> m_messageBuffer;
- QString m_contact;
+ TQMap<Q_UINT32, P2P::TransferContext*> m_sessions;
+ TQMap<Q_UINT32, P2P::Message> m_messageBuffer;
+ TQString m_contact;
CallbackChannel *m_callbackChannel;
- QStringList m_ip;
+ TQStringList m_ip;
friend class P2P::TransferContext;
friend class P2P::IncomingTransfer;
diff --git a/kopete/protocols/msn/incomingtransfer.cpp b/kopete/protocols/msn/incomingtransfer.cpp
index aefbdbfe..c7757219 100644
--- a/kopete/protocols/msn/incomingtransfer.cpp
+++ b/kopete/protocols/msn/incomingtransfer.cpp
@@ -29,13 +29,13 @@ using P2P::Message;
using namespace KNetwork;
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
// Kopete includes
#include <kopetetransfermanager.h>
-IncomingTransfer::IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+IncomingTransfer::IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
: TransferContext(from,dispatcher,sessionId)
{
m_direction = P2P::Incoming;
@@ -59,19 +59,19 @@ IncomingTransfer::~IncomingTransfer()
}
-void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const QString& /*fileName*/)
+void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const TQString& /*fileName*/)
{
Q_UINT32 sessionId = transfer->info().internalId().toUInt();
if(sessionId!=m_sessionId)
return;
- QObject::connect(transfer , SIGNAL(transferCanceled()), this, SLOT(abort()));
+ TQObject::connect(transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
m_transfer = transfer;
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
sendMessage(OK, content);
- QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
+ TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
}
void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info)
@@ -80,12 +80,12 @@ void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info)
if(sessionId!=m_sessionId)
return;
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
// Send the sending client a cancelation message.
sendMessage(DECLINE, content);
m_state=Finished;
- QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
+ TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
}
@@ -106,7 +106,7 @@ void IncomingTransfer::acknowledged()
// should follow. Otherwise, the file transfer may start right away.
if(m_transfer)
{
- QFile *destination = new QFile(m_transfer->destinationURL().path());
+ TQFile *destination = new TQFile(m_transfer->destinationURL().path());
if(!destination->open(IO_WriteOnly))
{
m_transfer->slotError(KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Cannot open file for writing"));
@@ -141,7 +141,7 @@ void IncomingTransfer::processMessage(const Message& message)
{
// UserDisplayIcon data or File data is in this message.
// Write the recieved data to the file.
- kdDebug(14140) << k_funcinfo << QString("Received, %1 bytes").arg(message.header.dataSize) << endl;
+ kdDebug(14140) << k_funcinfo << TQString("Received, %1 bytes").arg(message.header.dataSize) << endl;
m_file->writeBlock(message.body.data(), message.header.dataSize);
if(m_transfer){
@@ -178,7 +178,7 @@ void IncomingTransfer::processMessage(const Message& message)
{
// Data preparation message.
//if (m_tempFile->name().isEmpty() == false) {
- // QFile::remove(m_tempFile->name());
+ // TQFile::remove(m_tempFile->name());
//}
m_tempFile = new KTempFile(locateLocal("tmp", "msnpicture--"), ".png");
m_tempFile->setAutoDelete(true);
@@ -189,30 +189,30 @@ void IncomingTransfer::processMessage(const Message& message)
}
else
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
// kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("INVITE"))
{
// Retrieve some MSNSLP headers used when
// replying to this INVITE message.
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_branch = regex.cap(1);
// NOTE Call-ID never changes.
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_callId = regex.cap(1);
- regex = QRegExp("Bridges: ([^\r\n]*)\r\n");
+ regex = TQRegExp("Bridges: ([^\r\n]*)\r\n");
regex.search(body);
- QString bridges = regex.cap(1);
+ TQString bridges = regex.cap(1);
// The NetID field is 0 if the Conn-Type is
// Direct-Connect or Firewall, otherwise, it is
// a randomly generated number.
- regex = QRegExp("NetID: (\\-?\\d+)\r\n");
+ regex = TQRegExp("NetID: (\\-?\\d+)\r\n");
regex.search(body);
- QString netId = regex.cap(1);
+ TQString netId = regex.cap(1);
kdDebug(14140) << "net id, " << netId << endl;
// Connection Types
// - Direct-Connect
@@ -220,9 +220,9 @@ void IncomingTransfer::processMessage(const Message& message)
// - IP-Restrict-NAT
// - Symmetric-NAT
// - Firewall
- regex = QRegExp("Conn-Type: ([^\r\n]+)\r\n");
+ regex = TQRegExp("Conn-Type: ([^\r\n]+)\r\n");
regex.search(body);
- QString connType = regex.cap(1);
+ TQString connType = regex.cap(1);
bool wouldListen = false;
if(netId.toUInt() == 0 && connType == "Direct-Connect"){
@@ -235,7 +235,7 @@ void IncomingTransfer::processMessage(const Message& message)
#if 1
wouldListen = false; // TODO Direct connection support
#endif
- QString content;
+ TQString content;
if(wouldListen)
{
@@ -243,8 +243,8 @@ void IncomingTransfer::processMessage(const Message& message)
m_listener = new KServerSocket("", "");
m_listener->setResolutionEnabled(true);
// Create the callback that will try to accept incoming connections.
- QObject::connect(m_listener, SIGNAL(readyAccept()), SLOT(slotAccept()));
- QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int)));
+ TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(slotAccept()));
+ TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int)));
// Listen for incoming connections.
bool isListening = m_listener->listen(1);
kdDebug(14140) << k_funcinfo << (isListening ? "listening" : "not listening") << endl;
@@ -254,9 +254,9 @@ void IncomingTransfer::processMessage(const Message& message)
content = "Bridge: TCPv1\r\n"
"Listening: true\r\n" +
- QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
- QString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) +
- QString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) +
+ TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
+ TQString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) +
+ TQString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) +
"\r\n";
}
else
@@ -349,11 +349,11 @@ void IncomingTransfer::slotAccept()
m_socket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
- QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
}
void IncomingTransfer::slotSocketRead()
@@ -362,10 +362,10 @@ void IncomingTransfer::slotSocketRead()
kdDebug(14140) << k_funcinfo << available << ", bytes available." << endl;
if(available > 0)
{
- QByteArray buffer(available);
+ TQByteArray buffer(available);
m_socket->readBlock(buffer.data(), buffer.size());
- if(QString(buffer) == "foo"){
+ if(TQString(buffer) == "foo"){
kdDebug(14140) << "Connection Check." << endl;
}
}
diff --git a/kopete/protocols/msn/incomingtransfer.h b/kopete/protocols/msn/incomingtransfer.h
index 23e101b3..ca879deb 100644
--- a/kopete/protocols/msn/incomingtransfer.h
+++ b/kopete/protocols/msn/incomingtransfer.h
@@ -31,7 +31,7 @@ namespace P2P{
class IncomingTransfer : public P2P::TransferContext
{ Q_OBJECT
public:
- IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
+ IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
virtual ~IncomingTransfer();
private slots:
@@ -41,7 +41,7 @@ namespace P2P{
void slotSocketClosed();
void slotSocketError(int errorCode);
- void slotTransferAccepted(Kopete::Transfer* transfer, const QString& fileName);
+ void slotTransferAccepted(Kopete::Transfer* transfer, const TQString& fileName);
void slotTransferRefused(const Kopete::FileTransferInfo& info);
diff --git a/kopete/protocols/msn/messageformatter.cpp b/kopete/protocols/msn/messageformatter.cpp
index 3a698ac4..7d830ea6 100644
--- a/kopete/protocols/msn/messageformatter.cpp
+++ b/kopete/protocols/msn/messageformatter.cpp
@@ -17,8 +17,8 @@
#include "p2p.h"
// Qt includes
-#include <qdatastream.h>
-#include <qregexp.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
// Kde includes
#include <kdebug.h>
@@ -26,13 +26,13 @@
using P2P::MessageFormatter;
using P2P::Message;
-MessageFormatter::MessageFormatter(QObject *parent, const char *name) : QObject(parent, name)
+MessageFormatter::MessageFormatter(TQObject *parent, const char *name) : TQObject(parent, name)
{}
MessageFormatter::~MessageFormatter()
{}
-Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
+Message MessageFormatter::readMessage(const TQByteArray& stream, bool compact)
{
Message inbound;
@@ -49,30 +49,30 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
}
// Retrieve the message header.
- QString messageHeader = QCString(stream.data(), index);
+ TQString messageHeader = TQCString(stream.data(), index);
// Retrieve the message mime version, content type,
// and p2p destination.
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(messageHeader);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType != "application/x-msnmsgrp2p")
return inbound;
// kdDebug(14140) << k_funcinfo << endl;
- regex = QRegExp("MIME-Version: (\\d.\\d)");
+ regex = TQRegExp("MIME-Version: (\\d.\\d)");
regex.search(messageHeader);
inbound.mimeVersion = regex.cap(1);
inbound.contentType = contentType;
- regex = QRegExp("P2P-Dest: ([^\r\n]*)");
+ regex = TQRegExp("P2P-Dest: ([^\r\n]*)");
regex.search(messageHeader);
- QString destination = regex.cap(1);
+ TQString destination = regex.cap(1);
}
- QDataStream reader(stream, IO_ReadOnly);
- reader.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream reader(stream, IO_ReadOnly);
+ reader.setByteOrder(TQDataStream::LittleEndian);
// Seek to the start position of the message
// transport header.
reader.device()->at(index);
@@ -108,7 +108,7 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
if(compact == false)
{
- reader.setByteOrder(QDataStream::BigEndian);
+ reader.setByteOrder(TQDataStream::BigEndian);
// Read the message application identifier from the stream.
reader >> inbound.applicationIdentifier;
@@ -120,16 +120,16 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
return inbound;
}
-void MessageFormatter::writeMessage(const Message& message, QByteArray& stream, bool compact)
+void MessageFormatter::writeMessage(const Message& message, TQByteArray& stream, bool compact)
{
// kdDebug(14140) << k_funcinfo << endl;
- QDataStream writer(stream, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(stream, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
if(compact == false)
{
- const QCString messageHeader = QString("MIME-Version: 1.0\r\n"
+ const TQCString messageHeader = TQString("MIME-Version: 1.0\r\n"
"Content-Type: application/x-msnmsgrp2p\r\n"
"P2P-Dest: " + message.destination + "\r\n"
"\r\n").utf8();
@@ -178,7 +178,7 @@ void MessageFormatter::writeMessage(const Message& message, QByteArray& stream,
if(compact == false)
{
// Seek to the message application identifier section.
- writer.setByteOrder(QDataStream::BigEndian);
+ writer.setByteOrder(TQDataStream::BigEndian);
// Write the message application identifier to the stream.
writer << message.applicationIdentifier;
diff --git a/kopete/protocols/msn/messageformatter.h b/kopete/protocols/msn/messageformatter.h
index 9eae8682..f86d679d 100644
--- a/kopete/protocols/msn/messageformatter.h
+++ b/kopete/protocols/msn/messageformatter.h
@@ -16,7 +16,7 @@
#ifndef MESSAGEFORMATTER_H
#define MESSAGEFORMATTER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace P2P{
class Message;
@@ -29,11 +29,11 @@ namespace P2P{
class MessageFormatter : public QObject
{ Q_OBJECT
public:
- MessageFormatter(QObject *parent = 0, const char *name = 0);
+ MessageFormatter(TQObject *parent = 0, const char *name = 0);
~MessageFormatter();
- Message readMessage(const QByteArray& stream, bool compact=false);
- void writeMessage(const Message& message, QByteArray& stream, bool compact=false);
+ Message readMessage(const TQByteArray& stream, bool compact=false);
+ void writeMessage(const Message& message, TQByteArray& stream, bool compact=false);
};
}
diff --git a/kopete/protocols/msn/msnaccount.cpp b/kopete/protocols/msn/msnaccount.cpp
index 01caec11..267cd0d7 100644
--- a/kopete/protocols/msn/msnaccount.cpp
+++ b/kopete/protocols/msn/msnaccount.cpp
@@ -31,10 +31,10 @@
#include <kmdcodec.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qvalidator.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
+#include <tqimage.h>
#include "msncontact.h"
#include "msnnotifysocket.h"
@@ -61,7 +61,7 @@
#include "avdevice/videodevicepool.h"
#endif
-MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const char *name )
+MSNAccount::MSNAccount( MSNProtocol *parent, const TQString& AccountID, const char *name )
: Kopete::PasswordedAccount ( parent, AccountID.lower(), 0, name )
{
m_notifySocket = 0L;
@@ -73,16 +73,16 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
setMyself( new MSNContact( this, accountId(), Kopete::ContactList::self()->myself() ) );
//myself()->setOnlineStatus( MSNProtocol::protocol()->FLN );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ),
- SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ),
- SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ),
+ TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ),
+ TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ));
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ));
- m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" );
- m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), QString::null, 0, this, SLOT( slotChangePublicName() ), this, "renameAction" );
- m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, SLOT( slotStartChat() ), this, "startChatAction" );
+ m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" );
+ m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), TQString::null, 0, this, TQT_SLOT( slotChangePublicName() ), this, "renameAction" );
+ m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, TQT_SLOT( slotStartChat() ), this, "startChatAction" );
KConfigGroup *config=configGroup();
@@ -92,7 +92,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
m_reverseList = config->readListEntry( "reverseList" ) ;
// Load the avatar
- m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(QRegExp("[./~]"),"-") +".png" );
+ m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(TQRegExp("[./~]"),"-") +".png" );
resetPictureObject(true);
static_cast<MSNContact *>( myself() )->setInfo( "PHH", config->readEntry("PHH") );
@@ -103,10 +103,10 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
//construct the group list
//Before 2003-11-14 the MSN server allowed us to download the group list without downloading the whole contactlist, but it's not possible anymore
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
for ( Kopete::Group *g = groupList.first(); g; g = groupList.next() )
{
- QString groupGuid=g->pluginData( protocol(), accountId() + " id" );
+ TQString groupGuid=g->pluginData( protocol(), accountId() + " id" );
if ( !groupGuid.isEmpty() )
m_groupList.insert( groupGuid , g );
}
@@ -124,7 +124,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
}
-QString MSNAccount::serverName()
+TQString MSNAccount::serverName()
{
return configGroup()->readEntry( "serverName" , "messenger.hotmail.com" );
}
@@ -139,12 +139,12 @@ bool MSNAccount::useHttpMethod() const
return configGroup()->readBoolEntry( "useHttpMethod" , false );
}
-QString MSNAccount::myselfClientId() const
+TQString MSNAccount::myselfClientId() const
{
- return QString::number(m_clientId, 10);
+ return TQString::number(m_clientId, 10);
}
-void MSNAccount::connectWithPassword( const QString &passwd )
+void MSNAccount::connectWithPassword( const TQString &passwd )
{
m_newContactList=false;
if ( isConnected() )
@@ -181,13 +181,13 @@ void MSNAccount::connectWithPassword( const QString &passwd )
createNotificationServer(serverName(), serverPort());
}
-void MSNAccount::createNotificationServer( const QString &host, uint port )
+void MSNAccount::createNotificationServer( const TQString &host, uint port )
{
if(m_notifySocket) //we are switching from one to another notifysocket.
{
//remove every slots to that socket, so we won't delete receive signals
// from the old socket thinking they are from the new one
- QObject::disconnect( m_notifySocket , 0, this, 0 );
+ TQObject::disconnect( m_notifySocket , 0, this, 0 );
m_notifySocket->deleteLater(); //be sure it will be deleted
m_notifySocket=0L;
}
@@ -200,36 +200,36 @@ void MSNAccount::createNotificationServer( const QString &host, uint port )
m_notifySocket = new MSNNotifySocket( this, accountId() , m_password);
m_notifySocket->setUseHttpMethod( useHttpMethod() );
- QObject::connect( m_notifySocket, SIGNAL( groupAdded( const QString&, const QString& ) ),
- SLOT( slotGroupAdded( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupRenamed( const QString&, const QString& ) ),
- SLOT( slotGroupRenamed( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupListed( const QString&, const QString& ) ),
- SLOT( slotGroupAdded( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupRemoved( const QString& ) ),
- SLOT( slotGroupRemoved( const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( contactList(const QString&, const QString&, const QString&, uint, const QString& ) ),
- SLOT( slotContactListed(const QString&, const QString&, const QString&, uint, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL(contactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotContactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( contactRemoved(const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotContactRemoved(const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ),
- SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) );
- QObject::connect( m_notifySocket, SIGNAL( invitedToChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotCreateChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( startChat( const QString&, const QString& ) ),
- SLOT( slotCreateChat( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( socketClosed() ),
- SLOT( slotNotifySocketClosed() ) );
- QObject::connect( m_notifySocket, SIGNAL( newContactList() ),
- SLOT( slotNewContactList() ) );
- QObject::connect( m_notifySocket, SIGNAL( receivedNotificationServer(const QString&, uint ) ),
- SLOT(createNotificationServer(const QString&, uint ) ) );
- QObject::connect( m_notifySocket, SIGNAL( hotmailSeted( bool ) ),
- m_openInboxAction, SLOT( setEnabled( bool ) ) );
- QObject::connect( m_notifySocket, SIGNAL( errorMessage(int, const QString& ) ),
- SLOT( slotErrorMessageReceived(int, const QString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupAdded( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRenamed( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupRenamed( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupListed( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRemoved( const TQString& ) ),
+ TQT_SLOT( slotGroupRemoved( const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( contactList(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ),
+ TQT_SLOT( slotContactListed(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL(contactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotContactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( contactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotContactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ),
+ TQT_SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( invitedToChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotCreateChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( startChat( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotCreateChat( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( socketClosed() ),
+ TQT_SLOT( slotNotifySocketClosed() ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( newContactList() ),
+ TQT_SLOT( slotNewContactList() ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( receivedNotificationServer(const TQString&, uint ) ),
+ TQT_SLOT(createNotificationServer(const TQString&, uint ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( hotmailSeted( bool ) ),
+ m_openInboxAction, TQT_SLOT( setEnabled( bool ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( errorMessage(int, const TQString& ) ),
+ TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) );
m_notifySocket->setStatus( m_connectstatus );
m_notifySocket->connect(host, port);
@@ -269,7 +269,7 @@ KActionMenu * MSNAccount::actionMenu()
#if !defined NDEBUG
KActionMenu *debugMenu = new KActionMenu( "Debug", m_actionMenu );
debugMenu->insert( new KAction( i18n( "Send Raw C&ommand..." ), 0,
- this, SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) );
+ this, TQT_SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) );
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert( debugMenu );
#endif
@@ -283,7 +283,7 @@ MSNNotifySocket *MSNAccount::notifySocket()
}
-void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason)
+void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason)
{
kdDebug( 14140 ) << k_funcinfo << status.description() << endl;
@@ -298,7 +298,7 @@ void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QSt
// since it's the same.
if( reason.contains("[Music]") )
{
- QString personalMessage = reason.section("[Music]", 1);
+ TQString personalMessage = reason.section("[Music]", 1);
setPersonalMessage( MSNProtocol::PersonalMessageMusic, personalMessage );
// Don't send un-needed status change.
@@ -329,8 +329,8 @@ void MSNAccount::slotStartChat()
{
bool ok;
- QString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ),
- i18n( "Please enter the email address of the person with whom you want to chat:" ), QString::null, &ok ).lower();
+ TQString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ),
+ i18n( "Please enter the email address of the person with whom you want to chat:" ), TQString::null, &ok ).lower();
if ( ok )
{
if ( MSNProtocol::validContactId( handle ) )
@@ -356,7 +356,7 @@ void MSNAccount::slotDebugRawCommand()
MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L );
int result = dlg->exec();
- if ( result == QDialog::Accepted && m_notifySocket )
+ if ( result == TQDialog::Accepted && m_notifySocket )
{
m_notifySocket->sendCommand( dlg->command(), dlg->params(),
dlg->addId(), dlg->msg().replace( "\n", "\r\n" ).utf8() );
@@ -374,7 +374,7 @@ void MSNAccount::slotChangePublicName()
}
bool ok;
- QString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ),
+ TQString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ),
i18n( "Enter the new display name by which you want to be visible to your friends on MSN:" ),
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(), &ok );
@@ -416,8 +416,8 @@ void MSNAccount::slotNotifySocketClosed()
if(reason == Kopete::Account::OtherClient)
{ //close all chat sessions, so new message will arive to the other client.
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- QValueList<Kopete::ChatSession*>::Iterator it;
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*>::Iterator it;
for (it=sessions.begin() ; it != sessions.end() ; it++ )
{
MSNChatSession *msnCS = dynamic_cast<MSNChatSession *>( *it );
@@ -449,7 +449,7 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status )
{
m_newContactList=false;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( *it );
@@ -470,9 +470,9 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status )
}
-void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage )
+void MSNAccount::slotPersonalMessageChanged( const TQString& personalMessage )
{
- QString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ;
+ TQString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ;
if ( personalMessage != oldPersonalMessage )
{
myself()->setProperty( MSNProtocol::protocol()->propPersonalMessage, personalMessage );
@@ -480,15 +480,15 @@ void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage )
}
}
-void MSNAccount::setPublicName( const QString &publicName )
+void MSNAccount::setPublicName( const TQString &publicName )
{
if ( m_notifySocket )
{
- m_notifySocket->changePublicName( publicName, QString::null );
+ m_notifySocket->changePublicName( publicName, TQString::null );
}
}
-void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage )
+void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage )
{
if ( m_notifySocket )
{
@@ -501,7 +501,7 @@ void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, cons
}*/
}
-void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupGuid )
+void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &groupGuid )
{
if ( m_groupList.contains( groupGuid ) )
{
@@ -512,11 +512,11 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
}
//--------- Find the appropriate Kopete::Group, or create one ---------//
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
Kopete::Group *fallBack = 0L;
//check if we have one in the old group list. if yes, update the id translate map.
- for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
+ for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
{
Kopete::Group *g=it.data();
if (g && g->pluginData( protocol(), accountId() + " displayName" ) == groupName &&
@@ -543,7 +543,7 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
if ( g->pluginData( protocol(), accountId() + " id" ).toUInt() == groupNumber )
{
m_groupList.insert( groupNumber, g );
- QString oldGroupName;
+ TQString oldGroupName;
if ( g->pluginData( protocol(), accountId() + " displayName" ) != groupName )
{
// The displayName of the group has been modified by another client
@@ -589,14 +589,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
// We have pending groups that we need add a contact to
if ( tmp_addToNewGroup.contains(groupName) )
{
- QStringList list=tmp_addToNewGroup[groupName];
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list=tmp_addToNewGroup[groupName];
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString contactId = *it;
+ TQString contactId = *it;
kdDebug( 14140 ) << k_funcinfo << "Adding to new group: " << contactId << endl;
MSNContact *c = static_cast<MSNContact *>(contacts()[contactId]);
if(c && c->hasProperty(MSNProtocol::protocol()->propGuid.key()) )
- notifySocket()->addContact( contactId, MSNProtocol::FL, QString::null, c->guid(), groupGuid );
+ notifySocket()->addContact( contactId, MSNProtocol::FL, TQString::null, c->guid(), groupGuid );
else
{
// If we get to here, we're currently adding a new contact, add the groupGUID to the groupList
@@ -604,14 +604,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupGuid);
else
- tmp_addNewContactToGroup.insert(contactId, QStringList(groupGuid) );
+ tmp_addNewContactToGroup.insert(contactId, TQStringList(groupGuid) );
}
}
tmp_addToNewGroup.remove(groupName);
}
}
-void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& groupName )
+void MSNAccount::slotGroupRenamed( const TQString &groupGuid, const TQString& groupName )
{
if ( m_groupList.contains( groupGuid ) )
{
@@ -625,16 +625,16 @@ void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& grou
}
}
-void MSNAccount::slotGroupRemoved( const QString& groupGuid )
+void MSNAccount::slotGroupRemoved( const TQString& groupGuid )
{
if ( m_groupList.contains( groupGuid ) )
{
- m_groupList[ groupGuid ]->setPluginData( protocol(), QMap<QString,QString>() );
+ m_groupList[ groupGuid ]->setPluginData( protocol(), TQMap<TQString,TQString>() );
m_groupList.remove( groupGuid );
}
}
-void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd )
+void MSNAccount::addGroup( const TQString &groupName, const TQString& contactToAdd )
{
if ( !contactToAdd.isNull() )
{
@@ -648,7 +648,7 @@ void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd
}
else
{
- tmp_addToNewGroup.insert(groupName,QStringList(contactToAdd));
+ tmp_addToNewGroup.insert(groupName,TQStringList(contactToAdd));
kdDebug( 14140 ) << k_funcinfo << "preparing to add " << groupName << " for " << contactToAdd << endl;
}
}
@@ -682,7 +682,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() )
{
- QString groupGuid = g->pluginData( protocol(), accountId() + " id" );
+ TQString groupGuid = g->pluginData( protocol(), accountId() + " id" );
if ( !m_groupList.contains( groupGuid ) )
{
// the group is maybe already removed in the server
@@ -703,7 +703,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " id", "" );
Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " displayName", g->pluginData( protocol(), accountId() + " displayName" ) );
- g->setPluginData( protocol(), accountId() + " id", QString::null ); // the group should be soon deleted, but make sure
+ g->setPluginData( protocol(), accountId() + " id", TQString::null ); // the group should be soon deleted, but make sure
return;
}
@@ -712,7 +712,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
{
bool still_have_contact=false;
// if contact are contains only in the group we are removing, abort the
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( it.current() );
@@ -734,10 +734,10 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
void MSNAccount::slotNewContactList()
{
m_oldGroupList=m_groupList;
- for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
+ for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
{ //they are about to be changed
if(it.data())
- it.data()->setPluginData( protocol(), accountId() + " id", QString::null );
+ it.data()->setPluginData( protocol(), accountId() + " id", TQString::null );
}
m_allowList.clear();
@@ -745,13 +745,13 @@ void MSNAccount::slotNewContactList()
m_reverseList.clear();
m_groupList.clear();
KConfigGroup *config=configGroup();
- config->writeEntry( "blockList" , QString::null ) ;
- config->writeEntry( "allowList" , QString::null );
- config->writeEntry( "reverseList" , QString::null );
+ config->writeEntry( "blockList" , TQString::null ) ;
+ config->writeEntry( "allowList" , TQString::null );
+ config->writeEntry( "reverseList" , TQString::null );
// clear all date information which will be received.
// if the information is not anymore on the server, it will not be received
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( *it );
@@ -759,15 +759,15 @@ void MSNAccount::slotNewContactList()
c->setAllowed( false );
c->setReversed( false );
c->setDeleted( true );
- c->setInfo( "PHH", QString::null );
- c->setInfo( "PHW", QString::null );
- c->setInfo( "PHM", QString::null );
+ c->setInfo( "PHH", TQString::null );
+ c->setInfo( "PHW", TQString::null );
+ c->setInfo( "PHM", TQString::null );
c->removeProperty( MSNProtocol::protocol()->propGuid );
}
m_newContactList=true;
}
-void MSNAccount::slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups )
+void MSNAccount::slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups )
{
// On empty lists handle might be empty, ignore that
// ignore also the myself contact.
@@ -778,7 +778,7 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
if ( lists & 1 ) // FL
{
- QStringList contactGroups = QStringList::split( ",", groups, false );
+ TQStringList contactGroups = TQStringList::split( ",", groups, false );
if ( c )
{
if( !c->metaContact() )
@@ -799,11 +799,11 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
c->removeProperty( Kopete::Global::Properties::self()->nickName() );
c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid);
- const QMap<QString, Kopete::Group *> oldServerGroups = c->serverGroups();
+ const TQMap<TQString, Kopete::Group *> oldServerGroups = c->serverGroups();
c->clearServerGroups();
- for ( QStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it )
+ for ( TQStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it )
{
- QString newServerGroupID = *it;
+ TQString newServerGroupID = *it;
if(m_groupList.contains(newServerGroupID))
{
Kopete::Group *newServerGroup=m_groupList[ newServerGroupID ] ;
@@ -816,12 +816,12 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
}
}
- for ( QMap<QString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it )
+ for ( TQMap<TQString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it )
{
Kopete::Group *old_group=m_oldGroupList[it.key()];
if(old_group)
{
- QString oldnewID=old_group->pluginData(protocol() , accountId() +" id");
+ TQString oldnewID=old_group->pluginData(protocol() , accountId() +" id");
if ( !oldnewID.isEmpty() && contactGroups.contains( oldnewID ) )
continue; //ok, it's correctn no need to do anything.
@@ -847,10 +847,10 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
c->removeProperty( Kopete::Global::Properties::self()->nickName() );
c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid );
- for ( QStringList::Iterator it = contactGroups.begin();
+ for ( TQStringList::Iterator it = contactGroups.begin();
it != contactGroups.end(); ++it )
{
- QString groupGuid = *it;
+ TQString groupGuid = *it;
if(m_groupList.contains(groupGuid))
{
c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] );
@@ -874,25 +874,25 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
}
}
if ( lists & 2 )
- slotContactAdded( handle, "AL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "AL", publicName, TQString::null, TQString::null );
else if(c)
c->setAllowed(false);
if ( lists & 4 )
- slotContactAdded( handle, "BL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "BL", publicName, TQString::null, TQString::null );
else if(c)
c->setBlocked(false);
if ( lists & 8 )
- slotContactAdded( handle, "RL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "RL", publicName, TQString::null, TQString::null );
else if(c)
c->setReversed(false);
if ( lists & 16 ) // This contact is on the pending list. Add to the reverse list and delete from the pending list
{
- notifySocket()->addContact( handle, MSNProtocol::RL, QString::null, QString::null, QString::null );
- notifySocket()->removeContact( handle, MSNProtocol::PL, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::RL, TQString::null, TQString::null, TQString::null );
+ notifySocket()->removeContact( handle, MSNProtocol::PL, TQString::null, TQString::null );
}
}
-void MSNAccount::slotContactAdded( const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid )
+void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid )
{
if ( list == "FL" )
{
@@ -912,17 +912,17 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
// Add the new contact to the group he belongs.
if ( tmp_addNewContactToGroup.contains(handle) )
{
- QStringList list = tmp_addNewContactToGroup[handle];
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = tmp_addNewContactToGroup[handle];
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString groupGuid = *it;
+ TQString groupGuid = *it;
// If the group didn't exist yet (yay for async operations), don't add the contact to the group
// Let slotGroupAdded do it.
if( m_groupList.contains(groupGuid) )
{
kdDebug( 14140 ) << k_funcinfo << "Adding " << handle << " to group: " << groupGuid << endl;
- notifySocket()->addContact( handle, MSNProtocol::FL, QString::null, contactGuid, groupGuid );
+ notifySocket()->addContact( handle, MSNProtocol::FL, TQString::null, contactGuid, groupGuid );
c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] );
@@ -971,7 +971,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
if ( !handle.isEmpty() && !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
kdDebug(14140) << k_funcinfo << "Trying to add contact to AL. " << endl;
- notifySocket()->addContact(handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact(handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
}
}
else if ( list == "BL" )
@@ -1006,14 +1006,14 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
// before I declare it good :- )
if ( !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
- QString nick; //in most case, the public name is not know
+ TQString nick; //in most case, the public name is not know
if(publicName!=handle) // so we don't whos it if it is not know
nick=publicName;
Kopete::UI::ContactAddedNotifyDialog *dialog=
new Kopete::UI::ContactAddedNotifyDialog( handle,nick,this,
Kopete::UI::ContactAddedNotifyDialog::InfoButton );
- QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),
- this,SLOT(slotContactAddedNotifyDialogClosed(const QString& )));
+ TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),
+ this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& )));
dialog->show();
}
}
@@ -1026,7 +1026,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
}
}
-void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid )
+void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid )
{
kdDebug( 14140 ) << k_funcinfo << "handle: " << handle << " list: " << list << " contact-uid: " << contactGuid << endl;
MSNContact *c=static_cast<MSNContact *>( contacts()[ handle ] );
@@ -1035,7 +1035,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
m_blockList.remove( handle );
configGroup()->writeEntry( "blockList" , m_blockList ) ;
if ( !m_allowList.contains( handle ) )
- notifySocket()->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
if(c)
c->setBlocked( false );
@@ -1045,7 +1045,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
m_allowList.remove( handle );
configGroup()->writeEntry( "allowList" , m_allowList ) ;
if ( !m_blockList.contains( handle ) )
- notifySocket()->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
if(c)
c->setAllowed( false );
@@ -1063,7 +1063,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
/*
InfoWidget *info = new InfoWidget( 0 );
info->title->setText( "<b>" + i18n( "Contact removed!" ) +"</b>" );
- QString dummy;
+ TQString dummy;
dummy = "<center><b>" + imContact->getPublicName() + "( " +imContact->getHandle() +" )</b></center><br>";
dummy += i18n( "has removed you from his contact list!" ) + "<br>";
dummy += i18n( "This contact is now removed from your contact list" );
@@ -1077,15 +1077,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
{
// The FL list only use the contact GUID, use the contact referenced by the GUID.
MSNContact *contactRemoved = findContactByGuid(contactGuid);
- QStringList groupGuidList;
+ TQStringList groupGuidList;
bool deleteContact = groupGuid.isEmpty() ? true : false; // Delete the contact when the group GUID is empty.
// Remove the contact from the contact list for all the group he is a member.
if( groupGuid.isEmpty() )
{
if(contactRemoved)
{
- QPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups();
- for( QPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it )
+ TQPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups();
+ for( TQPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it )
{
Kopete::Group *group = *it;
if ( !group->pluginData( protocol(), accountId() + " id" ).isEmpty() )
@@ -1102,7 +1102,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
if( !groupGuidList.isEmpty() )
{
- QStringList::const_iterator stringIt;
+ TQStringList::const_iterator stringIt;
for( stringIt = groupGuidList.begin(); stringIt != groupGuidList.end(); ++stringIt )
{
// Contact is removed from the FL list, remove it from the group
@@ -1114,7 +1114,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
{
bool still_have_contact=false;
// if contact are contains only in the group we are removing, abort the
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c2 = static_cast<MSNContact *>( it.current() );
@@ -1137,15 +1137,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
}
}
-void MSNAccount::slotCreateChat( const QString& address, const QString& auth )
+void MSNAccount::slotCreateChat( const TQString& address, const TQString& auth )
{
slotCreateChat( 0L, address, auth, m_msgHandle.first(), m_msgHandle.first() );
}
-void MSNAccount::slotCreateChat( const QString& ID, const QString& address, const QString& auth,
- const QString& handle_, const QString& publicName )
+void MSNAccount::slotCreateChat( const TQString& ID, const TQString& address, const TQString& auth,
+ const TQString& handle_, const TQString& publicName )
{
- QString handle = handle_.lower();
+ TQString handle = handle_.lower();
if ( handle.isEmpty() )
{
@@ -1189,7 +1189,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons
if ( !ID.isEmpty() && notifyNewChat )
{
// this temporary message should open the window if they not exist
- QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
+ TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
Kopete::Message tmpMsg = Kopete::Message( c, manager->members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
manager->appendMessage( tmpMsg );
}
@@ -1200,7 +1200,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons
m_msgHandle.pop_front();
}
-void MSNAccount::slotStartChatSession( const QString& handle )
+void MSNAccount::slotStartChatSession( const TQString& handle )
{
// First create a message manager, because we might get an existing
// manager back, in which case we likely also have an active switchboard
@@ -1218,7 +1218,7 @@ void MSNAccount::slotStartChatSession( const QString& handle )
}
}
-void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle)
+void MSNAccount::slotContactAddedNotifyDialogClosed(const TQString& handle)
{
const Kopete::UI::ContactAddedNotifyDialog *dialog =
dynamic_cast<const Kopete::UI::ContactAddedNotifyDialog *>(sender());
@@ -1242,29 +1242,29 @@ void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle)
if ( !dialog->authorized() )
{
if ( m_allowList.contains( handle ) )
- m_notifySocket->removeContact( handle, MSNProtocol::AL, QString::null, QString::null );
+ m_notifySocket->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null );
else if ( !m_blockList.contains( handle ) )
- m_notifySocket->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null );
+ m_notifySocket->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
}
else
{
if ( m_blockList.contains( handle ) )
- m_notifySocket->removeContact( handle, MSNProtocol::BL, QString::null, QString::null );
+ m_notifySocket->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null );
else if ( !m_allowList.contains( handle ) )
- m_notifySocket->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ m_notifySocket->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
}
}
-void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant &value )
+void MSNAccount::slotGlobalIdentityChanged( const TQString &key, const TQVariant &value )
{
if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) )
{
if(key == Kopete::Global::Properties::self()->nickName().key())
{
- QString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
- QString newNick = value.toString();
+ TQString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString newNick = value.toString();
if(newNick != oldNick)
{
@@ -1280,9 +1280,9 @@ void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant &
}
}
-void MSNAccount::slotErrorMessageReceived( int type, const QString &msg )
+void MSNAccount::slotErrorMessageReceived( int type, const TQString &msg )
{
- QString caption = i18n( "MSN Plugin" );
+ TQString caption = i18n( "MSN Plugin" );
// Use different notification type based on the error context.
switch(type)
@@ -1316,7 +1316,7 @@ void MSNAccount::slotErrorMessageReceived( int type, const QString &msg )
}
}
-bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *metaContact )
+bool MSNAccount::createContact( const TQString &contactId, Kopete::MetaContact *metaContact )
{
if ( !metaContact->isTemporary() && m_notifySocket)
{
@@ -1339,14 +1339,14 @@ bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *m
}
-void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList)
+void MSNAccount::addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList)
{
// First of all, fill the temporary group list. The contact will be moved to his group(s).
// When we receive back his contact GUID(required to move a contact between groups)
for( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
// TODO: It it time that libkopete generate a unique ID that contains protocols, account and contact id.
- QString groupId = group->pluginData( protocol(), accountId() + " id" );
+ TQString groupId = group->pluginData( protocol(), accountId() + " id" );
// If the groupId is empty, that's mean the Kopete group is not on the MSN server.
if( !groupId.isEmpty() )
{
@@ -1354,8 +1354,8 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
if( !m_groupList.contains(groupId) )
{
// Clear the group plugin data.
- group->setPluginData( protocol() , accountId() + " id" , QString::null);
- group->setPluginData( protocol() , accountId() + " displayName" , QString::null);
+ group->setPluginData( protocol() , accountId() + " id" , TQString::null);
+ group->setPluginData( protocol() , accountId() + " displayName" , TQString::null);
kdDebug( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" << groupId << " does not seems to be anymore on the server" << endl;
// Add the group on MSN server, will fix the corruption.
@@ -1368,7 +1368,7 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupId);
else
- tmp_addNewContactToGroup.insert(contactId, QStringList(groupId) );
+ tmp_addNewContactToGroup.insert(contactId, TQStringList(groupId) );
}
}
else
@@ -1383,13 +1383,13 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
// After add the contact to the top-level, it will be moved to required groups later.
kdDebug( 14140 ) << k_funcinfo << "Add the contact on the server " << endl;
- m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, QString::null, QString::null );
+ m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, TQString::null, TQString::null );
}
-MSNContact *MSNAccount::findContactByGuid(const QString &contactGuid)
+MSNContact *MSNAccount::findContactByGuid(const TQString &contactGuid)
{
kdDebug(14140) << k_funcinfo << "Looking for " << contactGuid << endl;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = dynamic_cast<MSNContact *>( it.current() );
@@ -1412,17 +1412,17 @@ bool MSNAccount::isHotmail() const
return m_openInboxAction->isEnabled();
}
-QString MSNAccount::pictureUrl()
+TQString MSNAccount::pictureUrl()
{
return m_pictureFilename;
}
-void MSNAccount::setPictureUrl(const QString &url)
+void MSNAccount::setPictureUrl(const TQString &url)
{
m_pictureFilename = url;
}
-QString MSNAccount::pictureObject()
+TQString MSNAccount::pictureObject()
{
if(m_pictureObj.isNull())
resetPictureObject(true); //silent=true to keep infinite loop away
@@ -1431,7 +1431,7 @@ QString MSNAccount::pictureObject()
void MSNAccount::resetPictureObject(bool silent, bool force)
{
- QString old=m_pictureObj;
+ TQString old=m_pictureObj;
if(!configGroup()->readBoolEntry("exportCustomPicture") && !force)
{
@@ -1441,7 +1441,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
else
{
// Check if the picture is a 96x96 image, if not scale, crop and save.
- QImage picture(m_pictureFilename);
+ TQImage picture(m_pictureFilename);
if(picture.isNull())
{
m_pictureObj="";
@@ -1452,7 +1452,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
if(picture.width() != 96 || picture.height() != 96)
{
// Save to a new location in msnpictures.
- QString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) );
// Scale and crop the picture.
picture = MSNProtocol::protocol()->scalePicture(picture);
@@ -1467,7 +1467,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
}
}
- QFile pictFile( m_pictureFilename );
+ TQFile pictFile( m_pictureFilename );
if(!pictFile.open(IO_ReadOnly))
{
m_pictureObj="";
@@ -1475,12 +1475,12 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
}
else
{
- QByteArray ar=pictFile.readAll();
- QString sha1d= QString((KCodecs::base64Encode(SHA1::hash(ar))));
+ TQByteArray ar=pictFile.readAll();
+ TQString sha1d= TQString((KCodecs::base64Encode(SHA1::hash(ar))));
- QString size=QString::number( pictFile.size() );
- QString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d;
- m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ QString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>";
+ TQString size=TQString::number( pictFile.size() );
+ TQString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d;
+ m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>";
myself()->setProperty( Kopete::Global::Properties::self()->photo() , m_pictureFilename );
}
}
diff --git a/kopete/protocols/msn/msnaccount.h b/kopete/protocols/msn/msnaccount.h
index 7fbee16b..5f7352e3 100644
--- a/kopete/protocols/msn/msnaccount.h
+++ b/kopete/protocols/msn/msnaccount.h
@@ -19,7 +19,7 @@
#ifndef MSNACCOUNT_H
#define MSNACCOUNT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kopetepasswordedaccount.h"
@@ -42,7 +42,7 @@ class MSNAccount : public Kopete::PasswordedAccount
Q_OBJECT
public:
- MSNAccount( MSNProtocol *parent, const QString &accountID, const char *name = 0L );
+ MSNAccount( MSNProtocol *parent, const TQString &accountID, const char *name = 0L );
/*
* return the menu for this account
@@ -53,13 +53,13 @@ public:
/**
* change the publicName to this new name
*/
- void setPublicName( const QString &name );
- void setPersonalMessage(MSNProtocol::PersonalMessageType type, const QString &personalMessage );
+ void setPublicName( const TQString &name );
+ void setPersonalMessage(MSNProtocol::PersonalMessageType type, const TQString &personalMessage );
/**
* Returns the address of the MSN server
*/
- QString serverName();
+ TQString serverName();
/**
* Returns the address of the MSN server port
@@ -77,17 +77,17 @@ public:
/**
* Return the picture url.
*/
- QString pictureUrl();
+ TQString pictureUrl();
/**
* Set the picture url.
*/
- void setPictureUrl(const QString &url);
+ void setPictureUrl(const TQString &url);
/**
* return the <msnobj> tag of the display picture
*/
- QString pictureObject();
+ TQString pictureObject();
/**
* reset the <msnobj>. This method should be called if the displayimage has changed
@@ -107,25 +107,25 @@ public:
* Return the client ID for the myself contact of this account.
* It is dynamic to see if we really have a webcam or not.
*/
- QString myselfClientId() const;
+ TQString myselfClientId() const;
public slots:
- virtual void connectWithPassword( const QString &password ) ;
+ virtual void connectWithPassword( const TQString &password ) ;
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);
/**
* Ask to the account to create a new chat session
*/
- void slotStartChatSession( const QString& handle );
+ void slotStartChatSession( const TQString& handle );
/**
* Single slot to display error message.
*/
- void slotErrorMessageReceived( int type, const QString &msg );
+ void slotErrorMessageReceived( int type, const TQString &msg );
protected:
- virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact );
+ virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact );
private slots:
@@ -144,36 +144,36 @@ private slots:
// notifySocket related
void slotStatusChanged( const Kopete::OnlineStatus &status );
void slotNotifySocketClosed();
- void slotPersonalMessageChanged(const QString& personalMessage);
- void slotContactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid );
- void slotContactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid );
- void slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups );
+ void slotPersonalMessageChanged(const TQString& personalMessage);
+ void slotContactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid );
+ void slotContactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid );
+ void slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups );
void slotNewContactList();
/**
* The group has successful renamed in the server
* groupName: is new new group name
*/
- void slotGroupRenamed(const QString &groupGuid, const QString& groupName );
+ void slotGroupRenamed(const TQString &groupGuid, const TQString& groupName );
/**
* A new group was created on the server (or received durring an LSG command)
*/
- void slotGroupAdded( const QString& groupName, const QString &groupGuid );
+ void slotGroupAdded( const TQString& groupName, const TQString &groupGuid );
/**
* Group was removed from the server
*/
- void slotGroupRemoved( const QString &groupGuid );
+ void slotGroupRemoved( const TQString &groupGuid );
/**
* Incoming RING command: connect to the Switchboard server and send
* the startChat signal
*/
- void slotCreateChat( const QString& sessionID, const QString& address, const QString& auth,
- const QString& handle, const QString& publicName );
+ void slotCreateChat( const TQString& sessionID, const TQString& address, const TQString& auth,
+ const TQString& handle, const TQString& publicName );
/**
* Incoming XFR command: this is an result from
* slotStartChatSession(handle)
* connect to the switchboard server and sen startChat signal
*/
- void slotCreateChat( const QString& address, const QString& auth);
+ void slotCreateChat( const TQString& address, const TQString& auth);
// ui related
@@ -190,17 +190,17 @@ private slots:
/**
* add contact ui
*/
- void slotContactAddedNotifyDialogClosed( const QString &handle);
+ void slotContactAddedNotifyDialogClosed( const TQString &handle);
/**
* When the dispatch server sends us the notification server to use.
*/
- void createNotificationServer( const QString &host, uint port );
+ void createNotificationServer( const TQString &host, uint port );
/**
* When a global identity key get changed.
*/
- void slotGlobalIdentityChanged( const QString &key, const QVariant &value );
+ void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value );
private:
MSNNotifySocket *m_notifySocket;
@@ -211,7 +211,7 @@ private:
// status which will be using for connecting
Kopete::OnlineStatus m_connectstatus;
- QStringList m_msgHandle;
+ TQStringList m_msgHandle;
bool m_newContactList;
@@ -220,35 +220,35 @@ private:
* Add the contact on the server in the given groups.
* this is a helper function called bu createContact and slotStatusChanged
*/
- void addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList);
+ void addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList);
public: //FIXME: should be private
- QMap<QString, Kopete::Group*> m_groupList;
+ TQMap<TQString, Kopete::Group*> m_groupList;
- void addGroup( const QString &groupName, const QString &contactToAdd = QString::null );
+ void addGroup( const TQString &groupName, const TQString &contactToAdd = TQString::null );
/**
* Find and retrive a MSNContact by its contactGuid. (Helper function)
*/
- MSNContact *findContactByGuid(const QString &contactGuid);
+ MSNContact *findContactByGuid(const TQString &contactGuid);
private:
// server data
- QStringList m_allowList;
- QStringList m_blockList;
- QStringList m_reverseList;
+ TQStringList m_allowList;
+ TQStringList m_blockList;
+ TQStringList m_reverseList;
Kopete::MetaContact *m_addWizard_metaContact;
- QMap< QString, QStringList > tmp_addToNewGroup;
- QMap< QString, QStringList > tmp_addNewContactToGroup;
+ TQMap< TQString, TQStringList > tmp_addToNewGroup;
+ TQMap< TQString, TQStringList > tmp_addNewContactToGroup;
- QString m_pictureObj; //a cache of the <msnobj>
- QString m_pictureFilename; // the picture filename.
+ TQString m_pictureObj; //a cache of the <msnobj>
+ TQString m_pictureFilename; // the picture filename.
//this is the translation between old to new groups id when syncing from server.
- QMap<QString, Kopete::Group*> m_oldGroupList;
+ TQMap<TQString, Kopete::Group*> m_oldGroupList;
/**
* I need the password in createNotificationServer.
@@ -256,7 +256,7 @@ private:
* at this place. so i'm forced to keep it here.
* I would like an API to request the password WITHOUT askling it.
*/
- QString m_password;
+ TQString m_password;
/**
* Cliend ID is a bitfield that contains supported features for a MSN contact.
diff --git a/kopete/protocols/msn/msnaddcontactpage.cpp b/kopete/protocols/msn/msnaddcontactpage.cpp
index 337939e6..8bdf77a1 100644
--- a/kopete/protocols/msn/msnaddcontactpage.cpp
+++ b/kopete/protocols/msn/msnaddcontactpage.cpp
@@ -13,8 +13,8 @@
*/
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -25,10 +25,10 @@
#include "kopeteaccount.h"
#include "kopeteuiglobal.h"
-MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char *name )
+MSNAddContactPage::MSNAddContactPage(bool connected, TQWidget *parent, const char *name )
: AddContactPage(parent,name)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
/* if ( connected )
{*/
msndata = new msnAddUI(this);
@@ -41,8 +41,8 @@ MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char
/* }
else
{
- noaddMsg1 = new QLabel( i18n( "You need to be connected to be able to add contacts." ), this );
- noaddMsg2 = new QLabel( i18n( "Please connect to the MSN 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( "Please connect to the MSN network and try again." ), this );
canadd = false;
}*/
@@ -55,7 +55,7 @@ bool MSNAddContactPage::apply( Kopete::Account* i, Kopete::MetaContact*m )
{
if ( validateData() )
{
- QString userid = msndata->addID->text();
+ TQString userid = msndata->addID->text();
return i->addContact( userid , m, Kopete::Account::ChangeKABC );
}
return false;
@@ -67,7 +67,7 @@ bool MSNAddContactPage::validateData()
if(!canadd)
return false;
- QString userid = msndata->addID->text();
+ TQString userid = msndata->addID->text();
if(MSNProtocol::validContactId(userid))
return true;
diff --git a/kopete/protocols/msn/msnaddcontactpage.h b/kopete/protocols/msn/msnaddcontactpage.h
index c2e3fb3b..4b51a15e 100644
--- a/kopete/protocols/msn/msnaddcontactpage.h
+++ b/kopete/protocols/msn/msnaddcontactpage.h
@@ -2,9 +2,9 @@
#ifndef MSNADDCONTACTPAGE_H
#define MSNADDCONTACTPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <addcontactpage.h>
-#include <qlabel.h>
+#include <tqlabel.h>
/**
*@author duncan
@@ -16,11 +16,11 @@ class MSNAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- MSNAddContactPage(bool connected, QWidget *parent=0, const char *name=0);
+ MSNAddContactPage(bool connected, TQWidget *parent=0, const char *name=0);
~MSNAddContactPage();
msnAddUI *msndata;
- QLabel *noaddMsg1;
- QLabel *noaddMsg2;
+ TQLabel *noaddMsg1;
+ TQLabel *noaddMsg2;
bool canadd;
virtual bool validateData();
virtual bool apply( Kopete::Account*, Kopete::MetaContact* );
diff --git a/kopete/protocols/msn/msnchallengehandler.cpp b/kopete/protocols/msn/msnchallengehandler.cpp
index e0bcc987..46d4b8a0 100644
--- a/kopete/protocols/msn/msnchallengehandler.cpp
+++ b/kopete/protocols/msn/msnchallengehandler.cpp
@@ -19,12 +19,12 @@
#include "msnchallengehandler.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <kdebug.h>
#include <kmdcodec.h>
-MSNChallengeHandler::MSNChallengeHandler(const QString& productKey, const QString& productId)
+MSNChallengeHandler::MSNChallengeHandler(const TQString& productKey, const TQString& productId)
{
m_productKey = productKey;
m_productId = productId;
@@ -36,17 +36,17 @@ MSNChallengeHandler::~MSNChallengeHandler()
kdDebug(14140) << k_funcinfo << endl;
}
-QString MSNChallengeHandler::computeHash(const QString& challengeString)
+TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
{
// Step One: THe MD5 Hash.
// Combine the received challenge string with the product key.
KMD5 md5((challengeString + m_productKey).utf8());
- QCString digest = md5.hexDigest();
+ TQCString digest = md5.hexDigest();
kdDebug(14140) << k_funcinfo << "md5: " << digest << endl;
- QValueVector<Q_INT32> md5Integers(4);
+ TQValueVector<Q_INT32> md5Integers(4);
for(Q_UINT32 i=0; i < md5Integers.count(); i++)
{
md5Integers[i] = hexSwap(digest.mid(i*8, 8)).toUInt(0, 16) & 0x7FFFFFFF;
@@ -55,21 +55,21 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString)
// Step Two: Create the challenge string key
- QString challengeKey = challengeString + m_productId;
+ TQString challengeKey = challengeString + m_productId;
// Pad to multiple of 8.
challengeKey = challengeKey.leftJustify(challengeKey.length() + (8 - challengeKey.length() % 8), '0');
kdDebug(14140) << k_funcinfo << "challenge key: " << challengeKey << endl;
- QValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4);
+ TQValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4);
for(Q_UINT32 i=0; i < challengeIntegers.count(); i++)
{
- QString sNum = challengeKey.mid(i*4, 4), sNumHex;
+ TQString sNum = challengeKey.mid(i*4, 4), sNumHex;
// Go through the number string, determining the hex equivalent of each value
// and add that to our new hex string for this number.
for(uint j=0; j < sNum.length(); j++) {
- sNumHex += QString::number((int)sNum[j].latin1(), 16);
+ sNumHex += TQString::number((int)sNum[j].latin1(), 16);
}
// swap because of the byte ordering issue.
@@ -87,19 +87,19 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString)
// Step Four: Create the final hash key.
- QString upper = QString::number(QString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16);
+ TQString upper = TQString::number(TQString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16);
if(upper.length() % 16 != 0)
upper = upper.rightJustify(upper.length() + (16 - upper.length() % 16), '0');
- QString lower = QString::number(QString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16);
+ TQString lower = TQString::number(TQString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16);
if(lower.length() % 16 != 0)
lower = lower.rightJustify(lower.length() + (16 - lower.length() % 16), '0');
return (upper + lower);
}
-Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integers,
- const QValueVector<Q_INT32>& challengeIntegers)
+Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<Q_INT32>& md5Integers,
+ const TQValueVector<Q_INT32>& challengeIntegers)
{
kdDebug(14140) << k_funcinfo << "Creating 64-bit key." << endl;
@@ -119,22 +119,22 @@ Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integ
high = (high + md5Integers[1]) % 0x7FFFFFFF;
low = (low + md5Integers[3]) % 0x7FFFFFFF;
- QDataStream buffer(QByteArray(8), IO_ReadWrite);
- buffer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream buffer(TQByteArray(8), IO_ReadWrite);
+ buffer.setByteOrder(TQDataStream::LittleEndian);
buffer << (Q_INT32)high;
buffer << (Q_INT32)low;
buffer.device()->reset();
- buffer.setByteOrder(QDataStream::BigEndian);
+ buffer.setByteOrder(TQDataStream::BigEndian);
Q_INT64 key;
buffer >> key;
return key;
}
-QString MSNChallengeHandler::hexSwap(const QString& in)
+TQString MSNChallengeHandler::hexSwap(const TQString& in)
{
- QString sHex = in, swapped;
+ TQString sHex = in, swapped;
while(sHex.length() > 0)
{
swapped = swapped + sHex.mid(sHex.length() - 2, 2);
@@ -143,7 +143,7 @@ QString MSNChallengeHandler::hexSwap(const QString& in)
return swapped;
}
-QString MSNChallengeHandler::productId()
+TQString MSNChallengeHandler::productId()
{
return m_productId;
}
diff --git a/kopete/protocols/msn/msnchallengehandler.h b/kopete/protocols/msn/msnchallengehandler.h
index 9e866560..8ae8c3aa 100644
--- a/kopete/protocols/msn/msnchallengehandler.h
+++ b/kopete/protocols/msn/msnchallengehandler.h
@@ -20,8 +20,8 @@
#ifndef MSNCHALLENGEHANDLER_H
#define MSNCHALLENGEHANDLER_H
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
/**
* Provides a simple way to compute a msn challenge response hash key.
@@ -32,33 +32,33 @@ class MSNChallengeHandler : public QObject
{
Q_OBJECT
public:
- MSNChallengeHandler(const QString& productKey, const QString& productId);
+ MSNChallengeHandler(const TQString& productKey, const TQString& productId);
~MSNChallengeHandler();
/**
* Computes the response hash string for the specified challenge string.
*/
- QString computeHash(const QString& challengeString);
+ TQString computeHash(const TQString& challengeString);
/**
* Returns the product id used by the challenge handler.
*/
- QString productId();
+ TQString productId();
private:
/**
* Creates a 64-bit hash key.
*/
- Q_INT64 createHashKey(const QValueVector<Q_INT32>& md5Integers, const QValueVector<Q_INT32>& challengeIntegers);
+ Q_INT64 createHashKey(const TQValueVector<Q_INT32>& md5Integers, const TQValueVector<Q_INT32>& challengeIntegers);
/**
* Swaps the bytes in a hex string.
*/
- QString hexSwap(const QString& in);
+ TQString hexSwap(const TQString& in);
- QString m_productKey;
- QString m_productId;
+ TQString m_productKey;
+ TQString m_productId;
};
#endif
diff --git a/kopete/protocols/msn/msnchatsession.cpp b/kopete/protocols/msn/msnchatsession.cpp
index 3bf5d0c6..f799edc1 100644
--- a/kopete/protocols/msn/msnchatsession.cpp
+++ b/kopete/protocols/msn/msnchatsession.cpp
@@ -17,11 +17,11 @@
#include "msnchatsession.h"
-#include <qlabel.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qiconset.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqiconset.h>
#include <kconfig.h>
@@ -66,43 +66,43 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac
setInstance(protocol->instance());
- connect( this, SIGNAL( messageSent( Kopete::Message&,
+ connect( this, TQT_SIGNAL( messageSent( Kopete::Message&,
Kopete::ChatSession* ) ),
- this, SLOT( slotMessageSent( Kopete::Message&,
+ this, TQT_SLOT( slotMessageSent( Kopete::Message&,
Kopete::ChatSession* ) ) );
- connect( this, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ,
- protocol, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) );
+ connect( this, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ,
+ protocol, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) );
m_actionInvite = new KActionMenu( i18n( "&Invite" ), "kontact_contacts", actionCollection(), "msnInvite" );
- connect ( m_actionInvite->popupMenu() , SIGNAL( aboutToShow() ) , this , SLOT(slotActionInviteAboutToShow() ) ) ;
+ connect ( m_actionInvite->popupMenu() , TQT_SIGNAL( aboutToShow() ) , this , TQT_SLOT(slotActionInviteAboutToShow() ) ) ;
#if !defined NDEBUG
- new KAction( i18n( "Send Raw C&ommand..." ), 0, this, SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ;
+ new KAction( i18n( "Send Raw C&ommand..." ), 0, this, TQT_SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ;
#endif
- m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ;
+ m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, TQT_SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ;
#if MSN_WEBCAM
// Invite to receive webcam action
- m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ;
+ m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ;
//Send webcam action
- m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ;
+ m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ;
#endif
- new KAction( i18n( "Send File" ),"attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "msnSendFile" );
+ new KAction( i18n( "Send File" ),"attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "msnSendFile" );
MSNContact *c = static_cast<MSNContact*>( others.first() );
- (new KAction( i18n( "Request Display Picture" ), "image", 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty());
+ (new KAction( i18n( "Request Display Picture" ), "image", 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty());
if ( !c->object().isEmpty() )
{
- connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) );
- m_image = new QLabel( 0L, "kde toolbar widget" );
- new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" );
+ connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) );
+ m_image = new TQLabel( 0L, "kde toolbar widget" );
+ new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" );
if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) )
{
//if the view doesn't exist yet, we will be unable to get the size of the toolbar
@@ -110,7 +110,7 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac
//How to know when a our view is created? We can't.
// but chances are the next created view will be for this KMM
// And if it is not? never mind. the icon will just be sized 22x22
- connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) );
+ connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) );
//it's viewActivated and not viewCreated because the view get his mainwindow only when it is shown.
}
}
@@ -132,7 +132,7 @@ MSNChatSession::~MSNChatSession()
// if(m_chatService)
// delete m_chatService;
- QMap<unsigned long int, MSNInvitation*>::Iterator it;
+ TQMap<unsigned long int, MSNInvitation*>::Iterator it;
for( it = m_invitations.begin(); it != m_invitations.end() ; it = m_invitations.begin())
{
delete *it;
@@ -140,8 +140,8 @@ MSNChatSession::~MSNChatSession()
}
}
-void MSNChatSession::createChat( const QString &handle,
- const QString &address, const QString &auth, const QString &ID )
+void MSNChatSession::createChat( const TQString &handle,
+ const TQString &address, const TQString &auth, const TQString &ID )
{
/* disabled because i don't want to reopen a chatwindow if we just closed it
* and the contact take much time to type his message
@@ -163,46 +163,46 @@ void MSNChatSession::createChat( const QString &handle,
m_chatService->setMsgHandle( handle );
m_chatService->connectToSwitchBoard( ID, address, auth );
- connect( m_chatService, SIGNAL( userJoined(const QString&,const QString&,bool)),
- this, SLOT( slotUserJoined(const QString&,const QString&,bool) ) );
- connect( m_chatService, SIGNAL( userLeft(const QString&,const QString&)),
- this, SLOT( slotUserLeft(const QString&,const QString&) ) );
- connect( m_chatService, SIGNAL( msgReceived( Kopete::Message & ) ),
- this, SLOT( slotMessageReceived( Kopete::Message & ) ) );
- connect( m_chatService, SIGNAL( switchBoardClosed() ),
- this, SLOT( slotSwitchBoardClosed() ) );
- connect( m_chatService, SIGNAL( receivedTypingMsg( const QString &, bool ) ),
- this, SLOT( receivedTypingMsg( const QString &, bool ) ) );
+ connect( m_chatService, TQT_SIGNAL( userJoined(const TQString&,const TQString&,bool)),
+ this, TQT_SLOT( slotUserJoined(const TQString&,const TQString&,bool) ) );
+ connect( m_chatService, TQT_SIGNAL( userLeft(const TQString&,const TQString&)),
+ this, TQT_SLOT( slotUserLeft(const TQString&,const TQString&) ) );
+ connect( m_chatService, TQT_SIGNAL( msgReceived( Kopete::Message & ) ),
+ this, TQT_SLOT( slotMessageReceived( Kopete::Message & ) ) );
+ connect( m_chatService, TQT_SIGNAL( switchBoardClosed() ),
+ this, TQT_SLOT( slotSwitchBoardClosed() ) );
+ connect( m_chatService, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ),
+ this, TQT_SLOT( receivedTypingMsg( const TQString &, bool ) ) );
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
if(config->readBoolEntry( "SendTypingNotification" , true) )
{
- connect( this, SIGNAL( myselfTyping( bool ) ),
- m_chatService, SLOT( sendTypingMsg( bool ) ) );
+ connect( this, TQT_SIGNAL( myselfTyping( bool ) ),
+ m_chatService, TQT_SLOT( sendTypingMsg( bool ) ) );
}
- connect( m_chatService, SIGNAL( msgAcknowledgement(unsigned int, bool) ),
- this, SLOT( slotAcknowledgement(unsigned int, bool) ) );
- connect( m_chatService, SIGNAL( invitation( const QString&, const QString& ) ),
- this, SLOT( slotInvitation( const QString&, const QString& ) ) );
- connect( m_chatService, SIGNAL( nudgeReceived(const QString&) ),
- this, SLOT( slotNudgeReceived(const QString&) ) );
- connect( m_chatService, SIGNAL( errorMessage(int, const QString& ) ), static_cast<MSNAccount *>(myself()->account()), SLOT( slotErrorMessageReceived(int, const QString& ) ) );
+ connect( m_chatService, TQT_SIGNAL( msgAcknowledgement(unsigned int, bool) ),
+ this, TQT_SLOT( slotAcknowledgement(unsigned int, bool) ) );
+ connect( m_chatService, TQT_SIGNAL( invitation( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotInvitation( const TQString&, const TQString& ) ) );
+ connect( m_chatService, TQT_SIGNAL( nudgeReceived(const TQString&) ),
+ this, TQT_SLOT( slotNudgeReceived(const TQString&) ) );
+ connect( m_chatService, TQT_SIGNAL( errorMessage(int, const TQString& ) ), static_cast<MSNAccount *>(myself()->account()), TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) );
if(!m_timeoutTimer)
{
- m_timeoutTimer=new QTimer(this);
- connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) );
+ m_timeoutTimer=new TQTimer(this);
+ connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) );
}
m_timeoutTimer->start(20000,true);
}
-void MSNChatSession::slotUserJoined( const QString &handle, const QString &publicName, bool IRO )
+void MSNChatSession::slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO )
{
delete m_timeoutTimer;
m_timeoutTimer=0L;
if( !account()->contacts()[ handle ] )
- account()->addContact( handle, QString::null, 0L, Kopete::Account::Temporary);
+ account()->addContact( handle, TQString::null, 0L, Kopete::Account::Temporary);
MSNContact *c = static_cast<MSNContact*>( account()->contacts()[ handle ] );
@@ -229,7 +229,7 @@ void MSNChatSession::slotUserJoined( const QString &handle, const QString &publi
slotRequestPicture();
}
-void MSNChatSession::slotUserLeft( const QString &handle, const QString& reason )
+void MSNChatSession::slotUserLeft( const TQString &handle, const TQString& reason )
{
MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] );
if(c)
@@ -274,7 +274,7 @@ void MSNChatSession::slotMessageSent(Kopete::Message &message,Kopete::ChatSessio
else
{
m_messagesSent.insert( id, message );
- message.setBg(QColor()); // clear the bgColor
+ message.setBg(TQColor()); // clear the bgColor
message.setBody(message.plainBody() , Kopete::Message::PlainText ); //clear every custom tag which are not sent
appendMessage(message); // send the own msg to chat window
}
@@ -294,8 +294,8 @@ void MSNChatSession::slotMessageReceived( Kopete::Message &msg )
if( msg.plainBody().startsWith( "AutoMessage: " ) )
{
//FIXME: HardCodded color are not so good
- msg.setFg( QColor( "SlateGray3" ) );
- QFont f;
+ msg.setFg( TQColor( "SlateGray3" ) );
+ TQFont f;
f.setItalic( true );
msg.setFont( f );
}
@@ -313,18 +313,18 @@ void MSNChatSession::slotActionInviteAboutToShow()
m_actionInvite->popupMenu()->clear();
- QDictIterator<Kopete::Contact> it( account()->contacts() );
+ TQDictIterator<Kopete::Contact> it( account()->contacts() );
for( ; it.current(); ++it )
{
if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() )
{
KAction *a=new KopeteContactAction( it.current(), this,
- SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
+ TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
m_actionInvite->insert( a );
m_inviteactions.append( a ) ;
}
}
- KAction *b=new KAction( i18n ("Other..."), 0, this, SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
+ KAction *b=new KAction( i18n ("Other..."), 0, this, TQT_SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
m_actionInvite->insert( b );
m_inviteactions.append( b ) ;
}
@@ -342,7 +342,7 @@ void MSNChatSession::slotInviteContact( Kopete::Contact *contact )
inviteContact( contact->contactId() );
}
-void MSNChatSession::inviteContact(const QString &contactId)
+void MSNChatSession::inviteContact(const TQString &contactId)
{
if( m_chatService )
m_chatService->slotInviteContact( contactId );
@@ -353,9 +353,9 @@ void MSNChatSession::inviteContact(const QString &contactId)
void MSNChatSession::slotInviteOtherContact()
{
bool ok;
- QString handle = KInputDialog::getText(i18n( "MSN Plugin" ),
+ TQString handle = KInputDialog::getText(i18n( "MSN Plugin" ),
i18n( "Please enter the email address of the person you want to invite:" ),
- QString::null, &ok );
+ TQString::null, &ok );
if( !ok )
return;
@@ -378,7 +378,7 @@ void MSNChatSession::sendMessageQueue()
return;
}
// kdDebug(14140) << "MSNChatSession::sendMessageQueue: " << m_messagesQueue.count() <<endl;
- for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
+ for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
{
//m_chatService->sendMsg( *it) ;
slotMessageSent(*it , this);
@@ -386,7 +386,7 @@ void MSNChatSession::sendMessageQueue()
}
- QMap<unsigned long int, MSNInvitation*>::Iterator it;
+ TQMap<unsigned long int, MSNInvitation*>::Iterator it;
for( it = m_invitations.begin(); it != m_invitations.end() ; ++it)
{
if(! (*it)->incoming() && (*it)->state()<MSNInvitation::Invited)
@@ -408,7 +408,7 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack)
if ( !ack )
{
Kopete::Message m = m_messagesSent[ id ];
- QString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() );
+ TQString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() );
Kopete::Message msg = Kopete::Message( m.to().first(), members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
appendMessage( msg );
//stop the stupid animation
@@ -422,14 +422,14 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack)
m_messagesSent.remove( id );
}
-void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
+void MSNChatSession::slotInvitation(const TQString &handle, const TQString &msg)
{
//FIXME! a contact from another account can send a file
MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] );
if(!c)
return;
- QRegExp rx("Invitation-Cookie: ([0-9]*)");
+ TQRegExp rx("Invitation-Cookie: ([0-9]*)");
rx.search(msg);
long unsigned int cookie=rx.cap(1).toUInt();
@@ -443,7 +443,7 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
if( msg.contains(MSNFileTransferSocket::applicationID()) )
{
MSNFileTransferSocket *MFTS=new MSNFileTransferSocket(myself()->account()->accountId(),c,true,this);
- connect(MFTS, SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) ));
+ connect(MFTS, TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) ));
m_invitations.insert( cookie , MFTS);
MFTS->parseInvitation(msg);
setCanBeDeleted(false);
@@ -460,11 +460,11 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
}
else
{
- rx=QRegExp("Application-Name: ([^\\r\\n]*)");
+ rx=TQRegExp("Application-Name: ([^\\r\\n]*)");
rx.search(msg);
- QString inviteName = rx.cap( 1 );
+ TQString inviteName = rx.cap( 1 );
- QString body = i18n(
+ TQString body = i18n(
"%1 has sent an unimplemented invitation, the invitation was rejected.\n"
"The invitation was: %2" )
.arg( c->property( Kopete::Global::Properties::self()->nickName()).value().toString(), inviteName );
@@ -487,7 +487,7 @@ void MSNChatSession::invitationDone(MSNInvitation* MFTS)
setCanBeDeleted(true);
}
-void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*fileName*/,
+void MSNChatSession::sendFile(const TQString &fileLocation, const TQString &/*fileName*/,
long unsigned int fileSize)
{
// TODO create a switchboard to send the file is one is not available.
@@ -499,7 +499,7 @@ void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*file
void MSNChatSession::initInvitation(MSNInvitation* invitation)
{
- connect(invitation->object(), SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) ));
+ connect(invitation->object(), TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) ));
m_invitations.insert( invitation->cookie() , invitation);
if(m_chatService)
@@ -515,7 +515,7 @@ void MSNChatSession::initInvitation(MSNInvitation* invitation)
void MSNChatSession::slotRequestPicture()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
MSNContact *c = static_cast<MSNContact*>( mb.first() );
if(!c)
return;
@@ -539,7 +539,7 @@ void MSNChatSession::slotRequestPicture()
void MSNChatSession::slotDisplayPictureChanged()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
MSNContact *c = static_cast<MSNContact *>( mb.first() );
if ( c && m_image )
{
@@ -552,9 +552,9 @@ void MSNChatSession::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<KToolBar> it=w->toolBarIterator() ;
+ TQPtrListIterator<KToolBar> it=w->toolBarIterator() ;
KAction *imgAction=actionCollection()->action("msnDisplayPicture");
if(imgAction) while(it)
{
@@ -563,15 +563,15 @@ void MSNChatSession::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
@@ -579,7 +579,7 @@ void MSNChatSession::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, "<qt><img src=\"" + imgURL + "\"></qt>" );
+ TQToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" );
}
else
@@ -600,7 +600,7 @@ void MSNChatSession::slotDebugRawCommand()
MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L );
int result = dlg->exec();
- if( result == QDialog::Accepted && m_chatService )
+ if( result == TQDialog::Accepted && m_chatService )
{
m_chatService->sendCommand( dlg->command(), dlg->params(),
dlg->addId(), dlg->msg().replace("\n","\r\n").utf8() );
@@ -610,7 +610,7 @@ void MSNChatSession::slotDebugRawCommand()
}
-void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b )
+void MSNChatSession::receivedTypingMsg( const TQString &contactId, bool b )
{
MSNContact *c = dynamic_cast<MSNContact *>( account()->contacts()[ contactId ] );
if(c && m_newSession && !view(false))
@@ -621,7 +621,7 @@ void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b )
if ( notifyNewChat )
{
// this internal message should open the window if they not exist
- QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
+ TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
Kopete::Message tmpMsg = Kopete::Message( c, members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
appendMessage( tmpMsg );
}
@@ -637,20 +637,20 @@ void MSNChatSession::slotSendNudge()
{
m_chatService->sendNudge();
Kopete::Message msg = Kopete::Message( myself(), members() , i18n ( "has sent a nudge" ), Kopete::Message::Outbound,
- Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
+ Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction );
appendMessage( msg );
}
}
-void MSNChatSession::slotNudgeReceived(const QString& handle)
+void MSNChatSession::slotNudgeReceived(const TQString& handle)
{
Kopete::Contact *c = account()->contacts()[ handle ] ;
if(!c)
c=members().getFirst();
Kopete::Message msg = Kopete::Message(c, myself(), i18n ( "has sent you a nudge" ), Kopete::Message::Inbound,
- Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
+ Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction );
appendMessage( msg );
// Emit the nudge/buzz notification (configured by user).
emitNudgeNotification();
@@ -681,25 +681,25 @@ void MSNChatSession::slotWebcamSend()
void MSNChatSession::slotSendFile()
{
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<MSNContact *>(contacts.first())->sendFile();
}
void MSNChatSession::startChatSession()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
static_cast<MSNAccount*>( account() )->slotStartChatSession( mb.first()->contactId() );
if(!m_timeoutTimer)
{
- m_timeoutTimer=new QTimer(this);
- connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) );
+ m_timeoutTimer=new TQTimer(this);
+ connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) );
}
m_timeoutTimer->start(20000, true);
}
-void MSNChatSession::cleanMessageQueue( const QString & reason )
+void MSNChatSession::cleanMessageQueue( const TQString & reason )
{
delete m_timeoutTimer;
m_timeoutTimer=0L;
@@ -715,21 +715,21 @@ void MSNChatSession::cleanMessageQueue( const QString & reason )
else
m=m_messagesSent.begin().data();
- QString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody());
+ TQString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody());
Kopete::Message msg = Kopete::Message(m.to().first() , members() , body , Kopete::Message::Internal, Kopete::Message::PlainText);
appendMessage(msg);
}
else
{
Kopete::Message m;
- QString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason);
- for ( QMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() )
+ TQString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason);
+ for ( TQMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() )
{
m=it.data();
body+= "<li>"+m.escapedBody()+"</li>";
m_messagesSent.remove(it);
}
- for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
+ for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
{
m=(*it);
body+= "<li>"+m.escapedBody()+"</li>";
diff --git a/kopete/protocols/msn/msnchatsession.h b/kopete/protocols/msn/msnchatsession.h
index 8011574e..702fac8a 100644
--- a/kopete/protocols/msn/msnchatsession.h
+++ b/kopete/protocols/msn/msnchatsession.h
@@ -39,11 +39,11 @@ public:
MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 );
~MSNChatSession();
- void createChat( const QString &handle, const QString &address, const QString &auth, const QString &ID = QString::null );
+ void createChat( const TQString &handle, const TQString &address, const TQString &auth, const TQString &ID = TQString::null );
MSNSwitchBoardSocket *service() { return m_chatService; };
- void sendFile( const QString &fileLocation, const QString &fileName,
+ void sendFile( const TQString &fileLocation, const TQString &fileName,
long unsigned int fileSize );
/**
@@ -51,7 +51,7 @@ public:
*/
void initInvitation(MSNInvitation* invitation);
- virtual void inviteContact(const QString& );
+ virtual void inviteContact(const TQString& );
public slots:
void slotCloseSession();
@@ -65,7 +65,7 @@ public slots:
* this is a reimplementation of ChatSesstion slot.
* the original slot is not virtual, but that's not a problem because it's a slot.
*/
- virtual void receivedTypingMsg( const QString &, bool );
+ virtual void receivedTypingMsg( const TQString &, bool );
void slotConnectionTimeout();
@@ -73,12 +73,12 @@ private slots:
void slotMessageSent( Kopete::Message &message, Kopete::ChatSession *kmm );
void slotMessageReceived( Kopete::Message &message );
- void slotUserJoined( const QString &handle, const QString &publicName, bool IRO );
- void slotUserLeft( const QString &handle, const QString &reason );
+ void slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO );
+ void slotUserLeft( const TQString &handle, const TQString &reason );
void slotSwitchBoardClosed();
void slotInviteContact( Kopete::Contact *contact );
void slotAcknowledgement( unsigned int id, bool ack );
- void slotInvitation( const QString &handle, const QString &msg );
+ void slotInvitation( const TQString &handle, const TQString &msg );
void slotActionInviteAboutToShow();
@@ -94,27 +94,27 @@ private slots:
void slotWebcamSend();
void slotSendFile();
- void slotNudgeReceived(const QString& handle);
+ void slotNudgeReceived(const TQString& handle);
private:
MSNSwitchBoardSocket *m_chatService;
- QString otherString;
+ TQString otherString;
KActionMenu *m_actionInvite;
- QPtrList<KAction> m_inviteactions;
+ TQPtrList<KAction> m_inviteactions;
KAction *m_actionNudge;
KAction *m_actionWebcamReceive;
KAction *m_actionWebcamSend;
//Messages sent before the ending of the connection are queued
- QValueList<Kopete::Message> m_messagesQueue;
+ TQValueList<Kopete::Message> m_messagesQueue;
void sendMessageQueue();
- void cleanMessageQueue( const QString &reason);
+ void cleanMessageQueue( const TQString &reason);
void startChatSession();
- QMap<unsigned int, Kopete::Message> m_messagesSent;
+ TQMap<unsigned int, Kopete::Message> m_messagesSent;
- QMap<long unsigned int, MSNInvitation*> m_invitations;
+ TQMap<long unsigned int, MSNInvitation*> m_invitations;
/**
@@ -122,8 +122,8 @@ private:
*/
bool m_newSession;
- QLabel *m_image;
- QTimer *m_timeoutTimer;
+ TQLabel *m_image;
+ TQTimer *m_timeoutTimer;
uint m_connectionTry;
@@ -131,7 +131,7 @@ signals:
/*
* This signal is relayed to the protocol and after, to plugins
*/
- void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+ void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
};
#endif
diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp
index 8a490a1b..c6ef14f8 100644
--- a/kopete/protocols/msn/msncontact.cpp
+++ b/kopete/protocols/msn/msncontact.cpp
@@ -21,7 +21,7 @@
#include "msncontact.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#undef KDE_NO_COMPAT
#include <kaction.h>
@@ -35,7 +35,7 @@
#include <ktempfile.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/job.h>
#include "kopetecontactlist.h"
@@ -50,7 +50,7 @@
#include "msnnotifysocket.h"
#include "msnaccount.h"
-MSNContact::MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent )
+MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent )
: Kopete::Contact( account, id, parent )
{
m_deleted = false;
@@ -125,30 +125,30 @@ Kopete::ChatSession *MSNContact::manager( Kopete::Contact::CanCreateFlags canCre
return manager;
}
-QPtrList<KAction> *MSNContact::customContextMenuActions()
+TQPtrList<KAction> *MSNContact::customContextMenuActions()
{
- QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>;
+ TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>;
// Block/unblock Contact
- QString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
+ TQString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
if( !actionBlock )
{
- actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlockUser() ),
+ actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlockUser() ),
this, "actionBlock" );
//show profile
- actionShowProfile = new KAction( i18n("Show Profile") , 0, this, SLOT( slotShowProfile() ),
+ actionShowProfile = new KAction( i18n("Show Profile") , 0, this, TQT_SLOT( slotShowProfile() ),
this, "actionShowProfile" );
// Send mail (only available if it is an hotmail account)
- actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, SLOT( slotSendMail() ),
+ actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, TQT_SLOT( slotSendMail() ),
this, "actionSendMail" );
// Invite to receive webcam
- actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
+ actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
//Send webcam action
- actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
+ actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
}
else
actionBlock->setText( label );
@@ -178,22 +178,22 @@ void MSNContact::slotBlockUser()
if( m_blocked )
{
- notify->removeContact( contactId(), MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null );
}
else
{
if(m_allowed)
- notify->removeContact( contactId(), MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::AL, TQString::null, TQString::null );
else
- notify->addContact( contactId(), MSNProtocol::BL, QString::null, QString::null, QString::null );
+ notify->addContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
}
}
void MSNContact::slotUserInfo()
{
- KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, QString::null, KDialogBase::Close , KDialogBase::Close, false );
- QString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
- QString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
+ KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString::null, KDialogBase::Close , KDialogBase::Close, false );
+ TQString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
MSNInfo *info=new MSNInfo ( infoDialog,"info");
info->m_id->setText( contactId() );
info->m_displayName->setText(nick);
@@ -203,7 +203,7 @@ void MSNContact::slotUserInfo()
info->m_phm->setText(m_phoneMobile);
info->m_reversed->setChecked(m_reversed);
- connect( info->m_reversed, SIGNAL(toggled(bool)) , this, SLOT(slotUserInfoDialogReversedToggled()));
+ connect( info->m_reversed, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(slotUserInfoDialogReversedToggled()));
infoDialog->setMainWidget(info);
infoDialog->setCaption(nick);
@@ -213,9 +213,9 @@ void MSNContact::slotUserInfo()
void MSNContact::slotUserInfoDialogReversedToggled()
{
//workaround to make this checkboxe readonly
- const QCheckBox *cb=dynamic_cast<const QCheckBox*>(sender());
+ const TQCheckBox *cb=dynamic_cast<const TQCheckBox*>(sender());
if(cb && cb->isChecked()!=m_reversed)
- const_cast<QCheckBox*>(cb)->setChecked(m_reversed);
+ const_cast<TQCheckBox*>(cb)->setChecked(m_reversed);
}
void MSNContact::deleteContact()
@@ -228,7 +228,7 @@ void MSNContact::deleteContact()
if( hasProperty(MSNProtocol::protocol()->propGuid.key()) )
{
// Remove from all groups he belongs (if applicable)
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
kdDebug(14140) << k_funcinfo << "Removing contact from group \"" << it.key() << "\"" << endl;
notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() );
@@ -237,7 +237,7 @@ void MSNContact::deleteContact()
// Then trully remove it from server contact list,
// because only removing the contact from his groups isn't sufficent from MSNP11.
kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl;
- notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null);
+ notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString::null);
}
else
{
@@ -325,7 +325,7 @@ void MSNContact::setClientFlags( uint flags )
m_clientFlags=flags;
}
-void MSNContact::setInfo(const QString &type,const QString &data )
+void MSNContact::setInfo(const TQString &type,const TQString &data )
{
if( type == "PHH" )
{
@@ -362,12 +362,12 @@ void MSNContact::setInfo(const QString &type,const QString &data )
}
-void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> & /* addressBookData */ )
+void MSNContact::serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> & /* addressBookData */ )
{
// Contact id and display name are already set for us, only add the rest
- QString groups;
+ TQString groups;
bool firstEntry = true;
- for( QMap<QString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
if( !firstEntry )
{
@@ -377,7 +377,7 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
groups += it.key();
}
- QString lists="C";
+ TQString lists="C";
if(m_blocked)
lists +="B";
if(m_allowed)
@@ -395,14 +395,14 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
}
-QString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
+TQString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
-QString MSNContact::phoneHome(){ return m_phoneHome ;}
-QString MSNContact::phoneWork(){ return m_phoneWork ;}
-QString MSNContact::phoneMobile(){ return m_phoneMobile ;}
+TQString MSNContact::phoneHome(){ return m_phoneHome ;}
+TQString MSNContact::phoneWork(){ return m_phoneWork ;}
+TQString MSNContact::phoneMobile(){ return m_phoneMobile ;}
-const QMap<QString, Kopete::Group*> MSNContact::serverGroups() const
+const TQMap<TQString, Kopete::Group*> MSNContact::serverGroups() const
{
return m_serverGroups;
}
@@ -451,21 +451,21 @@ void MSNContact::sync( unsigned int changed )
return;
//STEP ONE : add the contact to every kopetegroups where the MC is
- QPtrList<Kopete::Group> groupList = metaContact()->groups();
+ TQPtrList<Kopete::Group> groupList = metaContact()->groups();
for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
//For each group, ensure it is on the MSN server
if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() )
{
- QString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
+ TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
// This shouln't be possible anymore 2004-06-10 -Olivier
//repair the problem
- group->setPluginData( protocol() , account()->accountId() + " id" , QString::null);
- group->setPluginData( protocol() , account()->accountId() + " displayName" , QString::null);
+ group->setPluginData( protocol() , account()->accountId() + " id" , TQString::null);
+ group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString::null);
kdWarning( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" <<Gid << " does not seems to be anymore on the server" << endl;
if(!group->displayName().isEmpty() && group->type() == Kopete::Group::Normal) //not the top-level
@@ -479,7 +479,7 @@ void MSNContact::sync( unsigned int changed )
else if( !m_serverGroups.contains(Gid) )
{
//Add the contact to the group on the server
- notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), Gid );
+ notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), Gid );
count++;
m_moving=true;
}
@@ -502,9 +502,9 @@ void MSNContact::sync( unsigned int changed )
//STEP TWO : remove the contact from groups where the MC is not, but let it at least in one group
//contact is not in that group. on the server. we will remove them dirrectly after the loop
- QValueList<QString> removinglist;
+ TQValueList<TQString> removinglist;
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
{
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) )
{ // ohoh! something is corrupted on the contactlist.xml
@@ -531,7 +531,7 @@ void MSNContact::sync( unsigned int changed )
}
}
- for(QValueList<QString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
+ for(TQValueList<TQString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
contactRemovedFromGroup(*it);
//FINAL TEST: is the contact at least in a group..
@@ -539,17 +539,17 @@ void MSNContact::sync( unsigned int changed )
// we add the contact to the group #0 (the default one)
/*if(count==0)
{
-// notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), "0");
+// notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), "0");
}*/
}
-void MSNContact::contactAddedToGroup( const QString& groupId, Kopete::Group *group )
+void MSNContact::contactAddedToGroup( const TQString& groupId, Kopete::Group *group )
{
m_serverGroups.insert( groupId, group );
m_moving=false;
}
-void MSNContact::contactRemovedFromGroup( const QString& groupId )
+void MSNContact::contactRemovedFromGroup( const TQString& groupId )
{
m_serverGroups.remove( groupId );
if(m_serverGroups.isEmpty() && !m_moving)
@@ -560,7 +560,7 @@ void MSNContact::contactRemovedFromGroup( const QString& groupId )
}
-void MSNContact::rename( const QString &newName )
+void MSNContact::rename( const TQString &newName )
{
//kdDebug( 14140 ) << k_funcinfo << "From: " << displayName() << ", to: " << newName << endl;
@@ -577,20 +577,20 @@ void MSNContact::rename( const QString &newName )
void MSNContact::slotShowProfile()
{
- KRun::runURL( KURL( QString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
+ KRun::runURL( KURL( TQString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
}
/**
* FIXME: Make this a standard KMM API call
*/
-void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, uint /*fileSize*/ )
+void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName( QString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
+ filePath = KFileDialog::getOpenFileName( TQString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
else
filePath = sourceURL.path(-1);
@@ -598,7 +598,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, ui
if ( !filePath.isEmpty() )
{
- Q_UINT32 fileSize = QFileInfo(filePath).size();
+ Q_UINT32 fileSize = TQFileInfo(filePath).size();
//Send the file
static_cast<MSNChatSession*>( manager(Kopete::Contact::CanCreate) )->sendFile( filePath, altFileName, fileSize );
@@ -614,7 +614,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status)
(status.weight()==0) ? 0 : (status.weight() -1) ,
protocol() ,
status.internalStatus()+15 ,
- status.overlayIcons() + QStringList("msn_blocked") ,
+ status.overlayIcons() + TQStringList("msn_blocked") ,
i18n("%1|Blocked").arg( status.description() ) ) );
}
else if(!isBlocked() && status.internalStatus() >= 15)
@@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ );
@@ -680,17 +680,17 @@ void MSNContact::setDisplayPicture(KTempFile *f)
delete f;
//let the time to KIO to copy the file
- connect(j, SIGNAL(result(KIO::Job *)) , this, SLOT(slotEmitDisplayPictureChanged() ));
+ connect(j, TQT_SIGNAL(result(KIO::Job *)) , this, TQT_SLOT(slotEmitDisplayPictureChanged() ));
}
void MSNContact::slotEmitDisplayPictureChanged()
{
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
-void MSNContact::setObject(const QString &obj)
+void MSNContact::setObject(const TQString &obj)
{
if(m_obj==obj && (obj.isEmpty() || hasProperty(Kopete::Global::Properties::self()->photo().key())))
return;
diff --git a/kopete/protocols/msn/msncontact.h b/kopete/protocols/msn/msncontact.h
index bcd6cc68..8b38d678 100644
--- a/kopete/protocols/msn/msncontact.h
+++ b/kopete/protocols/msn/msncontact.h
@@ -46,7 +46,7 @@ class MSNContact : public Kopete::Contact
Q_OBJECT
public:
- MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent );
+ MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent );
~MSNContact();
/**
@@ -77,12 +77,12 @@ public:
/**
* set one phone number
*/
- void setInfo(const QString &type, const QString &data);
+ void setInfo(const TQString &type, const TQString &data);
/**
* The groups in which the user is located on the server.
*/
- const QMap<QString, Kopete::Group *> serverGroups() const;
+ const TQMap<TQString, Kopete::Group *> serverGroups() const;
/**
* clear that map
*/
@@ -96,20 +96,20 @@ public:
virtual bool isReachable();
- virtual QPtrList<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
/**
* update the server group map
*/
- void contactRemovedFromGroup( const QString& groupId );
- void contactAddedToGroup(const QString& groupId, Kopete::Group *group );
+ void contactRemovedFromGroup( const TQString& groupId );
+ void contactAddedToGroup(const TQString& groupId, Kopete::Group *group );
- virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData );
/**
* Rename contact on server
*/
- virtual void rename( const QString &newName ) KDE_DEPRECATED;
+ virtual void rename( const TQString &newName ) KDE_DEPRECATED;
/**
* Returns the MSN Message Manager associated with this contact
@@ -122,19 +122,19 @@ public:
*/
void setOnlineStatus(const Kopete::OnlineStatus&);
- QString guid();
- QString phoneHome();
- QString phoneWork();
- QString phoneMobile();
+ TQString guid();
+ TQString phoneHome();
+ TQString phoneWork();
+ TQString phoneMobile();
- void setObject(const QString &obj);
- QString object() const { return m_obj; }
+ void setObject(const TQString &obj);
+ TQString object() const { return m_obj; }
public slots:
virtual void slotUserInfo();
virtual void deleteContact();
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
/**
* Every time the kopete's contactlist is modified, we sync the serverlist with it
@@ -159,7 +159,7 @@ private slots:
void slotUserInfoDialogReversedToggled();
private:
- QMap<QString, Kopete::Group *> m_serverGroups;
+ TQMap<TQString, Kopete::Group *> m_serverGroups;
bool m_blocked;
bool m_allowed;
@@ -170,9 +170,9 @@ private:
uint m_clientFlags;
- QString m_phoneHome;
- QString m_phoneWork;
- QString m_phoneMobile;
+ TQString m_phoneHome;
+ TQString m_phoneWork;
+ TQString m_phoneMobile;
KAction *actionBlock;
@@ -181,7 +181,7 @@ private:
KAction *actionWebcamReceive;
KAction *actionWebcamSend;
- QString m_obj; //the MSNObject
+ TQString m_obj; //the MSNObject
/**
* keep the current status here. (it's normally already in Kopete::Contact::d->onlineStatus)
diff --git a/kopete/protocols/msn/msndebugrawcmddlg.cpp b/kopete/protocols/msn/msndebugrawcmddlg.cpp
index 341c6808..48c4050e 100644
--- a/kopete/protocols/msn/msndebugrawcmddlg.cpp
+++ b/kopete/protocols/msn/msndebugrawcmddlg.cpp
@@ -21,18 +21,18 @@
#include "ui/msndebugrawcommand_base.h"
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include <ktextedit.h>
#include <klocale.h>
-MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( QWidget *parent )
+MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( TQWidget *parent )
: KDialogBase( parent, 0L, true,
i18n( "DEBUG: Send Raw Command - MSN Plugin" ), Ok | Cancel,
Ok, true )
{
- setInitialSize( QSize( 350, 200 ) );
+ setInitialSize( TQSize( 350, 200 ) );
m_main = new MSNDebugRawCommand_base( this );
setMainWidget( m_main );
@@ -42,12 +42,12 @@ MSNDebugRawCmdDlg::~MSNDebugRawCmdDlg()
{
}
-QString MSNDebugRawCmdDlg::command()
+TQString MSNDebugRawCmdDlg::command()
{
return m_main->m_command->text();
}
-QString MSNDebugRawCmdDlg::params()
+TQString MSNDebugRawCmdDlg::params()
{
return m_main->m_params->text();
}
@@ -62,7 +62,7 @@ bool MSNDebugRawCmdDlg::addId()
return m_main->m_addId->isChecked();
}
-QString MSNDebugRawCmdDlg::msg()
+TQString MSNDebugRawCmdDlg::msg()
{
return m_main->m_msg->text();
}
diff --git a/kopete/protocols/msn/msndebugrawcmddlg.h b/kopete/protocols/msn/msndebugrawcmddlg.h
index 3721daae..7f9741e8 100644
--- a/kopete/protocols/msn/msndebugrawcmddlg.h
+++ b/kopete/protocols/msn/msndebugrawcmddlg.h
@@ -34,14 +34,14 @@ class MSNDebugRawCmdDlg : public KDialogBase
Q_OBJECT
public:
- MSNDebugRawCmdDlg( QWidget *parent );
+ MSNDebugRawCmdDlg( TQWidget *parent );
~MSNDebugRawCmdDlg();
- QString command();
- QString params();
+ TQString command();
+ TQString params();
bool addNewline();
bool addId();
- QString msg();
+ TQString msg();
private:
MSNDebugRawCommand_base *m_main;
diff --git a/kopete/protocols/msn/msnfiletransfersocket.cpp b/kopete/protocols/msn/msnfiletransfersocket.cpp
index 54a09e4a..c07fad06 100644
--- a/kopete/protocols/msn/msnfiletransfersocket.cpp
+++ b/kopete/protocols/msn/msnfiletransfersocket.cpp
@@ -21,7 +21,7 @@
#include <math.h>
//qt
-#include <qtimer.h>
+#include <tqtimer.h>
// kde
#include <kdebug.h>
@@ -40,7 +40,7 @@
using namespace KNetwork;
-MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Contact *c,bool incoming, QObject* parent)
+MSNFileTransferSocket::MSNFileTransferSocket(const TQString &handle, Kopete::Contact *c,bool incoming, TQObject* parent)
: MSNSocket(parent) , MSNInvitation(incoming, MSNFileTransferSocket::applicationID() , i18n("File Transfer - MSN Plugin"))
{
m_handle=handle;
@@ -50,8 +50,8 @@ MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Cont
m_contact=c;
ready=true;
- QObject::connect( this, SIGNAL( socketClosed() ), this, SLOT( slotSocketClosed() ) );
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ), this, SLOT(slotReadBlock( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( socketClosed() ), this, TQT_SLOT( slotSocketClosed() ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ), this, TQT_SLOT(slotReadBlock( const TQByteArray & ) ) );
}
MSNFileTransferSocket::~MSNFileTransferSocket()
@@ -61,7 +61,7 @@ MSNFileTransferSocket::~MSNFileTransferSocket()
kdDebug(14140) << "MSNFileTransferSocket::~MSNFileTransferSocket" <<endl;
}
-void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QString & data)
+void MSNFileTransferSocket::parseCommand(const TQString & cmd, uint id, const TQString & data)
{
if( cmd == "VER" )
{
@@ -83,7 +83,7 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt
m_size=id; //data.toUInt(); //BUG: the size is take as id bye MSNSocket because it is a number
m_downsize=0;
- m_file=new QFile(m_fileName);
+ m_file=new TQFile(m_fileName);
if( m_file->open( IO_WriteOnly ))
sendCommand( "TFR" ,NULL,false);
@@ -106,13 +106,13 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt
disconnect();
}
else
- sendCommand("FIL" , QString::number(size()) , false);
+ sendCommand("FIL" , TQString::number(size()) , false);
}
else if( cmd == "TFR" )
{
m_downsize=0;
ready=true;
- QTimer::singleShot( 0, this, SLOT(slotSendFile()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotSendFile()) );
}
else if( cmd == "CCL" )
{
@@ -131,12 +131,12 @@ void MSNFileTransferSocket::doneConnect()
MSNSocket::doneConnect();
}
-void MSNFileTransferSocket::bytesReceived(const QByteArray & head)
+void MSNFileTransferSocket::bytesReceived(const TQByteArray & head)
{
if(head[0]!='\0')
{
kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: transfer aborted" <<endl;
- QTimer::singleShot(0,this,SLOT(disconnect()));
+ TQTimer::singleShot(0,this,TQT_SLOT(disconnect()));
}
unsigned int sz=(int)((unsigned char)head.data()[2])*256+(int)((unsigned char)head.data()[1]);
// kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: " << sz <<endl;
@@ -162,7 +162,7 @@ void MSNFileTransferSocket::slotSocketClosed()
emit done(this);
}
-void MSNFileTransferSocket::slotReadBlock(const QByteArray &block)
+void MSNFileTransferSocket::slotReadBlock(const TQByteArray &block)
{
m_file->writeBlock( block.data(), block.size() ); // write to file
@@ -175,7 +175,7 @@ void MSNFileTransferSocket::slotReadBlock(const QByteArray &block)
//the transfer seems to be finished.
sendCommand( "BYE" ,"16777989",false);
// if we are not already disconected in 30 seconds, do it.
- QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+ TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) );
}
}
@@ -185,8 +185,8 @@ void MSNFileTransferSocket::setKopeteTransfer(Kopete::Transfer *kt)
m_kopeteTransfer=kt;
if(kt)
{
- QObject::connect(kt , SIGNAL(transferCanceled()), this, SLOT(abort()));
- QObject::connect(kt, SIGNAL(destroyed()) , this , SLOT(slotKopeteTransferDestroyed()));
+ TQObject::connect(kt , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
+ TQObject::connect(kt, TQT_SIGNAL(destroyed()) , this , TQT_SLOT(slotKopeteTransferDestroyed()));
}
}
@@ -194,13 +194,13 @@ void MSNFileTransferSocket::listen(int port)
{
m_server = new KServerSocket();
- QObject::connect( m_server, SIGNAL(readyAccept()), this, SLOT(slotAcceptConnection()));
- m_server->setAddress(QString::number(port));
+ TQObject::connect( m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAcceptConnection()));
+ m_server->setAddress(TQString::number(port));
kdDebug(14140) << "MSNFileTransferSocket::listen: about to listen"<<endl;
bool listenResult = m_server->listen(1);
kdDebug(14140) << "MSNFileTransferSocket::listen: result: "<< listenResult <<endl;
- QTimer::singleShot( 60000, this, SLOT(slotTimer()) );
+ TQTimer::singleShot( 60000, this, TQT_SLOT(slotTimer()) );
kdDebug(14140) << "MSNFileTransferSocket::listen done" <<endl;
}
@@ -240,7 +240,7 @@ void MSNFileTransferSocket::abort()
}
else
{
- QByteArray bytes(3);
+ TQByteArray bytes(3);
bytes[0]='\1';
bytes[1]='\0';
bytes[2]='\0';
@@ -249,11 +249,11 @@ void MSNFileTransferSocket::abort()
}
//the timer wait one second, the time to send the CCL or the binary header
//retarding the disconnection keep away from a crash. (in KIO::Job::emitResult when `delete this`)
- QTimer::singleShot( 1000, this, SLOT(disconnect()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(disconnect()) );
ready=false;
}
-void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSize )
+void MSNFileTransferSocket::setFile( const TQString &fn, long unsigned int fileSize )
{
m_fileName=fn;
if(!m_incoming)
@@ -263,7 +263,7 @@ void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSi
kdDebug(14140) << "MSNFileTransferSocket::setFileName: WARNING m_file already exists" << endl;
delete m_file;
}
- m_file = new QFile( fn );
+ m_file = new TQFile( fn );
if(!m_file->open(IO_ReadOnly))
{
//FIXME: abort transfer here
@@ -286,7 +286,7 @@ void MSNFileTransferSocket::slotSendFile()
{
//the transfer seems to be finished.
// if we are not already disconected in 30 seconds, do it.
- QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+ TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) );
return;
}
@@ -295,7 +295,7 @@ void MSNFileTransferSocket::slotSendFile()
char data[2046];
int bytesRead = m_file->readBlock( data, 2045 );
- QByteArray block(bytesRead+3);
+ TQByteArray block(bytesRead+3);
// char i1= (char)fmod( bytesRead, 256 ) ;
// char i2= (char)floor( bytesRead / 256 ) ;
// kdDebug(14140) << "MSNFileTransferSocket::slotSendFile: " << (int)i1 <<" + 256* "<< (int)i2 <<" = " << bytesRead <<endl;
@@ -317,7 +317,7 @@ void MSNFileTransferSocket::slotSendFile()
}
ready=false;
- QTimer::singleShot( 10, this, SLOT(slotSendFile()) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(slotSendFile()) );
}
void MSNFileTransferSocket::slotReadyWrite()
@@ -326,50 +326,50 @@ void MSNFileTransferSocket::slotReadyWrite()
MSNSocket::slotReadyWrite();
}
-QString MSNFileTransferSocket::invitationHead()
+TQString MSNFileTransferSocket::invitationHead()
{
- QTimer::singleShot( 10 * 60000, this, SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer
+ TQTimer::singleShot( 10 * 60000, this, TQT_SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer
- return QString( MSNInvitation::invitationHead()+
+ return TQString( MSNInvitation::invitationHead()+
"Application-File: "+ m_fileName.right( m_fileName.length() - m_fileName.findRev( '/' ) - 1 ) +"\r\n"
- "Application-FileSize: "+ QString::number(size()) +"\r\n\r\n").utf8();
+ "Application-FileSize: "+ TQString::number(size()) +"\r\n\r\n").utf8();
}
-void MSNFileTransferSocket::parseInvitation(const QString& msg)
+void MSNFileTransferSocket::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") )
{
- rx=QRegExp("Application-File: ([^\\r\\n]*)");
+ rx=TQRegExp("Application-File: ([^\\r\\n]*)");
rx.search(msg);
- QString filename = rx.cap(1);
- rx=QRegExp("Application-FileSize: ([0-9]*)");
+ TQString filename = rx.cap(1);
+ rx=TQRegExp("Application-FileSize: ([0-9]*)");
rx.search(msg);
unsigned long int filesize= rx.cap(1).toUInt();
MSNInvitation::parseInvitation(msg); //for the cookie
- Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, QString::null, QString::number( cookie() ) );
+ Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, TQString::null, TQString::number( cookie() ) );
- QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ),this, SLOT( slotFileTransferAccepted( Kopete::Transfer *, const QString& ) ) );
- QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) );
+ TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ),this, TQT_SLOT( slotFileTransferAccepted( Kopete::Transfer *, const TQString& ) ) );
+ TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, TQT_SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) );
}
else if( msg.contains("Invitation-Command: ACCEPT") )
{
if(incoming())
{
- rx=QRegExp("IP-Address: ([0-9\\.]*)");
+ rx=TQRegExp("IP-Address: ([0-9\\.]*)");
rx.search(msg);
- QString ip_address = rx.cap(1);
- rx=QRegExp("AuthCookie: ([0-9]*)");
+ TQString ip_address = rx.cap(1);
+ rx=TQRegExp("AuthCookie: ([0-9]*)");
rx.search(msg);
- QString authcook = rx.cap(1);
- rx=QRegExp("Port: ([0-9]*)");
+ TQString authcook = rx.cap(1);
+ rx=TQRegExp("Port: ([0-9]*)");
rx.search(msg);
- QString port = rx.cap(1);
+ TQString port = rx.cap(1);
setAuthCookie(authcook);
connect(ip_address, port.toUInt());
@@ -377,7 +377,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
else
{
unsigned long int auth = (rand()%(999999))+1;
- setAuthCookie(QString::number(auth));
+ setAuthCookie(TQString::number(auth));
setKopeteTransfer(Kopete::TransferManager::transferManager()->addTransfer(m_contact, fileName(), size(), m_contact->metaContact() ? m_contact->metaContact()->displayName() : m_contact->contactId() , Kopete::FileTransferInfo::Outgoing));
@@ -387,15 +387,15 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
MSNNotifySocket *notify=static_cast<MSNAccount*>(manager->account())->notifySocket();
if(notify){
- 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"
"IP-Address: " + notify->localIP() + "\r\n"
"Port: 6891\r\n"
- "AuthCookie: "+QString::number(auth)+"\r\n"
+ "AuthCookie: "+TQString::number(auth)+"\r\n"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n\r\n").utf8();
@@ -416,7 +416,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
}
}
-void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const QString& fileName)
+void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const TQString& fileName)
{
if(trans->info().internalId().toULong() != cookie())
return;
@@ -432,17 +432,17 @@ void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, co
{
setFile(fileName);
- 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"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n" ).utf8();
manager->service()->sendCommand( "MSG" , "N", true, message );
- QTimer::singleShot( 3 * 60000, this, SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this
+ TQTimer::singleShot( 3 * 60000, this, TQT_SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this
}
else
{
diff --git a/kopete/protocols/msn/msnfiletransfersocket.h b/kopete/protocols/msn/msnfiletransfersocket.h
index 82ae0662..bf4a07a7 100644
--- a/kopete/protocols/msn/msnfiletransfersocket.h
+++ b/kopete/protocols/msn/msnfiletransfersocket.h
@@ -18,7 +18,7 @@
#ifndef MSNFILETRANSFERSOCKET_H
#define MSNFILETRANSFERSOCKET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "msnsocket.h"
#include "msninvitation.h"
@@ -42,24 +42,24 @@ class MSNFileTransferSocket : public MSNSocket , public MSNInvitation
Q_OBJECT
public:
- MSNFileTransferSocket(const QString &myID,Kopete::Contact* c, bool incoming, QObject* parent = 0L );
+ MSNFileTransferSocket(const TQString &myID,Kopete::Contact* c, bool incoming, TQObject* parent = 0L );
~MSNFileTransferSocket();
- static QString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; }
- QString invitationHead();
+ static TQString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; }
+ TQString invitationHead();
void setKopeteTransfer( Kopete::Transfer *kt );
Kopete::Transfer* kopeteTransfer() { return m_kopeteTransfer; }
- void setFile( const QString &fn, long unsigned int fileSize = 0L );
- void setAuthCookie( const QString &c ) { m_authcook = c; }
- QString fileName() { return m_fileName;}
+ void setFile( const TQString &fn, long unsigned int fileSize = 0L );
+ void setAuthCookie( const TQString &c ) { m_authcook = c; }
+ TQString fileName() { return m_fileName;}
long unsigned int size() { return m_size;}
void listen( int port );
- virtual void parseInvitation(const QString& invitation);
+ virtual void parseInvitation(const TQString& invitation);
- virtual QObject* object() { return this; }
+ virtual TQObject* object() { return this; }
public slots:
void abort();
@@ -78,35 +78,35 @@ protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand(const QString & cmd, uint id, const QString & data);
- virtual void bytesReceived(const QByteArray & data);
+ virtual void parseCommand(const TQString & cmd, uint id, const TQString & data);
+ virtual void bytesReceived(const TQByteArray & data);
protected slots:
virtual void slotReadyWrite();
private slots:
void slotSocketClosed();
- void slotReadBlock(const QByteArray &);
+ void slotReadBlock(const TQByteArray &);
void slotAcceptConnection();
void slotTimer();
void slotSendFile();
void slotFileTransferRefused( const Kopete::FileTransferInfo &info );
- void slotFileTransferAccepted( Kopete::Transfer *trans, const QString& fileName );
+ void slotFileTransferAccepted( Kopete::Transfer *trans, const TQString& fileName );
/* the Kopete::Transfer has been deleted */
void slotKopeteTransferDestroyed();
private:
- QString m_handle;
+ TQString m_handle;
Kopete::Contact *m_contact;
long unsigned int m_size;
long unsigned int m_downsize;
- QString m_authcook;
- QString m_fileName;
+ TQString m_authcook;
+ TQString m_fileName;
Kopete::Transfer* m_kopeteTransfer;
- QFile *m_file ;
+ TQFile *m_file ;
KNetwork::KServerSocket *m_server;
bool ready;
diff --git a/kopete/protocols/msn/msninvitation.cpp b/kopete/protocols/msn/msninvitation.cpp
index ddc8136a..8a64aa93 100644
--- a/kopete/protocols/msn/msninvitation.cpp
+++ b/kopete/protocols/msn/msninvitation.cpp
@@ -16,9 +16,9 @@
*/
#include "msninvitation.h"
#include <stdlib.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-MSNInvitation::MSNInvitation(bool incoming, const QString &applicationID , const QString &applicationName)
+MSNInvitation::MSNInvitation(bool incoming, const TQString &applicationID , const TQString &applicationName)
{
m_incoming=incoming;
m_applicationId=applicationID;
@@ -32,57 +32,57 @@ MSNInvitation::~MSNInvitation()
{
}
-QCString MSNInvitation::unimplemented(long unsigned int cookie)
+TQCString MSNInvitation::unimplemented(long unsigned int cookie)
{
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: CANCEL\r\n"
"Cancel-Code: REJECT_NOT_INSTALLED\r\n"
- "Invitation-Cookie: " + QString::number(cookie) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie) + "\r\n"
"Session-ID: {120019D9-C3F5-4F94-978D-CB33534C3309}\r\n\r\n").utf8();
//FIXME: i don't know at all what Seession-ID is
}
-QString MSNInvitation::invitationHead()
+TQString MSNInvitation::invitationHead()
{
setState(Invited);
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Application-Name: " + m_applicationName + "\r\n"
"Application-GUID: {" + m_applicationId + "}\r\n"
"Invitation-Command: INVITE\r\n"
- "Invitation-Cookie: " +QString::number(m_cookie) +"\r\n");
+ "Invitation-Cookie: " +TQString::number(m_cookie) +"\r\n");
}
-QCString MSNInvitation::rejectMessage(const QString & rejectcode)
+TQCString MSNInvitation::rejectMessage(const TQString & rejectcode)
{
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: CANCEL\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"Cancel-Code: "+ rejectcode +"\r\n").utf8();
}
-void MSNInvitation::parseInvitation(const QString& msg)
+void MSNInvitation::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(command=="INVITE")
{
- rx=QRegExp("Invitation-Cookie: ([0-9]*)");
+ rx=TQRegExp("Invitation-Cookie: ([0-9]*)");
rx.search(msg);
m_cookie=rx.cap(1).toUInt();
}
else if(command=="CANCEL")
{
- /*rx=QRegExp("Cancel-Code: ([0-9]*)");
+ /*rx=TQRegExp("Cancel-Code: ([0-9]*)");
rx.search(msg);
- QString code=rx.cap(1).toUInt();
+ TQString code=rx.cap(1).toUInt();
//TODO: parse the code*/
}
// else if(command=="ACCEPT")
diff --git a/kopete/protocols/msn/msninvitation.h b/kopete/protocols/msn/msninvitation.h
index 90010dc3..d8b48116 100644
--- a/kopete/protocols/msn/msninvitation.h
+++ b/kopete/protocols/msn/msninvitation.h
@@ -17,7 +17,7 @@
#ifndef MSNINVITATION_H
#define MSNINVITATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kopete_export.h"
@@ -27,7 +27,7 @@ class QObject;
* @author Olivier Goffart
*
* The invitation is the base class which handle an MSN invitation.
- * The implemented class must to herits from QObject too.
+ * The implemented class must to herits from TQObject too.
* You can accept the invitation by catching @ref MSNProtocol::invitation() signals
* or create one and insert it to a kmm with @ref MSNChatSession::initInvitation()
* you can add action with @ref Kopete::Plugin::customChatActions()
@@ -41,14 +41,14 @@ public:
* @param applicationID is the exadecimal id of the invitation
* @param applicationName is a i18n'ed string of the name of the application
*/
- MSNInvitation(bool incoming,const QString &applicationID , const QString &applicationName);
+ MSNInvitation(bool incoming,const TQString &applicationID , const TQString &applicationName);
virtual ~MSNInvitation();
/**
* @internal
* it is a reject invitation because the invitation is not implemented
*/
- static QCString unimplemented(long unsigned int cookie);
+ static TQCString unimplemented(long unsigned int cookie);
/**
* you can set manualy the cookie. note that a cookie is automatically generated when a new
@@ -71,24 +71,24 @@ public:
* the default implementation return the common begin.
* You can also set the state to Invited (the default implementation do that)
*/
- virtual QString invitationHead();
+ virtual TQString invitationHead();
/**
* This is the reject invitation string
* @param rejectcode is the code, it can be "REJECT" or "TIMEOUT"
*/
- QCString rejectMessage(const QString & rejectcode = "REJECT");
+ TQCString rejectMessage(const TQString & rejectcode = "REJECT");
/**
* reimplement this method. it is called when an invitation message with the invitation's cookie is received
* the default implementation parse the cookie, or the reject message
*/
- virtual void parseInvitation(const QString& invitation);
+ virtual void parseInvitation(const TQString& invitation);
/**
* return the qobject (this)
*/
- virtual QObject* object()=0;
+ virtual TQObject* object()=0;
//signals:
/**
* reimplement this as a signal, and emit it when the invitation has to be destroyed.
@@ -116,8 +116,8 @@ public:
protected:
bool m_incoming;
long unsigned int m_cookie;
- QString m_applicationId;
- QString m_applicationName;
+ TQString m_applicationId;
+ TQString m_applicationName;
State m_state;
diff --git a/kopete/protocols/msn/msnnotifysocket.cpp b/kopete/protocols/msn/msnnotifysocket.cpp
index e31e0257..3b3fc531 100644
--- a/kopete/protocols/msn/msnnotifysocket.cpp
+++ b/kopete/protocols/msn/msnnotifysocket.cpp
@@ -28,9 +28,9 @@
#include "msnsecureloginhandler.h"
#include "msnchallengehandler.h"
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -41,7 +41,7 @@
#include <ktempfile.h>
#include <krun.h>
#include <kio/job.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <knotification.h>
@@ -51,7 +51,7 @@
#include <ctime>
-MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/, const QString &password )
+MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const TQString& /*msnId*/, const TQString &password )
: MSNSocket( account )
{
m_newstatus = MSNProtocol::protocol()->NLN;
@@ -64,8 +64,8 @@ MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/,
m_account = account;
m_password=password;
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ),
- this, SLOT( slotReadMessage( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ),
+ this, TQT_SLOT( slotReadMessage( const TQByteArray & ) ) );
m_keepaliveTimer = 0L;
m_isLogged = false;
}
@@ -91,7 +91,7 @@ void MSNNotifySocket::disconnect()
if( m_disconnectReason==Kopete::Account::Unknown )
m_disconnectReason=Kopete::Account::Manual;
if( onlineStatus() == Connected )
- sendCommand( "OUT", QString::null, false );
+ sendCommand( "OUT", TQString::null, false );
if( m_keepaliveTimer )
m_keepaliveTimer->stop();
@@ -107,11 +107,11 @@ void MSNNotifySocket::handleError( uint code, uint id )
{
kdDebug(14140) << k_funcinfo << endl;
- QString handle;
+ TQString handle;
if(m_tmpHandles.contains(id))
handle=m_tmpHandles[id];
- QString msg;
+ TQString msg;
MSNSocket::ErrorType type;
// See http://www.hypothetic.org/docs/msn/basics.php for a
// description of all possible error codes.
@@ -148,7 +148,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
}
/*else
{
- QString msg = i18n( "You are trying to change the display name of a user who has not "
+ TQString msg = i18n( "You are trying to change the display name of a user who has not "
"confirmed his or her email address;\n"
"the contact was not renamed on the server." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error, msg, i18n( "MSN Plugin" ) );
@@ -218,7 +218,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
{
/*
//if(handlev==m_account->accountId())
- QString msg = i18n( "Your email address has not been verified with the MSN server.\n"
+ TQString msg = i18n( "Your email address has not been verified with the MSN server.\n"
"You should have received a mail with a link to confirm your email address.\n"
"Some functions will be restricted if you do not confirm your email address." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) );//TODO don't show again
@@ -230,7 +230,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
//This happen when too much commends are sent to the server.
//the command will not be executed, too bad.
// ignore it for now, as we don't really know what command it was.
- /* QString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n"
+ /* TQString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n"
"This might happen if you added yourself to your own contact list." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) );
//FIXME: try to fix this problem*/
@@ -262,7 +262,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
emit errorMessage( type, msg );
}
-void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &data )
+void MSNNotifySocket::parseCommand( const TQString &cmd, uint id, const TQString &data )
{
//kdDebug(14140) << "MSNNotifySocket::parseCommand: Command: " << cmd << endl;
@@ -288,9 +288,9 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
m_secureLoginHandler = new MSNSecureLoginHandler(m_account->accountId(), m_password, data.section( ' ' , 2 , 2 ));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginFailed()), this, SLOT(sslLoginFailed()));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginBadPassword()), this, SLOT(sslLoginIncorrect()));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginSuccesful(QString )), this, SLOT(sslLoginSucceeded(QString )));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginFailed()), this, TQT_SLOT(sslLoginFailed()));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginBadPassword()), this, TQT_SLOT(sslLoginIncorrect()));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginSuccesful(TQString )), this, TQT_SLOT(sslLoginSucceeded(TQString )));
m_secureLoginHandler->login();
}
@@ -300,7 +300,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
m_disconnectReason=Kopete::Account::Unknown;
// Synchronize with the server.
- QString lastSyncTime, lastChange;
+ TQString lastSyncTime, lastChange;
if(m_account->contacts().count() > 1)
{
@@ -331,10 +331,10 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
// LST N=passport@hotmail.com F=Display%20Name C=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 13 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// But can be
// LST N=passport@hotmail.com 10
- QString publicName, contactGuid, groups;
+ TQString publicName, contactGuid, groups;
uint lists;
- QRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
+ TQRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
regex.search(data);
// Capture passport email.
@@ -368,12 +368,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
MSNContact *c = static_cast<MSNContact*>( m_account->contacts()[ data.section( ' ', 1, 1 ) ] );
if( c && c->contactId() != m_account->accountId() )
{
- QString publicName=unescape( data.section( ' ', 2, 2 ) );
+ TQString publicName=unescape( data.section( ' ', 2, 2 ) );
if ( (publicName!=c->contactId() || c->hasProperty(Kopete::Global::Properties::self()->nickName().key()) ) &&
publicName!=c->property( Kopete::Global::Properties::self()->nickName()).value().toString() )
changePublicName(publicName,c->contactId());
- QString obj=unescape(data.section( ' ', 4, 4 ));
+ TQString obj=unescape(data.section( ' ', 4, 4 ));
c->setObject( obj );
c->setOnlineStatus( convertOnlineStatus( data.section( ' ', 0, 0 ) ) );
c->setClientFlags(data.section( ' ', 3, 3 ).toUInt());
@@ -391,7 +391,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
// UUX is sended to acknowledge that the server has received and processed the personal Message.
// if the result is 0, set the myself() contact personalMessage.
- if( data.section(' ', 0, 0) == QString::fromUtf8("0") )
+ if( data.section(' ', 0, 0) == TQString::fromUtf8("0") )
m_account->myself()->setProperty(MSNProtocol::protocol()->propPersonalMessage, m_propertyPersonalMessage);
}
else if( cmd == "FLN" )
@@ -405,7 +405,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "XFR" )
{
- QString stype=data.section( ' ', 0, 0 );
+ TQString stype=data.section( ' ', 0, 0 );
if( stype=="SB" ) //switchboard connection (chat)
{
// Address, AuthInfo
@@ -413,8 +413,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( stype=="NS" ) //notifysocket ; Got our notification server
{ //we are connecting and we receive the initial NS, or the msn server encounter a problem, and we are switching to another switchboard
- QString host = data.section( ' ', 1, 1 );
- QString server = host.section( ':', 0, 0 );
+ TQString host = data.section( ' ', 1, 1 );
+ TQString server = host.section( ':', 0, 0 );
uint port = host.section( ':', 1, 1 ).toUInt();
setOnlineStatus( Connected );
emit receivedNotificationServer( server, port );
@@ -425,12 +425,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
else if( cmd == "RNG" )
{
// SessionID, Address, AuthInfo, handle, publicName
- emit invitedToChat( QString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ),
+ emit invitedToChat( TQString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ),
data.section( ' ', 3, 3 ), unescape( data.section( ' ', 4, 4 ) ) );
}
else if( cmd == "ADC" )
{
- QString msnId, list, publicName, contactGuid, groupGuid;
+ TQString msnId, list, publicName, contactGuid, groupGuid;
// Retrieve the list parameter (FL/AL/BL/RL)
list = data.section( ' ', 0, 0 );
@@ -441,7 +441,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
// ADC TrID RL N=example@passport.com F=friednly%20name
// ADC TrID FL N=ex@pas.com F=My%20Name C=contactGuid
// Thanks Gregg for that complex RegExp.
- QRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
+ TQRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
regex.search( data.section( ' ', 1 ) );
// Capture passport email.
@@ -460,7 +460,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "REM" ) // someone is removed from a list
{
- QString handle, list, contactGuid, groupGuid;
+ TQString handle, list, contactGuid, groupGuid;
list = data.section( ' ', 0, 0 );
if( list == "FL" )
{
@@ -495,13 +495,13 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "CHG" )
{
- QString status = data.section( ' ', 0, 0 );
+ TQString status = data.section( ' ', 0, 0 );
setOnlineStatus( Connected );
emit statusChanged( convertOnlineStatus( status ) );
}
else if( cmd == "SBP" )
{
- QString contactGuid, type, publicName;
+ TQString contactGuid, type, publicName;
contactGuid = data.section( ' ', 0, 0 );
type = data.section( ' ', 1, 1 );
if(type == "MFN" )
@@ -540,7 +540,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
m_challengeHandler = new MSNChallengeHandler("CFHUR$52U_{VIX5T", "PROD0101{0RM?UBW");
// Compute the challenge response hash, and send the response.
- QString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0));
+ TQString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0));
sendCommand("QRY", m_challengeHandler->productId(), true, chlResponse.utf8());
// Dispose of the challenge handler.
m_challengeHandler->deleteLater();
@@ -549,8 +549,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
else if( cmd == "SYN" )
{
// Retrieve the last synchronization timestamp known to the server.
- QString lastSyncTime = data.section( ' ', 1, 1 );
- QString lastChange = data.section( ' ', 0, 0 );
+ TQString lastSyncTime = data.section( ' ', 1, 1 );
+ TQString lastChange = data.section( ' ', 0, 0 );
if( lastSyncTime != m_account->configGroup()->readEntry("lastsynctime") ||
lastChange != m_account->configGroup()->readEntry("lastchange") )
{
@@ -576,8 +576,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
MSNContact *c = static_cast<MSNContact*>( m_account->myself() );
if( c )
{
- QString type = data.section( ' ', 0, 0 );
- QString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY????????
+ TQString type = data.section( ' ', 0, 0 );
+ TQString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY????????
c->setInfo( type, prpData );
m_account->configGroup()->writeEntry( type, prpData );
}
@@ -610,21 +610,21 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
// URL 6 /cgi-bin/HoTMaiL https://loginnet.passport.com/ppsecure/md5auth.srf?lc=1033 2
//example of reply: URL 10 /cgi-bin/HoTMaiL https://msnialogin.passport.com/ppsecure/md5auth.srf?lc=1036 3
- QString from_action_url = data.section( ' ', 1, 1 );
- QString rru = data.section( ' ', 0, 0 );
- QString id = data.section( ' ', 2, 2 );
+ TQString from_action_url = data.section( ' ', 1, 1 );
+ TQString rru = data.section( ' ', 0, 0 );
+ TQString id = data.section( ' ', 2, 2 );
//write the tmp file
- QString UserID=m_account->accountId();
+ TQString UserID=m_account->accountId();
time_t actualTime;
time(&actualTime);
- QString sl = QString::number( ( unsigned long ) actualTime - m_loginTime.toULong() );
+ TQString sl = TQString::number( ( unsigned long ) actualTime - m_loginTime.toULong() );
- QString md5this( m_MSPAuth + sl + m_password );
+ TQString md5this( m_MSPAuth + sl + m_password );
KMD5 md5( md5this.utf8() );
- QString hotmailRequest = "<html>\n"
+ TQString hotmailRequest = "<html>\n"
"<head>\n"
"<noscript>\n"
"<meta http-equiv=Refresh content=\"0; url=http://www.hotmail.com\">\n"
@@ -641,7 +641,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
"<input type=\"hidden\" name=\"sl\" value=\"" + sl +"\">\n"
"<input type=\"hidden\" name=\"rru\" value=\"" + rru + "\">\n"
"<input type=\"hidden\" name=\"auth\" value=\"" + m_MSPAuth + "\">\n"
- "<input type=\"hidden\" name=\"creds\" value=\"" + QString::fromLatin1( md5.hexDigest() ) + "\">\n"
+ "<input type=\"hidden\" name=\"creds\" value=\"" + TQString::fromLatin1( md5.hexDigest() ) + "\">\n"
"<input type=\"hidden\" name=\"svc\" value=\"mail\">\n"
"<input type=\"hidden\" name=\"js\" value=\"yes\">\n"
"</form></body>\n</html>\n";
@@ -679,7 +679,7 @@ void MSNNotifySocket::sslLoginIncorrect()
disconnect();
}
-void MSNNotifySocket::sslLoginSucceeded(QString ticket)
+void MSNNotifySocket::sslLoginSucceeded(TQString ticket)
{
sendCommand("USR" , "TWN S " + ticket);
@@ -706,9 +706,9 @@ void MSNNotifySocket::slotOpenInbox()
sendCommand("URL", "INBOX" );
}
-void MSNNotifySocket::sendMail(const QString &email)
+void MSNNotifySocket::sendMail(const TQString &email)
{
- sendCommand("URL", QString("COMPOSE " + email).utf8() );
+ sendCommand("URL", TQString("COMPOSE " + email).utf8() );
}
bool MSNNotifySocket::setUseHttpMethod(bool useHttp)
@@ -723,17 +723,17 @@ bool MSNNotifySocket::setUseHttpMethod(bool useHttp)
}
else {
if( !m_keepaliveTimer ) {
- m_keepaliveTimer = new QTimer( this, "m_keepaliveTimer" );
- QObject::connect( m_keepaliveTimer, SIGNAL( timeout() ), SLOT( slotSendKeepAlive() ) );
+ m_keepaliveTimer = new TQTimer( this, "m_keepaliveTimer" );
+ TQObject::connect( m_keepaliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSendKeepAlive() ) );
}
}
return ret;
}
-void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
+void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
{
- QString msg = QString::fromUtf8(bytes, bytes.size());
+ TQString msg = TQString::fromUtf8(bytes, bytes.size());
if(msg.contains("text/x-msmsgsinitialmdatanotification"))
{
@@ -744,7 +744,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// IU - initial unread
// O - other mail
// OU - other unread.
- QRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>");
+ TQRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>");
regex.search(msg);
bool unread;
@@ -753,56 +753,56 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
if(unread && mailCount > 0)
{
// If there are new email message available, raise the unread email event.
- QObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.",
+ TQObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.",
"You have %n unread messages in your MSN inbox.", mailCount ), 0 , 0 , i18n( "Open Inbox..." ) ),
- SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
+ TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
}
else if(msg.contains("text/x-msmsgsactivemailnotification"))
{
//this sends the server if mails are deleted
- QString m = msg.right(msg.length() - msg.find("Message-Delta:") );
+ TQString m = msg.right(msg.length() - msg.find("Message-Delta:") );
m = m.left(msg.find("\r\n"));
mailCount = mailCount - m.right(m.length() -m.find(" ")-1).toUInt();
}
else if(msg.contains("text/x-msmsgsemailnotification"))
{
//this sends the server if a new mail has arrived
- QRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)");
+ TQRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)");
rx.search(msg);
- QString m=rx.cap(1);
+ TQString m=rx.cap(1);
mailCount++;
//TODO: it is also possible to get the subject (but warning about the encoding)
- QObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m),
+ TQObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m),
0 , 0 , i18n( "Open Inbox..." ) ),
- SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
+ TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
else if(msg.contains("text/x-msmsgsprofile"))
{
//Hotmail profile
if(msg.contains("MSPAuth:"))
{
- QRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)");
+ TQRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)");
rx.search(msg);
m_MSPAuth=rx.cap(1);
}
if(msg.contains("sid:"))
{
- QRegExp rx("sid: ([0-9]*)");
+ TQRegExp rx("sid: ([0-9]*)");
rx.search(msg);
m_sid=rx.cap(1);
}
if(msg.contains("kv:"))
{
- QRegExp rx("kv: ([0-9]*)");
+ TQRegExp rx("kv: ([0-9]*)");
rx.search(msg);
m_kv=rx.cap(1);
}
if(msg.contains("LoginTime:"))
{
- QRegExp rx("LoginTime: ([0-9]*)");
+ TQRegExp rx("LoginTime: ([0-9]*)");
rx.search(msg);
m_loginTime=rx.cap(1);
}
@@ -810,18 +810,18 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
{
time_t actualTime;
time(&actualTime);
- m_loginTime=QString::number((unsigned long)actualTime);
+ m_loginTime=TQString::number((unsigned long)actualTime);
}
if(msg.contains("EmailEnabled:"))
{
- QRegExp rx("EmailEnabled: ([0-9]*)");
+ TQRegExp rx("EmailEnabled: ([0-9]*)");
rx.search(msg);
m_isHotmailAccount = (rx.cap(1).toUInt() == 1);
emit hotmailSeted(m_isHotmailAccount);
}
if(msg.contains("ClientIP:"))
{
- QRegExp rx("ClientIP: ([0-9.]*)");
+ TQRegExp rx("ClientIP: ([0-9.]*)");
rx.search(msg);
m_localIP = rx.cap(1);
}
@@ -846,29 +846,29 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// </NOTIFICATION>
// MSN sends out badly formed XML .. fix it for them (thanks MS!)
- QString notificationDOMAsString(msg);
+ TQString notificationDOMAsString(msg);
- QRegExp rx( "&(?!amp;)" ); // match ampersands but not &amp;
+ TQRegExp rx( "&(?!amp;)" ); // match ampersands but not &amp;
notificationDOMAsString.replace(rx, "&amp;");
- QDomDocument alertDOM;
+ TQDomDocument alertDOM;
alertDOM.setContent(notificationDOMAsString);
- QDomNodeList msgElements = alertDOM.elementsByTagName("MSG");
+ TQDomNodeList msgElements = alertDOM.elementsByTagName("MSG");
for (uint i = 0 ; i < msgElements.count() ; i++)
{
- QString subscString;
- QString actionString;
- QString textString;
+ TQString subscString;
+ TQString actionString;
+ TQString textString;
- QDomNode msgDOM = msgElements.item(i);
+ TQDomNode msgDOM = msgElements.item(i);
- QDomNodeList msgChildren = msgDOM.childNodes();
+ TQDomNodeList msgChildren = msgDOM.childNodes();
for (uint i = 0 ; i < msgChildren.length() ; i++) {
- QDomNode child = msgChildren.item(i);
- QDomElement element = child.toElement();
+ TQDomNode child = msgChildren.item(i);
+ TQDomElement element = child.toElement();
if (element.tagName() == "SUBSCR")
{
- QDomAttr subscElementURLAttribute;
+ TQDomAttr subscElementURLAttribute;
if (element.hasAttribute("url"))
{
subscElementURLAttribute = element.attributeNode("url");
@@ -878,7 +878,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
else if (element.tagName() == "ACTION")
{
// process ACTION node to pull out URL the alert is tied to
- QDomAttr actionElementURLAttribute;
+ TQDomAttr actionElementURLAttribute;
if (element.hasAttribute("url"))
{
actionElementURLAttribute = element.attributeNode("url");
@@ -888,10 +888,10 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
else if (element.tagName() == "BODY")
{
// process BODY node to get the text of the alert
- QDomNodeList textElements = element.elementsByTagName("TEXT");
+ TQDomNodeList textElements = element.elementsByTagName("TEXT");
if (textElements.count() >= 1)
{
- QDomElement textElement = textElements.item(0).toElement();
+ TQDomElement textElement = textElements.item(0).toElement();
textString = textElement.text();
}
}
@@ -901,7 +901,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// kdDebug( 14140 ) << "subscString " << subscString << " actionString " << actionString << " textString " << textString << endl;
// build an internal list of actions ... we'll need to index into this list when we receive an event
- QStringList actions;
+ TQStringList actions;
actions.append(i18n("More Information"));
m_msnAlertURLs.append(actionString);
@@ -909,11 +909,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
m_msnAlertURLs.append(subscString);
// Don't do any MSN alerts notification for new blog updates
- if( subscString != QString::fromLatin1("s.htm") && actionString != QString::fromLatin1("a.htm") )
+ if( subscString != TQString::fromLatin1("s.htm") && actionString != TQString::fromLatin1("a.htm") )
{
KNotification* notification = KNotification::event("msn_alert", textString, 0L, 0L, actions);
- QObject::connect(notification, SIGNAL(activated(unsigned int)), this, SLOT(slotMSNAlertLink(unsigned int)));
- QObject::connect(notification, SIGNAL(closed()), this, SLOT(slotMSNAlertUnwanted()));
+ TQObject::connect(notification, TQT_SIGNAL(activated(unsigned int)), this, TQT_SLOT(slotMSNAlertLink(unsigned int)));
+ TQObject::connect(notification, TQT_SIGNAL(closed()), this, TQT_SLOT(slotMSNAlertUnwanted()));
}
} // end for each MSG tag
}
@@ -925,21 +925,21 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
if(!m_tmpLastHandle.isNull())
{
- QString personalMessage, currentMedia;
- QDomDocument psm;
+ TQString personalMessage, currentMedia;
+ TQDomDocument psm;
if( psm.setContent(msg) )
{
// Get the first child of the xml "document";
- QDomElement psmElement = psm.documentElement().firstChild().toElement();
+ TQDomElement psmElement = psm.documentElement().firstChild().toElement();
while( !psmElement.isNull() )
{
- if(psmElement.tagName() == QString::fromUtf8("PSM"))
+ if(psmElement.tagName() == TQString::fromUtf8("PSM"))
{
personalMessage = psmElement.text();
kdDebug(14140) << k_funcinfo << "Personnal Message received: " << personalMessage << endl;
}
- else if(psmElement.tagName() == QString::fromUtf8("CurrentMedia"))
+ else if(psmElement.tagName() == TQString::fromUtf8("CurrentMedia"))
{
if( !psmElement.text().isEmpty() )
{
@@ -956,11 +956,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
contact->setProperty(MSNProtocol::protocol()->propPersonalMessage, currentMedia.isEmpty() ? personalMessage : currentMedia);
}
}
- m_tmpLastHandle = QString::null;
+ m_tmpLastHandle = TQString::null;
}
}
-QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
+TQString MSNNotifySocket::processCurrentMedia( const TQString &mediaXmlElement )
{
/*
The value of the CurrentMedia tag you can think of like an array
@@ -985,10 +985,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
From http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes
*/
- QString application, type, format, currentMedia;
+ TQString application, type, format, currentMedia;
bool enabled=false, test;
// \0 is textual, it's the "array" separator.
- QStringList argumentLists = QStringList::split(QString::fromUtf8("\\0"), mediaXmlElement, true);
+ TQStringList argumentLists = TQStringList::split(TQString::fromUtf8("\\0"), mediaXmlElement, true);
// Retrive the "stable" array elements.
application = argumentLists[0];
@@ -997,8 +997,8 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
format = argumentLists[3];
// Get the formatter strings
- QStringList formatterStrings;
- QStringList::ConstIterator it;
+ TQStringList formatterStrings;
+ TQStringList::ConstIterator it;
for( it = argumentLists.at(4); it != argumentLists.end(); ++it )
{
formatterStrings.append( *it );
@@ -1008,10 +1008,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
currentMedia = format;
for(uint i=0; i<formatterStrings.size(); i++)
{
- currentMedia = currentMedia.replace(QString("{%1}").arg(i), formatterStrings[i]);
+ currentMedia = currentMedia.replace(TQString("{%1}").arg(i), formatterStrings[i]);
}
- if( type == QString::fromUtf8("Music") )
+ if( type == TQString::fromUtf8("Music") )
{
// the "♫" is encoded in utf8 (and should be in utf8)
currentMedia = i18n("Now Listening: ♫ %1 ♫").arg(currentMedia);
@@ -1022,26 +1022,26 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
return currentMedia;
}
-void MSNNotifySocket::addGroup(const QString& groupName)
+void MSNNotifySocket::addGroup(const TQString& groupName)
{
// escape spaces
sendCommand( "ADG", escape( groupName ) );
}
-void MSNNotifySocket::renameGroup( const QString& groupName, const QString& groupGuid )
+void MSNNotifySocket::renameGroup( const TQString& groupName, const TQString& groupGuid )
{
// escape spaces
sendCommand( "REG", groupGuid + " " + escape( groupName ) );
}
-void MSNNotifySocket::removeGroup( const QString& groupGuid )
+void MSNNotifySocket::removeGroup( const TQString& groupGuid )
{
sendCommand( "RMG", groupGuid );
}
-void MSNNotifySocket::addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid )
+void MSNNotifySocket::addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid )
{
- QString args;
+ TQString args;
switch( list )
{
case MSNProtocol::FL:
@@ -1049,25 +1049,25 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString
// Adding the contact to a group
if( !contactGuid.isEmpty() )
{
- args = QString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid );
+ args = TQString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid );
kdDebug(14140) << k_funcinfo << "In adding contact to a group" << endl;
}
// Adding a new contact
else
{
- args = QString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) );
+ args = TQString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) );
kdDebug(14140) << k_funcinfo << "In adding contact to a new contact" << endl;
}
break;
}
case MSNProtocol::AL:
- args = QString("AL N=%1").arg( handle );
+ args = TQString("AL N=%1").arg( handle );
break;
case MSNProtocol::BL:
- args = QString("BL N=%1").arg( handle );
+ args = TQString("BL N=%1").arg( handle );
break;
case MSNProtocol::RL:
- args = QString("RL N=%1").arg( handle );
+ args = TQString("RL N=%1").arg( handle );
break;
default:
kdDebug(14140) << k_funcinfo <<"WARNING! Unknown list " << list << "!" << endl;
@@ -1077,9 +1077,9 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString
m_tmpHandles[id]=handle;
}
-void MSNNotifySocket::removeContact( const QString &handle, int list, const QString& contactGuid, const QString& groupGuid )
+void MSNNotifySocket::removeContact( const TQString &handle, int list, const TQString& contactGuid, const TQString& groupGuid )
{
- QString args;
+ TQString args;
switch( list )
{
case MSNProtocol::FL:
@@ -1115,9 +1115,9 @@ void MSNNotifySocket::setStatus( const Kopete::OnlineStatus &status )
sendCommand( "CHG", statusToString( status ) + " " + m_account->myselfClientId() + " " + escape(m_account->pictureObject()) );
}
-void MSNNotifySocket::changePublicName( const QString &publicName, const QString &handle )
+void MSNNotifySocket::changePublicName( const TQString &publicName, const TQString &handle )
{
- QString tempPublicName = publicName;
+ TQString tempPublicName = publicName;
//The maximum length is 387. but with utf8 or encodage, each character may be triple
// 387/3 = 129 so we make sure the lenght is not logner than 129 char, even if
@@ -1144,10 +1144,10 @@ void MSNNotifySocket::changePublicName( const QString &publicName, const QString
}
}
-void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage )
+void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage )
{
- QString tempPersonalMessage;
- QString xmlCurrentMedia;
+ TQString tempPersonalMessage;
+ TQString xmlCurrentMedia;
// Only espace and cut the personalMessage is the type is normal.
if(type == MSNProtocol::PersonalMessageNormal)
@@ -1161,14 +1161,14 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
}
}
- QDomDocument xmlMessage;
+ TQDomDocument xmlMessage;
xmlMessage.appendChild( xmlMessage.createElement( "Data" ) );
- QDomElement psm = xmlMessage.createElement("PSM");
+ TQDomElement psm = xmlMessage.createElement("PSM");
psm.appendChild( xmlMessage.createTextNode( tempPersonalMessage ) );
xmlMessage.documentElement().appendChild( psm );
- QDomElement currentMedia = xmlMessage.createElement("CurrentMedia");
+ TQDomElement currentMedia = xmlMessage.createElement("CurrentMedia");
/* Example of currentMedia xml tag:
<CurrentMedia>\0Music\01\0{0} - {1}\0 Song Title\0Song Artist\0Song Album\0\0</CurrentMedia>
@@ -1180,22 +1180,22 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
case MSNProtocol::PersonalMessageMusic:
{
xmlCurrentMedia = "\\0Music\\01\\0";
- QStringList mediaList = QStringList::split(";", personalMessage);
- QString formatterArguments;
+ TQStringList mediaList = TQStringList::split(";", personalMessage);
+ TQString formatterArguments;
if( !mediaList[0].isEmpty() ) // Current Track
{
xmlCurrentMedia += "{0}";
- formatterArguments += QString("%1\\0").arg(mediaList[0]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[0]);
}
if( !mediaList[1].isEmpty() ) // Current Artist
{
xmlCurrentMedia += " - {1}";
- formatterArguments += QString("%1\\0").arg(mediaList[1]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[1]);
}
if( !mediaList[2].isEmpty() ) // Current Album
{
xmlCurrentMedia += " ({2})";
- formatterArguments += QString("%1\\0").arg(mediaList[2]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[2]);
}
xmlCurrentMedia += "\\0" + formatterArguments + "\\0";
break;
@@ -1216,7 +1216,7 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
}
-void MSNNotifySocket::changePhoneNumber( const QString &key, const QString &data )
+void MSNNotifySocket::changePhoneNumber( const TQString &key, const TQString &data )
{
sendCommand( "PRP", key + " " + escape ( data ) );
}
@@ -1227,7 +1227,7 @@ void MSNNotifySocket::createChatSession()
sendCommand( "XFR", "SB" );
}
-QString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const
+TQString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const
{
if( status == MSNProtocol::protocol()->NLN )
return "NLN";
@@ -1269,7 +1269,7 @@ void MSNNotifySocket::slotSendKeepAlive()
{
// Send a dummy command to fake activity. This makes sure MSN doesn't
// disconnect you when the notify socket is idle.
- sendCommand( "PNG" , QString::null , false );
+ sendCommand( "PNG" , TQString::null , false );
m_ping=true;
}
@@ -1278,7 +1278,7 @@ void MSNNotifySocket::slotSendKeepAlive()
m_tmpHandles.clear();
}
-Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const QString &status )
+Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const TQString &status )
{
if( status == "NLN" )
return MSNProtocol::protocol()->NLN;
diff --git a/kopete/protocols/msn/msnnotifysocket.h b/kopete/protocols/msn/msnnotifysocket.h
index 7f915410..e8c22158 100644
--- a/kopete/protocols/msn/msnnotifysocket.h
+++ b/kopete/protocols/msn/msnnotifysocket.h
@@ -44,34 +44,34 @@ class MSNNotifySocket : public MSNSocket
Q_OBJECT
public:
- MSNNotifySocket( MSNAccount* account, const QString &msnId, const QString &password );
+ MSNNotifySocket( MSNAccount* account, const TQString &msnId, const TQString &password );
~MSNNotifySocket();
virtual void disconnect();
void setStatus( const Kopete::OnlineStatus &status );
- void addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid );
- void removeContact( const QString &handle, int list, const QString &contactGuid, const QString &groupGuid );
+ void addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid );
+ void removeContact( const TQString &handle, int list, const TQString &contactGuid, const TQString &groupGuid );
- void addGroup( const QString& groupName );
- void removeGroup( const QString& group );
- void renameGroup( const QString& groupName, const QString& groupGuid );
+ void addGroup( const TQString& groupName );
+ void removeGroup( const TQString& group );
+ void renameGroup( const TQString& groupName, const TQString& groupGuid );
- void changePublicName( const QString& publicName , const QString &handle=QString::null );
- void changePersonalMessage( MSNProtocol::PersonalMessageType type , const QString& personalMessage );
+ void changePublicName( const TQString& publicName , const TQString &handle=TQString::null );
+ void changePersonalMessage( MSNProtocol::PersonalMessageType type , const TQString& personalMessage );
- void changePhoneNumber( const QString &key, const QString &data );
+ void changePhoneNumber( const TQString &key, const TQString &data );
void createChatSession();
- void sendMail(const QString &email);
+ void sendMail(const TQString &email);
/**
* this should return a Kopete::Account::DisconnectReason value
*/
int disconnectReason() { return m_disconnectReason; }
- QString localIP() { return m_localIP; }
+ TQString localIP() { return m_localIP; }
bool setUseHttpMethod( bool useHttpMethod );
@@ -84,19 +84,19 @@ public slots:
signals:
void newContactList();
- void contactList(const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups);
- void contactStatus(const QString&, const QString&, const QString& );
- void contactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString& groupGuid);
- //void contactRemoved(const QString&, const QString&, uint);
- void contactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid);
+ void contactList(const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups);
+ void contactStatus(const TQString&, const TQString&, const TQString& );
+ void contactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid);
+ //void contactRemoved(const TQString&, const TQString&, uint);
+ void contactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid);
- void groupListed(const QString&, const QString&);
- void groupAdded( const QString&, const QString&);
- void groupRenamed( const QString&, const QString& );
- void groupRemoved( const QString& );
+ void groupListed(const TQString&, const TQString&);
+ void groupAdded( const TQString&, const TQString&);
+ void groupRenamed( const TQString&, const TQString& );
+ void groupRemoved( const TQString& );
- void invitedToChat(const QString&, const QString&, const QString&, const QString&, const QString& );
- void startChat( const QString&, const QString& );
+ void invitedToChat(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& );
+ void startChat( const TQString&, const TQString& );
void statusChanged( const Kopete::OnlineStatus &newStatus );
@@ -107,15 +107,15 @@ signals:
* When the dispatch server sends us the notification server to use, this
* signal is emitted. After this the socket is automatically closed.
*/
- void receivedNotificationServer( const QString &host, uint port );
+ void receivedNotificationServer( const TQString &host, uint port );
protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data );
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data );
/**
* Handle an MSN error condition.
@@ -136,7 +136,7 @@ private slots:
* We received a message from the server, which is sent as raw data,
* instead of cr/lf line-based text.
*/
- void slotReadMessage( const QByteArray &bytes );
+ void slotReadMessage( const TQByteArray &bytes );
/**
* Send a keepalive to the server to avoid idle connections to cause
@@ -146,18 +146,18 @@ private slots:
void sslLoginFailed();
void sslLoginIncorrect();
- void sslLoginSucceeded(QString ticket);
+ void sslLoginSucceeded(TQString ticket);
private:
/**
* Convert the MSN status strings to a Kopete::OnlineStatus
*/
- Kopete::OnlineStatus convertOnlineStatus( const QString &statusString );
+ Kopete::OnlineStatus convertOnlineStatus( const TQString &statusString );
MSNAccount *m_account;
- QString m_password;
- QStringList m_msnAlertURLs;
+ TQString m_password;
+ TQStringList m_msnAlertURLs;
unsigned int mailCount;
@@ -166,30 +166,30 @@ private:
/**
* Convert an entry of the Status enum back to a string
*/
- QString statusToString( const Kopete::OnlineStatus &status ) const;
+ TQString statusToString( const Kopete::OnlineStatus &status ) const;
/**
* Process the CurrentMedia XML element.
* @param mediaXmlElement the source XML element as text.
*/
- QString processCurrentMedia( const QString &mediaXmlElement );
+ TQString processCurrentMedia( const TQString &mediaXmlElement );
//know the last handle used
- QString m_tmpLastHandle;
- QMap <unsigned int,QString> m_tmpHandles;
- QString m_configFile;
+ TQString m_tmpLastHandle;
+ TQMap <unsigned int,TQString> m_tmpHandles;
+ TQString m_configFile;
//for hotmail inbox opening
bool m_isHotmailAccount;
- QString m_MSPAuth;
- QString m_kv;
- QString m_sid;
- QString m_loginTime;
- QString m_localIP;
+ TQString m_MSPAuth;
+ TQString m_kv;
+ TQString m_sid;
+ TQString m_loginTime;
+ TQString m_localIP;
MSNSecureLoginHandler *m_secureLoginHandler;
MSNChallengeHandler *m_challengeHandler;
- QTimer *m_keepaliveTimer;
+ TQTimer *m_keepaliveTimer;
bool m_ping;
@@ -199,7 +199,7 @@ private:
* Used to set the myself() personalMessage when the acknowledge(UUX) command is received.
* The personalMessage is built into @ref changePersonalMessage
*/
- QString m_propertyPersonalMessage;
+ TQString m_propertyPersonalMessage;
/**
* Used to tell when we are logged in to MSN Messeger service.
diff --git a/kopete/protocols/msn/msnprotocol.cpp b/kopete/protocols/msn/msnprotocol.cpp
index 2a5b4319..9c0007fc 100644
--- a/kopete/protocols/msn/msnprotocol.cpp
+++ b/kopete/protocols/msn/msnprotocol.cpp
@@ -18,7 +18,7 @@
*************************************************************************
*/
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -47,15 +47,15 @@ K_EXPORT_COMPONENT_FACTORY( libkopete_msn_shared, MSNProtocolFactory( "kopete_ms
MSNProtocol *MSNProtocol::s_protocol = 0L;
-MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & /* args */ )
+MSNProtocol::MSNProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Protocol( MSNProtocolFactory::instance(), parent, name ),
- NLN( Kopete::OnlineStatus::Online, 25, this, 1, QString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ),
+ NLN( Kopete::OnlineStatus::Online, 25, this, 1, TQString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ),
BSY( Kopete::OnlineStatus::Away, 20, this, 2, "msn_busy", i18n( "Busy" ) , i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ),
BRB( Kopete::OnlineStatus::Away, 22, this, 3, "msn_brb", i18n( "Be Right Back" ), i18n( "Be &Right Back" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
AWY( Kopete::OnlineStatus::Away, 18, this, 4, "contact_away_overlay", i18n( "Away From Computer" ),i18n( "&Away" ), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ),
PHN( Kopete::OnlineStatus::Away, 12, this, 5, "contact_phone_overlay", i18n( "On the Phone" ) , i18n( "On The &Phone" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
LUN( Kopete::OnlineStatus::Away, 15, this, 6, "contact_food_overlay", i18n( "Out to Lunch" ) , i18n( "Out To &Lunch" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
- FLN( Kopete::OnlineStatus::Offline, 0, this, 7, QString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ),
+ FLN( Kopete::OnlineStatus::Offline, 0, this, 7, TQString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ),
HDN( Kopete::OnlineStatus::Invisible, 3, this, 8, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "&Invisible" ), Kopete::OnlineStatusManager::Invisible ),
IDL( Kopete::OnlineStatus::Away, 10, this, 9, "contact_away_overlay", i18n( "Idle" ) , i18n( "&Idle" ), Kopete::OnlineStatusManager::Idle , Kopete::OnlineStatusManager::HideFromMenu ),
UNK( Kopete::OnlineStatus::Unknown, 25, this, 0, "status_unknown", i18n( "Status not available" ) ),
@@ -77,16 +77,16 @@ MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList &
// m_status = m_unknownStatus = UNK;
}
-Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
- QString contactId = serializedData[ "contactId" ] ;
- QString accountId = serializedData[ "accountId" ] ;
- QString lists = serializedData[ "lists" ];
- QStringList groups = QStringList::split( ",", serializedData[ "groups" ] );
- QString contactGuid = serializedData[ "contactGuid" ] ;
+ TQString contactId = serializedData[ "contactId" ] ;
+ TQString accountId = serializedData[ "accountId" ] ;
+ TQString lists = serializedData[ "lists" ];
+ TQStringList groups = TQStringList::split( ",", serializedData[ "groups" ] );
+ TQString contactGuid = serializedData[ "contactGuid" ] ;
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
Kopete::Account *account = accounts[ accountId ];
if( !account )
@@ -95,7 +95,7 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta
// Create MSN contact
MSNContact *c = new MSNContact( account, contactId, metaContact );
- for( QStringList::Iterator it = groups.begin() ; it != groups.end(); ++it )
+ for( TQStringList::Iterator it = groups.begin() ; it != groups.end(); ++it )
c->contactAddedToGroup( *it, 0L /* FIXME - m_groupList[ ( *it ).toUInt() ]*/ );
c->m_obj= serializedData[ "obj" ];
@@ -111,17 +111,17 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta
return c;
}
-AddContactPage *MSNProtocol::createAddContactWidget(QWidget *parent , Kopete::Account *i)
+AddContactPage *MSNProtocol::createAddContactWidget(TQWidget *parent , Kopete::Account *i)
{
return (new MSNAddContactPage(i->isConnected(),parent));
}
-KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent)
+KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
{
return new MSNEditAccountWidget(this,account,parent);
}
-Kopete::Account *MSNProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *MSNProtocol::createNewAccount(const TQString &accountId)
{
return new MSNAccount(this, accountId);
}
@@ -135,12 +135,12 @@ void MSNProtocol::slotSyncContactList()
return;
}
// First, delete D marked contacts
- QStringList localcontacts;
+ TQStringList localcontacts;
contactsFile->setGroup("Default");
contactsFile->readListEntry("Contacts",localcontacts);
- QString tmpUin;
+ TQString tmpUin;
tmpUin.sprintf("%d",uin);
tmp.append(tmpUin);
cnt=contactsFile->readNumEntry("Count",0);
@@ -152,15 +152,15 @@ MSNProtocol* MSNProtocol::protocol()
return s_protocol;
}
-bool MSNProtocol::validContactId(const QString& userid)
+bool MSNProtocol::validContactId(const TQString& userid)
{
return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0);
}
-QImage MSNProtocol::scalePicture(const QImage &picture)
+TQImage MSNProtocol::scalePicture(const TQImage &picture)
{
- QImage img(picture);
- img = img.smoothScale( 96, 96, QImage::ScaleMin );
+ TQImage img(picture);
+ img = img.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
{
diff --git a/kopete/protocols/msn/msnprotocol.h b/kopete/protocols/msn/msnprotocol.h
index 7017fd90..77e3d171 100644
--- a/kopete/protocols/msn/msnprotocol.h
+++ b/kopete/protocols/msn/msnprotocol.h
@@ -21,8 +21,8 @@
#ifndef __msnprotocol_h__
#define __msnprotocol_h__
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kopeteprotocol.h"
#include "kopeteonlinestatus.h"
@@ -58,7 +58,7 @@ class KOPETE_EXPORT MSNProtocol : public Kopete::Protocol
Q_OBJECT
public:
- MSNProtocol( QObject *parent, const char *name, const QStringList &args );
+ MSNProtocol( TQObject *parent, const char *name, const TQStringList &args );
/**
* SyncMode indicates whether settings differing between client and
@@ -150,15 +150,15 @@ 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 );
- 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);
static MSNProtocol* protocol();
- static bool validContactId(const QString&);
- QImage scalePicture(const QImage &picture);
+ static bool validContactId(const TQString&);
+ TQImage scalePicture(const TQImage &picture);
private slots:
void slotSyncContactList();
@@ -178,7 +178,7 @@ signals:
* @param msnMM is the message manager
* @param c is the contact
*/
- void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+ void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
};
#endif
diff --git a/kopete/protocols/msn/msnsecureloginhandler.cpp b/kopete/protocols/msn/msnsecureloginhandler.cpp
index 00f862fe..a795b43a 100644
--- a/kopete/protocols/msn/msnsecureloginhandler.cpp
+++ b/kopete/protocols/msn/msnsecureloginhandler.cpp
@@ -17,14 +17,14 @@
#include "msnsecureloginhandler.h"
// Qt includes
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kio/job.h>
#include <kurl.h>
#include <kdebug.h>
-MSNSecureLoginHandler::MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters)
+MSNSecureLoginHandler::MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters)
: m_password(password), m_accountId(accountId), m_authentification(authParameters)
{
@@ -45,7 +45,7 @@ void MSNSecureLoginHandler::login()
getLoginServer->addMetaData("cache", "reload");
getLoginServer->addMetaData("PropagateHttpHeader", "true");
- connect(getLoginServer, SIGNAL(result(KIO::Job *)), this, SLOT(slotLoginServerReceived(KIO::Job* )));
+ connect(getLoginServer, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotLoginServerReceived(KIO::Job* )));
}
void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
@@ -53,24 +53,24 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
if(!loginJob->error())
{
// Retrive the HTTP header
- QString httpHeaders = loginJob->queryMetaData("HTTP-Headers");
+ TQString httpHeaders = loginJob->queryMetaData("HTTP-Headers");
// Get the login URL using QRegExp
- QRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg=");
+ TQRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg=");
rx.search(httpHeaders);
// Set the loginUrl and loginServer
- QString loginUrl = rx.cap(2);
- QString loginServer = loginUrl.section('/', 0, 0);
+ TQString loginUrl = rx.cap(2);
+ TQString loginServer = loginUrl.section('/', 0, 0);
kdDebug(14140) << k_funcinfo << loginServer << endl;
- QString authURL = "https://" + loginUrl;
+ TQString authURL = "https://" + loginUrl;
KIO::Job *authJob = KIO::get(KURL(authURL), true, false);
authJob->addMetaData("cookies", "manual");
- QString authRequest = "Authorization: Passport1.4 "
+ TQString authRequest = "Authorization: Passport1.4 "
"OrgVerb=GET,"
"OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,"
"sign-in=" + KURL::encode_string(m_accountId) +
@@ -86,7 +86,7 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
authJob->addMetaData("cookies", "manual");
authJob->addMetaData("cache", "reload");
- connect(authJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotTweenerReceived(KIO::Job* )));
+ connect(authJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotTweenerReceived(KIO::Job* )));
}
else
{
@@ -100,21 +100,21 @@ void MSNSecureLoginHandler::slotTweenerReceived(KIO::Job *authJob)
{
if(!authJob->error())
{
- QString httpHeaders = authJob->queryMetaData("HTTP-Headers");
+ TQString httpHeaders = authJob->queryMetaData("HTTP-Headers");
// kdDebug(14140) << k_funcinfo << "HTTP headers: " << httpHeaders << endl;
// Check if we get "401 Unauthorized", thats means it's a bad password.
- if(httpHeaders.contains(QString::fromUtf8("401 Unauthorized")))
+ if(httpHeaders.contains(TQString::fromUtf8("401 Unauthorized")))
{
// kdDebug(14140) << k_funcinfo << "MSN Login Bad password." << endl;
emit loginBadPassword();
}
else
{
- QRegExp rx("from-PP='(.*)'");
+ TQRegExp rx("from-PP='(.*)'");
rx.search(httpHeaders);
- QString ticket = rx.cap(1);
+ TQString ticket = rx.cap(1);
// kdDebug(14140) << k_funcinfo << "Received ticket: " << ticket << endl;
diff --git a/kopete/protocols/msn/msnsecureloginhandler.h b/kopete/protocols/msn/msnsecureloginhandler.h
index 8e4dc466..8f913fc7 100644
--- a/kopete/protocols/msn/msnsecureloginhandler.h
+++ b/kopete/protocols/msn/msnsecureloginhandler.h
@@ -17,7 +17,7 @@
#ifndef MSNSECURELOGINHANDLER_H
#define MSNSECURELOGINHANDLER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -35,7 +35,7 @@ class MSNSecureLoginHandler : public QObject
{
Q_OBJECT
public:
- MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters);
+ MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters);
~MSNSecureLoginHandler();
@@ -43,9 +43,9 @@ public:
signals:
/**
- * TODO: return to const QString &
+ * TODO: return to const TQString &
*/
- void loginSuccesful(QString ticket);
+ void loginSuccesful(TQString ticket);
void loginBadPassword();
void loginFailed();
@@ -60,15 +60,15 @@ private:
/**
* Store the password.
*/
- QString m_password;
+ TQString m_password;
/**
* Store the accountId.
*/
- QString m_accountId;
+ TQString m_accountId;
/**
* Store the authentification parameters
*/
- QString m_authentification;
+ TQString m_authentification;
void displayMetaData(KIO::MetaData data);
};
diff --git a/kopete/protocols/msn/msnsocket.cpp b/kopete/protocols/msn/msnsocket.cpp
index a650cd83..0aaad25c 100644
--- a/kopete/protocols/msn/msnsocket.cpp
+++ b/kopete/protocols/msn/msnsocket.cpp
@@ -23,8 +23,8 @@
#include "msnsocket.h"
//#include "msnprotocol.h"
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -42,19 +42,19 @@ using namespace KNetwork;
class MimeMessage
{
public:
- MimeMessage(const QString &msg) : message(msg) {}
+ MimeMessage(const TQString &msg) : message(msg) {}
- QString getValue(const QString &key)
+ TQString getValue(const TQString &key)
{
- QRegExp rx(key+": ([^\r\n]+)");
+ TQRegExp rx(key+": ([^\r\n]+)");
rx.search(message);
return rx.cap(1);
}
private:
- QString message;
+ TQString message;
};
-MSNSocket::MSNSocket(QObject* parent) : QObject (parent)
+MSNSocket::MSNSocket(TQObject* parent) : TQObject (parent)
{
m_onlineStatus = Disconnected;
m_socket = 0L;
@@ -73,7 +73,7 @@ MSNSocket::~MSNSocket()
m_socket->deleteLater();
}
-void MSNSocket::connect( const QString &server, uint port )
+void MSNSocket::connect( const TQString &server, uint port )
{
if ( m_onlineStatus == Connected || m_onlineStatus == Connecting )
{
@@ -101,7 +101,7 @@ void MSNSocket::connect( const QString &server, uint port )
m_port = port;
if(!m_useHttp)
- m_socket = new KBufferedSocket( server, QString::number(port) );
+ m_socket = new KBufferedSocket( server, TQString::number(port) );
else {
m_socket = new KBufferedSocket( m_gateway, "80" );
}
@@ -112,20 +112,20 @@ void MSNSocket::connect( const QString &server, uint port )
// non-empty, so disable it until we have actual data in the queue
m_socket->enableWrite( false );
- QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) );
- QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) );
- QObject::connect( m_socket, SIGNAL( hostFound() ), this, SLOT( slotHostFound() ) );
- QObject::connect( m_socket, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotConnectionSuccess() ) );
- QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) );
- QObject::connect( m_socket, SIGNAL( closed( ) ), this, SLOT( slotSocketClosed( ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( hostFound() ), this, TQT_SLOT( slotHostFound() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotConnectionSuccess() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( closed( ) ), this, TQT_SLOT( slotSocketClosed( ) ) );
if(m_useHttp)
{
if(m_timer == 0L)
{
- m_timer = new QTimer(this, "Http poll timer");
+ m_timer = new TQTimer(this, "Http poll timer");
// Connect the slot HttpPoll with the timer timeout signal.
- QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(slotHttpPoll()));
+ TQObject::connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHttpPoll()));
}
}
@@ -181,7 +181,7 @@ void MSNSocket::slotSocketError( int error )
return;
//we only care about fatal error
- QString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" );
+ TQString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" );
if ( error == KSocketBase::LookupFailure )
errormsg += i18n( "Unable to lookup %1" ).arg( m_socket->peerResolver().nodeName() );
else
@@ -212,7 +212,7 @@ void MSNSocket::slotDataReceived()
}
// incoming data, plus an extra char where we pretend a NUL is so the conversion
- // to QCString doesn't go over the end of the allocated memory.
+ // to TQCString doesn't go over the end of the allocated memory.
char *buffer = new char[ avail + 1 ];
int ret = m_socket->readBlock( buffer, avail );
@@ -240,16 +240,16 @@ void MSNSocket::slotDataReceived()
}
- QString rawData;
+ TQString rawData;
if(m_useHttp)
{
bool error = false;
- QByteArray bytes;
+ TQByteArray bytes;
// Check if all data has arrived.
- rawData = QString(QCString(buffer, avail + 1));
- bool headers = (rawData.find(QRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
+ rawData = TQString(TQCString(buffer, avail + 1));
+ bool headers = (rawData.find(TQRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
if(headers)
{
@@ -258,7 +258,7 @@ void MSNSocket::slotDataReceived()
if((endOfHeaders + 4) == avail)
{
// Only the response headers data is included.
- QRegExp re("Content-Length: ([^\r\n]+)");
+ TQRegExp re("Content-Length: ([^\r\n]+)");
if(re.search(rawData) != -1)
{
bool valid;
@@ -312,9 +312,9 @@ void MSNSocket::slotDataReceived()
{
// If we received a valid response, read the required headers.
// Retrieve the X-MSN-Messenger header.
- QString header = response.getHeaders()->getValue("X-MSN-Messenger");
+ TQString header = response.getHeaders()->getValue("X-MSN-Messenger");
- QStringList parts = QStringList::split(";", header.replace(" ", ""));
+ TQStringList parts = TQStringList::split(";", header.replace(" ", ""));
if(!header.isNull() && (parts.count() >= 2))
{
if(parts[0].find("SessionID", 0) != -1)
@@ -361,7 +361,7 @@ void MSNSocket::slotDataReceived()
if(valid && (length > 0))
{
// Otherwise, if the content length is greater than zero, get the web response stream.
- QDataStream *stream = response.getResponseStream();
+ TQDataStream *stream = response.getResponseStream();
buffer = new char[length];
// Read the web response content.
stream->readRawBytes(buffer, length);
@@ -390,8 +390,8 @@ void MSNSocket::slotDataReceived()
// all MSN commands start with one or more uppercase characters.
// For now just check the first three chars, let's see how accurate it is.
// Additionally, if we receive an MSN-P2P packet, strip off anything after the P2P header.
- rawData = QString( QCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace(
- QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
+ rawData = TQString( TQCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace(
+ TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
bool isBinary = false;
for ( uint i = 0; i < 3 ; ++i )
@@ -429,7 +429,7 @@ void MSNSocket::slotReadLine()
if ( m_buffer.size() >= 3 && ( m_buffer.data()[ 0 ] == '\0' || m_buffer.data()[ 0 ]== '\1' ) )
{
bytesReceived( m_buffer.take( 3 ) );
- QTimer::singleShot( 0, this, SLOT( slotReadLine() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) );
return;
}
@@ -445,13 +445,13 @@ void MSNSocket::slotReadLine()
if ( index != -1 )
{
- QString command = QString::fromUtf8( m_buffer.take( index + 2 ), index );
+ TQString command = TQString::fromUtf8( m_buffer.take( index + 2 ), index );
command.replace( "\r\n", "" );
//kdDebug( 14141 ) << k_funcinfo << command << endl;
// Don't block the GUI while parsing data, only do a single line!
// (Done before parseLine() to prevent a potential crash)
- QTimer::singleShot( 0, this, SLOT( slotReadLine() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) );
parseLine( command );
// WARNING: At this point 'this' can be deleted (when disconnecting)
@@ -489,7 +489,7 @@ bool MSNSocket::pollReadBlock()
return true;
}
- QByteArray block = m_buffer.take( m_waitBlockSize );
+ TQByteArray block = m_buffer.take( m_waitBlockSize );
//kdDebug( 14140 ) << k_funcinfo << "Successfully read block of size " << m_waitBlockSize << endl;
@@ -499,10 +499,10 @@ bool MSNSocket::pollReadBlock()
return false;
}
-void MSNSocket::parseLine( const QString &str )
+void MSNSocket::parseLine( const TQString &str )
{
- QString cmd = str.section( ' ', 0, 0 );
- QString data = str.section( ' ', 2 ).replace( "\r\n" , "" );
+ TQString cmd = str.section( ' ', 0, 0 );
+ TQString data = str.section( ' ', 2 ).replace( "\r\n" , "" );
bool isNum;
uint id = str.section( ' ', 1, 1 ).toUInt( &isNum );
@@ -529,7 +529,7 @@ void MSNSocket::parseLine( const QString &str )
void MSNSocket::handleError( uint code, uint /* id */ )
{
kdDebug(14140) << k_funcinfo << endl;
- QString msg;
+ TQString msg;
ErrorType type = ErrorServerError;
switch ( code )
{
@@ -605,7 +605,7 @@ void MSNSocket::handleError( uint code, uint /* id */ )
return;
}
-int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId, const QByteArray &body, bool binary )
+int MSNSocket::sendCommand( const TQString &cmd, const TQString &args, bool addId, const TQByteArray &body, bool binary )
{
if ( !m_socket )
{
@@ -613,22 +613,22 @@ int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId,
return -1;
}
- QCString data = cmd.utf8();
+ TQCString data = cmd.utf8();
if ( addId )
- data += " " + QString::number( m_id ).utf8();
+ data += " " + TQString::number( m_id ).utf8();
if ( !args.isEmpty() )
data += " " + args.utf8();
// Add length in bytes, not characters
if ( !body.isEmpty() )
- data += " " + QString::number( body.size() - (binary ? 0 : 1 ) ).utf8();
+ data += " " + TQString::number( body.size() - (binary ? 0 : 1 ) ).utf8();
data += "\r\n";
// the command will be sent in slotReadyWrite
- QByteArray bytes;
+ TQByteArray bytes;
const uint length = data.length();
bytes.duplicate(data.data(), length);
if(!body.isEmpty())
@@ -657,7 +657,7 @@ void MSNSocket::slotReadyWrite()
if ( !m_sendQueue.isEmpty() )
{
// If the command queue is not empty, retrieve the first command.
- QValueList<QByteArray>::Iterator it = m_sendQueue.begin();
+ TQValueList<TQByteArray>::Iterator it = m_sendQueue.begin();
if(m_useHttp)
{
@@ -668,8 +668,8 @@ void MSNSocket::slotReadyWrite()
// Temporarily disable http polling.
m_bCanPoll = false;
// Set the host to the msn gateway by default.
- QString host = m_gateway;
- QString query; // Web request query string.
+ TQString host = m_gateway;
+ TQString query; // Web request query string.
if(m_bIsFirstInTransaction)
{
@@ -689,11 +689,11 @@ void MSNSocket::slotReadyWrite()
}
// Create the web request headers.
- QString s = makeHttpRequestString(host, query, (*it).size());
+ TQString s = makeHttpRequestString(host, query, (*it).size());
uint length = s.length();
// Create the web request bytes.
- QByteArray bytes(length + (*it).size());
+ TQByteArray bytes(length + (*it).size());
// Copy the request headers into the request bytes.
for(uint i=0; i < length; i++)
@@ -702,7 +702,7 @@ void MSNSocket::slotReadyWrite()
for(uint i=0; i < (*it).size(); i++)
bytes[length + i] = (*it)[i];
- kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << QString(*it).stripWhiteSpace() << endl;
+ kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << TQString(*it).stripWhiteSpace() << endl;
// Write the request bytes to the socket.
m_socket->writeBlock(bytes.data(), bytes.size());
@@ -725,8 +725,8 @@ void MSNSocket::slotReadyWrite()
// Simple check to avoid dumping the binary data from the icons and emoticons to kdDebug:
// When sending an MSN-P2P packet, strip off anything after the P2P header.
- QString debugData = QString( *it ).stripWhiteSpace().replace(
- QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
+ TQString debugData = TQString( *it ).stripWhiteSpace().replace(
+ TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
kdDebug( 14141 ) << k_funcinfo << "Sending command: " << debugData << endl;
m_socket->writeBlock( *it, ( *it ).size() );
@@ -750,14 +750,14 @@ void MSNSocket::slotReadyWrite()
}
}
-QString MSNSocket::escape( const QString &str )
+TQString MSNSocket::escape( const TQString &str )
{
//return ( KURL::encode_string( str, 106 ) );
//It's not needed to encode everything. The official msn client only encode spaces and %
//If we encode more, the size can be longer than excepted.
int old_length= str.length();
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -780,20 +780,20 @@ QString MSNSocket::escape( const QString &str )
new_segment[ new_length++ ] = str[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-QString MSNSocket::unescape( const QString &str )
+TQString MSNSocket::unescape( const TQString &str )
{
- QString str2 = KURL::decode_string( str, 106 );
+ TQString str2 = KURL::decode_string( str, 106 );
//remove msn+ colors code
- str2 = str2.replace( QRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
+ str2 = str2.replace( TQRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
// added by kaoul <erwin.kwolek at gmail.com>
- str2 = str2.replace( QRegExp("\\xB7[&@\'#0]"),""); // dot ...
- str2 = str2.replace( QRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
+ str2 = str2.replace( TQRegExp("\\xB7[&@\'#0]"),""); // dot ...
+ str2 = str2.replace( TQRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
return str2;
}
@@ -847,7 +847,7 @@ void MSNSocket::slotHttpPoll()
}
// Create the http request headers.
- const QCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8();
+ const TQCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8();
m_socket->writeBlock(headers, headers.length());
// Wait for the response.
m_pending = true;
@@ -856,12 +856,12 @@ void MSNSocket::slotHttpPoll()
// Used in MSNFileTransferSocket
// FIXME: Why is this here if it's only used for file transfer? - Martijn
-void MSNSocket::bytesReceived( const QByteArray & /* data */ )
+void MSNSocket::bytesReceived( const TQByteArray & /* data */ )
{
kdWarning( 14140 ) << k_funcinfo << "Unknown bytes were received" << endl;
}
-void MSNSocket::sendBytes( const QByteArray &data )
+void MSNSocket::sendBytes( const TQByteArray &data )
{
if ( !m_socket )
{
@@ -879,13 +879,13 @@ bool MSNSocket::setUseHttpMethod( bool useHttp )
return true;
if( useHttp ) {
- QString s = QString( this->className() ).lower();
+ TQString s = TQString( this->className() ).lower();
if( s == "msnnotifysocket" )
m_type = "NS";
else if( s == "msnswitchboardsocket" )
m_type = "SB";
else
- m_type = QString::null;
+ m_type = TQString::null;
if( m_type.isNull() )
return false;
@@ -938,23 +938,23 @@ bool MSNSocket::accept( KServerSocket *server )
m_socket->enableRead( true );
m_socket->enableWrite( true );
- QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) );
- QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) );
- QObject::connect( m_socket, SIGNAL( closed() ), this, SLOT( slotSocketClosed() ) );
- QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSocketClosed() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) );
doneConnect();
return true;
}
-QString MSNSocket::getLocalIP()
+TQString MSNSocket::getLocalIP()
{
if ( !m_socket )
- return QString::null;
+ return TQString::null;
const KSocketAddress address = m_socket->localAddress();
- QString ip = address.nodeName();
+ TQString ip = address.nodeName();
kdDebug( 14140 ) << k_funcinfo << "IP: " << ip <<endl;
//delete address;
@@ -962,7 +962,7 @@ QString MSNSocket::getLocalIP()
}
MSNSocket::Buffer::Buffer( unsigned int sz )
-: QByteArray( sz )
+: TQByteArray( sz )
{
}
@@ -982,15 +982,15 @@ void MSNSocket::Buffer::add( char *str, unsigned int sz )
delete[] b;
}
-QByteArray MSNSocket::Buffer::take( unsigned blockSize )
+TQByteArray MSNSocket::Buffer::take( unsigned blockSize )
{
if ( size() < blockSize )
{
kdWarning( 14140 ) << k_funcinfo << "Buffer size " << size() << " < asked size " << blockSize << "!" << endl;
- return QByteArray();
+ return TQByteArray();
}
- QByteArray rep( blockSize );
+ TQByteArray rep( blockSize );
for( uint i = 0; i < blockSize; i++ )
rep[ i ] = data()[ i ];
@@ -1003,9 +1003,9 @@ QByteArray MSNSocket::Buffer::take( unsigned blockSize )
return rep;
}
-QString MSNSocket::makeHttpRequestString(const QString& host, const QString& query, uint contentLength)
+TQString MSNSocket::makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength)
{
- QString s(
+ TQString s(
"POST http://" + host + "/gateway/gateway.dll?" + query + " HTTP/1.1\r\n" +
"Accept: */*\r\n" +
"Accept-Language: en-us\r\n" +
@@ -1015,22 +1015,22 @@ QString MSNSocket::makeHttpRequestString(const QString& host, const QString& que
"Connection: Keep-Alive\r\n" +
"Pragma: no-cache\r\n" +
"Content-Type: application/x-msn-messenger\r\n" +
- "Content-Length: " + QString::number(contentLength) + "\r\n" +
+ "Content-Length: " + TQString::number(contentLength) + "\r\n" +
"\r\n");
return s;
}
-MSNSocket::WebResponse::WebResponse(const QByteArray& bytes)
+MSNSocket::WebResponse::WebResponse(const TQByteArray& bytes)
{
m_statusCode = 0;
m_stream = 0;
int headerEnd;
- QString header;
- QString data(QCString(bytes, bytes.size() + 1));
+ TQString header;
+ TQString data(TQCString(bytes, bytes.size() + 1));
// Parse the HTTP status header
- QRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)");
+ TQRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)");
headerEnd = data.find("\r\n");
header = data.left( (headerEnd == -1) ? 20 : headerEnd );
@@ -1055,11 +1055,11 @@ MSNSocket::WebResponse::WebResponse(const QByteArray& bytes)
// copy the web response content bytes.
int offset = bytes.size() - length;
- QByteArray content(length);
+ TQByteArray content(length);
for(int i=0; i < length; i++)
content[i] = bytes[offset + i];
// Create the web response stream from the response content bytes.
- m_stream = new QDataStream(content, IO_ReadOnly);
+ m_stream = new TQDataStream(content, IO_ReadOnly);
}
}
}
@@ -1077,7 +1077,7 @@ MimeMessage* MSNSocket::WebResponse::getHeaders()
return m_headers;
}
-QDataStream* MSNSocket::WebResponse::getResponseStream()
+TQDataStream* MSNSocket::WebResponse::getResponseStream()
{
return m_stream;
}
@@ -1087,7 +1087,7 @@ int MSNSocket::WebResponse::getStatusCode()
return m_statusCode;
}
-QString MSNSocket::WebResponse::getStatusDescription()
+TQString MSNSocket::WebResponse::getStatusDescription()
{
return m_statusDescription;
}
diff --git a/kopete/protocols/msn/msnsocket.h b/kopete/protocols/msn/msnsocket.h
index 85df08c7..96bfd0cb 100644
--- a/kopete/protocols/msn/msnsocket.h
+++ b/kopete/protocols/msn/msnsocket.h
@@ -22,11 +22,11 @@
#ifndef MSNSOCKET_H
#define MSNSOCKET_H
-#include <qobject.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
#include "kopete_export.h"
@@ -49,7 +49,7 @@ class KOPETE_EXPORT MSNSocket : public QObject
Q_OBJECT
public:
- MSNSocket(QObject* parent=0l);
+ MSNSocket(TQObject* parent=0l);
~MSNSocket();
/**
@@ -85,7 +85,7 @@ public:
* return the local ip.
* Used for filetransfer
*/
- QString getLocalIP();
+ TQString getLocalIP();
//BEGIN Http
@@ -95,7 +95,7 @@ public:
//END
public slots:
- void connect( const QString &server, uint port );
+ void connect( const TQString &server, uint port );
virtual void disconnect();
@@ -113,15 +113,15 @@ public slots:
*
* return the id
*/
- int sendCommand( const QString &cmd, const QString &args = QString::null,
- bool addId = true, const QByteArray &body = QByteArray() , bool binary=false );
+ int sendCommand( const TQString &cmd, const TQString &args = TQString::null,
+ bool addId = true, const TQByteArray &body = TQByteArray() , bool binary=false );
signals:
/**
* A block read is ready.
* After this the normal line-based reads go on again
*/
- void blockRead( const QByteArray &block );
+ void blockRead( const TQByteArray &block );
/**
* The online status has changed
@@ -141,19 +141,19 @@ signals:
/**
* A error has occured. Handle the display of the message.
*/
- void errorMessage( int type, const QString &msg );
+ void errorMessage( int type, const TQString &msg );
protected:
/**
* Convenience method: escape spaces with '%20' for use in the protocol.
* Doesn't escape any other sequence.
*/
- QString escape( const QString &str );
+ TQString escape( const TQString &str );
/**
* And the other way round...
*/
- QString unescape( const QString &str );
+ TQString unescape( const TQString &str );
/**
* Set the online status. Emits onlineStatusChanged.
@@ -193,17 +193,17 @@ protected:
* This method is pure virtual and *must* be overridden in derived
* classes.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data ) = 0;
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data ) = 0;
/**
* Used in MSNFileTransferSocket
*/
- virtual void bytesReceived( const QByteArray & );
+ virtual void bytesReceived( const TQByteArray & );
bool accept( KNetwork::KServerSocket * );
- void sendBytes( const QByteArray &data );
+ void sendBytes( const TQByteArray &data );
- const QString &server() { return m_server; }
+ const TQString &server() { return m_server; }
uint port() { return m_port; }
/**
@@ -268,19 +268,19 @@ private:
* Queue of pending commands (should be mostly empty, but is needed to
* send more than one command to the server)
*/
- QValueList<QByteArray> m_sendQueue;
+ TQValueList<TQByteArray> m_sendQueue;
/**
* Parse a single line of data.
* Will call either parseCommand or handleError depending on the type of
* data received.
*/
- void parseLine( const QString &str );
+ void parseLine( const TQString &str );
KNetwork::KBufferedSocket *m_socket;
OnlineStatus m_onlineStatus;
- QString m_server;
+ TQString m_server;
uint m_port;
/**
@@ -294,7 +294,7 @@ private:
Buffer( unsigned size = 0 );
~Buffer();
void add( char *str, unsigned size );
- QByteArray take( unsigned size );
+ TQByteArray take( unsigned size );
};
Buffer m_buffer;
@@ -305,18 +305,18 @@ private:
* Makes a http request headers string using the specified, host, query, and content length.
* return: The string containing the http request headers.
*/
- QString makeHttpRequestString(const QString& host, const QString& query, uint contentLength);
+ TQString makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength);
bool m_useHttp; // Indicates whether to use the msn http gateway to connect to the msn service.
bool m_bCanPoll; // Indicates whether polling of the http server is allowed.
bool m_bIsFirstInTransaction; // Indicates whether pending message to be sent is the first in the transaction.
// If so, the gateway is used.
// Use the gateway only for initial connected state; Otherwise, use the host.
- QString m_gateway; // Msn http gateway domain name.
- QString m_gwip; // The ip address of the msn gateway.
- QString m_sessionId; // session id.
- QTimer *m_timer; // Msn http poll timer.
- QString m_type; // Indicates the type of socket being used. NS or SB
+ TQString m_gateway; // Msn http gateway domain name.
+ TQString m_gwip; // The ip address of the msn gateway.
+ TQString m_sessionId; // session id.
+ TQTimer *m_timer; // Msn http poll timer.
+ TQString m_type; // Indicates the type of socket being used. NS or SB
bool m_pending; // Indicates whether a http response is pending.
int m_remaining; // Indicates how many bytes of content data remain
// to be received if the content bytes are sent in
@@ -328,7 +328,7 @@ private:
class WebResponse
{
public:
- WebResponse(const QByteArray& bytes);
+ WebResponse(const TQByteArray& bytes);
~WebResponse();
/**
@@ -338,7 +338,7 @@ private:
/**
* Gets the data stream used to read the body of the response from the server.
*/
- QDataStream* getResponseStream();
+ TQDataStream* getResponseStream();
/**
* Gets the status code of the response.
*/
@@ -346,13 +346,13 @@ private:
/**
* Gets the status description returned with the response.
*/
- QString getStatusDescription();
+ TQString getStatusDescription();
private:
MimeMessage *m_headers;
- QDataStream *m_stream;
+ TQDataStream *m_stream;
int m_statusCode;
- QString m_statusDescription;
+ TQString m_statusDescription;
};
//END
diff --git a/kopete/protocols/msn/msnswitchboardsocket.cpp b/kopete/protocols/msn/msnswitchboardsocket.cpp
index ae09a93c..7754c448 100644
--- a/kopete/protocols/msn/msnswitchboardsocket.cpp
+++ b/kopete/protocols/msn/msnswitchboardsocket.cpp
@@ -26,12 +26,12 @@
#include <cmath>
// qt
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
// kde
#include <kdebug.h>
@@ -63,7 +63,7 @@
#include "dispatcher.h"
using P2P::Dispatcher;
-MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , QObject *parent )
+MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , TQObject *parent )
: MSNSocket( parent )
{
m_account = account;
@@ -80,30 +80,30 @@ MSNSwitchBoardSocket::~MSNSwitchBoardSocket()
{
kdDebug(14140) << k_funcinfo << endl;
- QMap<QString , QPair<QString , KTempFile*> >::Iterator it;
+ TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it;
for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it )
{
delete it.data().second;
}
}
-void MSNSwitchBoardSocket::connectToSwitchBoard(QString ID, QString address, QString auth)
+void MSNSwitchBoardSocket::connectToSwitchBoard(TQString ID, TQString address, TQString auth)
{
// we need these for the handshake later on (when we're connected)
m_ID = ID;
m_auth = auth;
- QString server = address.left( address.find( ":" ) );
+ TQString server = address.left( address.find( ":" ) );
uint port = address.right( address.length() - address.findRev( ":" ) - 1 ).toUInt();
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ),
- this, SLOT(slotReadMessage( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ),
+ this, TQT_SLOT(slotReadMessage( const TQByteArray & ) ) );
- QObject::connect( this, SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ),
- this, SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) );
+ TQObject::connect( this, TQT_SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ),
+ this, TQT_SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) );
- QObject::connect( this, SIGNAL( socketClosed( ) ),
- this, SLOT( slotSocketClosed( ) ) );
+ TQObject::connect( this, TQT_SIGNAL( socketClosed( ) ),
+ this, TQT_SLOT( slotSocketClosed( ) ) );
connect( server, port );
}
@@ -112,7 +112,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
{
kdDebug(14140) << k_funcinfo << endl;
- QString msg;
+ TQString msg;
MSNSocket::ErrorType type;
switch( code )
@@ -153,7 +153,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
}
case 713:
{
- QString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle );
+ TQString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle );
type = MSNSocket::ErrorInformation;
userLeftChat(m_msgHandle, i18n("user blocked you"));
@@ -175,8 +175,8 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
emit errorMessage( type, msg );
}
-void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
- const QString &data )
+void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id ,
+ const TQString &data )
{
if( cmd == "NAK" )
{
@@ -189,8 +189,8 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
else if( cmd == "JOI" )
{
// new user joins the chat, update user in chat list
- QString handle = data.section( ' ', 0, 0 );
- QString screenname = unescape(data.section( ' ', 1, 1 ));
+ TQString handle = data.section( ' ', 0, 0 );
+ TQString screenname = unescape(data.section( ' ', 1, 1 ));
if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
emit userJoined( handle, screenname, false );
@@ -198,11 +198,11 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
else if( cmd == "IRO" )
{
// we have joined a multi chat session- this are the users in this chat
- QString handle = data.section( ' ', 2, 2 );
+ TQString handle = data.section( ' ', 2, 2 );
if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
- QString screenname = unescape(data.section( ' ', 3, 3));
+ TQString screenname = unescape(data.section( ' ', 3, 3));
emit userJoined( handle, screenname, true );
}
else if( cmd == "USR" )
@@ -214,12 +214,12 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
// some has disconnect from chat, update user in chat list
cleanQueue(); //in case some message are waiting their emoticons, never mind, send them
- QString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" );
- userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : QString::null );
+ TQString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" );
+ userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : TQString::null );
}
else if( cmd == "MSG" )
{
- QString len = data.section( ' ', 2, 2 );
+ TQString len = data.section( ' ', 2, 2 );
// we need to know who's sending is the block...
m_msgHandle = data.section( ' ', 0, 0 );
@@ -229,7 +229,7 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
//that's why the official client does not uptade alaws the nickname immediately.
if(m_account->contacts()[ m_msgHandle ])
{
- QString displayName=data.section( ' ', 1, 1 );
+ TQString displayName=data.section( ' ', 1, 1 );
if(m_account->contacts()[ m_msgHandle ]->displayName() != displayName)
m_account->contacts()[ m_msgHandle ]->rename(displayName);
}*/
@@ -238,17 +238,17 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
}
}
-void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
+void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
{
- QString msg = QString::fromUtf8(bytes, bytes.size());
+ TQString msg = TQString::fromUtf8(bytes, bytes.size());
- QRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)");
+ TQRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)");
rx.search(msg);
- QString type=rx.cap(1);
+ TQString type=rx.cap(1);
- rx=QRegExp("User-Agent: ([A-Za-z0-9./\\-]*)");
+ rx=TQRegExp("User-Agent: ([A-Za-z0-9./\\-]*)");
rx.search(msg);
- QString clientStr=rx.cap(1);
+ TQString clientStr=rx.cap(1);
if( !clientStr.isNull() && !m_msgHandle.isNull())
{
@@ -264,7 +264,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
else if( type== "text/x-msmsgscontrol" )
{
- QString message;
+ TQString message;
message = msg.right( msg.length() - msg.findRev( " " ) - 1 );
message = message.replace( "\r\n" ,"" );
emit receivedTypingMsg( message.lower(), true );
@@ -273,7 +273,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
{
if(msg.contains("ID:"))
{
- QRegExp rx("ID: ([0-9]*)");
+ TQRegExp rx("ID: ([0-9]*)");
rx.search(msg);
uint dataCastId = rx.cap(1).toUInt();
if( dataCastId == 1 )
@@ -290,16 +290,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
// sending a text message. So if it's not supplied, we'll just
// assume its that.
- QColor fontColor;
- QFont font;
+ TQColor fontColor;
+ TQFont font;
if ( msg.contains( "X-MMS-IM-Format" ) )
{
- QString fontName;
- QString fontInfo;
- QString color;
+ TQString fontName;
+ TQString fontInfo;
+ TQString color;
- rx=QRegExp("X-MMS-IM-Format: ([^\r\n]*)");
+ rx=TQRegExp("X-MMS-IM-Format: ([^\r\n]*)");
rx.search(msg);
fontInfo =rx.cap(1);
@@ -339,27 +339,27 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
// Handle 'MS Serif' and 'MS Sans Serif' as an empty font name
if( !fontName.isEmpty() && fontName != "MS Serif" && fontName != "MS Sans Serif" )
{
- QString ef=parseFontAttr( fontInfo, "EF" );
+ TQString ef=parseFontAttr( fontInfo, "EF" );
- font = QFont( fontName,
+ font = TQFont( fontName,
parseFontAttr( fontInfo, "PF" ).toInt(), // font size
- ef.contains( 'B' ) ? QFont::Bold : QFont::Normal,
+ ef.contains( 'B' ) ? TQFont::Bold : TQFont::Normal,
ef.contains( 'I' ) );
font.setUnderline(ef.contains( 'U' ));
font.setStrikeOut(ef.contains( 'S' ));
}
}
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
others.append( m_account->contacts()[ *it2 ] );
}
- QString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 );
+ TQString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 );
//Stupid MSN PLUS colors code. message with incorrect charactere are not showed correctly in the chatwindow.
//TODO: parse theses one to show the color too in Kopete
@@ -381,16 +381,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
kmsg.setFg( fontColor );
kmsg.setFont( font );
- rx=QRegExp("Chunks: ([0-9]*)");
+ rx=TQRegExp("Chunks: ([0-9]*)");
rx.search(msg);
unsigned int chunks=rx.cap(1).toUInt();
- rx=QRegExp("Chunk: ([0-9]*)");
+ rx=TQRegExp("Chunk: ([0-9]*)");
rx.search(msg);
unsigned int chunk=rx.cap(1).toUInt();
if(chunk != 0 && !m_msgQueue.isEmpty())
{
- QString msg=m_msgQueue.last().plainBody();
+ TQString msg=m_msgQueue.last().plainBody();
m_msgQueue.pop_back(); //removes the last item
kmsg.setBody( msg+ message, Kopete::Message::PlainText );
}
@@ -407,8 +407,8 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
m_msgQueue.append( kmsg );
if(!m_emoticonTimer) //to be sure no message will be lost, we will appends message to
{ // the queue in 15 secondes even if we have not received emoticons
- m_emoticonTimer=new QTimer(this);
- QObject::connect(m_emoticonTimer , SIGNAL(timeout()) , this, SLOT(cleanQueue()));
+ m_emoticonTimer=new TQTimer(this);
+ TQObject::connect(m_emoticonTimer , TQT_SIGNAL(timeout()) , this, TQT_SLOT(cleanQueue()));
m_emoticonTimer->start( 15000 , true );
}
}
@@ -423,13 +423,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
config->setGroup( "MSN" );
if ( config->readBoolEntry( "useCustomEmoticons", true ) )
{
- QRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)");
+ TQRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)");
rx.setMinimal(true);
int pos = rx.search(msg);
while( pos != -1)
{
- QString msnobj=rx.cap(2);
- QString txt=rx.cap(1);
+ TQString msnobj=rx.cap(2);
+ TQString txt=rx.cap(1);
kdDebug(14140) << k_funcinfo << "emoticon: " << txt << " msnobj: " << msnobj<< endl;
if( !m_emoticons.contains(msnobj) || !m_emoticons[msnobj].second )
@@ -453,7 +453,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
else if( type == "text/x-clientcaps" )
{
- rx=QRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)");
+ rx=TQRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)");
rx.search(msg);
clientStr=unescape( rx.cap(1) );
@@ -469,7 +469,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
- QString JabberID;
+ TQString JabberID;
if(config->readBoolEntry("SendJabber", true))
JabberID=config->readEntry("JabberAccount");
@@ -479,13 +479,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
if( config->readBoolEntry("SendClientInfo", true) || !JabberID.isEmpty())
{
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-clientcaps\r\n"
"Client-Name: Kopete/"+escape(kapp->aboutData()->version())+"\r\n"
+JabberID+
"\r\n" ).utf8();
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
}
m_clientcapsSent=true;
@@ -496,15 +496,15 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
else if(type == "image/gif" || msg.contains("Message-ID:"))
{
// Incoming inkformatgif.
- QRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}");
+ TQRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}");
regex.search(msg);
- QString messageId = regex.cap(1);
- regex = QRegExp("Chunks: (\\d+)");
+ TQString messageId = regex.cap(1);
+ regex = TQRegExp("Chunks: (\\d+)");
regex.search(msg);
- QString chunks = regex.cap(1);
- regex = QRegExp("Chunk: (\\d+)");
+ TQString chunks = regex.cap(1);
+ regex = TQRegExp("Chunk: (\\d+)");
regex.search(msg);
- QString chunk = regex.cap(1);
+ TQString chunk = regex.cap(1);
if(!messageId.isNull())
{
@@ -513,10 +513,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
Q_UINT32 numberOfChunks = chunks.toUInt(&valid);
if(valid && (numberOfChunks > 1))
{
- regex = QRegExp("base64:([0-9a-zA-Z+/=]+)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]+)");
regex.search(msg);
// Retrieve the first chunk of the ink format gif.
- QString base64 = regex.cap(1);
+ TQString base64 = regex.cap(1);
// More chunks are expected, buffer the chunk received.
InkMessage inkMessage;
inkMessage.chunks = numberOfChunks;
@@ -527,10 +527,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
else
{
// There is only one chunk of data.
- regex = QRegExp("base64:([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)");
regex.search(msg);
// Retrieve the base64 encoded ink data.
- QString data = regex.cap(1);
+ TQString data = regex.cap(1);
DispatchInkMessage(data);
}
@@ -558,9 +558,9 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
}
-void MSNSwitchBoardSocket::DispatchInkMessage(const QString& base64String)
+void MSNSwitchBoardSocket::DispatchInkMessage(const TQString& base64String)
{
- QByteArray image;
+ TQByteArray image;
// Convert from base64 encoded string to byte array.
KCodecs::base64Decode(base64String.utf8() , image);
KTempFile *inkImage = new KTempFile(locateLocal( "tmp", "inkformatgif-" ), ".gif");
@@ -585,18 +585,18 @@ void MSNSwitchBoardSocket::sendTypingMsg( bool isTyping )
}
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgscontrol\r\n"
"TypingUser: " + m_myHandle + "\r\n"
"\r\n" ).utf8();
// Length is appended by sendCommand()
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
}
// this Invites an Contact
-void MSNSwitchBoardSocket::slotInviteContact(const QString &handle)
+void MSNSwitchBoardSocket::slotInviteContact(const TQString &handle)
{
m_msgHandle=handle;
sendCommand( "CAL", handle );
@@ -604,13 +604,13 @@ void MSNSwitchBoardSocket::slotInviteContact(const QString &handle)
//
// Send a custum emoticon
//
-int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString &filename)
+int MSNSwitchBoardSocket::sendCustomEmoticon(const TQString &name, const TQString &filename)
{
- QString picObj;
+ TQString picObj;
//try to find it in the cache.
- const QMap<QString, QString> objectList = PeerDispatcher()->objectList;
- for (QMap<QString,QString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it )
+ const TQMap<TQString, TQString> objectList = PeerDispatcher()->objectList;
+ for (TQMap<TQString,TQString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it )
{
if(it.data() == filename)
{
@@ -621,18 +621,18 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString
if(picObj.isNull())
{ //if not found in the cache, generate the picture object
- QFileInfo fi(filename);
+ TQFileInfo fi(filename);
// open the icon file
- QFile pictFile(fi.filePath());
+ TQFile pictFile(fi.filePath());
if (pictFile.open(IO_ReadOnly)) {
- QByteArray ar = pictFile.readAll();
+ TQByteArray ar = pictFile.readAll();
pictFile.close();
- QString sha1d = QString(KCodecs::base64Encode(SHA1::hash(ar)));
- QString size = QString::number( pictFile.size() );
- QString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d;
- QString sha1c = QString(KCodecs::base64Encode(SHA1::hashString(all.utf8())));
+ TQString sha1d = TQString(KCodecs::base64Encode(SHA1::hash(ar)));
+ TQString size = TQString::number( pictFile.size() );
+ TQString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d;
+ TQString sha1c = TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8())));
picObj = "<msnobj Creator=\"" + m_account->accountId() + "\" Size=\"" + size + "\" Type=\"2\" Location=\""+ fi.fileName() + "\" Friendly=\"AAA=\" SHA1D=\""+sha1d+ "\" SHA1C=\""+sha1c+"\"/>";
PeerDispatcher()->objectList.insert(picObj, filename);
@@ -641,7 +641,7 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString
return 0;
}
- QString msg = "MIME-Version: 1.0\r\n"
+ TQString msg = "MIME-Version: 1.0\r\n"
"Content-Type: text/x-mms-emoticon\r\n"
"\r\n" +
name + "\t" + picObj + "\t\r\n";
@@ -671,12 +671,12 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
config->setGroup( "MSN" );
if ( config->readBoolEntry( "exportEmoticons", false ) )
{
- QMap<QString, QStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList();
+ TQMap<TQString, TQStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList();
// Check the list for any custom emoticons
- for (QMap<QString, QStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++)
+ for (TQMap<TQString, TQStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++)
{
- for ( QStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 )
+ for ( TQStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 )
{
if ( msg.plainBody().contains( *itr2 ) )
sendCustomEmoticon( *itr2, itr.key() );
@@ -686,7 +686,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
if( msg.format() & Kopete::Message::RichText )
{
- QRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$");
+ TQRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$");
if(regex.search(msg.escapedBody()) != -1)
{
// FIXME why are we sending the images.. the contact should request them.
@@ -696,19 +696,19 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
}
// User-Agent is not a official flag, but GAIM has it
- QString UA;
+ TQString UA;
if( config->readBoolEntry("SendClientInfo", true) )
{
UA="User-Agent: Kopete/"+escape(kapp->aboutData()->version())+"\r\n";
}
- QString head =
+ TQString head =
"MIME-Version: 1.0\r\n"
"Content-Type: text/plain; charset=UTF-8\r\n"
+UA+
"X-MMS-IM-Format: ";
- if(msg.font() != QFont() )
+ if(msg.font() != TQFont() )
{
//It's verry strange that if the font name is bigger than 31 char, the _server_ close the socket and don't deliver the message.
// the real question is why ? my guess is that MS patched the server because a bug in their client, but that's just a guess.
@@ -735,7 +735,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
// Color support
if (msg.fg().isValid())
{
- QString colorCode = QColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.)
+ TQString colorCode = TQColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.)
head += "CO=" + colorCode;
}
else
@@ -748,7 +748,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
head += "; RL=1";
head += "\r\n";
- QString message= msg.plainBody().replace( "\n" , "\r\n" );
+ TQString message= msg.plainBody().replace( "\n" , "\r\n" );
//-- Check if the message isn't too big, TODO: do that at the libkopete level.
int len_H=head.utf8().length(); // != head.length() because i need the size in butes and
@@ -759,7 +759,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
//It's possible to made the opposite client join them, as explained in this MS Word document
//http://www.bot-depot.com/forums/index.php?act=Attach&type=post&id=35110
- head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+QString::number( rand()%10)+QString::number( rand()%10)+"}\r\n";
+ head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+TQString::number( rand()%10)+TQString::number( rand()%10)+"}\r\n";
int len_H=head.utf8().length()+ 14; //14 is the size of "Chunks: x"
//this is the size of each part of the message (excluding the header)
int futurmessages_size=1400; //1400 is a common good size
@@ -777,7 +777,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
int chunk=0;
do
{
- QString m=message.mid(place, futurmessages_size);
+ TQString m=message.mid(place, futurmessages_size);
place += futurmessages_size;
//make sure the size is not too big because of utf8
@@ -798,11 +798,11 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
m=m.left(len-d);
place -= d;
}
- QString chunk_str;
+ TQString chunk_str;
if(chunk==0)
- chunk_str="Chunks: "+QString::number(nb)+"\r\n";
+ chunk_str="Chunks: "+TQString::number(nb)+"\r\n";
else if(chunk<nb)
- chunk_str="Chunk: "+QString::number(chunk)+"\r\n";
+ chunk_str="Chunk: "+TQString::number(chunk)+"\r\n";
else
{
kdDebug(14140) << k_funcinfo <<"The message is slit in more than initially estimated" <<endl;
@@ -815,7 +815,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
while(chunk<nb)
{
kdDebug(14140) << k_funcinfo <<"The message is plit in less than initially estimated. Sending empty message to complete" <<endl;
- QString chunk_str="Chunk: "+QString::number(chunk);
+ TQString chunk_str="Chunk: "+TQString::number(chunk);
sendCommand( "MSG", "A", true, (head+chunk_str+"\r\n").utf8() );
chunk++;
}
@@ -827,8 +827,8 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
if(!m_keepAlive)
{
m_keepAliveNb=20;
- m_keepAlive=new QTimer(this);
- QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer()));
+ m_keepAlive=new TQTimer(this);
+ TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer()));
m_keepAlive->start(50*1000);
}
@@ -838,7 +838,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
void MSNSwitchBoardSocket::slotSocketClosed( )
{
- for( QStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it )
+ for( TQStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it )
{
emit userLeft( (*it), i18n("connection closed"));
}
@@ -850,7 +850,7 @@ void MSNSwitchBoardSocket::slotSocketClosed( )
void MSNSwitchBoardSocket::slotCloseSession()
{
- sendCommand( "OUT", QString::null, false );
+ sendCommand( "OUT", TQString::null, false );
disconnect();
}
@@ -859,8 +859,8 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat
{
if (status == Connected)
{
- QCString command;
- QString args;
+ TQCString command;
+ TQString args;
if( !m_ID ) // we're inviting
{
@@ -877,14 +877,14 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat
if(!m_keepAlive)
{
m_keepAliveNb=20;
- m_keepAlive=new QTimer(this);
- QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer()));
+ m_keepAlive=new TQTimer(this);
+ TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer()));
m_keepAlive->start(50*1000);
}
}
}
-void MSNSwitchBoardSocket::userLeftChat(const QString& handle , const QString &reason)
+void MSNSwitchBoardSocket::userLeftChat(const TQString& handle , const TQString &reason)
{
emit userLeft( handle, reason );
@@ -903,7 +903,7 @@ void MSNSwitchBoardSocket::requestDisplayPicture()
PeerDispatcher()->requestDisplayIcon(m_msgHandle, contact->object());
}
-void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString &msnObj )
+void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const TQString &msnObj )
{
kdDebug(14141) << k_funcinfo << msnObj << endl;
@@ -920,17 +920,17 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString
}
else if(msnObj == "inkformatgif")
{
- QString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() );
+ TQString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() );
kdDebug(14140) << k_funcinfo << file->name() <<endl;
m_typewrited.append(file);
m_typewrited.setAutoDelete(true);
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
@@ -961,11 +961,11 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString
}
}
-void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const QString& /*fileName*/, Q_INT64 /*fileSize*/)
+void MSNSwitchBoardSocket::slotIncomingFileTransfer(const TQString& from, const TQString& /*fileName*/, Q_INT64 /*fileSize*/)
{
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
@@ -980,7 +980,7 @@ void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const Q
m_chatMembers.append( m_msgHandle );
emit userJoined( m_msgHandle , m_msgHandle , false);
}
- QString invite = "Incoming file transfer.";
+ TQString invite = "Incoming file transfer.";
Kopete::Message msg =
Kopete::Message(m_account->contacts()[from], others, invite, Kopete::Message::Internal, Kopete::Message::PlainText);
emit msgReceived(msg);
@@ -996,7 +996,7 @@ void MSNSwitchBoardSocket::cleanQueue()
}
kdDebug(14141) << k_funcinfo << m_msgQueue.count() << endl;
- QValueList<const Kopete::Message>::Iterator it_msg;
+ TQValueList<const Kopete::Message>::Iterator it_msg;
for ( it_msg = m_msgQueue.begin(); it_msg != m_msgQueue.end(); ++it_msg )
{
Kopete::Message kmsg = (*it_msg);
@@ -1007,33 +1007,33 @@ void MSNSwitchBoardSocket::cleanQueue()
Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kmsg)
{
- QString message=kmsg.escapedBody();
- QMap<QString , QPair<QString , KTempFile*> >::Iterator it;
+ TQString message=kmsg.escapedBody();
+ TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it;
for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it )
{
- QString es=QStyleSheet::escape(it.data().first);
+ TQString es=TQStyleSheet::escape(it.data().first);
KTempFile *f=it.data().second;
if(message.contains(es) && f)
{
- QString imgPath = f->name();
- QImage iconImage(imgPath);
+ TQString imgPath = f->name();
+ TQImage iconImage(imgPath);
/* We don't use a comple algoritm (like the one in the #if) because the msn client shows
* emoticons like that. So, in that case, we show like the MSN client */
#if 0
- QString em = QRegExp::escape( es );
- message.replace( QRegExp(QString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)),
- QString::fromLatin1("\\1<img align=\"center\" width=\"") +
+ TQString em = TQRegExp::escape( es );
+ message.replace( TQRegExp(TQString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)),
+ TQString::fromLatin1("\\1<img align=\"center\" width=\"") +
#endif
//match any occurence which is not in a html tag.
- message.replace( QRegExp(QString::fromLatin1("%1(?![^><]*>)").arg(QRegExp::escape(es))),
- QString::fromLatin1("<img align=\"center\" width=\"") +
- QString::number(iconImage.width()) +
- QString::fromLatin1("\" height=\"") +
- QString::number(iconImage.height()) +
- QString::fromLatin1("\" src=\"") + imgPath +
- QString::fromLatin1("\" title=\"") + es +
- QString::fromLatin1("\" alt=\"") + es +
- QString::fromLatin1( "\"/>" ) );
+ message.replace( TQRegExp(TQString::fromLatin1("%1(?![^><]*>)").arg(TQRegExp::escape(es))),
+ TQString::fromLatin1("<img align=\"center\" width=\"") +
+ TQString::number(iconImage.width()) +
+ TQString::fromLatin1("\" height=\"") +
+ TQString::number(iconImage.height()) +
+ TQString::fromLatin1("\" src=\"") + imgPath +
+ TQString::fromLatin1("\" title=\"") + es +
+ TQString::fromLatin1("\" alt=\"") + es +
+ TQString::fromLatin1( "\"/>" ) );
kmsg.setBody(message, Kopete::Message::RichText);
}
}
@@ -1042,22 +1042,22 @@ Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kms
int MSNSwitchBoardSocket::sendNudge()
{
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msnmsgr-datacast\r\n"
"\r\n"
"ID: 1\r\n"
"\r\n\r\n" ).utf8();
- QString args = "U";
+ TQString args = "U";
return sendCommand( "MSG", args, true, message );
}
// FIXME: This is nasty... replace with a regexp or so.
-QString MSNSwitchBoardSocket::parseFontAttr(QString str, QString attr)
+TQString MSNSwitchBoardSocket::parseFontAttr(TQString str, TQString attr)
{
- QString tmp;
+ TQString tmp;
int pos1=0, pos2=0;
pos1 = str.find(attr + "=");
@@ -1081,7 +1081,7 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher()
{
// Create a new msnslp dispatcher to handle
// all peer to peer requests.
- QStringList ip;
+ TQStringList ip;
if(m_account->notifySocket())
{
ip << m_account->notifySocket()->localIP();
@@ -1090,11 +1090,11 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher()
}
m_dispatcher = new Dispatcher(this, m_account->accountId(),ip );
-// QObject::connect(this, SIGNAL(blockRead(const QByteArray&)), m_dispatcher, SLOT(slotReadMessage(const QByteArray&)));
-// QObject::connect(m_dispatcher, SIGNAL(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool)), this, SLOT(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool)));
- QObject::connect(m_dispatcher, SIGNAL(incomingTransfer(const QString&, const QString&, Q_INT64)), this, SLOT(slotIncomingFileTransfer(const QString&, const QString&, Q_INT64)));
- QObject::connect(m_dispatcher, SIGNAL(displayIconReceived(KTempFile *, const QString&)), this, SLOT(slotEmoticonReceived( KTempFile *, const QString&)));
- QObject::connect(this, SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, SLOT(messageAcknowledged(unsigned int, bool)));
+// TQObject::connect(this, TQT_SIGNAL(blockRead(const TQByteArray&)), m_dispatcher, TQT_SLOT(slotReadMessage(const TQByteArray&)));
+// TQObject::connect(m_dispatcher, TQT_SIGNAL(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool)), this, TQT_SLOT(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool)));
+ TQObject::connect(m_dispatcher, TQT_SIGNAL(incomingTransfer(const TQString&, const TQString&, Q_INT64)), this, TQT_SLOT(slotIncomingFileTransfer(const TQString&, const TQString&, Q_INT64)));
+ TQObject::connect(m_dispatcher, TQT_SIGNAL(displayIconReceived(KTempFile *, const TQString&)), this, TQT_SLOT(slotEmoticonReceived( KTempFile *, const TQString&)));
+ TQObject::connect(this, TQT_SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, TQT_SLOT(messageAcknowledged(unsigned int, bool)));
m_dispatcher->m_pictureUrl = m_account->pictureUrl();
}
return m_dispatcher;
@@ -1120,12 +1120,12 @@ void MSNSwitchBoardSocket::slotKeepAliveTimer( )
}
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-keepalive\r\n"
"\r\n" ).utf8();
// Length is appended by sendCommand()
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
m_keepAliveNb--;
diff --git a/kopete/protocols/msn/msnswitchboardsocket.h b/kopete/protocols/msn/msnswitchboardsocket.h
index 5a6f9628..70cb7fa0 100644
--- a/kopete/protocols/msn/msnswitchboardsocket.h
+++ b/kopete/protocols/msn/msnswitchboardsocket.h
@@ -21,9 +21,9 @@
#ifndef MSNSWITCHBOARDSOCKET_H
#define MSNSWITCHBOARDSOCKET_H
-#include <qobject.h>
-#include <qstrlist.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
+#include <tqvaluevector.h>
#include <kstringhandler.h>
@@ -48,37 +48,37 @@ public:
/**
* Contructor: id is the KopeteMessageMangager's id
*/
- MSNSwitchBoardSocket( MSNAccount * account , QObject *parent);
+ MSNSwitchBoardSocket( MSNAccount * account , TQObject *parent);
~MSNSwitchBoardSocket();
private:
P2P::Dispatcher *m_dispatcher;
MSNAccount *m_account;
- QString m_myHandle; // our handle
+ TQString m_myHandle; // our handle
// contains the handle of the last person that msg'ed us.
// since we receive the actual message by readBlock(), we need
// to remember what the handle was of the person sending us the message.
- QString m_msgHandle;
+ TQString m_msgHandle;
- QString m_ID;
- QString m_auth;
- QStringList m_chatMembers;
+ TQString m_ID;
+ TQString m_auth;
+ TQStringList m_chatMembers;
//used for emoticons
- QValueList<const Kopete::Message> m_msgQueue;
+ TQValueList<const Kopete::Message> m_msgQueue;
unsigned m_recvIcons;
- QMap<QString , QPair<QString , KTempFile*> > m_emoticons;
+ TQMap<TQString , QPair<TQString , KTempFile*> > m_emoticons;
Kopete::Message &parseCustomEmoticons(Kopete::Message &msg);
- QTimer *m_emoticonTimer;
- QPtrList<KTempFile> m_typewrited;
+ TQTimer *m_emoticonTimer;
+ TQPtrList<KTempFile> m_typewrited;
struct InkMessage{
Q_UINT32 chunks;
- QString data;
+ TQString data;
};
- QMap<QString, InkMessage> m_inkMessageBuffer;
+ TQMap<TQString, InkMessage> m_inkMessageBuffer;
/** the number of chunk for currents messages */
unsigned int m_chunks;
@@ -87,33 +87,33 @@ private:
bool m_clientcapsSent;
private:
- void DispatchInkMessage(const QString &base64String);
+ void DispatchInkMessage(const TQString &base64String);
protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data );
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data );
/**
* Handle exceptions that might occur during a chat.
*/
virtual void handleError( uint code, uint id );
- QString parseFontAttr( QString str, QString attr );
+ TQString parseFontAttr( TQString str, TQString attr );
public:
- void connectToSwitchBoard( QString ID, QString address, QString auth );
- void setHandle( QString handle ) { m_myHandle = handle; }
- void setMsgHandle( QString handle ) { m_msgHandle = handle; }
+ void connectToSwitchBoard( TQString ID, TQString address, TQString auth );
+ void setHandle( TQString handle ) { m_myHandle = handle; }
+ void setMsgHandle( TQString handle ) { m_msgHandle = handle; }
- const QStringList &chatMembers() { return m_chatMembers; }
+ const TQStringList &chatMembers() { return m_chatMembers; }
- void userLeftChat( const QString &handle , const QString &reason );
+ void userLeftChat( const TQString &handle , const TQString &reason );
int sendMsg( const Kopete::Message &msg );
- int sendCustomEmoticon(const QString &name, const QString &filename);
+ int sendCustomEmoticon(const TQString &name, const TQString &filename);
int sendNudge();
@@ -121,7 +121,7 @@ public:
public slots:
void slotCloseSession();
- void slotInviteContact(const QString &handle);
+ void slotInviteContact(const TQString &handle);
/**
* Notify the server that the user is typing a message
@@ -131,7 +131,7 @@ public slots:
void requestDisplayPicture();
/** workaround Bug 113425 . see slotKeepAliveTimer() **/
- QTimer *m_keepAlive;
+ TQTimer *m_keepAlive;
int m_keepAliveNb;
@@ -139,9 +139,9 @@ public slots:
private slots:
void slotOnlineStatusChanged( MSNSocket::OnlineStatus status );
void slotSocketClosed( );
- void slotReadMessage( const QByteArray &bytes );
- void slotEmoticonReceived( KTempFile *, const QString& );
- void slotIncomingFileTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize);
+ void slotReadMessage( const TQByteArray &bytes );
+ void slotEmoticonReceived( KTempFile *, const TQString& );
+ void slotIncomingFileTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize);
void cleanQueue();
/** workaround Bug 113425 . see comment inside the function **/
@@ -149,14 +149,14 @@ private slots:
signals:
void msgReceived( Kopete::Message &msg );
- void receivedTypingMsg( const QString &contactId, bool isTyping );
+ void receivedTypingMsg( const TQString &contactId, bool isTyping );
void msgAcknowledgement(unsigned int, bool);
- void userJoined(const QString& handle , const QString &publicName , bool IRO);
- void userLeft(const QString& handle , const QString &reason);
- void nudgeReceived(const QString &handle);
+ void userJoined(const TQString& handle , const TQString &publicName , bool IRO);
+ void userLeft(const TQString& handle , const TQString &reason);
+ void nudgeReceived(const TQString &handle);
void switchBoardClosed( );
- void invitation(const QString& handle, const QString& msg);
+ void invitation(const TQString& handle, const TQString& msg);
};
diff --git a/kopete/protocols/msn/outgoingtransfer.cpp b/kopete/protocols/msn/outgoingtransfer.cpp
index 4879cf52..f6b71c12 100644
--- a/kopete/protocols/msn/outgoingtransfer.cpp
+++ b/kopete/protocols/msn/outgoingtransfer.cpp
@@ -26,9 +26,9 @@
using namespace KNetwork;
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
// Kopete includes
#include <kopetetransfermanager.h>
@@ -39,7 +39,7 @@ using P2P::Dispatcher;
using P2P::OutgoingTransfer;
using P2P::Message;
-OutgoingTransfer::OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+OutgoingTransfer::OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
: TransferContext(to,dispatcher,sessionId)
{
m_direction = Outgoing;
@@ -51,12 +51,12 @@ OutgoingTransfer::~OutgoingTransfer()
kdDebug(14140) << k_funcinfo << endl;
}
-void OutgoingTransfer::sendImage(const QByteArray& image)
+void OutgoingTransfer::sendImage(const TQByteArray& image)
{
-// TODO QByteArray base64 = KCodecs::base64Encode(image);
+// TODO TQByteArray base64 = KCodecs::base64Encode(image);
//
-// QCString body = "MIME-Version: 1.0\r\n"
+// TQCString body = "MIME-Version: 1.0\r\n"
// "Content-Type: image/gif\r\n"
// "\r\n"
// "base64:" +
@@ -71,7 +71,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image)
// outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4;
// outbound.header.ackUniqueIdentifier = 0;
// outbound.header.ackDataSize = 0l;
-// QByteArray bytes(4);
+// TQByteArray bytes(4);
// bytes.fill('\0');
// outbound.body = bytes;
// outbound.applicationIdentifier = 0;
@@ -84,7 +84,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image)
void OutgoingTransfer::slotSendData()
{
Q_INT32 bytesRead = 0;
- QByteArray buffer(1202);
+ TQByteArray buffer(1202);
if(!m_file)
return;
@@ -101,7 +101,7 @@ void OutgoingTransfer::slotSendData()
buffer.resize(bytesRead);
}
- kdDebug(14140) << k_funcinfo << QString("Sending, %1 bytes").arg(bytesRead) << endl;
+ kdDebug(14140) << k_funcinfo << TQString("Sending, %1 bytes").arg(bytesRead) << endl;
if((m_offset + bytesRead) < m_file->size())
{
@@ -193,8 +193,8 @@ void OutgoingTransfer::acknowledged()
void OutgoingTransfer::processMessage(const Message& message)
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("BYE"))
@@ -217,9 +217,9 @@ void OutgoingTransfer::processMessage(const Message& message)
else if(body.startsWith("MSNSLP/1.0 200 OK"))
{
// Retrieve the message content type.
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(body);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType == "application/x-msnmsgr-sessionreqbody")
{
@@ -246,19 +246,19 @@ void OutgoingTransfer::processMessage(const Message& message)
m_transfer =
Kopete::TransferManager::transferManager()->addTransfer(contact, m_file->name(), m_file->size(), m_recipient, Kopete::FileTransferInfo::Outgoing);
- QObject::connect(m_transfer , SIGNAL(transferCanceled()), this, SLOT(abort()));
+ TQObject::connect(m_transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
m_state = Negotiation;
m_branch = P2P::Uid::createUid();
// Send the direct connection invitation message.
- QString content = "Bridges: TRUDPv1 TCPv1\r\n" +
- QString("NetID: %1\r\n").arg("-123657987") +
- QString("Conn-Type: %1\r\n").arg("Restrict-NAT") +
+ TQString content = "Bridges: TRUDPv1 TCPv1\r\n" +
+ TQString("NetID: %1\r\n").arg("-123657987") +
+ TQString("Conn-Type: %1\r\n").arg("Restrict-NAT") +
"UPnPNat: false\r\n"
"ICF: false\r\n" +
- QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
+ TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
"\r\n";
sendMessage(INVITE, content);
}
@@ -266,7 +266,7 @@ void OutgoingTransfer::processMessage(const Message& message)
{
// Determine whether the recipient created
// a listening endpoint.
- regex = QRegExp("Listening: ([^\r\n]+)\r\n");
+ regex = TQRegExp("Listening: ([^\r\n]+)\r\n");
regex.search(body);
bool isListening = (regex.cap(1) == "true");
@@ -281,16 +281,16 @@ void OutgoingTransfer::processMessage(const Message& message)
if(isListening)
{
// Retrieve the hashed nonce for this direct connection instance.
- regex = QRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_nonce = regex.cap(1);
// Retrieve the listening endpoints of the receiving client.
- regex = QRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n");
+ regex = TQRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n");
regex.search(body);
- m_peerEndpoints = QStringList::split(" ", regex.cap(1));
+ m_peerEndpoints = TQStringList::split(" ", regex.cap(1));
m_endpointIterator = m_peerEndpoints.begin();
// Retrieve the listening port of the receiving client.
- regex = QRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n");
+ regex = TQRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n");
regex.search(body);
m_remotePort = regex.cap(1);
@@ -336,7 +336,7 @@ void OutgoingTransfer::readyToSend()
slotSendData();
}
-void OutgoingTransfer::connectToEndpoint(const QString& hostName)
+void OutgoingTransfer::connectToEndpoint(const TQString& hostName)
{
m_socket = new KBufferedSocket(hostName, m_remotePort);
m_socket->setBlocking(false);
@@ -345,10 +345,10 @@ void OutgoingTransfer::connectToEndpoint(const QString& hostName)
// when we are ready to sent data.
// NOTE readyWrite consumes too much cpu usage.
m_socket->enableWrite(false);
- QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotRead()));
- QObject::connect(m_socket, SIGNAL(connected(const KResolverEntry&)), this, SLOT(slotConnected()));
- QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
- QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotRead()));
+ TQObject::connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry&)), this, TQT_SLOT(slotConnected()));
+ TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Try to connect to the endpoint.
m_socket->connect();
}
@@ -357,13 +357,13 @@ void OutgoingTransfer::slotConnected()
{
kdDebug(14140) << k_funcinfo << endl;
// Check if connection is ok.
- Q_UINT32 bytesWritten = m_socket->writeBlock(QCString("foo").data(), 4);
+ Q_UINT32 bytesWritten = m_socket->writeBlock(TQCString("foo").data(), 4);
if(bytesWritten != 4)
{
// Not all data was written, close the socket.
m_socket->closeNow();
// Schedule the data to be sent through the existing session.
- QTimer::singleShot(2000, this, SLOT(slotSendData()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData()));
return;
}
@@ -377,7 +377,7 @@ void OutgoingTransfer::slotConnected()
// Set the flag to indicate that this is
// a direct connection handshake message.
handshake.header.flag = 0x100;
- QString nonce = m_nonce.remove('-');
+ TQString nonce = m_nonce.remove('-');
handshake.header.ackSessionIdentifier = nonce.mid(0, 8).toUInt(0, 16);
handshake.header.ackUniqueIdentifier =
nonce.mid(8, 4).toUInt(0, 16) | (nonce.mid(12, 4).toUInt(0, 16) << 16);
@@ -386,7 +386,7 @@ void OutgoingTransfer::slotConnected()
handshake.header.ackDataSize =
((Q_INT64)htonl(lo)) | (((Q_INT64)htonl(hi)) << 32);
- QByteArray stream;
+ TQByteArray stream;
// Write the message to the memory stream.
m_messageFormatter.writeMessage(handshake, stream, true);
// Send the byte stream over the wire.
@@ -418,7 +418,7 @@ void OutgoingTransfer::slotSocketError(int)
{
// Otherwise, send the data through the session.
m_identifier -= 1;
- QTimer::singleShot(2000, this, SLOT(slotSendData()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData()));
}
}
diff --git a/kopete/protocols/msn/outgoingtransfer.h b/kopete/protocols/msn/outgoingtransfer.h
index 014971ef..ee55593f 100644
--- a/kopete/protocols/msn/outgoingtransfer.h
+++ b/kopete/protocols/msn/outgoingtransfer.h
@@ -19,7 +19,7 @@
#include "p2p.h"
#include "dispatcher.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
@author Kopete Developers
@@ -28,10 +28,10 @@ namespace P2P{
class OutgoingTransfer : public TransferContext
{ Q_OBJECT
public:
- OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
+ OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
virtual ~OutgoingTransfer();
- void sendImage(const QByteArray& image);
+ void sendImage(const TQByteArray& image);
private slots:
void slotConnected();
@@ -42,13 +42,13 @@ namespace P2P{
private:
virtual void acknowledged();
- void connectToEndpoint(const QString& hostName);
+ void connectToEndpoint(const TQString& hostName);
virtual void processMessage(const Message& message);
- QStringList m_peerEndpoints;
- QStringList::Iterator m_endpointIterator;
- QString m_remotePort;
- QString m_nonce;
+ TQStringList m_peerEndpoints;
+ TQStringList::Iterator m_endpointIterator;
+ TQString m_remotePort;
+ TQString m_nonce;
char m_handshake;
protected:
diff --git a/kopete/protocols/msn/p2p.cpp b/kopete/protocols/msn/p2p.cpp
index 219fd935..1aa3ddae 100644
--- a/kopete/protocols/msn/p2p.cpp
+++ b/kopete/protocols/msn/p2p.cpp
@@ -27,25 +27,25 @@ using P2P::TransferType;
#include <kbufferedsocket.h>
#include <kdebug.h>
// Qt includes
-#include <qfile.h>
+#include <tqfile.h>
// Kopete includes
#include <kopetetransfermanager.h>
-QString P2P::Uid::createUid()
+TQString P2P::Uid::createUid()
{
- return (QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number(rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
+ return (TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number(rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
}
-TransferContext::TransferContext(const QString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
- : QObject(dispatcher) ,
+TransferContext::TransferContext(const TQString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+ : TQObject(dispatcher) ,
m_sessionId(sessionId) ,
m_identifier(0) ,
m_file(0) ,
@@ -115,7 +115,7 @@ void TransferContext::acknowledge(const Message& message)
outbound.applicationIdentifier = 0l;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
// Write the acknowledge message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
@@ -137,7 +137,7 @@ void TransferContext::error()
m_dispatcher->detach(this);
}
-void TransferContext::sendData(const QByteArray& bytes)
+void TransferContext::sendData(const TQByteArray& bytes)
{
Message outbound;
outbound.header.sessionId = m_sessionId;
@@ -166,7 +166,7 @@ void TransferContext::sendData(const QByteArray& bytes)
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
{
@@ -194,19 +194,19 @@ void TransferContext::sendDataPreparation()
outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4;
outbound.header.ackUniqueIdentifier = 0;
outbound.header.ackDataSize = 0l;
- QByteArray bytes(4);
+ TQByteArray bytes(4);
bytes.fill('\0');
outbound.body = bytes;
outbound.applicationIdentifier = 1;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream);
// Send the receiving client the data prepartion message.
m_dispatcher->callbackChannel()->send(stream);
}
-void TransferContext::sendMessage(MessageType type, const QString& content, Q_INT32 flag, Q_INT32 appId)
+void TransferContext::sendMessage(MessageType type, const TQString& content, Q_INT32 flag, Q_INT32 appId)
{
Message outbound;
if(appId != 0){
@@ -237,7 +237,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
outbound.applicationIdentifier = appId;
outbound.destination = m_recipient;
- QString contentType, cSeq, method;
+ TQString contentType, cSeq, method;
switch(m_state)
{
@@ -295,7 +295,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
break;
}
- QCString body = QString(method + "\r\n"
+ TQCString body = TQString(method + "\r\n"
"To: <msnmsgr:" + m_recipient + ">\r\n"
"From: <msnmsgr:" + m_sender + ">\r\n"
"Via: MSNSLP/1.0/TLP ;branch={" + m_branch.upper() + "}\r\n"
@@ -303,12 +303,12 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
"Call-ID: {" + m_callId.upper() + "}\r\n"
"Max-Forwards: 0\r\n"
"Content-Type: " + contentType + "\r\n"
- "Content-Length: "+ QString::number(content.length() + 1) + "\r\n"
+ "Content-Length: "+ TQString::number(content.length() + 1) + "\r\n"
"\r\n" +
content).utf8();
// NOTE The body must have a null character at the end.
- // QCString by chance automatically adds a \0 to the
+ // TQCString by chance automatically adds a \0 to the
// end of the string.
outbound.header.totalDataSize = body.size();
@@ -316,7 +316,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
sendMessage(outbound, body);
}
-void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
+void TransferContext::sendMessage(Message& outbound, const TQByteArray& body)
{
Q_INT64 offset = 0L, bytesLeft = outbound.header.totalDataSize;
Q_INT16 chunkLength = 1202;
@@ -343,10 +343,10 @@ void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
}
kdDebug(14140) << k_funcinfo <<
- QCString(outbound.body.data(), outbound.body.size())
+ TQCString(outbound.body.data(), outbound.body.size())
<< endl;
- QByteArray stream;
+ TQByteArray stream;
// Write the outbound message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
diff --git a/kopete/protocols/msn/p2p.h b/kopete/protocols/msn/p2p.h
index c9b29af1..426b8dc5 100644
--- a/kopete/protocols/msn/p2p.h
+++ b/kopete/protocols/msn/p2p.h
@@ -18,7 +18,7 @@
#define P2P_H
// Qt includes
-#include <qobject.h>
+#include <tqobject.h>
#include "messageformatter.h"
#include "kopete_export.h"
@@ -41,7 +41,7 @@ namespace System{
public:
~Guid(){}
static Guid newGuid();
- QString toString();
+ TQString toString();
private:
Guid(){}
@@ -78,19 +78,19 @@ namespace P2P{
struct Message
{
public:
- QString mimeVersion;
- QString contentType;
- QString destination;
- QString source;
+ TQString mimeVersion;
+ TQString contentType;
+ TQString destination;
+ TQString source;
TransportHeader header;
- QByteArray body;
+ TQByteArray body;
Q_INT32 applicationIdentifier;
bool attachApplicationIdentifier;
};
class KOPETE_EXPORT Uid
{
- public: static QString createUid();
+ public: static TQString createUid();
};
class KOPETE_EXPORT TransferContext : public QObject
@@ -103,20 +103,20 @@ namespace P2P{
void error();
virtual void processMessage(const P2P::Message& message) = 0;
void sendDataPreparation();
- void sendMessage(MessageType type, const QString& content=QString::null, Q_INT32 flag=0, Q_INT32 appId=0);
+ void sendMessage(MessageType type, const TQString& content=TQString::null, Q_INT32 flag=0, Q_INT32 appId=0);
void setType(TransferType type);
public:
Q_UINT32 m_sessionId;
Q_UINT32 m_identifier;
- QFile *m_file;
+ TQFile *m_file;
Q_UINT32 m_transactionId;
Q_UINT32 m_ackSessionIdentifier;
Q_UINT32 m_ackUniqueIdentifier;
Kopete::Transfer *m_transfer;
- QString m_branch;
- QString m_callId;
- QString m_object;
+ TQString m_branch;
+ TQString m_callId;
+ TQString m_object;
public slots:
@@ -124,9 +124,9 @@ namespace P2P{
void readyWrite();
protected:
- TransferContext(const QString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId);
- void sendData(const QByteArray& bytes);
- void sendMessage(P2P::Message& outbound, const QByteArray& body);
+ TransferContext(const TQString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId);
+ void sendData(const TQByteArray& bytes);
+ void sendMessage(P2P::Message& outbound, const TQByteArray& body);
virtual void readyToSend();
Q_UINT32 m_baseIdentifier;
@@ -136,8 +136,8 @@ namespace P2P{
Q_INT64 m_offset;
Q_INT64 m_totalDataSize;
P2P::MessageFormatter m_messageFormatter;
- QString m_recipient;
- QString m_sender;
+ TQString m_recipient;
+ TQString m_sender;
KNetwork::KBufferedSocket *m_socket;
CommunicationState m_state;
TransferType m_type;
diff --git a/kopete/protocols/msn/sha1.cpp b/kopete/protocols/msn/sha1.cpp
index 84ad13ad..0774cede 100644
--- a/kopete/protocols/msn/sha1.cpp
+++ b/kopete/protocols/msn/sha1.cpp
@@ -159,10 +159,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -171,19 +171,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
diff --git a/kopete/protocols/msn/sha1.h b/kopete/protocols/msn/sha1.h
index 24f31af0..2038b9e7 100644
--- a/kopete/protocols/msn/sha1.h
+++ b/kopete/protocols/msn/sha1.h
@@ -21,14 +21,14 @@
#ifndef CS_SHA1_H
#define CS_SHA1_H
-#include<qstring.h>
+#include<tqstring.h>
class SHA1
{
public:
- static QByteArray hash(const QByteArray &);
- static QByteArray hashString(const QCString &);
- static QString digest(const QString &);
+ static TQByteArray hash(const TQByteArray &);
+ static TQByteArray hashString(const TQCString &);
+ static TQString digest(const TQString &);
private:
SHA1();
diff --git a/kopete/protocols/msn/transport.cpp b/kopete/protocols/msn/transport.cpp
index 492117b6..904e9411 100644
--- a/kopete/protocols/msn/transport.cpp
+++ b/kopete/protocols/msn/transport.cpp
@@ -34,8 +34,8 @@ using namespace KNetwork;
namespace PeerToPeer {
-Transport::Transport(QObject* parent, const char* name)
- : QObject(parent, name)
+Transport::Transport(TQObject* parent, const char* name)
+ : TQObject(parent, name)
{
mFormatter = new PeerToPeer::MessageFormatter(this);
}
@@ -47,7 +47,7 @@ Transport::~Transport()
//BEGIN Public Methods
-TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, TransportBridgeType type, const QString& identifier)
+TransportBridge* Transport::getBridge (const TQString& to, Q_UINT16 port, TransportBridgeType type, const TQString& identifier)
{
TransportBridge *bridge = 0l;
KInetSocketAddress address;
@@ -72,7 +72,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo
if (bridge != 0l)
{
- QObject::connect(bridge, SIGNAL(readyRead(const QByteArray&)), SLOT(slotOnReceive(const QByteArray&)));
+ TQObject::connect(bridge, TQT_SIGNAL(readyRead(const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQByteArray&)));
}
return 0l;
@@ -81,7 +81,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo
void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss)
{
mDefaultBridge = mss;
- QObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, SIGNAL(messageReceived(const QString&, const QByteArray&)), SLOT(slotOnReceive(const QString&, const QByteArray&)));
+ TQObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, TQT_SIGNAL(messageReceived(const TQString&, const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQString&, const TQByteArray&)));
}
//END
@@ -92,7 +92,7 @@ void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss)
// {
// }
-void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes)
+void Transport::slotOnReceive(const TQString& contact, const TQByteArray& bytes)
{
kdDebug (14140) << k_funcinfo << " >> RECEIVED " << bytes.size() << " bytes." << endl;
// Message message = mFormatter->readMessage(bytes);
@@ -103,15 +103,15 @@ void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes)
-TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name)
-: QObject(parent, name)
+TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name)
+: TQObject(parent, name)
{
mAddress = to;
mFormatter = formatter;
}
-TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name)
-: QObject(parent, name)
+TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name)
+: TQObject(parent, name)
{
mSocket = socket;
mAddress = mSocket->peerAddress();
@@ -166,17 +166,17 @@ void TransportBridge::slotOnSocketReceive()
-TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name)
+TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name)
: TransportBridge(to, formatter, parent, name)
{
- mSocket = new KStreamSocket(mAddress.ipAddress().toString(), QString::number(mAddress.port()), this);
+ mSocket = new KStreamSocket(mAddress.ipAddress().toString(), TQString::number(mAddress.port()), this);
mSocket->setBlocking(false);
- QObject::connect(mSocket, SIGNAL(connected(const KResolverEntry&)), SLOT(slotOnSocketConnect()));
- QObject::connect(mSocket, SIGNAL(gotError(int)), SLOT(slotOnError(int)));
+ TQObject::connect(mSocket, TQT_SIGNAL(connected(const KResolverEntry&)), TQT_SLOT(slotOnSocketConnect()));
+ TQObject::connect(mSocket, TQT_SIGNAL(gotError(int)), TQT_SLOT(slotOnError(int)));
mConnected = false;
}
-TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name)
+TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name)
: TransportBridge(socket, formatter, parent, name)
{
mConnected = (mSocket->state() == KStreamSocket::Open) ? true : false;
@@ -199,7 +199,7 @@ void TcpTransportBridge::slotOnConnect()
KStreamSocket *socket = static_cast<KStreamSocket*>(mSocket);
socket->setTimeout(5000);
- QObject::connect(socket, SIGNAL(timeOut()), SLOT(slotOnSocketConnectTimeout()));
+ TQObject::connect(socket, TQT_SIGNAL(timeOut()), TQT_SLOT(slotOnSocketConnectTimeout()));
mSocket->connect();
}
@@ -213,7 +213,7 @@ void TcpTransportBridge::slotOnDisconnect()
void TcpTransportBridge::slotOnError(int errorCode)
{
kdDebug(14140) << k_funcinfo << "Bridge (" << name() << ") ERROR occurred on {" << mSocket->localAddress().toString() << " <-> " << mSocket->peerAddress().toString() << "} - " << mSocket->errorString() << endl;
- emit bridgeError(QString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString()));
+ emit bridgeError(TQString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString()));
if (mConnected){
mSocket->disconnect();
mConnected = false;
@@ -239,13 +239,13 @@ void TcpTransportBridge::slotOnSocketConnect()
<< mSocket->localAddress().toString() << endl;
mConnected = true;
- QObject::connect(mSocket, SIGNAL(readyRead()), SLOT(slotOnSocketReceive()));
- QObject::connect(mSocket, SIGNAL(closed()), SLOT(slotOnSocketClose()));
+ TQObject::connect(mSocket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotOnSocketReceive()));
+ TQObject::connect(mSocket, TQT_SIGNAL(closed()), TQT_SLOT(slotOnSocketClose()));
mVerified = true;
- QString foo = "foo\0";
+ TQString foo = "foo\0";
mSocket->writeBlock(foo.ascii(), foo.length());
- foo = QString::null;
+ foo = TQString::null;
emit bridgeConnect();
}
@@ -254,15 +254,15 @@ void TcpTransportBridge::slotOnSocketReceive()
{
kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") RECEIVED " << mSocket->bytesAvailable() << " bytes." << endl;
- QByteArray bytes(mSocket->bytesAvailable());
+ TQByteArray bytes(mSocket->bytesAvailable());
mSocket->readBlock(bytes.data(), bytes.size());
// Write the data to the buffer.
mBuffer.write(bytes);
if (mVerified == false && mBuffer.size() >= 4)
{
- QByteArray foo = mBuffer.read(4);
- if (QString(foo) == "foo"){
+ TQByteArray foo = mBuffer.read(4);
+ if (TQString(foo) == "foo"){
kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") CONNECTION verified." << endl;
mVerified = true;
}
@@ -272,7 +272,7 @@ void TcpTransportBridge::slotOnSocketReceive()
{
if (mBuffer.size() >= 4 && mLength == 0)
{
- QByteArray array = mBuffer.read(4);
+ TQByteArray array = mBuffer.read(4);
for (int i=0; i < 4; i++){
((char*)mLength)[i] = array[i];
}
@@ -312,7 +312,7 @@ void TcpTransportBridge::slotOnSocketConnectTimeout()
TcpTransportBridge::Buffer::Buffer(Q_UINT32 length)
-: QByteArray(length)
+: TQByteArray(length)
{
}
@@ -322,7 +322,7 @@ TcpTransportBridge::Buffer::~Buffer()
//BEGIN Public Methods
-void TcpTransportBridge::Buffer::write(const QByteArray& bytes)
+void TcpTransportBridge::Buffer::write(const TQByteArray& bytes)
{
resize(size() + bytes.size());
for (uint i=0; i < bytes.size(); i++){
@@ -330,11 +330,11 @@ void TcpTransportBridge::Buffer::write(const QByteArray& bytes)
}
}
-QByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length)
+TQByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length)
{
- if (length >= size()) return QByteArray();
+ if (length >= size()) return TQByteArray();
- QByteArray buffer;
+ TQByteArray buffer;
buffer.duplicate(data(), length);
char *bytes = new char[size() - length];
diff --git a/kopete/protocols/msn/transport.h b/kopete/protocols/msn/transport.h
index 0dae0f32..eb190325 100644
--- a/kopete/protocols/msn/transport.h
+++ b/kopete/protocols/msn/transport.h
@@ -18,9 +18,9 @@
#define PEERTOPEERTRANSPORT_H
//BEGIN QT Includes
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
//END
//BEGIN KDE Includes
@@ -52,10 +52,10 @@ class Transport : public QObject
Q_OBJECT
public:
/** @brief Creates a new instance of the class Transport. */
- Transport(QObject* parent, const char* name = 0l);
+ Transport(TQObject* parent, const char* name = 0l);
~Transport();
/** @brief Get a transport bridge with the specified address, port, type and identifier. */
- TransportBridge* getBridge(const QString& address, Q_UINT16 port, TransportBridgeType type, const QString& identifier);
+ TransportBridge* getBridge(const TQString& address, Q_UINT16 port, TransportBridgeType type, const TQString& identifier);
/** @brief Sets the default transport bridge. */
void setDefaultBridge(MSNSwitchBoardSocket* mss);
@@ -63,15 +63,15 @@ private slots:
/** @brief Invokes when a message is received on a transport bridge. */
// void slotOnReceive(Message& message);
/** @brief Invokes when a message is received on the default transport bridge (relay). */
- void slotOnReceive(const QString& contact, const QByteArray& bytes);
+ void slotOnReceive(const TQString& contact, const TQByteArray& bytes);
private:
/** @brief Known SocketAddresses of peers. */
- QMap<QString, KNetwork::KInetSocketAddress> mAddresses;
+ TQMap<TQString, KNetwork::KInetSocketAddress> mAddresses;
/** @brief The list the connected transport bridges. */
- QValueList<TransportBridge*> mBridges;
+ TQValueList<TransportBridge*> mBridges;
/** @brief The default transport bridge (relay). */
- QGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge;
+ TQGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge;
/** @brief Message formatter used to ser/deser message. */
MessageFormatter *mFormatter;
};
@@ -85,9 +85,9 @@ public:
protected:
/** @brief Creates a new instance of the class TransportBridge with the specified address and formatter. */
- TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
/** @brief Creates a new instance of the class TransportBridge with the specified socket and formatter. */
- TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
public:
/** @brief Creates a connection between two peers. */
@@ -106,8 +106,8 @@ protected slots:
signals:
void bridgeConnect();
void bridgeDisconnect();
- void bridgeError(const QString& e);
- void bytesReceived(const QByteArray&);
+ void bridgeError(const TQString& e);
+ void bytesReceived(const TQByteArray&);
protected:
@@ -128,8 +128,8 @@ public:
virtual ~TcpTransportBridge();
private:
- TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
- TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
+ TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
protected slots:
virtual void slotOnConnect();
@@ -153,8 +153,8 @@ private:
~Buffer();
public:
- void write(const QByteArray& bytes);
- QByteArray read(Q_UINT32 length);
+ void write(const TQByteArray& bytes);
+ TQByteArray read(Q_UINT32 length);
};
Buffer mBuffer;
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
index 1829f41d..baa4fb60 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.cpp
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
@@ -18,16 +18,16 @@
#include "msneditaccountwidget.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kautoconfig.h>
@@ -61,18 +61,18 @@ public:
KAutoConfig *autoConfig;
MSNEditAccountUI *ui;
- QString pictureUrl;
- QImage pictureData;
+ TQString pictureUrl;
+ TQImage pictureData;
};
-MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent, const char * /* name */ )
-: QWidget( parent ), KopeteEditAccountWidget( account )
+MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent, const char * /* name */ )
+: TQWidget( parent ), KopeteEditAccountWidget( account )
{
d = new MSNEditAccountWidgetPrivate;
d->protocol=proto;
- ( new QVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
d->ui = new MSNEditAccountUI( this );
@@ -85,9 +85,9 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
//Get a list of all jabber accounts
KGlobal::config()->setGroup("MSN");
- QString jab_account=KGlobal::config()->readEntry("JabberAccount");
+ TQString jab_account=KGlobal::config()->readEntry("JabberAccount");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
{
if(a->protocol()->pluginId()=="JabberProtocol")
@@ -146,20 +146,20 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_serverName->setText( m_account->serverName() );
d->ui->m_serverPort->setValue( m_account->serverPort() );
- QStringList blockList = config->readListEntry( "blockList" );
- QStringList allowList = config->readListEntry( "allowList" );
- //QStringList reverseList = config->readListEntry("reverseList" );
+ TQStringList blockList = config->readListEntry( "blockList" );
+ TQStringList allowList = config->readListEntry( "allowList" );
+ //TQStringList reverseList = config->readListEntry("reverseList" );
- for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
+ for ( TQStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
d->ui->m_BL->insertItem( *it );
- for ( QStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
+ for ( TQStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
d->ui->m_AL->insertItem( *it );
d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" );
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
d->ui->m_displayPicture->setPixmap( d->pictureUrl );
d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" ));
@@ -174,14 +174,14 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_phones->setDisabled( true );
}
- connect( d->ui->m_allowButton, SIGNAL( clicked() ), this, SLOT( slotAllow() ) );
- connect( d->ui->m_blockButton, SIGNAL( clicked() ), this, SLOT( slotBlock() ) );
- connect( d->ui->m_selectImage, SIGNAL( clicked() ), this, SLOT( slotSelectImage() ) );
- connect( d->ui->m_RLButton, SIGNAL( clicked() ), this, SLOT( slotShowReverseList() ) );
- connect( d->ui->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister()));
- QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
- QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
- QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
+ connect( d->ui->m_allowButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAllow() ) );
+ connect( d->ui->m_blockButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBlock() ) );
+ connect( d->ui->m_selectImage, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectImage() ) );
+ connect( d->ui->m_RLButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowReverseList() ) );
+ connect( d->ui->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister()));
+ TQWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
+ TQWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
+ TQWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
}
MSNEditAccountWidget::~MSNEditAccountWidget()
@@ -227,7 +227,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() )
{
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account()->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account()->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
if ( d->pictureData.save( d->pictureUrl, "PNG" ) )
{
static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl );
@@ -270,7 +270,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
bool MSNEditAccountWidget::validateData()
{
- QString userid = d->ui->m_login->text();
+ TQString userid = d->ui->m_login->text();
if ( MSNProtocol::validContactId( userid ) )
return true;
@@ -282,16 +282,16 @@ bool MSNEditAccountWidget::validateData()
void MSNEditAccountWidget::slotAllow()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_BL->selectedItem();
+ TQListBoxItem *item = d->ui->m_BL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null );
d->ui->m_BL->takeItem( item );
d->ui->m_AL->insertItem( item );
@@ -300,17 +300,17 @@ void MSNEditAccountWidget::slotAllow()
void MSNEditAccountWidget::slotBlock()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_AL->selectedItem();
+ TQListBoxItem *item = d->ui->m_AL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null );
d->ui->m_AL->takeItem( item );
d->ui->m_BL->insertItem( item );
@@ -318,16 +318,16 @@ void MSNEditAccountWidget::slotBlock()
void MSNEditAccountWidget::slotShowReverseList()
{
- QStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
+ TQStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
KMessageBox::informationList( this, i18n( "Here you can see a list of contacts who added you to their contact list" ), reverseList,
i18n( "Reverse List - MSN Plugin" ) );
}
void MSNEditAccountWidget::slotSelectImage()
{
- QString path = 0;
+ TQString path = 0;
bool remoteFile = false;
- KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "MSN Display Picture" ) );
+ KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "MSN Display Picture" ) );
if( filePath.isEmpty() )
return;
@@ -340,14 +340,14 @@ void MSNEditAccountWidget::slotSelectImage()
}
else path = filePath.path();
- QImage img( path );
- img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this );
+ TQImage img( path );
+ img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this );
if(!img.isNull())
{
img = MSNProtocol::protocol()->scalePicture(img);
- d->ui->m_displayPicture->setPixmap( QPixmap(img) );
+ d->ui->m_displayPicture->setPixmap( TQPixmap(img) );
d->pictureData = img;
}
else
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.h b/kopete/protocols/msn/ui/msneditaccountwidget.h
index 2b8b8f6e..40900871 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.h
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.h
@@ -19,7 +19,7 @@
#ifndef MSNEDITACCOUNTWIDEGET_H
#define MSNEDITACCOUNTWIDEGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "editaccountwidget.h"
@@ -32,12 +32,12 @@ class MSNEditAccountWidgetPrivate;
/**
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class MSNEditAccountWidget : public QWidget, public KopeteEditAccountWidget
+class MSNEditAccountWidget : public TQWidget, public KopeteEditAccountWidget
{
Q_OBJECT
public:
- MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent = 0, const char *name = 0 );
+ MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent = 0, const char *name = 0 );
~MSNEditAccountWidget();
virtual bool validateData();
virtual Kopete::Account * apply();
diff --git a/kopete/protocols/msn/webcam.cpp b/kopete/protocols/msn/webcam.cpp
index db27d65f..60ce0e82 100644
--- a/kopete/protocols/msn/webcam.cpp
+++ b/kopete/protocols/msn/webcam.cpp
@@ -18,16 +18,16 @@
#include <stdlib.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kbufferedsocket.h>
#include <klocale.h>
#include <kserversocket.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qdatetime.h>
+#include <tqlabel.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqdatetime.h>
#include <kconfig.h>
#include "dispatcher.h"
@@ -42,7 +42,7 @@ using namespace KNetwork;
namespace P2P {
-Webcam::Webcam(Who who, const QString& to, Dispatcher *parent, Q_UINT32 sessionId)
+Webcam::Webcam(Who who, const TQString& to, Dispatcher *parent, Q_UINT32 sessionId)
: TransferContext(to,parent,sessionId) , m_who(who) , m_timerId(0)
{
setType(P2P::WebcamType);
@@ -83,8 +83,8 @@ void Webcam::askIncommingInvitation()
{
m_direction = Incoming;
//protect, in case this is deleted when the messagebox is active
- QGuardedPtr<Webcam> _this = this;
- QString message= (m_who==wProducer) ?
+ TQGuardedPtr<Webcam> _this = this;
+ TQString message= (m_who==wProducer) ?
i18n("<qt>The contact %1 wants to see <b>your</b> webcam, do you want them to see it?</qt>") :
i18n("The contact %1 wants to show you his/her webcam, do you want to see it?") ;
int result=KMessageBox::questionYesNo( 0L , message.arg(m_recipient),
@@ -92,7 +92,7 @@ void Webcam::askIncommingInvitation()
if(!_this)
return;
- QString content = QString("SessionID: %1\r\n\r\n").arg(m_sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(m_sessionId);
if(result==KMessageBox::Yes)
{
//Send two message, an OK, and an invite.
@@ -107,7 +107,7 @@ void Webcam::askIncommingInvitation()
m_branch=Uid::createUid();
m_state = Negotiation; //set type to application/x-msnmsgr-transreqbody
- content=QString("Bridges: TRUDPv1 TCPv1\r\n"
+ content=TQString("Bridges: TRUDPv1 TCPv1\r\n"
"NetID: -1280904111\r\n"
"Conn-Type: Firewall\r\n"
"UPnPNat: false\r\n"
@@ -127,11 +127,11 @@ void Webcam::askIncommingInvitation()
void Webcam::sendBYEMessage()
{
m_state=Finished;
- QString content="Context: dAMAgQ==\r\n";
+ TQString content="Context: dAMAgQ==\r\n";
sendMessage(BYE,content);
//If ever the opposite client was dead or something, we'll ack anyway, so everything get cleaned
- QTimer::singleShot(60*1000 , this, SLOT(acknowledged()));
+ TQTimer::singleShot(60*1000 , this, TQT_SLOT(acknowledged()));
}
@@ -203,7 +203,7 @@ void Webcam::processMessage(const Message& message)
if(message.applicationIdentifier != 4l)
{
- QString body = QCString(message.body.data(), message.header.dataSize);
+ TQString body = TQCString(message.body.data(), message.header.dataSize);
kdDebug(14141) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("MSNSLP/1.0 200 OK"))
@@ -214,7 +214,7 @@ void Webcam::processMessage(const Message& message)
{
if(m_direction == Outgoing)
{
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_branch=regex.cap(1);
//decline
@@ -242,10 +242,10 @@ void Webcam::processMessage(const Message& message)
//Let's take the fun, we entering into the delicious webcam negotiation binary protocol
//well, there is maybe better to take utf16, but it's ascii, so no problem.
- QByteArray dataMessage=message.body;
+ TQByteArray dataMessage=message.body;
#if 0
- QString echoS="";
+ TQString echoS="";
unsigned int f=0;
while(f<dataMessage.size())
{
@@ -257,7 +257,7 @@ void Webcam::processMessage(const Message& message)
unsigned int N=(unsigned int) (dataMessage[q+f]);
if(N<16)
echoS+="0";
- echoS+=QString::number( N ,16)+" ";
+ echoS+=TQString::number( N ,16)+" ";
}
else
echoS+=" ";
@@ -268,7 +268,7 @@ void Webcam::processMessage(const Message& message)
{
unsigned char X=dataMessage[q+f];
char C=((char)(( X<128 && X>31 ) ? X : '.'));
- echoS+=QString::fromLatin1(&C,1);
+ echoS+=TQString::fromLatin1(&C,1);
}
f+=16;
}
@@ -305,31 +305,31 @@ void Webcam::processMessage(const Message& message)
{
uint sess=rand()%1000+5000;
uint rid=rand()%100+50;
- m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess);
+ m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess);
kdDebug(14140) << k_funcinfo << "m_myAuth= " << m_myAuth << endl;
- QString producerxml=xml(sess , rid);
+ TQString producerxml=xml(sess , rid);
kdDebug(14140) << k_funcinfo << "producerxml= " << producerxml << endl;
makeSIPMessage(producerxml);
}
}
else if(m_content.contains("<producer>") || m_content.contains("<viewer>"))
{
- QRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>");
+ TQRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>");
rx.search(m_content);
- QString rid=rx.cap(1);
- QString sess=rx.cap(2);
+ TQString rid=rx.cap(1);
+ TQString sess=rx.cap(2);
if(m_content.contains("<producer>"))
{
- QString viewerxml=xml(sess.toUInt() , rid.toUInt());
+ TQString viewerxml=xml(sess.toUInt() , rid.toUInt());
kdDebug(14140) << k_funcinfo << "vewerxml= " << viewerxml << endl;
makeSIPMessage( viewerxml ,0x00,0x09,0x00 );
- m_peerAuth=m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
+ m_peerAuth=m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
kdDebug(14140) << k_funcinfo << "m_auth= " << m_myAuth << endl;
}
else
{
- m_peerAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
+ m_peerAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
makeSIPMessage("receivedViewerData", 0xec , 0xda , 0x03);
}
@@ -342,39 +342,39 @@ void Webcam::processMessage(const Message& message)
}
//m_listener->setResolutionEnabled(true);
// Create the callback that will try to accept incoming connections.
- QObject::connect(m_listener, SIGNAL(readyAccept()), this, SLOT(slotAccept()));
- QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int)));
+ TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAccept()));
+ TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int)));
// Listen for incoming connections.
bool isListening = m_listener->listen();
- kdDebug(14140) << k_funcinfo << (isListening ? QString("listening %1").arg(m_listener->localAddress().toString()) : QString("not listening")) << endl;
+ kdDebug(14140) << k_funcinfo << (isListening ? TQString("listening %1").arg(m_listener->localAddress().toString()) : TQString("not listening")) << endl;
- rx=QRegExp("<tcpport>([^<]*)</tcpport>");
+ rx=TQRegExp("<tcpport>([^<]*)</tcpport>");
rx.search(m_content);
- QString port1=rx.cap(1);
+ TQString port1=rx.cap(1);
if(port1=="0")
- port1=QString::null;
+ port1=TQString::null;
- rx=QRegExp("<tcplocalport>([^<]*)</tcplocalport>");
+ rx=TQRegExp("<tcplocalport>([^<]*)</tcplocalport>");
rx.search(m_content);
- QString port2=rx.cap(1);
+ TQString port2=rx.cap(1);
if(port2==port1 || port2=="0")
- port2=QString::null;
+ port2=TQString::null;
- rx=QRegExp("<tcpexternalport>([^<]*)</tcpexternalport>");
+ rx=TQRegExp("<tcpexternalport>([^<]*)</tcpexternalport>");
rx.search(m_content);
- QString port3=rx.cap(1);
+ TQString port3=rx.cap(1);
if(port3==port1 || port3==port2 || port3=="0")
- port3=QString::null;
+ port3=TQString::null;
int an=0;
while(true)
{
an++;
- if(!m_content.contains( QString("<tcpipaddress%1>").arg(an) ))
+ if(!m_content.contains( TQString("<tcpipaddress%1>").arg(an) ))
break;
- rx=QRegExp(QString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an));
+ rx=TQRegExp(TQString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an));
rx.search(m_content);
- QString ip=rx.cap(1);
+ TQString ip=rx.cap(1);
if(ip.isNull())
continue;
@@ -383,8 +383,8 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port1 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port1, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port1);
kdDebug(14140) << k_funcinfo << "okok " << sock << " - " << sock->peerAddress().toString() << " ; " << sock->localAddress().toString() << endl;
}
@@ -393,8 +393,8 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port2 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port2, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port2);
}
if(!port3.isNull())
@@ -402,12 +402,12 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port3 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port3, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port3);
}
}
- QValueList<KBufferedSocket*>::iterator it;
+ TQValueList<KBufferedSocket*>::iterator it;
for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it )
{
KBufferedSocket *sock=(*it);
@@ -422,14 +422,14 @@ void Webcam::processMessage(const Message& message)
}
else
error();
- m_content=QString::null;
+ m_content=TQString::null;
}
-void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ)
+void Webcam::makeSIPMessage(const TQString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ)
{
- QByteArray dataMessage; //(12+message.length()*2);
- QDataStream writer(dataMessage, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQByteArray dataMessage; //(12+message.length()*2);
+ TQDataStream writer(dataMessage, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
writer << (Q_UINT8)0x80;
writer << (Q_UINT8)XX;
writer << (Q_UINT8)YY;
@@ -439,7 +439,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
writer << message+'\0';
//writer << (Q_UINT16)0x0000;
- /*QString echoS="";
+ /*TQString echoS="";
unsigned int f=0;
while(f<dataMessage.size())
{
@@ -451,7 +451,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
unsigned int N=(unsigned int) (dataMessage[q+f]);
if(N<16)
echoS+="0";
- echoS+=QString::number( N ,16)+" ";
+ echoS+=TQString::number( N ,16)+" ";
}
else
echoS+=" ";
@@ -462,7 +462,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
{
unsigned char X=dataMessage[q+f];
char C=((char)(( X<128 && X>31 ) ? X : '.'));
- echoS+=QString::fromLatin1(&C,1);
+ echoS+=TQString::fromLatin1(&C,1);
}
f+=16;
}
@@ -472,7 +472,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
sendBigP2PMessage(dataMessage);
}
-void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
+void Webcam::sendBigP2PMessage( const TQByteArray & dataMessage)
{
unsigned int size=m_totalDataSize=dataMessage.size();
m_offset=0;
@@ -481,7 +481,7 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
for(unsigned int f=0;f<size;f+=1200)
{
m_offset=f;
- QByteArray dm2;
+ TQByteArray dm2;
dm2.duplicate(dataMessage.data()+m_offset, QMIN(1200,m_totalDataSize-m_offset));
sendData( dm2 );
m_offset+=dm2.size();
@@ -492,26 +492,26 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
-QString Webcam::xml(uint session , uint rid)
+TQString Webcam::xml(uint session , uint rid)
{
- QString who= ( m_who == wProducer ) ? QString("producer") : QString("viewer");
+ TQString who= ( m_who == wProducer ) ? TQString("producer") : TQString("viewer");
- QString ip;
+ TQString ip;
uint ip_number=1;
- QStringList::iterator it;
- QStringList ips=m_dispatcher->localIp();
+ TQStringList::iterator it;
+ TQStringList ips=m_dispatcher->localIp();
for ( it = ips.begin(); it != ips.end(); ++it )
{
- ip+=QString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number);
+ ip+=TQString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number);
++ip_number;
}
- QString port = QString::number(getAvailablePort());
+ TQString port = TQString::number(getAvailablePort());
m_listener = new KServerSocket(port, this) ;
- return "<" + who + "><version>2.0</version><rid>"+QString::number(rid)+"</rid><udprid>"+QString::number(rid+1)+"</udprid><session>"+QString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" +
+ return "<" + who + "><version>2.0</version><rid>"+TQString::number(rid)+"</rid><udprid>"+TQString::number(rid+1)+"</udprid><session>"+TQString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" +
"<tcp><tcpport>"+port+"</tcpport>\t\t\t\t\t\t\t\t <tcplocalport>"+port+"</tcplocalport>\t\t\t\t\t\t\t\t <tcpexternalport>"+port+"</tcpexternalport>"+ip+"</tcp>"+
"<udp><udplocalport>7786</udplocalport><udpexternalport>31863</udpexternalport><udpexternalip>"+ ip +"</udpexternalip><a1_port>31859</a1_port><b1_port>31860</b1_port><b2_port>31861</b2_port><b3_port>31862</b3_port><symmetricallocation>1</symmetricallocation><symmetricallocationincrement>1</symmetricallocationincrement><udpversion>1</udpversion><udpinternalipaddress1>127.0.0.1</udpinternalipaddress1></udp>"+
"<codec></codec><channelmode>1</channelmode></"+who+">\r\n\r\n";
@@ -521,7 +521,7 @@ int Webcam::getAvailablePort()
{
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
- QString basePort=config->readEntry("WebcamPort");
+ TQString basePort=config->readEntry("WebcamPort");
if(basePort.isEmpty() || basePort == "0" )
basePort="6891";
@@ -536,7 +536,7 @@ int Webcam::getAvailablePort()
bool found = false;
unsigned int port = firstport;
for( ; port <= lastport; ++port) {
- ss->setAddress( QString::number( port ) );
+ ss->setAddress( TQString::number( port ) );
bool success = ss->listen();
if( found = ( success && ss->error() == KSocketBase::NoError ) )
break;
@@ -568,14 +568,14 @@ void Webcam::slotSocketConnected()
m_webcamSocket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
-// QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+// TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
m_webcamStates[m_webcamSocket]=wsConnected;
- QCString to_send=m_peerAuth.utf8();
+ TQCString to_send=m_peerAuth.utf8();
m_webcamSocket->writeBlock(to_send.data(), to_send.length());
kdDebug(14140) << k_funcinfo << "sending "<< m_peerAuth << endl;
@@ -608,11 +608,11 @@ void Webcam::slotAccept()
m_webcamSocket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
- QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
m_allSockets.append(m_webcamSocket);
m_webcamStates[m_webcamSocket]=wsNegotiating;
@@ -625,14 +625,14 @@ void Webcam::slotSocketRead()
uint available = m_webcamSocket->bytesAvailable();
kdDebug(14140) << k_funcinfo << m_webcamSocket << "############# " << available << " bytes available." << endl;
- QByteArray avail_buff(available);
+ TQByteArray avail_buff(available);
m_webcamSocket->peekBlock(avail_buff.data(), avail_buff.size());
kdDebug(14140) << k_funcinfo << m_webcamSocket << avail_buff << endl;
- const QString connected_str("connected\r\n\r\n");
+ const TQString connected_str("connected\r\n\r\n");
switch(m_webcamStates[m_webcamSocket])
{
case wsNegotiating:
@@ -642,16 +642,16 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<m_myAuth.length()<< " )"<< endl;
break;
}
- QByteArray buffer(available);
+ TQByteArray buffer(available);
m_webcamSocket->readBlock(buffer.data(), buffer.size());
kdDebug(14140) << k_funcinfo << buffer.data() << endl;
- if(QString(buffer) == m_myAuth )
+ if(TQString(buffer) == m_myAuth )
{
closeAllOtherSockets();
kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl;
- QCString conne=connected_str.utf8();
+ TQCString conne=connected_str.utf8();
m_webcamSocket->writeBlock(conne.data(), conne.length());
m_webcamStates[m_webcamSocket]=wsConnecting;
@@ -668,7 +668,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl;
}
m_widget=new MSNWebcamDialog(m_recipient);
- connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage()));
+ connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage()));
}
else
@@ -690,19 +690,19 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<connected_str.length()<< " )"<< endl;
break;
}
- QByteArray buffer(connected_str.length());
+ TQByteArray buffer(connected_str.length());
m_webcamSocket->readBlock(buffer.data(), buffer.size());
-// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << QCString(buffer) << endl;
+// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << TQCString(buffer) << endl;
- if(QString(buffer) == connected_str)
+ if(TQString(buffer) == connected_str)
{
if(m_webcamStates[m_webcamSocket]==wsConnected)
{
closeAllOtherSockets();
kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl;
- QCString conne=connected_str.utf8();
+ TQCString conne=connected_str.utf8();
m_webcamSocket->writeBlock(conne.data(), conne.length());
//SHOULD BE DONE IN ALL CASE
@@ -718,7 +718,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl;
}
m_widget=new MSNWebcamDialog(m_recipient);
- connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage()));
+ connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage()));
}
m_webcamStates[m_webcamSocket]=wsTransfer;
@@ -746,7 +746,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<24<< " )"<< endl;
break;
}
- QByteArray buffer(24);
+ TQByteArray buffer(24);
m_webcamSocket->peekBlock(buffer.data(), buffer.size());
Q_UINT32 paysize=(uchar)buffer[8] + ((uchar)buffer[9]<<8) + ((uchar)buffer[10]<<16) + ((uchar)buffer[11]<<24);
@@ -760,7 +760,7 @@ void Webcam::slotSocketRead()
buffer.resize(paysize);
m_webcamSocket->readBlock(buffer.data(), buffer.size());
- QPixmap pix=m_mimic->decode(buffer);
+ TQPixmap pix=m_mimic->decode(buffer);
if(pix.isNull())
{
kdWarning(14140) << k_funcinfo << "incorrect pixmap returned, better to stop everything"<< endl;
@@ -815,7 +815,7 @@ void Webcam::closeAllOtherSockets()
delete m_listener;
m_listener=0l;
- QValueList<KBufferedSocket*>::iterator it;
+ TQValueList<KBufferedSocket*>::iterator it;
for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it )
{
KBufferedSocket *sock=(*it);
@@ -826,7 +826,7 @@ void Webcam::closeAllOtherSockets()
}
-void Webcam::timerEvent( QTimerEvent *e )
+void Webcam::timerEvent( TQTimerEvent *e )
{
if(e->timerId() != m_timerId)
return TransferContext::timerEvent(e);
@@ -835,7 +835,7 @@ void Webcam::timerEvent( QTimerEvent *e )
Kopete::AV::VideoDevicePool *videoDevice = Kopete::AV::VideoDevicePool::self();
videoDevice->getFrame();
- QImage img;
+ TQImage img;
videoDevice->getImage(&img);
if(m_widget)
@@ -848,7 +848,7 @@ void Webcam::timerEvent( QTimerEvent *e )
}
uchar *bits=img.bits();
- QByteArray image_data(img.width()*img.height()*3);
+ TQByteArray image_data(img.width()*img.height()*3);
uint b2=0;
uint imgsize=img.width()*img.height()*4;
for(uint f=0; f< imgsize; f+=4)
@@ -859,15 +859,15 @@ void Webcam::timerEvent( QTimerEvent *e )
b2+=3;
}
- QByteArray frame=m_mimic->encode(image_data);
+ TQByteArray frame=m_mimic->encode(image_data);
kdDebug(14140) << k_funcinfo << "Sendinf frame of size " << frame.size() << endl;
//build the header.
- QByteArray header;
+ TQByteArray header;
- QDataStream writer(header, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(header, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
writer << (Q_UINT16)24; // header size
writer << (Q_UINT16)img.width();
writer << (Q_UINT16)img.height();
@@ -875,7 +875,7 @@ void Webcam::timerEvent( QTimerEvent *e )
writer << (Q_UINT32)frame.size();
writer << (Q_UINT8)('M') << (Q_UINT8)('L') << (Q_UINT8)('2') << (Q_UINT8)('0');
writer << (Q_UINT32)0x00000000; //wtf .?
- writer << QTime::currentTime(); //FIXME: possible midnight bug ?
+ writer << TQTime::currentTime(); //FIXME: possible midnight bug ?
m_webcamSocket->writeBlock(header.data(), header.size());
m_webcamSocket->writeBlock(frame.data(), frame.size());
diff --git a/kopete/protocols/msn/webcam.h b/kopete/protocols/msn/webcam.h
index 4dc72fae..4bcc4f59 100644
--- a/kopete/protocols/msn/webcam.h
+++ b/kopete/protocols/msn/webcam.h
@@ -33,7 +33,7 @@ class Webcam : public TransferContext
public:
enum Who { wProducer , wViewer };
- Webcam( Who who , const QString& to, Dispatcher *parent, Q_UINT32 sessionID);
+ Webcam( Who who , const TQString& to, Dispatcher *parent, Q_UINT32 sessionID);
~Webcam( );
virtual void processMessage(const Message& message);
@@ -44,12 +44,12 @@ class Webcam : public TransferContext
void sendBYEMessage();
private:
- void makeSIPMessage(const QString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0);
- void sendBigP2PMessage( const QByteArray& dataMessage );
+ void makeSIPMessage(const TQString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0);
+ void sendBigP2PMessage( const TQByteArray& dataMessage );
void closeAllOtherSockets();
- QString m_content;
+ TQString m_content;
- QString xml(uint session , uint rid);
+ TQString xml(uint session , uint rid);
int getAvailablePort();
@@ -60,14 +60,14 @@ class Webcam : public TransferContext
Who m_who;
- QString m_myAuth;
- QString m_peerAuth;
+ TQString m_myAuth;
+ TQString m_peerAuth;
MimicWrapper *m_mimic;
MSNWebcamDialog *m_widget;
- QValueList<KNetwork::KBufferedSocket* > m_allSockets;
- QMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates;
+ TQValueList<KNetwork::KBufferedSocket* > m_allSockets;
+ TQMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates;
int m_timerId;
int m_timerFps;
@@ -81,7 +81,7 @@ class Webcam : public TransferContext
void slotSocketConnected();
// void slotReadyWrite();
protected:
- virtual void timerEvent( QTimerEvent * );
+ virtual void timerEvent( TQTimerEvent * );
};
}
diff --git a/kopete/protocols/msn/webcam/mimicwrapper.cpp b/kopete/protocols/msn/webcam/mimicwrapper.cpp
index f7a43d93..a9d3b131 100644
--- a/kopete/protocols/msn/webcam/mimicwrapper.cpp
+++ b/kopete/protocols/msn/webcam/mimicwrapper.cpp
@@ -18,7 +18,7 @@
//#include <qbytearray.h>
#include <kdebug.h>
-#include <qimage.h>
+#include <tqimage.h>
MimicWrapper::MimicWrapper() : m_init(false)
{
@@ -31,35 +31,35 @@ MimicWrapper::~MimicWrapper()
}
-QPixmap MimicWrapper::decode(const QByteArray& data)
+TQPixmap MimicWrapper::decode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_decoder_init(m_mimctx, (guchar*)(data.data())))
{
kdWarning(14140) << k_funcinfo << "Impossible to init decoder" << endl;
- return QPixmap();
+ return TQPixmap();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QPixmap();
+ return TQPixmap();
}
m_init=true;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
if(!mimic_decode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QPixmap();
+ return TQPixmap();
}
int width,height;
mimic_get_property(m_mimctx, "width", &width);
mimic_get_property(m_mimctx, "height", &height);
- QByteArray buff2(m_bufferSize*4/3);
+ TQByteArray buff2(m_bufferSize*4/3);
uint b2=0;
for(uint f=0;f<m_bufferSize;f+=3)
{
@@ -70,34 +70,34 @@ QPixmap MimicWrapper::decode(const QByteArray& data)
b2+=4;
}
- QImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, QImage::BigEndian );
- return QPixmap(img);
+ TQImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, TQImage::BigEndian );
+ return TQPixmap(img);
}
-QByteArray MimicWrapper::encode(const QByteArray& data)
+TQByteArray MimicWrapper::encode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_encoder_init(m_mimctx, MIMIC_RES_HIGH))
{
kdWarning(14140) << k_funcinfo << "Impossible to init encoder" << endl;
- return QByteArray();
+ return TQByteArray();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QByteArray();
+ return TQByteArray();
}
m_init=true;
m_numFrames=0;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
int buff_new_size;
if(!mimic_encode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) , (gint*)(&buff_new_size) , m_numFrames%15==0 ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QByteArray();
+ return TQByteArray();
}
buff.resize(buff_new_size);
++m_numFrames;
diff --git a/kopete/protocols/msn/webcam/mimicwrapper.h b/kopete/protocols/msn/webcam/mimicwrapper.h
index c4a7475f..1ed048a2 100644
--- a/kopete/protocols/msn/webcam/mimicwrapper.h
+++ b/kopete/protocols/msn/webcam/mimicwrapper.h
@@ -14,7 +14,7 @@
#ifndef MIMICWRAPPER_H
#define MIMICWREPPER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kopete_export.h"
@@ -26,8 +26,8 @@ class KOPETE_EXPORT MimicWrapper
MimicWrapper();
~MimicWrapper();
- QPixmap decode(const QByteArray &data);
- QByteArray encode(const QByteArray &data);
+ TQPixmap decode(const TQByteArray &data);
+ TQByteArray encode(const TQByteArray &data);
private:
MimCtx *m_mimctx;
diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
index 092135f0..b0540cbb 100644
--- a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
+++ b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
@@ -19,31 +19,31 @@
#include "msnwebcamdialog.h"
-#include <qframe.h>
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqobject.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <klocale.h>
-MSNWebcamDialog::MSNWebcamDialog( const QString& contact, QWidget * parent, const char * name )
+MSNWebcamDialog::MSNWebcamDialog( const TQString& contact, TQWidget * parent, const char * name )
: KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contact ),
KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ),
m_imageContainer( this )
{
- setInitialSize( QSize(320,290), true );
+ setInitialSize( TQSize(320,290), true );
setEscapeButton( KDialogBase::Close );
/*
- QObject::connect( contact, SIGNAL( signalReceivedWebcamImage( const QPixmap& ) ),
- this, SLOT( newImage( const QPixmap& ) ) );
+ TQObject::connect( contact, TQT_SIGNAL( signalReceivedWebcamImage( const TQPixmap& ) ),
+ this, TQT_SLOT( newImage( const TQPixmap& ) ) );
*/
- QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) );
+ TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) );
/*
- QObject::connect( contact, SIGNAL( webcamClosed( int ) ), this, SLOT( webcamClosed( int ) ) );
+ TQObject::connect( contact, TQT_SIGNAL( webcamClosed( int ) ), this, TQT_SLOT( webcamClosed( int ) ) );
*/
- QFrame* page = plainPage();
+ TQFrame* page = plainPage();
if ( page )
{
kdDebug(14180) << k_funcinfo << "Adding webcam image container" << endl;
@@ -59,7 +59,7 @@ MSNWebcamDialog::~ MSNWebcamDialog( )
}
-void MSNWebcamDialog::newImage( const QPixmap & image )
+void MSNWebcamDialog::newImage( const TQPixmap & image )
{
kdDebug(14180) << k_funcinfo << "New image received" << endl;
// kdDebug(14180) << image << endl;
@@ -72,7 +72,7 @@ void MSNWebcamDialog::webcamClosed( int reason )
{
kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <<endl;
//m_imageContainer.clear();
- //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( QString::number( reason ) ) );
+ //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( TQString::number( reason ) ) );
//m_imageContainer.setAlignment( Qt::AlignCenter );
//show();
}
diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.h b/kopete/protocols/msn/webcam/msnwebcamdialog.h
index dc10285d..a86050c4 100644
--- a/kopete/protocols/msn/webcam/msnwebcamdialog.h
+++ b/kopete/protocols/msn/webcam/msnwebcamdialog.h
@@ -21,7 +21,7 @@
#ifndef YAHOOWEBCAMDIALOG_H_
#define YAHOOWEBCAMDIALOG_H_
-//#include <qlabel.h>
+//#include <tqlabel.h>
#include <webcamwidget.h>
#include <kdialogbase.h>
@@ -36,11 +36,11 @@ class KOPETE_EXPORT MSNWebcamDialog : public KDialogBase
{
Q_OBJECT
public:
- MSNWebcamDialog( const QString& contact, QWidget* parent = 0, const char* name = 0 );
+ MSNWebcamDialog( const TQString& contact, TQWidget* parent = 0, const char* name = 0 );
~MSNWebcamDialog();
public slots:
- void newImage( const QPixmap& image );
+ void newImage( const TQPixmap& image );
void webcamClosed( int );
signals:
diff --git a/kopete/protocols/oscar/aim/aimaccount.cpp b/kopete/protocols/oscar/aim/aimaccount.cpp
index c6228040..9a6ec9de 100644
--- a/kopete/protocols/oscar/aim/aimaccount.cpp
+++ b/kopete/protocols/oscar/aim/aimaccount.cpp
@@ -13,8 +13,8 @@
*************************************************************************
*/
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -68,20 +68,20 @@ void AIMMyselfContact::userInfoUpdated()
setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusAway ); //we're away
}
-void AIMMyselfContact::setOwnProfile( const QString& newProfile )
+void AIMMyselfContact::setOwnProfile( const TQString& newProfile )
{
m_profileString = newProfile;
if ( m_acct->isConnected() )
m_acct->engine()->updateProfile( newProfile );
}
-QString AIMMyselfContact::userProfile()
+TQString AIMMyselfContact::userProfile()
{
return m_profileString;
}
Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags canCreate,
- Oscar::WORD exchange, const QString& room )
+ Oscar::WORD exchange, const TQString& room )
{
kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << endl;
Kopete::ContactPtrList chatMembers;
@@ -95,8 +95,8 @@ Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags
session = new AIMChatSession( this, chatMembers, account()->protocol(), exchange, room );
session->setEngine( m_acct->engine() );
- connect( session, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ),
- this, SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) );
+ connect( session, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ),
+ this, TQT_SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) );
m_chatRoomSessions.append( session );
}
return session;
@@ -112,7 +112,7 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio
kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "sending a message" << endl;
//TODO: remove duplication - factor into a message utils class or something
Oscar::Message msg;
- QString s;
+ TQString s;
if (message.plainBody().isEmpty()) // no text, do nothing
return;
@@ -127,53 +127,53 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio
//font-size:xxpt -> <font ptsize=xx>
s=message.escapedBody();
- s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
- QString::fromLatin1("<style>\\1;\"\\2</style>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
+ TQString::fromLatin1("<style>\\1;\"\\2</style>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("\\2"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("\\2"));
//okay now change the <font ptsize="xx"> to <font size="xx">
//0-9 are size 1
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")),
- QString::fromLatin1("<font size=\"1\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")),
+ TQString::fromLatin1("<font size=\"1\">"));
//10-11 are size 2
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")),
- QString::fromLatin1("<font size=\"2\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")),
+ TQString::fromLatin1("<font size=\"2\">"));
//12-13 are size 3
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")),
- QString::fromLatin1("<font size=\"3\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")),
+ TQString::fromLatin1("<font size=\"3\">"));
//14-16 are size 4
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")),
- QString::fromLatin1("<font size=\"4\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")),
+ TQString::fromLatin1("<font size=\"4\">"));
//17-22 are size 5
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
- QString::fromLatin1("<font size=\"5\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
+ TQString::fromLatin1("<font size=\"5\">"));
//23-29 are size 6
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">"));
//30- (and any I missed) are size 7
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">"));
- s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") );
+ s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") );
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<AIMProtocol*>( parent )->statusOffline );
- QString profile = configGroup()->readEntry( "Profile",
+ TQString profile = configGroup()->readEntry( "Profile",
i18n( "Visit the Kopete website at <a href=\"http://kopete.kde.org\">http://kopete.kde.org</a>") );
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<AIMMyselfContact *> ( 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<AIMMyselfContact*>( 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<TLV> tList( item.tlvList() );
+ TQValueList<TLV> 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<Oscar::TLV> list;
+ TQValueList<Oscar::TLV> 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<TLV> tList( item.tlvList() );
+ TQValueList<TLV> 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<int> list = engine()->chatExchangeList();
+ TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ),
+ this, TQT_SLOT( joinChatDialogClosed( int ) ) );
+ TQValueList<int> 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<AIMProtocol*>( protocol() )->statusOffline );
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for( ; it.current(); ++it )
{
OscarContact* oc = dynamic_cast<OscarContact*>( 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<AIMContact *> ( 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<AIMMyselfContact *> ( 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<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
- QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end();
+ TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*>::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<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
- QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end();
+ TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*>::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<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
- QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end();
+ TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*>::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<QString, QString> revContactMap;
+ TQMap<TQString, TQString> revContactMap;
- QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList();
- QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd();
+ TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList();
+ TQValueList<Oscar::SSI>::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<OscarContact*>( 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<Oscar::TLV> tList;
+ TQValueList<Oscar::TLV> 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 <qdict.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#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<Kopete::ChatSession*> m_chatRoomSessions;
+ TQString m_lastAwayMessage;
+ TQValueList<Kopete::ChatSession*> 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 <time.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kactionclasses.h>
@@ -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<AIMProtocol *>(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<KAction> *AIMContact::customContextMenuActions()
+TQPtrList<KAction> *AIMContact::customContextMenuActions()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
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<KAction> *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].*>(.*)</[hH][tT][mM][lL]>")),
- QString::fromLatin1("\\1"));
+ TQRegExp(TQString::fromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")),
+ TQString::fromLatin1("\\1"));
filteredMessage.replace(
- QRegExp(QString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")),
- QString::fromLatin1("\\1") );
- QRegExp fontRemover( QString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") );
+ TQRegExp(TQString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")),
+ TQString::fromLatin1("\\1") );
+ TQRegExp fontRemover( TQString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[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<AIMAccount*>( 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( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \
+ TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString();
+ TQString message = i18n( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \
"(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 -> <font ptsize=xx>
s=message.escapedBody();
- s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
- QString::fromLatin1("<style>\\1;\"\\2</style>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
+ TQString::fromLatin1("<style>\\1;\"\\2</style>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
- QString::fromLatin1("\\2"));
+ s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
+ TQString::fromLatin1("\\2"));
//okay now change the <font ptsize="xx"> to <font size="xx">
//0-9 are size 1
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")),
- QString::fromLatin1("<font size=\"1\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")),
+ TQString::fromLatin1("<font size=\"1\">"));
//10-11 are size 2
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")),
- QString::fromLatin1("<font size=\"2\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")),
+ TQString::fromLatin1("<font size=\"2\">"));
//12-13 are size 3
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")),
- QString::fromLatin1("<font size=\"3\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")),
+ TQString::fromLatin1("<font size=\"3\">"));
//14-16 are size 4
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")),
- QString::fromLatin1("<font size=\"4\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")),
+ TQString::fromLatin1("<font size=\"4\">"));
//17-22 are size 5
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
- QString::fromLatin1("<font size=\"5\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
+ TQString::fromLatin1("<font size=\"5\">"));
//23-29 are size 6
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">"));
//30- (and any I missed) are size 7
- s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">"));
+ s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">"));
- s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") );
+ s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") );
// strip left over line break
- s.remove( QRegExp( QString::fromLatin1( "<br>$" ) ) );
+ s.remove( TQRegExp( TQString::fromLatin1( "<br>$" ) ) );
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 <qdatetime.h>
+#include <tqdatetime.h>
#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<KAction> *customContextMenuActions();
+ TQPtrList<KAction> *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 <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <klocale.h>
#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<int>& list )
+void AIMJoinChatUI::setExchangeList( const TQValueList<int>& list )
{
m_exchanges = list;
- QStringList exchangeList;
- QValueList<int>::const_iterator it = list.begin();
+ TQStringList exchangeList;
+ TQValueList<int>::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<int>& );
- QValueList<int> exchangeList() const;
+ void setExchangeList( const TQValueList<int>& );
+ TQValueList<int> 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<int> m_exchanges;
- QString m_roomName;
- QString m_exchange;
+ TQValueList<int> 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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kgenericfactory.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
if (accounts.count() == 1)
{
- QDictIterator<Kopete::Account> it(accounts);
+ TQDictIterator<Kopete::Account> 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<QString, QString> &serializedData,
- const QMap<QString, QString> &/*addressBookData*/)
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/*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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> 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<TLV>(), 0 );
+ Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 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 <qmap.h>
+#include <tqmap.h>
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<QString, QString> &serializedData,
- const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &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 <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -37,7 +37,7 @@
#include <krun.h>
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<AIMProtocol*>( 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<AIMContact*>( 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 <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-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 <qwidget.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
#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 <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
#include <kdebug.h>
#include <krun.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include "editaccountwidget.h"
/**
* @author Chris TenHarmsel <tenharmsel@staticmethod.net>
@@ -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 <qfile.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -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<ICQAccount*>( 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<ICQAccount*>( 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<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for( ; it.current(); ++it )
{
OscarContact* oc = dynamic_cast<OscarContact*>( 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<QString, QString> revContactMap;
+ TQMap<TQString, TQString> revContactMap;
- QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList();
- QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd();
+ TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList();
+ TQValueList<Oscar::SSI>::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<OscarContact*>( 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<TLV> tList( item.tlvList() );
+ TQValueList<TLV> 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<Oscar::TLV> list;
+ TQValueList<Oscar::TLV> 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<TLV> tList( item.tlvList() );
+ TQValueList<TLV> 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 <qtimer.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kaction.h>
#include <kactionclasses.h>
@@ -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<ICQProtocol *>(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<KAction> *ICQContact::customContextMenuActions()
+TQPtrList<KAction> *ICQContact::customContextMenuActions()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
/*
- 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<KAction> *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<KAction> *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<KAction> *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<KAction> *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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *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<Presence::Type>(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 <netinet/in.h> // for ntohl()
-#include <qcombobox.h>
+#include <tqcombobox.h>
/*
-#include <qhostaddress.h>
-#include <qlistbox.h>
-#include <qspinbox.h>
-#include <qtextedit.h>
+#include <tqhostaddress.h>
+#include <tqlistbox.h>
+#include <tqspinbox.h>
+#include <tqtextedit.h>
#include <kdatewidget.h>*/
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdialogbase.h>
/*
#include <klineedit.h>
@@ -66,10 +66,10 @@ K_EXPORT_COMPONENT_FACTORY( kopete_icq, ICQProtocolFactory( "kopete_icq" ) )
ICQProtocolHandler::ICQProtocolHandler() : Kopete::MimeTypeHandler(false)
{
- registerAsMimeHandler(QString::fromLatin1("application/x-icq"));
+ registerAsMimeHandler(TQString::fromLatin1("application/x-icq"));
}
-void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) const
+void ICQProtocolHandler::handleURL(const TQString &mimeType, const KURL & url) const
{
if (mimeType != "application/x-icq")
return;
@@ -96,21 +96,21 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co
ICQProtocol *proto = ICQProtocol::protocol();
- QString uin = file.readEntry("UIN");
+ TQString uin = file.readEntry("UIN");
if (uin.isEmpty())
return;
- QString nick = file.readEntry("NickName");
- QString first = file.readEntry("FirstName");
- QString last = file.readEntry("LastName");
- QString email = file.readEntry("Email");
+ TQString nick = file.readEntry("NickName");
+ TQString first = file.readEntry("FirstName");
+ TQString last = file.readEntry("LastName");
+ TQString email = file.readEntry("Email");
Kopete::Account *account = 0;
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
// do not show chooser if we only have one account to "choose" from
if (accounts.count() == 1)
{
- QDictIterator<Kopete::Account> it(accounts);
+ TQDictIterator<Kopete::Account> it(accounts);
account = it.current();
}
else
@@ -126,7 +126,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co
account = accSelector->selectedItem();
delete chooser;
- if (ret == QDialog::Rejected || account == 0)
+ if (ret == TQDialog::Rejected || account == 0)
{
kdDebug(14153) << k_funcinfo << "Cancelled" << endl;
return;
@@ -140,12 +140,12 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co
return;
}
- QString nickuin = nick.isEmpty() ?
+ TQString nickuin = nick.isEmpty() ?
i18n("'%1'").arg(uin) :
i18n("'%1' (%2)").arg(nick, uin);
if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(),
- i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add"))
+ i18n("Do you want to add %1 to your contact list?").arg(nickuin), TQString::null, i18n("Add"), i18n("Do Not Add"))
!= KMessageBox::Yes)
{
kdDebug(14153) << k_funcinfo << "Cancelled" << endl;
@@ -173,7 +173,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co
ICQProtocol* ICQProtocol::protocolStatic_ = 0L;
-ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&)
+ICQProtocol::ICQProtocol(TQObject *parent, const char *name, const TQStringList&)
: Kopete::Protocol( ICQProtocolFactory::instance(), parent, name ),
firstName(Kopete::Global::Properties::self()->firstName()),
lastName(Kopete::Global::Properties::self()->lastName()),
@@ -181,8 +181,8 @@ ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&)
emailAddress(Kopete::Global::Properties::self()->emailAddress()),
ipAddress("ipAddress", i18n("IP Address") ),
clientFeatures("clientFeatures", i18n("Client Features"), 0, false),
- buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true),
- contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), QString::null, true, false, true )
+ buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true),
+ contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), TQString::null, true, false, true )
{
if (protocolStatic_)
@@ -219,7 +219,7 @@ void ICQProtocol::initGenders()
void ICQProtocol::initCountries()
{
mCountries.insert(0, ""); // unspecified
- KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete"));
+ KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete"));
mCountries.insert(93, kl->twoAlphaToCountryName("af"));
mCountries.insert(355, kl->twoAlphaToCountryName("al"));
@@ -468,7 +468,7 @@ void ICQProtocol::initCountries()
void ICQProtocol::initLang()
{
- KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete"));
+ KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete"));
mLanguages.insert(0 , "");
mLanguages.insert(1 , kl->twoAlphaToLanguageName("ar") /*i18n("Arabic")*/);
@@ -660,19 +660,19 @@ void ICQProtocol::initInterests()
}
-void ICQProtocol::fillComboFromTable(QComboBox *box, const QMap<int, QString> &map)
+void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map)
{
// kdDebug(14153) << k_funcinfo << "Called." << endl;
- QStringList list = map.values();
+ TQStringList list = map.values();
list.sort();
box->insertStringList(list);
}
-void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &map, int value)
+void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map, int value)
{
// kdDebug(14153) << k_funcinfo << "Called." << endl;
- QMap<int, QString>::ConstIterator it;
+ TQMap<int, TQString>::ConstIterator it;
it = map.find(value);
if (!(*it))
return;
@@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &ma
}
}
-int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map)
+int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap<int, TQString> &map)
{
- const QString curText = cmb->currentText();
+ const TQString curText = cmb->currentText();
- QMap<int, QString>::ConstIterator it;
+ TQMap<int, TQString>::ConstIterator it;
for(it = map.begin(); it != map.end(); ++it)
{
if(it.data() == curText)
@@ -701,10 +701,10 @@ int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map)
}
#if 0
-void ICQProtocol::fillTZCombo(QComboBox *combo)
+void ICQProtocol::fillTZCombo(TQComboBox *combo)
{
- QTime time(12, 0);
- QTime done(0, 0);
+ TQTime time(12, 0);
+ TQTime done(0, 0);
while(time > done)
{
@@ -713,8 +713,8 @@ void ICQProtocol::fillTZCombo(QComboBox *combo)
time = time.addSecs(-30 * 60);
}
- time = QTime(0, 0);
- done = QTime(12, 0);
+ time = TQTime(0, 0);
+ done = TQTime(12, 0);
while(time <= done)
{
@@ -724,7 +724,7 @@ void ICQProtocol::fillTZCombo(QComboBox *combo)
}
}
-void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz)
+void ICQProtocol::setTZComboValue(TQComboBox *combo, const char &tz)
{
kdDebug(14153) << k_funcinfo << "tz=" << int(tz) << endl;
if ((tz < -24) || (tz > 24))
@@ -733,7 +733,7 @@ void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz)
combo->setCurrentItem(24 + tz);
}
-char ICQProtocol::getTZComboValue(QComboBox *combo)
+char ICQProtocol::getTZComboValue(TQComboBox *combo)
{
char ret = combo->currentItem() - 24;
// kdDebug(14153) << k_funcinfo << "return value=" << int(ret) << endl;
@@ -752,11 +752,11 @@ bool ICQProtocol::canSendOffline() const
}
Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaContact,
- const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> &/*addressBookData*/ )
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/*addressBookData*/ )
{
- QString accountId = serializedData["accountId"];
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this);
+ TQString accountId = serializedData["accountId"];
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this);
ICQAccount *account = static_cast<ICQAccount*>(accounts[accountId]);
if(!account)
@@ -766,16 +766,16 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta
return 0;
}
- QString contactId=serializedData["contactId"];
+ TQString contactId=serializedData["contactId"];
uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF;
- QString ssiName;
+ TQString ssiName;
bool ssiWaitingAuth = false;
if ( serializedData.contains( "ssi_name" ) )
ssiName = serializedData["ssi_name"];
if ( serializedData.contains( "ssi_waitingAuth" ) )
{
- QString authStatus = serializedData["ssi_waitingAuth"];
+ TQString authStatus = serializedData["ssi_waitingAuth"];
if ( authStatus == "true" )
ssiWaitingAuth = true;
}
@@ -787,23 +787,23 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta
if ( serializedData.contains( "ssi_type" ) )
ssiType = serializedData["ssi_type"].toUInt();
- Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList<TLV>(), 0 );
+ Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 0 );
item.setWaitingAuth( ssiWaitingAuth );
- ICQContact *c = new ICQContact( account, contactId, metaContact, QString::null, item );
+ ICQContact *c = new ICQContact( account, contactId, metaContact, TQString::null, item );
return c;
}
-AddContactPage *ICQProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account)
+AddContactPage *ICQProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account)
{
return new ICQAddContactPage( static_cast<ICQAccount*>( account ), parent);
}
-KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent)
+KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
{
return new ICQEditAccountWidget(this, account, parent);
}
-Kopete::Account *ICQProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *ICQProtocol::createNewAccount(const TQString &accountId)
{
return new ICQAccount(this, accountId);
}
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<QString, QString> &serializedData,
- const QMap<QString, QString> &addressBookData );
- AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account);
- KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent);
- Kopete::Account *createNewAccount(const QString &accountId);
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &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<int, QString> &genders() { return mGenders; }
- const QMap<int, QString> &countries() { return mCountries; }
- const QMap<int, QString> &languages() { return mLanguages; }
- const QMap<int, QString> &encodings() { return mEncodings; }
- const QMap<int, QString> &maritals() { return mMarital; }
- const QMap<int, QString> &interests() { return mInterests; }
+ const TQMap<int, TQString> &genders() { return mGenders; }
+ const TQMap<int, TQString> &countries() { return mCountries; }
+ const TQMap<int, TQString> &languages() { return mLanguages; }
+ const TQMap<int, TQString> &encodings() { return mEncodings; }
+ const TQMap<int, TQString> &maritals() { return mMarital; }
+ const TQMap<int, TQString> &interests() { return mInterests; }
- void fillComboFromTable( QComboBox*, const QMap<int, QString>& );
- void setComboFromTable( QComboBox*, const QMap<int, QString>&, int );
- int getCodeForCombo( QComboBox*, const QMap<int, QString>& );
- /* void fillTZCombo(QComboBox *combo);
- void setTZComboValue(QComboBox *combo, const char &tz);
- char getTZComboValue(QComboBox *combo); */
+ void fillComboFromTable( TQComboBox*, const TQMap<int, TQString>& );
+ void setComboFromTable( TQComboBox*, const TQMap<int, TQString>&, int );
+ int getCodeForCombo( TQComboBox*, const TQMap<int, TQString>& );
+ /* 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<int, QString> mGenders;
- QMap<int, QString> mCountries;
- QMap<int, QString> mLanguages;
- QMap<int, QString> mEncodings;
- QMap<int, QString> mMarital;
- QMap<int, QString> mInterests;
+ TQMap<int, TQString> mGenders;
+ TQMap<int, TQString> mCountries;
+ TQMap<int, TQString> mLanguages;
+ TQMap<int, TQString> mEncodings;
+ TQMap<int, TQString> mMarital;
+ TQMap<int, TQString> 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 <qvbox.h>
+#include <tqvbox.h>
#include <ktextbrowser.h>
#include <klocale.h>
@@ -29,8 +29,8 @@
#include <assert.h>
-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 <ctype.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include <addcontactpage.h>
/**
@@ -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 <klocale.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
-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 <b>%1</b>." ).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 <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -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<ICQAccount*>(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 <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#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 <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qtabwidget.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -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 <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qobject.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqobject.h>
+#include <tqtextcodec.h>
#include <kdatewidget.h>
#include <kdebug.h>
@@ -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<ICQProtocol*>( m_contact->protocol() )->countries()[ui.country];
+ TQString country = static_cast<ICQProtocol*>( 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<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[0]];
+ TQString topic = static_cast<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[1]];
+ TQString topic = static_cast<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[2]];
+ TQString topic = static_cast<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[3]];
+ TQString topic = static_cast<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender];
+ TQString gender = static_cast<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender];
m_genInfoWidget->genderEdit->setText( gender );
m_genInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) );
- QString ms = static_cast<ICQProtocol*>( m_contact->protocol() )->maritals()[ui.marital];
+ TQString ms = static_cast<ICQProtocol*>( 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<ICQProtocol*>( m_contact->protocol() )->countries()[ui.ocountry];
+ TQString ocountry = static_cast<ICQProtocol*>( 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<TLV> tlvList = st->buffer()->getTLVList();
+ TQValueList<TLV> 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#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 <qcstring.h>
+#include <tqcstring.h>
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<len;i++)
ch += getLEByte();
@@ -340,9 +340,9 @@ TLV Buffer::getTLV()
return t;
}
-QValueList<TLV> Buffer::getTLVList()
+TQValueList<TLV> Buffer::getTLVList()
{
- QValueList<TLV> ql;
+ TQValueList<TLV> ql;
while (mReadPos < mBuffer.size())
{
@@ -363,7 +363,7 @@ QValueList<TLV> 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 <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
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<TLV> getTLVList();
+ TQValueList<TLV> 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
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! 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 <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
// 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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#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<Oscar::TLV> tList;
+ TQValueList<Oscar::TLV> 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<TLV>::const_iterator it2 = newSSI.tlvList().begin();
- QValueList<TLV>::const_iterator listEnd2 = newSSI.tlvList().end();
+ TQValueList<TLV>::const_iterator it2 = newSSI.tlvList().begin();
+ TQValueList<TLV>::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<int> ChatNavServiceTask::exchangeList() const
+TQValueList<int> 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<Oscar::TLV> tlvList = b.getTLVList();
- QValueList<Oscar::TLV>::iterator it, itEnd = tlvList.end();
- QString roomName;
+ TQValueList<Oscar::TLV> tlvList = b.getTLVList();
+ TQValueList<Oscar::TLV>::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<Oscar::TLV> roomTLVList = b.getTLVList();
- QValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end();
- for ( QValueList<Oscar::TLV>::iterator it = roomTLVList.begin();
+ TQValueList<Oscar::TLV> roomTLVList = b.getTLVList();
+ TQValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end();
+ for ( TQValueList<Oscar::TLV>::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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include <oscartypes.h>
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<int> exchangeList() const;
+ TQValueList<int> exchangeList() const;
signals:
- void haveChatExchanges( const QValueList<int>& );
- void connectChat( WORD, QByteArray, WORD, const QString& );
+ void haveChatExchanges( const TQValueList<int>& );
+ 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<int> m_exchanges;
+ TQValueList<int> 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 <qstring.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#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<Oscar::TLV> tlvList = b->getTLVList();
- QValueList<Oscar::TLV>::iterator it = tlvList.begin();
- QValueList<Oscar::TLV>::iterator itEnd = tlvList.end();
+ TQValueList<Oscar::TLV> tlvList = b->getTLVList();
+ TQValueList<Oscar::TLV>::iterator it = tlvList.begin();
+ TQValueList<Oscar::TLV>::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<Oscar::TLV> chatTLVs = b->getTLVList();
- QValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end();
+ TQValueList<Oscar::TLV> chatTLVs = b->getTLVList();
+ TQValueList<Oscar::TLV>::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 <qtimer.h>
-#include <qtextcodec.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#include <kdebug.h> //for kdDebug()
#include <klocale.h>
@@ -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<WORD> redirectionServices;
+ TQValueList<WORD> 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<int> exchanges;
+ TQValueList<int> 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<AwayMsgRequest> awayMsgRequestQueue;
- QTimer* awayMsgRequestTimer;
+ TQValueList<AwayMsgRequest> 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<int> Client::chatExchangeList() const
+TQValueList<int> Client::chatExchangeList() const
{
return d->exchanges;
}
-void Client::setChatExchangeList( const QValueList<int>& exchanges )
+void Client::setChatExchangeList( const TQValueList<int>& 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<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin();
+ TQValueList<ClientPrivate::AwayMsgRequest>::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<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList<TLV>() );
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<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList<TLV>() );
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<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList<TLV>() );
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<QObject*>( sender() );
+ TQObject* o = const_cast<TQObject*>( sender() );
ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( 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<int>& ) ),
- this, SLOT( setChatExchangeList( const QValueList<int>& ) ) );
+ TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList<int>& ) ),
+ this, TQT_SLOT( setChatExchangeList( const TQValueList<int>& ) ) );
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<QObject*>( sender() );
+ TQObject* obj = const_cast<TQObject*>( sender() );
Connection* c = dynamic_cast<Connection*>( 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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#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<int> chatExchangeList() const;
+ TQValueList<int> 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<int>& exchanges );
+ void setChatExchangeList( const TQValueList<int>& 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<int>& families )
+void ClientReadyTask::setFamilies( const TQValueList<int>& 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<int>::const_iterator rcEnd = m_familyList.constEnd();
- for ( QValueList<int>::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it )
+ TQValueList<int>::const_iterator rcEnd = m_familyList.constEnd();
+ for ( TQValueList<int>::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<int>& families );
+ void setFamilies( const TQValueList<int>& families );
private:
- QValueList<RateClass*> m_classList;
- QValueList<int> m_familyList;
+ TQValueList<RateClass*> m_classList;
+ TQValueList<int> 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 <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
#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<TLV> tlvList = ft->buffer()->getTLVList();
+ TQValueList<TLV> 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 <task.h>
-#include <qcstring.h>
+#include <tqcstring.h>
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<int> familyList;
+ TQValueList<int> 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<int> Connection::supportedFamilies() const
+TQValueList<int> Connection::supportedFamilies() const
{
return d->familyList;
}
-void Connection::addToSupportedFamilies( const QValueList<int>& familyList )
+void Connection::addToSupportedFamilies( const TQValueList<int>& 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 <kopete-devel@kde.org>
#ifndef CONNECTION_H
#define CONNECTION_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#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<int> supportedFamilies() const;
+ TQValueList<int> 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<int>& familyList );
+ void addToSupportedFamilies( const TQValueList<int>& 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<RateClass*> rateClassList );
+ void addToRateClasses( const TQValueList<RateClass*> 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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include "connection.h"
#include "oscartypes.h"
@@ -25,8 +25,8 @@
class ConnectionHandler::Private
{
public:
- QValueList<Connection*> connections;
- QMap<Connection*, ConnectionRoomInfo> chatRoomConnections;
+ TQValueList<Connection*> connections;
+ TQMap<Connection*, ConnectionRoomInfo> 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<Connection*>::iterator it = d->connections.begin();
- QValueList<Connection*>::iterator itEnd = d->connections.end();
+ TQValueList<Connection*>::iterator it = d->connections.begin();
+ TQValueList<Connection*>::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<Connection*>::iterator it = d->connections.begin();
- QValueList<Connection*>::iterator itEnd = d->connections.end();
+ TQValueList<Connection*>::iterator it = d->connections.begin();
+ TQValueList<Connection*>::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<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end();
+ TQMap<Connection*, ConnectionRoomInfo>::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<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end();
+ TQMap<Connection*, ConnectionRoomInfo>::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<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end();
+ TQMap<Connection*, ConnectionRoomInfo>::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 <qstring.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqpair.h>
class Connection;
-typedef QPair<Oscar::WORD, QString> ConnectionRoomInfo;
+typedef QPair<Oscar::WORD, TQString> 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 <qobject.h>
-#include "qhostaddress.h"
+#include <tqobject.h>
+#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 <qdatastream.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <ctype.h>
@@ -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 <qcstring.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
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 <qcstring.h>
-#include <qdatastream.h>
-#include <qobject.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqobject.h>
#include <kdebug.h>
#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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
@@ -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 <qcstring.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
#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<QCString> emailList;
+ TQValueList<TQCString> 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<ICQInfoItem> ICQInfoItemList;
+typedef TQValueList<ICQInfoItem> 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 <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#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<int, ICQGeneralUserInfo> m_genInfoMap;
- QMap<int, ICQEmailInfo> m_emailInfoMap;
- QMap<int, ICQMoreUserInfo> m_moreInfoMap;
- QMap<int, ICQWorkUserInfo> m_workInfoMap;
- QMap<int, ICQShortInfo> m_shortInfoMap;
- QMap<int, ICQInterestInfo> m_interestInfoMap;
- QMap<int, QString> m_notesInfoMap;
- QMap<int, QString> m_contactSequenceMap;
- QMap<QString, int> m_reverseContactMap;
+ TQMap<int, ICQGeneralUserInfo> m_genInfoMap;
+ TQMap<int, ICQEmailInfo> m_emailInfoMap;
+ TQMap<int, ICQMoreUserInfo> m_moreInfoMap;
+ TQMap<int, ICQWorkUserInfo> m_workInfoMap;
+ TQMap<int, ICQShortInfo> m_shortInfoMap;
+ TQMap<int, ICQInterestInfo> m_interestInfoMap;
+ TQMap<int, TQString> m_notesInfoMap;
+ TQMap<int, TQString> m_contactSequenceMap;
+ TQMap<TQString, int> 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 <qobject.h>
+#include <tqobject.h>
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 <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qcstring.h>
+#include <tqcstring.h>
#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 <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#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<TLV> messageTLVList = transfer()->buffer()->getTLVList();
+ TQValueList<TLV> 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<TLV> innerTLVList = messageBuffer.getTLVList();
- QValueList<TLV>::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end();
+ TQValueList<TLV> innerTLVList = messageBuffer.getTLVList();
+ TQValueList<TLV>::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<TLV> messageTLVList = transfer()->buffer()->getTLVList();
+ TQValueList<TLV> 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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#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 <qobject.h>
+#include <tqobject.h>
#include <kbufferedsocket.h>
#include <kdebug.h>
#include <kresolver.h>
#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 <qguardedptr.h>
-#include <qobject.h>
-#include <qptrqueue.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqptrqueue.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -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<Transfer> in;
+ TQPtrQueue<Transfer> 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<QObject> self = this;
+ TQGuardedPtr<TQObject> 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 <qdeepcopy.h>
-#include <qtextcodec.h>
+#include <tqdeepcopy.h>
+#include <tqtextcodec.h>
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 <qglobal.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
#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 <qdeepcopy.h>
-#include <qvaluelist.h>
+#include <tqdeepcopy.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#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<TLV> &tlvlist, int tlvLength )
+Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV> &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<TLV> >( tlvlist );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( 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<TLV> >( other.m_tlvList );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( 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<TLV>& Oscar::SSI::tlvList() const
+const TQValueList<TLV>& 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<TLV> list )
+void Oscar::SSI::setTLVList( TQValueList<TLV> list )
{
//deepcopy the tlvs
- m_tlvList = QDeepCopy< QValueList<TLV> >( list );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( list );
refreshTLVLength();
checkTLVs();
}
@@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList<TLV> list )
void Oscar::SSI::refreshTLVLength()
{
m_tlvLength = 0;
- QValueList<TLV>::iterator it = m_tlvList.begin();
+ TQValueList<TLV>::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<Oscar::TLV>::const_iterator it = m_tlvList.begin();
+ TQValueList<Oscar::TLV>::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 <qglobal.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#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<TLV>& tlvlist, int tlvLength = 0 );
+ SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV>& 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<TLV>& tlvList() const;
+ const TQValueList<TLV>& tlvList() const;
/** \brief Set the TLV list for the item */
- void setTLVList( QValueList<TLV> );
+ void setTLVList( TQValueList<TLV> );
/**
* \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<TLV> m_tlvList;
+ TQValueList<TLV> 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 <qglobal.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
//! 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 <qhostaddress.h>
+#include <tqhostaddress.h>
#include <kapplication.h>
#include <kdebug.h>
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<TLV>& list, int type )
+TLV Oscar::findTLV( const TQValueList<TLV>& list, int type )
{
TLV t;
- QValueList<TLV>::const_iterator it;
+ TQValueList<TLV>::const_iterator it;
for ( it = list.begin(); it != list.end(); ++it )
{
if ( ( *it ).type == type )
@@ -52,12 +52,12 @@ TLV Oscar::findTLV( const QValueList<TLV>& list, int type )
return t;
}
-bool Oscar::uptateTLVs( SSI& item, const QValueList<TLV>& list )
+bool Oscar::uptateTLVs( SSI& item, const TQValueList<TLV>& list )
{
bool changed = false;
- QValueList<TLV> tList( item.tlvList() );
+ TQValueList<TLV> tList( item.tlvList() );
- QValueList<TLV>::const_iterator it;
+ TQValueList<TLV>::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 <qglobal.h>
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#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<TLV>&, int type );
+KOPETE_EXPORT TLV findTLV( const TQValueList<TLV>&, 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<TLV>& list );
+KOPETE_EXPORT bool uptateTLVs( SSI& item, const TQValueList<TLV>& 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 <qcstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#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 <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#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<SnacPair>::const_iterator it;
- QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd();
+ TQValueList<SnacPair>::const_iterator it;
+ TQValueList<SnacPair>::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<SnacPair>::const_iterator it;
- QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd();
+ TQValueList<SnacPair>::const_iterator it;
+ TQValueList<SnacPair>::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<Transfer*>::iterator it = m_packetQueue.begin();
+ TQValueList<Transfer*>::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 <qobject.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
-#include <qpair.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
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<SnacPair> m_members;
- QValueList<Transfer*> m_packetQueue;
- QTime m_packetTimer;
+ TQValueList<SnacPair> m_members;
+ TQValueList<Transfer*> 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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -30,12 +30,12 @@ class RateClassManagerPrivate
{
public:
//! The list of rate classes owned by this manager
- QValueList<RateClass*> classList;
+ TQValueList<RateClass*> 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<RateClass*>::iterator it = d->classList.begin();
+ TQValueList<RateClass*>::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<RateClass*> RateClassManager::classList() const
+TQValueList<RateClass*> 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<RateClass*>::const_iterator it;
- QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd();
+ TQValueList<RateClass*>::const_iterator it;
+ TQValueList<RateClass*>::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<RateClass*>::iterator it;
- QValueList<RateClass*>::iterator rcEnd = d->classList.end();
+ TQValueList<RateClass*>::iterator it;
+ TQValueList<RateClass*>::iterator rcEnd = d->classList.end();
for ( it = d->classList.begin(); it != rcEnd; ++it )
( *it )->updateRateInfo();
}
int RateClassManager::timeToInitialLevel( SNAC s )
{
- QValueList<RateClass*>::const_iterator it;
- QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd();
+ TQValueList<RateClass*>::const_iterator it;
+ TQValueList<RateClass*>::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 <qobject.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "oscartypes.h"
class Transfer;
@@ -51,7 +51,7 @@ public:
void queue( Transfer* t );
/** Get the list of rate classes */
- QValueList<RateClass*> classList() const;
+ TQValueList<RateClass*> 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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#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<RateClass*> rates;
+ TQValueList<RateClass*> 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<RateClass*>::iterator it = rates.begin();
+ TQValueList<RateClass*>::iterator it = rates.begin();
for ( ; it != rates.end(); ++it )
{
if ( ( *it )->id() == groupNum )
@@ -139,8 +139,8 @@ void RateInfoTask::handleRateInfoResponse()
}
}
- QValueList<RateClass*>::iterator it = rates.begin();
- QValueList<RateClass*>::iterator rcEnd = rates.end();
+ TQValueList<RateClass*>::iterator it = rates.begin();
+ TQValueList<RateClass*>::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<int> cit = m_rateGroups.begin();
- QValueListConstIterator<int> end = m_rateGroups.end();
+ TQValueListConstIterator<int> cit = m_rateGroups.begin();
+ TQValueListConstIterator<int> 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 <qvaluelist.h>
+#include <tqvaluelist.h>
using namespace Oscar;
@@ -56,7 +56,7 @@ private slots:
private:
bool m_needRateAck;
- QValueList<int> m_rateGroups;
+ TQValueList<int> 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("&"), "&amp;");
- str.replace(QRegExp("<"), "&lt;");
- str.replace(QRegExp(">"), "&gt;");
- str.replace(QRegExp("\""), "&quot;");
- str.replace(QRegExp("\r"), "");
+ TQString str = _str;
+ str.replace(TQRegExp("&"), "&amp;");
+ str.replace(TQRegExp("<"), "&lt;");
+ str.replace(TQRegExp(">"), "&gt;");
+ str.replace(TQRegExp("\""), "&quot;");
+ str.replace(TQRegExp("\r"), "");
switch (mode){
case quoteHTML:
- str.replace(QRegExp("\n"), "<br>\n");
+ str.replace(TQRegExp("\n"), "<br>\n");
break;
case quoteXML:
- str.replace(QRegExp("\n"), "<br/>\n");
+ str.replace(TQRegExp("\n"), "<br/>\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 += "&nbsp;";
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("<span style=\"color:#%02X%02X%02X\">", 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("<span style=\"background-color:#%02X%02X%02X;\">", 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 <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
-#include <qtextcodec.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <vector>
@@ -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<FontDef> fonts;
// Colors table.
- vector<QColor> colors;
+ vector<TQColor> colors;
// Stack of tags (across all levels, not just current level)
stack<TagEnum> 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 <qtimer.h>
+#include <tqtimer.h>
//----------------------------------------------------------------------------
// 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<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
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 <qstring.h>
+#include <tqstring.h>
#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 <qcstring.h>
+#include <tqcstring.h>
#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 <qvaluelist.h>
+#include <tqvaluelist.h>
#include "oscartypes.h"
class Transfer;
@@ -52,7 +52,7 @@ private:
void requestFamilyVersions();
private:
- QValueList<int> m_familiesList;
+ TQValueList<int> 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<int> familyList;
+ TQValueList<int> 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 <qcstring.h>
-#include <qdatastream.h>
-#include <qobject.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqobject.h>
#include <kdebug.h>
#include <stdlib.h>
#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<TLV> tlvList;
+ TQValueList<TLV> 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<Oscar::SSI> SSIList;
- QValueList<WORD> groupIdList;
- QValueList<WORD> itemIdList;
+ TQValueList<Oscar::SSI> SSIList;
+ TQValueList<WORD> groupIdList;
+ TQValueList<WORD> 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<Oscar::SSI>::iterator it = d->SSIList.begin();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI*>& newList )
+void SSIManager::loadFromExisting( const TQValueList<Oscar::SSI*>& newList )
{
Q_UNUSED( newList );
//FIXME: NOT Implemented!
@@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList<Oscar::SSI*>& newList )
bool SSIManager::hasItem( const Oscar::SSI& item ) const
{
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::groupList() const
+TQValueList<Oscar::SSI> SSIManager::groupList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::groupList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactList() const
+TQValueList<Oscar::SSI> SSIManager::contactList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::visibleList() const
+TQValueList<Oscar::SSI> SSIManager::visibleList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::visibleList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::invisibleList() const
+TQValueList<Oscar::SSI> SSIManager::invisibleList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::invisibleList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) const
+TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( const TQString &group ) const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
Oscar::SSI gr = findGroup( group );
if ( gr.isValid() )
{
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) con
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
+TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
Oscar::SSI SSIManager::visibilityItem() const
{
Oscar::SSI item = m_dummyItem;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<WORD>& idList, WORD fromId ) const
+WORD SSIManager::findFreeId( const TQValueList<WORD>& 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 <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#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<Oscar::SSI*>& newList );
+ void loadFromExisting( const TQValueList<Oscar::SSI*>& 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<Oscar::SSI> groupList() const;
- QValueList<Oscar::SSI> contactList() const;
- QValueList<Oscar::SSI> visibleList() const;
- QValueList<Oscar::SSI> invisibleList() const;
- QValueList<Oscar::SSI> contactsFromGroup( const QString& group ) const;
- QValueList<Oscar::SSI> contactsFromGroup( int groupId ) const;
+ TQValueList<Oscar::SSI> groupList() const;
+ TQValueList<Oscar::SSI> contactList() const;
+ TQValueList<Oscar::SSI> visibleList() const;
+ TQValueList<Oscar::SSI> invisibleList() const;
+ TQValueList<Oscar::SSI> contactsFromGroup( const TQString& group ) const;
+ TQValueList<Oscar::SSI> 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<WORD>& idList, WORD fromId ) const;
+ WORD findFreeId( const TQValueList<WORD>& 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 <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#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<TLV> tlvList;
+ TQValueList<TLV> 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<TLV> dummy;
+ TQValueList<TLV> 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<TLV> list = oldGroupItem.tlvList();
+ TQValueList<TLV> 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<TLV> list2 = m_groupItem.tlvList();
+ TQValueList<TLV> 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<TLV>::const_iterator it = item.tlvList().begin();
- QValueList<TLV>::const_iterator listEnd = item.tlvList().end();
+ TQValueList<TLV>::const_iterator it = item.tlvList().begin();
+ TQValueList<TLV>::const_iterator listEnd = item.tlvList().end();
for( ; it != listEnd; ++it )
buffer->addTLV( ( *it ) );
}
Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const
{
- QValueList<TLV> tlvList;
+ TQValueList<TLV> 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 <qobject.h>
+#include <tqobject.h>
#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 <qtimer.h>
+#include <tqtimer.h>
#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 <qobject.h>
+#include <tqobject.h>
#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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <iostream>
#include "ipaddrtest.h"
-#include <qstring.h>
+#include <tqstring.h>
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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <iostream>
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<Tester> it( m_tests );
+ TQAsciiDictIterator<Tester> 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 <qobject.h>
-#include <qasciidict.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
+#include <tqptrdict.h>
#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<Tester> m_tests;
-// QPtrDict<QTester> m_qtests;
+ TQAsciiDict<Tester> m_tests;
+// TQPtrDict<QTester> 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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <iostream>
#include "redirecttest.h"
-#include <qcstring.h>
+#include <tqcstring.h>
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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qstring.h>
+#include <tqstring.h>
-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<TLV> tlvs;
+ TQPtrList<TLV> 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<SSI*> list = m_manager->contactsFromGroup("FirstGroup");
- QValueList<SSI*>::iterator it;
+ TQValueList<SSI*> list = m_manager->contactsFromGroup("FirstGroup");
+ TQValueList<SSI*>::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<SSI*> list2 = m_manager->groupList();
+ TQValueList<SSI*> 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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qstringlist.h>
+#include <tqstringlist.h>
#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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <ctype.h>
-#include <qdeepcopy.h>
+#include <tqdeepcopy.h>
#include <kdebug.h>
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<QByteArray>( m_wireFormat );
+ TQByteArray wire = TQDeepCopy<TQByteArray>( 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<QByteArray>( m_wireFormat );
+ TQByteArray wire = TQDeepCopy<TQByteArray>( 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<QByteArray>( m_wireFormat );
+ TQByteArray wire = TQDeepCopy<TQByteArray>( 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#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 <qstring.h>
+#include <tqstring.h>
#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 <netinet/in.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#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<TLV> list = b->getTLVList();
- QValueList<TLV>::iterator it = list.begin();
- QString profile;
- QString away;
+ TQValueList<TLV> list = b->getTLVList();
+ TQValueList<TLV>::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 <qstring.h>
+#include <tqstring.h>
#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<Q_UINT16, UserDetails> m_sequenceInfoMap;
- QMap<Q_UINT16, QString> m_contactSequenceMap;
- QMap<Q_UINT16, unsigned int> m_typesSequenceMap;
+ TQMap<Q_UINT16, UserDetails> m_sequenceInfoMap;
+ TQMap<Q_UINT16, TQString> m_contactSequenceMap;
+ TQMap<Q_UINT16, unsigned int> 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 <qstring.h>
+#include <tqstring.h>
#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<ICQSearchResult> m_results;
- QString m_uin;
+ TQValueList<ICQSearchResult> 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#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 <qmap.h>
+#include <tqmap.h>
#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 <assert.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qtextcodec.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqtextcodec.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -72,29 +72,29 @@ public:
Q_UINT32 ssiLastModTime;
//contacts waiting on SSI add ack and their metacontact
- QMap<QString, Kopete::MetaContact*> addContactMap;
+ TQMap<TQString, Kopete::MetaContact*> addContactMap;
//contacts waiting on their group to be added
- QMap<QString, QString> contactAddQueue;
- QMap<QString, QString> contactChangeQueue;
+ TQMap<TQString, TQString> contactAddQueue;
+ TQMap<TQString, TQString> 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<SSI> groupList = listManager->groupList();
- QValueList<SSI>::const_iterator git = groupList.constBegin();
- QValueList<SSI>::const_iterator listEnd = groupList.constEnd();
+ TQValueList<SSI> groupList = listManager->groupList();
+ TQValueList<SSI>::const_iterator git = groupList.constBegin();
+ TQValueList<SSI>::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<SSI> contactList = listManager->contactList();
- QValueList<SSI>::const_iterator bit = contactList.constBegin();
- QValueList<SSI>::const_iterator blistEnd = contactList.constEnd();
+ TQValueList<SSI> contactList = listManager->contactList();
+ TQValueList<SSI>::const_iterator bit = contactList.constBegin();
+ TQValueList<SSI>::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<Kopete::Contact> nonServerContacts = contacts();
- QDictIterator<Kopete::Contact> it( nonServerContacts );
- QStringList nonServerContactList;
+ TQDict<Kopete::Contact> nonServerContacts = contacts();
+ TQDictIterator<Kopete::Contact> it( nonServerContacts );
+ TQStringList nonServerContactList;
for ( ; it.current(); ++it )
{
OscarContact* oc = dynamic_cast<OscarContact*>( ( *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<OscarContact*>( 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<OscarContact *> ( 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<TLV> dummyList;
+ TQValueList<TLV> 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<QString,QString>::iterator it;
+ TQMap<TQString,TQString>::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 <qdict.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#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 <time.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
#include <kaction.h>
#include <kdebug.h>
@@ -43,30 +43,30 @@
#include <assert.h>
-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<OscarAccount*>(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<QString, QString> &serializedData,
- QMap<QString, QString> &/*addressBookData*/)
+void OscarContact::serialize(TQMap<TQString, TQString> &serializedData,
+ TQMap<TQString, TQString> &/*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<Kopete::Contact> theContact;
+ TQPtrList<Kopete::Contact> 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 <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#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<QString, QString>&, QMap<QString, QString>&);
+ virtual void serialize(TQMap<TQString, TQString>&, TQMap<TQString, TQString>&);
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 <kdebug.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <klocale.h>
-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<int, QString> m_encodings;
+ TQMap<int, TQString> 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 <qstringlist.h>
-#include <qcheckbox.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-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 <qdom.h>
-#include <qmutex.h>
+#include <tqdom.h>
+#include <tqmutex.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -25,7 +25,7 @@
#include <kglobal.h>
-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 <qobject.h>
+#include <tqobject.h>
#include <oscartypes.h>
@@ -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 <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
#include <klocale.h>
@@ -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<QString, QString> ContactMap;
+ typedef TQMap<TQString, TQString> 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<QString, Action> ChangeMap;
+ typedef TQMap<TQString, Action> 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 <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
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 <qcombobox.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -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"<<endl;
}
@@ -115,9 +115,9 @@ void GSMLibThread::send(const Kopete::Message& msg)
else
{
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);
}
}
@@ -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<SMSContact*>( 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("<qt>GSMLib is a library (and utilities) for sending SMS via a GSM device. The program can be found on <a href=\"%1\">%1</a></qt>").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 <qobject.h>
-#include <qevent.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqevent.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
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<IncomingMessage> MessageList;
+ typedef TQValueList<IncomingMessage> MessageList;
MessageList m_newMessages;
- typedef QValueList<Kopete::Message> KopeteMessageList;
+ typedef TQValueList<Kopete::Message> 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 <cassert>
#include <assert.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#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 <sys/types.h>
#include <termios.h>
-#include <qobject.h>
+#include <tqobject.h>
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 <qcombobox.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -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("<qt>SMSClient is a program for sending SMS with the modem. The program can be found on <a href=\"%1\">%1</a></qt>").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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
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 <qcombobox.h>
-#include <qvgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqvgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kconfigbase.h>
#include <klineedit.h>
@@ -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("<qt>SMSSend is a program for sending SMS through gateways on the web. It can be found on <a href=\"%1\">%2</a></qt>").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 <qobject.h>
-#include <qmap.h>
-#include <qlabel.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqlabel.h>
#include <klineedit.h>
@@ -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<KLineEdit> args;
- QPtrList<QLabel> labels;
- QString m_description;
+ TQPtrList<KLineEdit> args;
+ TQPtrList<TQLabel> 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 <qvaluelist.h>
-#include <qlabel.h>
-#include <qfile.h>
+#include <tqvaluelist.h>
+#include <tqlabel.h>
+#include <tqfile.h>
#include <kconfigbase.h>
#include <kprocess.h>
@@ -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<KLineEdit>& args)
+void SMSSendProvider::save(TQPtrList<KLineEdit>& 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<KLineEdit>& 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<SMSContact *>(msg.to().first())->qualifiedNumber();
+ TQString message = msg.plainBody();
+ TQString nr = dynamic_cast<SMSContact *>(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 <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
#include <klineedit.h>
@@ -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<KLineEdit>& args);
+ void save(TQPtrList<KLineEdit>& 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<bool> isHiddens;
+ TQStringList names;
+ TQStringList descriptions;
+ TQStringList values;
+ TQValueList<bool> 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<SMSContact*>(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 <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
-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 <qwidget.h>
+#include <tqwidget.h>
#include <addcontactpage.h>
-#include <qlabel.h>
+#include <tqlabel.h>
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<QString, QString> &serializedData,
- QMap<QString, QString> & /* addressBookData */ )
+void SMSContact::serialize( TQMap<TQString, TQString> &serializedData,
+ TQMap<TQString, TQString> & /* 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<Kopete::Contact> contacts;
+ TQPtrList<Kopete::Contact> 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<SMSAccount *>(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<KAction>* SMSContact::customContextMenuActions()
+TQPtrList<KAction>* SMSContact::customContextMenuActions()
{
- QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>();
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 <qstring.h>
+#include <tqstring.h>
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<KAction>* customContextMenuActions();
+ TQPtrList<KAction>* 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<QString, QString> &serializedData,
- QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData,
+ TQMap<TQString, TQString> &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 <qvgroupbox.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqvgroupbox.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include <kconfigbase.h>
#include <klocale.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#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<QString, QString> &serializedData,
- const QMap<QString, QString> &/* addressBookData */)
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/* 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<Kopete::Account> accounts=Kopete::AccountManager::self()->accounts(this);
+ TQDict<Kopete::Account> 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 <qmap.h>
-#include <qmovie.h>
-#include <qpixmap.h>
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqmovie.h>
+#include <tqpixmap.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#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<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &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 <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#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 <qstring.h>
-#include <qwidget.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqobject.h>
#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 <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <klineedit.h>
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 <kdialogbase.h>
-#include <qvbox.h>
+#include <tqvbox.h>
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<Kopete::Contact> itr( contacts() );
+ TQDictIterator<Kopete::Contact> 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 <qlayout.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#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<Kopete::Contact> contacts;
+ TQPtrList<Kopete::Contact> 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<KAction> *TestbedContact::customContextMenuActions() //OBSOLETE
+TQPtrList<KAction> *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 <qmap.h>
+#include <tqmap.h>
#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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *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 <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#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 <qwidget.h>
+#include <tqwidget.h>
#include <editaccountwidget.h>
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 <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#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 <qptrlist.h>
+#include "tqobject.h"
+#include <tqptrlist.h>
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<TestbedIncomingMessage> m_incomingMessages;
+ TQPtrList<TestbedIncomingMessage> 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 <qobject.h>
+#include <tqobject.h>
#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<QString, QString> &serializedData,
- const QMap<QString, QString> &/* addressBookData */)
+ Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/* 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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> 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 <webcamwidget.h>
#include "avdevice/videodevicepool.h"
-#include <qframe.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqframe.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <klocale.h>
-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 <qstring.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kdialogbase.h>
/**
@@ -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 <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
// KDE Includes
#include <kapplication.h>
@@ -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<QString, WorkGroup>::ConstIterator end = theGroups.end();
- for(QMap<QString, WorkGroup>::ConstIterator i = theGroups.begin(); i != end; i++)
+ TQStringList ret;
+ TQMap<TQString, WorkGroup>::ConstIterator end = theGroups.end();
+ for(TQMap<TQString, WorkGroup>::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<QString, WorkGroup>::Iterator end = theGroups.end();
- for(QMap<QString, WorkGroup>::Iterator i = theGroups.begin(); i != end && !ret; i++) {
+ TQMap<TQString, WorkGroup>::Iterator end = theGroups.end();
+ for(TQMap<TQString, WorkGroup>::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<QString, WorkGroup> newGroups;
+ TQMap<TQString, WorkGroup> newGroups;
//loop through the read groups and check for new ones
- QMap<QString, QString>::ConstIterator end = currentGroups.end();
- for (QMap<QString, QString>::ConstIterator i = currentGroups.begin(); i != end; i++) {
- QString groupMaster = i.data();
+ TQMap<TQString, TQString>::ConstIterator end = currentGroups.end();
+ for (TQMap<TQString, TQString>::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<QString, QString>::ConstIterator end = currentGroups.end();
- for (QMap<QString, QString>::ConstIterator i = currentGroups.begin(); i != end; i++) {
- QString groupMaster = i.data();
+ TQMap<TQString, TQString>::ConstIterator end = currentGroups.end();
+ for (TQMap<TQString, TQString>::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<KFileItem> it(items);
+ TQPtrListIterator<KFileItem> 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 <qobject.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
// KDE Includes
#include <kprocio.h>
#include <kfileitem.h>
-const QString WP_POPUP_DIR = QString::fromLatin1("/var/lib/winpopup");
+const TQString WP_POPUP_DIR = TQString::fromLatin1("/var/lib/winpopup");
class KDirLister;
-typedef QMap<QString, QString> stringMap;
+typedef TQMap<TQString, TQString> 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<QString, WorkGroup> theGroups, currentGroupsMap;
- QString currentGroup, currentHost;
- QStringList todo, done, currentHosts;
+ TQMap<TQString, WorkGroup> 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 <qregexp.h>
+#include <tqregexp.h>
// KDE Includes
#include <kdebug.h>
@@ -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 <qpixmap.h>
+#include <tqpixmap.h>
// 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 <qlayout.h>
+#include <tqlayout.h>
// KDE Includes
#include <kcombobox.h>
@@ -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(<owner>, " << newAccount << ", <parent>, " << 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("<qt>You must enter a valid hostname.</qt>"), 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("<qt>LOCALHOST is not allowed as contact.</qt>"), 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 <qregexp.h>
+#include <tqregexp.h>
// KDE Includes
#include <kdebug.h>
@@ -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(<account>, " << newHostName << ", " << nickName << ", <parent>)" << 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<WPProtocol *>(protocol())->WPOffline);
- connect(&checkStatus, SIGNAL(timeout()), this, SLOT(slotCheckStatus()));
+ connect(&checkStatus, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus()));
checkStatus.start(1000, false);
}
-QPtrList<KAction> * WPContact::customContextMenuActions()
+TQPtrList<KAction> * WPContact::customContextMenuActions()
{
//myActionCollection = new KActionCollection(parent);
return 0;
}
-void WPContact::serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData)
+void WPContact::serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &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<Kopete::Contact> singleContact;
+ TQPtrList<Kopete::Contact> 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<WPAccount*>( 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<Kopete::Contact> contactList;
+ TQPtrList<Kopete::Contact> 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<WPContact *>( 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<WPAccount *>(account());
WPContact *contact = dynamic_cast<WPContact *>( 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 <kaction.h>
// Qt Includes
-//#include <qvaluestack.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qstringlist.h>
+//#include <tqvaluestack.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
// 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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate);
- virtual void serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData);
+ virtual void serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &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 <unistd.h>
// QT Includes
-#include <qcheckbox.h>
-#include <qfile.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
// KDE Includes
#include <kdebug.h>
@@ -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(<parent>, <theAccount>)";
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("<qt>You must enter a valid smbclient path.</qt>"), 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 <qmap.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
// KDE Includes
#include <kapplication.h>
@@ -48,11 +48,11 @@ typedef KGenericFactory<WPProtocol> 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(<parent>, " << theAccount << ")" << endl;
@@ -87,11 +87,11 @@ AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Acco
}
Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContact,
- const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
- QString contactId = serializedData[ "contactId" ];
- QString accountId = serializedData[ "accountId" ];
+ TQString contactId = serializedData[ "contactId" ];
+ TQString accountId = serializedData[ "accountId" ];
WPAccount *theAccount = static_cast<WPAccount *>(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<Kopete::Account> Accounts = Kopete::AccountManager::self()->accounts(protocol());
- for (QDictIterator<Kopete::Account> it(Accounts); it.current(); ++it) {
- QDict<Kopete::Contact> Contacts = it.current()->contacts();
+ TQString accountKey = TQString::null;
+ TQDict<Kopete::Account> Accounts = Kopete::AccountManager::self()->accounts(protocol());
+ for (TQDictIterator<Kopete::Account> it(Accounts); it.current(); ++it) {
+ TQDict<Kopete::Contact> 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 <qpixmap.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
// 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<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData);
+ virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &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 <qregexp.h>
+#include <tqregexp.h>
// KDE Includes
#include <kdebug.h>
@@ -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
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! 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 <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
// 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
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 <qtimer.h>
-#include <qpixmap.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <ksocketbase.h>
@@ -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( "<ding>" ) );
+ smt->setText( TQString::fromLatin1( "<ding>" ) );
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 <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#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 <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
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 <qobject.h>
-#include "qhostaddress.h"
+#include <tqobject.h>
+#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 <string.h>
#include <iostream>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kurl.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
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 <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
#include <kdebug.h>
//#include <kcodecs.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
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 <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <stdlib.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
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 <qstring.h>
+#include <tqstring.h>
#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 <qstring.h>
+#include <tqstring.h>
#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 <qstring.h>
-#include <qdatastream.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -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<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
+ TQString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
}
void ModifyYABTask::connectSucceeded()
@@ -99,7 +99,7 @@ void ModifyYABTask::connectSucceeded()
kdDebug(YAHOO_RAW_DEBUG) ;
KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( 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<KBufferedSocket*>( static_cast<const KBufferedSocket*>( 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("<?xml") );
if( m_data.find("</ab>") < 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 <qglobal.h>
+#include <tqglobal.h>
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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
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 <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
#include <kio/global.h>
@@ -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 <qtimer.h>
+#include <tqtimer.h>
//----------------------------------------------------------------------------
// 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<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
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 <qstring.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kapplication.h> // for random()
#include <kdebug.h>
#include <klocale.h>
@@ -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 <kurl.h>
-#include <qfile.h>
+#include <tqfile.h>
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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qstring.h>
-#include <qfile.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdatastream.h>
#include <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
@@ -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<const KBufferedSocket*>( sender() )->errorString() << endl;
- client()->notifyError(i18n("The picture was not successfully uploaded"), QString("%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
+ client()->notifyError(i18n("The picture was not successfully uploaded"), TQString("%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( 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 <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
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 <qobject.h>
+#include <tqobject.h>
#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 <qtimer.h>
+#include <tqtimer.h>
#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 <qobject.h>
+#include <tqobject.h>
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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqglobal.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#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 <qbuffer.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <ktempfile.h>
#include <kprocess.h>
#include <kstreamsocket.h>
@@ -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("<RVWCFG>").data(), 8 );
- s = QString("g=%1\r\n").arg(socketMap[socket].sender);
+ socket->writeBlock( TQCString("<RVWCFG>").data(), 8 );
+ s = TQString("g=%1\r\n").arg(socketMap[socket].sender);
}
else
{
- socket->writeBlock( QCString("<RUPCFG>").data(), 8 );
- s = QString("f=1\r\n");
+ socket->writeBlock( TQCString("<RUPCFG>").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 <REQIMG>-Packet
- socket->writeBlock( QCString("<REQIMG>").data(), 8 );
+ socket->writeBlock( TQCString("<REQIMG>").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 <REQIMG>-Packet
- socket->writeBlock( QCString("<SNDIMG>").data(), 8 );
+ socket->writeBlock( TQCString("<SNDIMG>").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<KStreamSocket*>( dynamic_cast<const KStreamSocket*>( 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<uint>(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 <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
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', "&#xd;&#xa;" ) );
+ e.setAttribute( "wa", TQString( workAdress ).replace( '\n', "&#xd;&#xa;" ) );
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', "&#xd;&#xa;" ) );
+ e.setAttribute( "ha", TQString( privateAdress ).replace( '\n', "&#xd;&#xa;" ) );
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', "&#xd;&#xa;" ) );
+ e.setAttribute( "cm", TQString( notes ).replace( '\n', "&#xd;&#xa;" ) );
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 <kdebug.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
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 <qstring.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
#include <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
@@ -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 <qfile.h>
+#include <tqfile.h>
// KDE Includes
#include <kdebug.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqmap.h>
// KDE Includes
#include <kurl.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
#include <kbufferedsocket.h>
#include <kdebug.h>
#include <kresolver.h>
#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 <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qdom.h>
+#include <tqdom.h>
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 <qmap.h>
-#include <qvaluelist.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
+#include <tqpair.h>
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 <qapplication.h> // for qdebug
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qptrqueue.h>
-#include <qtimer.h>
+#include <tqapplication.h> // for qdebug
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqptrqueue.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -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<Transfer> in;
+ TQPtrQueue<Transfer> 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<QObject> self = this;
+ TQGuardedPtr<TQObject> 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 <qglobal.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqstring.h>
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 <QDataStream>
-//#include <QMap>
-//#include <QObject>
-//#include <QStringList>
+//#include <TQDataStream>
+//#include <TQMap>
+//#include <TQObject>
+//#include <TQStringList>
-//#include <qcstring.h>
-#include <qdatastream.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qstringlist.h>
+//#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kdebug.h>
@@ -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<QString, QString> params;
+ TQMap<TQString, TQString> 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 <qdatastream.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
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 <qpair.h>
-#include <qvaluelist.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
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 <kdebug.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
-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; i<listInvited->count(); 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; i<listFriends->count(); 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 <qwidget.h>
+#include <tqwidget.h>
#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 <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qtextedit.h>
-#include <qobject.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqtextedit.h>
+#include <tqobject.h>
+#include <tqtextcodec.h>
#include <kdatewidget.h>
#include <kdebug.h>
@@ -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 <qframe.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqframe.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <klocale.h>
#include <webcamwidget.h>
-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 <<endl;
- QString closeReason;
+ TQString closeReason;
switch ( reason )
{
case 1:
@@ -92,13 +92,13 @@ void YahooWebcamDialog::webcamClosed( int reason )
m_imageContainer->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 <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
@@ -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 <stdlib.h>
//QT
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqfile.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
// KDE
#include <klocale.h>
@@ -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", "<b>" );
@@ -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<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline );
// FIXME: to check
- //QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
+ //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
//for ( it = contacts().constBegin(); it != itEnd; ++it )
// static_cast<YahooContact *>( it.value() )->setOnlineStatus( m_protocol->Offline );
- for ( QDictIterator<Kopete::Contact> i( contacts() ); i.current(); ++i )
+ for ( TQDictIterator<Kopete::Contact> i( contacts() ); i.current(); ++i )
static_cast<YahooContact *>( i.current() )->setOnlineStatus( m_protocol->Offline );
static_cast<YahooContact*>( myself() )->setOnlineStatus( m_protocol->Offline );
@@ -581,10 +581,10 @@ void YahooAccount::disconnect()
m_session->cancelConnect();
// FIXME: to check
- //QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
+ //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
//for ( it = contacts().constBegin(); it != itEnd; ++it )
// static_cast<YahooContact*>( it.value() )->setOnlineStatus( m_protocol->Offline );
- for ( QDictIterator<Kopete::Contact> i(contacts()); i.current(); ++i )
+ for ( TQDictIterator<Kopete::Contact> i(contacts()); i.current(); ++i )
static_cast<YahooContact*>( i.current() )->setOnlineStatus( m_protocol->Offline );
static_cast<YahooContact*>( 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<YahooContact *>(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<YahooContact *>( 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<YahooContact *>( 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<QString, QString>(group, alias);
+ IDs[userid] = QPair<TQString, TQString>(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<QString, QString>(group, QString());
+ IDs[userid] = QPair<TQString, TQString>(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<QString, QString>(group, QString());
+ IDs[userid] = QPair<TQString, TQString>(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<const Kopete::UI::ContactAddedNotifyDialog *>(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( "&amp;" ) );
+ newMsgText.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&amp;" ) );
// 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("<font\\1style=\"font-size:\\2pt\">" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("<font\\1style=\"font-size:\\2pt\">" ) );
}
}
@@ -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("&lt;" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("&lt;" ) );
}
}
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&gt;" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1&gt;" ) );
}
}
// add closing tags when needed
regExp.setMinimal( false );
regExp.setPattern( "(<b>.*)(?!</b>)" );
- newMsgText.replace( regExp, QString::fromLatin1("\\1</b>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</b>" ) );
regExp.setPattern( "(<i>.*)(?!</i>)" );
- newMsgText.replace( regExp, QString::fromLatin1("\\1</i>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</i>" ) );
regExp.setPattern( "(<u>.*)(?!</u>)" );
- newMsgText.replace( regExp, QString::fromLatin1("\\1</u>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</u>" ) );
regExp.setPattern( "(<font.*)(?!</font>)" );
- newMsgText.replace( regExp, QString::fromLatin1("\\1</font>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</font>" ) );
- newMsgText.replace( QString::fromLatin1( "\r" ), QString::fromLatin1( "<br/>" ) );
+ newMsgText.replace( TQString::fromLatin1( "\r" ), TQString::fromLatin1( "<br/>" ) );
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<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
+ //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
//for( it = contacts().constBegin(); it != itEnd; ++it )
//{
// buddies.push_back( it.value()->contactId() );
//}
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> 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. <br><br>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. <br><br>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( "<qt>The selected buddy icon could not be opened. <br />Please set a new buddy icon.</qt>" ), 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<uint>(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 <qobject.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qpair.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpair.h>
// KDE
#include <kurl.h>
@@ -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<QString, QPair<QString, QString> > IDs;
+ TQMap<TQString, QPair<TQString, TQString> > IDs;
/**
* Conferences list, maped by room name (id)
*/
- QMap<QString, YahooConferenceChatSession *> m_conferences;
+ TQMap<TQString, YahooConferenceChatSession *> m_conferences;
YahooChatChatSession * m_chatChatSession;
- QStringList m_pendingConfInvites;
- QStringList m_pendingWebcamInvites;
- QStringList m_pendingFileTransfers;
+ TQStringList m_pendingConfInvites;
+ TQStringList m_pendingWebcamInvites;
+ TQStringList m_pendingFileTransfers;
- QMap<unsigned int, Kopete::Transfer *> m_fileTransfers;
+ TQMap<unsigned int, Kopete::Transfer *> 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 <qlayout.h>
+#include <tqlayout.h>
// KDE Includes
#include <kdebug.h>
@@ -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(<owner>, <parent>, " << 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<YahooAccount*>(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 <qlabel.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qiconset.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqiconset.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -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<YahooContact*>( 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;
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<YahooContact *>(contacts.first())->buzzContact();
}
void YahooChatSession::slotUserInfo()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<YahooContact *>(contacts.first())->slotUserInfo();
}
void YahooChatSession::slotRequestWebcam()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<YahooContact *>(contacts.first())->requestWebcam();
}
void YahooChatSession::slotInviteWebcam()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<YahooContact *>(contacts.first())->inviteWebcam();
}
void YahooChatSession::slotSendFile()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<YahooContact *>(contacts.first())->sendFile();
}
void YahooChatSession::slotDisplayPictureChanged()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
YahooContact *c = static_cast<YahooContact *>( 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<KToolBar> it=w->toolBarIterator() ;
+ TQPtrListIterator<KToolBar> 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, "<qt><img src=\"" + imgURL + "\"></qt>" );
+ TQToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" );
}
}
}
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<Kopete::Contact> it( account()->contacts() );
+ TQStringList buddies;
+ TQDictIterator<Kopete::Contact> 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<Kopete::Contact>::ConstIterator it = members().begin(); it != members().end(); it++ )
+ for( TQPtrList<Kopete::Contact>::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 <qregexp.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
// KDE Includes
#include <kdebug.h>
@@ -60,7 +60,7 @@
#include <kstandarddirs.h>
#include <kfiledialog.h>
-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<QString, QString> &serializedData, QMap<QString, QString> &addressBookData)
+void YahooContact::serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &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("<span\\1font-weight:600\\2>\033[1m\\3\033[x1m</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1font-weight:600\\2>\033[1m\\3\033[x1m</span>" ) );
}
}
@@ -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("<span\\1text-decoration:underline\\2>\033[4m\\3\033[x4m</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1text-decoration:underline\\2>\033[4m\\3\033[x4m</span>" ) );
}
}
@@ -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("<span\\1font-style:italic\\2>\033[2m\\3\033[x2m</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1font-style:italic\\2>\033[2m\\3\033[x2m</span>" ) );
}
}
@@ -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("<span\\1\\3>\033[#\\2m\\4\033[#000000m</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3>\033[#\\2m\\4\033[#000000m</span>" ) );
}
}
@@ -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("<span\\1\\3><font face=\"\\2\">\\4</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3><font face=\"\\2\">\\4</span>" ) );
}
}
@@ -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("<span\\1\\3><font size=\"\\2\">\\4</span>" ) );
+ newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3><font size=\"\\2\">\\4</span>" ) );
}
}
@@ -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( "&gt;" ), QString::fromLatin1( ">" ) );
- newMsg.replace( QString::fromLatin1( "&lt;" ), QString::fromLatin1( "<" ) );
- newMsg.replace( QString::fromLatin1( "&quot;" ), QString::fromLatin1( "\"" ) );
- newMsg.replace( QString::fromLatin1( "&nbsp;" ), QString::fromLatin1( " " ) );
- newMsg.replace( QString::fromLatin1( "&amp;" ), QString::fromLatin1( "&" ) );
- newMsg.replace( QString::fromLatin1( "<br />" ), QString::fromLatin1( "\r" ) );
- newMsg.replace( QString::fromLatin1( "<br/>" ), QString::fromLatin1( "\r" ) );
+ newMsg.replace( TQString::fromLatin1( "&gt;" ), TQString::fromLatin1( ">" ) );
+ newMsg.replace( TQString::fromLatin1( "&lt;" ), TQString::fromLatin1( "<" ) );
+ newMsg.replace( TQString::fromLatin1( "&quot;" ), TQString::fromLatin1( "\"" ) );
+ newMsg.replace( TQString::fromLatin1( "&nbsp;" ), TQString::fromLatin1( " " ) );
+ newMsg.replace( TQString::fromLatin1( "&amp;" ), TQString::fromLatin1( "&" ) );
+ newMsg.replace( TQString::fromLatin1( "<br />" ), TQString::fromLatin1( "\r" ) );
+ newMsg.replace( TQString::fromLatin1( "<br/>" ), 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<KAction> *YahooContact::customContextMenuActions()
+TQPtrList<KAction> *YahooContact::customContextMenuActions()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
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<KAction> *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<KAction> *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<KAction> *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<KAction> *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<KAction> *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<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate= Kopete::Contact::CanCreate );
- virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &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 <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
// KDE Includes
#include <klocale.h>
@@ -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<YahooProtocol> 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<QString, QString> &serializedData, const QMap<QString, QString> & /* addressBookData */ )
+ const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> & /* addressBookData */ )
{
- QString contactId = serializedData[ "contactId" ];
- QString accountId = serializedData[ "accountId" ];
+ TQString contactId = serializedData[ "contactId" ];
+ TQString accountId = serializedData[ "accountId" ];
YahooAccount *theAccount = static_cast<YahooAccount*>(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(<parent>)" << 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 <qpixmap.h>
-#include <qmap.h>
+#include <tqpixmap.h>
+#include <tqmap.h>
// 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<QString,QString> &serializedData,
- const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString,TQString> &serializedData,
+ const TQMap<TQString, TQString> &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 <qlayout.h>
-#include <qfile.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqlabel.h>
// KDE Includes
#include <kdebug.h>
@@ -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<YahooAccount*>(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 <kdebug.h>
#include <kprocess.h>
#include <ktempfile.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
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;
diff --git a/kpf/src/ActiveMonitor.cpp b/kpf/src/ActiveMonitor.cpp
index 8bd0c34a..5a11848d 100644
--- a/kpf/src/ActiveMonitor.cpp
+++ b/kpf/src/ActiveMonitor.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -38,16 +38,16 @@ namespace KPF
ActiveMonitor::ActiveMonitor
(
WebServer * server,
- QWidget * parent,
+ TQWidget * parent,
const char * name
)
- : QWidget (parent, name),
+ : TQWidget (parent, name),
server_ (server)
{
- view_ = new QListView(this);
+ view_ = new TQListView(this);
view_->setAllColumnsShowFocus(true);
- view_->setSelectionMode(QListView::Extended);
+ view_->setSelectionMode(TQListView::Extended);
view_->addColumn(i18n("Status"));
view_->addColumn(i18n("Progress"));
@@ -57,36 +57,36 @@ namespace KPF
view_->addColumn(i18n("Resource"));
view_->addColumn(i18n("Host"));
- QVBoxLayout * layout = new QVBoxLayout(this);
+ TQVBoxLayout * layout = new TQVBoxLayout(this);
layout->addWidget(view_);
connect
(
view_,
- SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged())
+ TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged())
);
connect
(
server_,
- SIGNAL(connection(Server *)),
- SLOT(slotConnection(Server *))
+ TQT_SIGNAL(connection(Server *)),
+ TQT_SLOT(slotConnection(Server *))
);
connect
(
server_,
- SIGNAL(output(Server *, ulong)),
- SLOT(slotOutput(Server *, ulong))
+ TQT_SIGNAL(output(Server *, ulong)),
+ TQT_SLOT(slotOutput(Server *, ulong))
);
- connect(server_, SIGNAL(finished(Server *)), SLOT(slotFinished(Server *)));
- connect(server_, SIGNAL(request(Server *)), SLOT(slotRequest(Server *)));
- connect(server_, SIGNAL(response(Server *)), SLOT(slotResponse(Server *)));
+ connect(server_, TQT_SIGNAL(finished(Server *)), TQT_SLOT(slotFinished(Server *)));
+ connect(server_, TQT_SIGNAL(request(Server *)), TQT_SLOT(slotRequest(Server *)));
+ connect(server_, TQT_SIGNAL(response(Server *)), TQT_SLOT(slotResponse(Server *)));
- connect(&cullTimer_, SIGNAL(timeout()), SLOT(slotCull()));
+ connect(&cullTimer_, TQT_SIGNAL(timeout()), TQT_SLOT(slotCull()));
cullTimer_.start(1000);
@@ -146,9 +146,9 @@ namespace KPF
void
ActiveMonitor::slotCull()
{
- QDateTime dt = QDateTime::currentDateTime();
+ TQDateTime dt = TQDateTime::currentDateTime();
- QListViewItemIterator it(view_);
+ TQListViewItemIterator it(view_);
for (; it.current(); ++it)
{
@@ -165,7 +165,7 @@ namespace KPF
void
ActiveMonitor::slotSelectionChanged()
{
- for (QListViewItemIterator it(view_); it.current(); ++it)
+ for (TQListViewItemIterator it(view_); it.current(); ++it)
{
ActiveMonitorItem * i = static_cast<ActiveMonitorItem *>(it.current());
@@ -189,7 +189,7 @@ namespace KPF
void
ActiveMonitor::slotKillSelected()
{
- for (QListViewItemIterator it(view_); it.current(); ++it)
+ for (TQListViewItemIterator it(view_); it.current(); ++it)
{
ActiveMonitorItem * i = static_cast<ActiveMonitorItem *>(it.current());
@@ -214,9 +214,9 @@ namespace KPF
}
void
- ActiveMonitor::closeEvent(QCloseEvent * e)
+ ActiveMonitor::closeEvent(TQCloseEvent * e)
{
- QWidget::closeEvent(e);
+ TQWidget::closeEvent(e);
emit(dying(this));
}
diff --git a/kpf/src/ActiveMonitor.h b/kpf/src/ActiveMonitor.h
index f0f62265..1c1e8618 100644
--- a/kpf/src/ActiveMonitor.h
+++ b/kpf/src/ActiveMonitor.h
@@ -24,9 +24,9 @@
#ifndef KPF_ACTIVE_MONITOR_H
#define KPF_ACTIVE_MONITOR_H
-#include <qmap.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
class QListView;
class QPainter;
@@ -42,7 +42,7 @@ namespace KPF
* Shows a list of ActiveMonitorItem objects.
*
* Proxies signals from Server objects to ActiveMonitorItem objects.
- * This is done to avoid making ActiveMonitorItem inherit QObject.
+ * This is done to avoid making ActiveMonitorItem inherit TQObject.
*/
class ActiveMonitor : public QWidget
{
@@ -57,7 +57,7 @@ namespace KPF
ActiveMonitor
(
WebServer * server,
- QWidget * parent = 0,
+ TQWidget * parent = 0,
const char * name = 0
);
@@ -123,7 +123,7 @@ namespace KPF
void slotCull();
/**
- * Connected to the relevant signal of the contained QListView and used
+ * Connected to the relevant signal of the contained TQListView and used
* to update the enabled/disabled state of the button which allows
* killing connections.
*/
@@ -134,7 +134,7 @@ namespace KPF
/**
* Overridden to emit a signal when this window is closed.
*/
- virtual void closeEvent(QCloseEvent *);
+ virtual void closeEvent(TQCloseEvent *);
signals:
@@ -144,19 +144,19 @@ namespace KPF
void dying(ActiveMonitor *);
/**
- * Emitted when the selection of the contained QListView has changed.
+ * Emitted when the selection of the contained TQListView has changed.
* @param selectionExists true if there is a selection.
*/
void selection(bool selectionExists);
private:
- QListView * view_;
+ TQListView * view_;
WebServer * server_;
- QMap<Server *, ActiveMonitorItem *> itemMap_;
+ TQMap<Server *, ActiveMonitorItem *> itemMap_;
- QTimer cullTimer_;
+ TQTimer cullTimer_;
};
} // End namespace KPF
diff --git a/kpf/src/ActiveMonitorItem.cpp b/kpf/src/ActiveMonitorItem.cpp
index 1cc8fdcb..6721080e 100644
--- a/kpf/src/ActiveMonitorItem.cpp
+++ b/kpf/src/ActiveMonitorItem.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include "Defines.h"
@@ -31,8 +31,8 @@
namespace KPF
{
- ActiveMonitorItem::ActiveMonitorItem(Server * server, QListView * parent)
- : QListViewItem (parent),
+ ActiveMonitorItem::ActiveMonitorItem(Server * server, TQListView * parent)
+ : TQListViewItem (parent),
server_ (server),
size_ (0),
sent_ (0)
@@ -54,8 +54,8 @@ namespace KPF
void
ActiveMonitorItem::paintCell
(
- QPainter * p,
- const QColorGroup & g,
+ TQPainter * p,
+ const TQColorGroup & g,
int c,
int w,
int a
@@ -63,7 +63,7 @@ namespace KPF
{
if (c != Progress)
{
- QListViewItem::paintCell(p, g, c, w, a);
+ TQListViewItem::paintCell(p, g, c, w, a);
return;
}
@@ -86,8 +86,8 @@ namespace KPF
int
ActiveMonitorItem::width
(
- const QFontMetrics & fm,
- const QListView * lv,
+ const TQFontMetrics & fm,
+ const TQListView * lv,
int c
) const
{
@@ -102,7 +102,7 @@ namespace KPF
break;
default:
- return QListViewItem::width(fm, lv, c);
+ return TQListViewItem::width(fm, lv, c);
break;
}
}
@@ -164,7 +164,7 @@ namespace KPF
size_ = server_->response().size();
- setText(Size, QString::number(size_));
+ setText(Size, TQString::number(size_));
updateState();
}
@@ -176,7 +176,7 @@ namespace KPF
if (0 != server_)
{
sent_ += l;
- setText(Sent, QString::number(sent_));
+ setText(Sent, TQString::number(sent_));
updateState();
repaint();
}
diff --git a/kpf/src/ActiveMonitorItem.h b/kpf/src/ActiveMonitorItem.h
index 99cc13db..d3cb2e71 100644
--- a/kpf/src/ActiveMonitorItem.h
+++ b/kpf/src/ActiveMonitorItem.h
@@ -24,10 +24,10 @@
#ifndef KPF_ACTIVE_MONITOR_ITEM_H
#define KPF_ACTIVE_MONITOR_ITEM_H
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qfontmetrics.h>
-#include <qpalette.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqfontmetrics.h>
+#include <tqpalette.h>
class QPainter;
@@ -60,7 +60,7 @@ namespace KPF
/**
* @param server the associated Server object.
*/
- ActiveMonitorItem(Server * server, QListView * parent);
+ ActiveMonitorItem(Server * server, TQListView * parent);
virtual ~ActiveMonitorItem();
/**
@@ -107,7 +107,7 @@ namespace KPF
* @return the time of death (end of transactions with remote client)
* of the associated Server object.
*/
- QDateTime death() const;
+ TQDateTime death() const;
protected:
@@ -122,18 +122,18 @@ namespace KPF
* the number of bytes sent to the remote client by the associated
* Server object.
*/
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
/**
* Overridden to provide for giving reasonable sizes for columns which
* do not contain text.
*/
- virtual int width(const QFontMetrics &, const QListView *, int) const;
+ virtual int width(const TQFontMetrics &, const TQListView *, int) const;
private:
Server * server_;
- QDateTime death_;
+ TQDateTime death_;
ulong size_;
ulong sent_;
};
diff --git a/kpf/src/ActiveMonitorWindow.cpp b/kpf/src/ActiveMonitorWindow.cpp
index ae44e4be..7eb3f07f 100644
--- a/kpf/src/ActiveMonitorWindow.cpp
+++ b/kpf/src/ActiveMonitorWindow.cpp
@@ -34,7 +34,7 @@ namespace KPF
ActiveMonitorWindow::ActiveMonitorWindow
(
WebServer * server,
- QWidget * parent,
+ TQWidget * parent,
const char * name
)
: KMainWindow(parent, name)
@@ -52,7 +52,7 @@ namespace KPF
"stop",
0,
monitor_,
- SLOT(slotKillSelected()),
+ TQT_SLOT(slotKillSelected()),
actionCollection(),
"kill"
);
@@ -80,7 +80,7 @@ namespace KPF
}
void
- ActiveMonitorWindow::closeEvent(QCloseEvent *)
+ ActiveMonitorWindow::closeEvent(TQCloseEvent *)
{
emit(dying(this));
}
diff --git a/kpf/src/ActiveMonitorWindow.h b/kpf/src/ActiveMonitorWindow.h
index eddf1113..bb9dc2e0 100644
--- a/kpf/src/ActiveMonitorWindow.h
+++ b/kpf/src/ActiveMonitorWindow.h
@@ -52,7 +52,7 @@ namespace KPF
ActiveMonitorWindow
(
WebServer * server,
- QWidget * parent = 0,
+ TQWidget * parent = 0,
const char * name = 0
);
@@ -76,7 +76,7 @@ namespace KPF
/**
* Overridden to emit a signal when this window is closed.
*/
- virtual void closeEvent(QCloseEvent *);
+ virtual void closeEvent(TQCloseEvent *);
signals:
@@ -86,7 +86,7 @@ namespace KPF
void dying(ActiveMonitorWindow *);
/**
- * Emitted when the selection of the contained QListView has changed.
+ * Emitted when the selection of the contained TQListView has changed.
* @param selectionExists true if there is a selection.
*/
void selection(bool selectionExists);
diff --git a/kpf/src/Applet.cpp b/kpf/src/Applet.cpp
index edd7a652..0eee06c8 100644
--- a/kpf/src/Applet.cpp
+++ b/kpf/src/Applet.cpp
@@ -21,14 +21,14 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
-#include <qfileinfo.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
+#include <tqfileinfo.h>
+#include <tqcursor.h>
#include <dcopclient.h>
#include <kiconloader.h>
@@ -54,7 +54,7 @@ static const char kpfVersion[] = "1.0.1";
extern "C"
{
KDE_EXPORT KPanelApplet *
- init(QWidget * parent, const QString & configFile)
+ init(TQWidget * parent, const TQString & configFile)
{
if (0 == kpf::userId() || 0 == kpf::effectiveUserId())
{
@@ -90,10 +90,10 @@ namespace KPF
{
Applet::Applet
(
- const QString & configFile,
+ const TQString & configFile,
Type type,
int actions,
- QWidget * parent,
+ TQWidget * parent,
const char * name
)
: KPanelApplet (configFile, type, actions, parent, name),
@@ -103,26 +103,26 @@ namespace KPF
{
setAcceptDrops(true);
- //setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ //setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
//setLineWidth(1);
connect
(
WebServerManager::instance(),
- SIGNAL(serverCreated(WebServer *)),
- SLOT(slotServerCreated(WebServer *))
+ TQT_SIGNAL(serverCreated(WebServer *)),
+ TQT_SLOT(slotServerCreated(WebServer *))
);
connect
(
WebServerManager::instance(),
- SIGNAL(serverDisabled(WebServer *)),
- SLOT(slotServerDisabled(WebServer *))
+ TQT_SIGNAL(serverDisabled(WebServer *)),
+ TQT_SLOT(slotServerDisabled(WebServer *))
);
WebServerManager::instance()->loadConfig();
- popup_ = new QPopupMenu(this);
+ popup_ = new TQPopupMenu(this);
popup_->insertItem
(BarIcon("filenew"), i18n("New Server..."), NewServer, NewServer);
@@ -171,7 +171,7 @@ namespace KPF
void
Applet::help()
{
- kapp->invokeHelp( QString::null, "kpf" );
+ kapp->invokeHelp( TQString::null, "kpf" );
}
void
@@ -226,15 +226,15 @@ namespace KPF
}
void
- Applet::resizeEvent(QResizeEvent *)
+ Applet::resizeEvent(TQResizeEvent *)
{
resetLayout();
}
void
- Applet::moveEvent(QMoveEvent *)
+ Applet::moveEvent(TQMoveEvent *)
{
- QPtrListIterator<AppletItem> it(itemList_);
+ TQPtrListIterator<AppletItem> it(itemList_);
for (uint i = 0; it.current(); ++it, ++i)
it.current()->setBackground();
@@ -252,7 +252,7 @@ namespace KPF
{
uint itemHeight = height() / itemList_.count();
- QPtrListIterator<AppletItem> it(itemList_);
+ TQPtrListIterator<AppletItem> it(itemList_);
for (uint i = 0; it.current(); ++it, ++i)
{
@@ -266,7 +266,7 @@ namespace KPF
{
uint itemWidth = width() / itemList_.count();
- QPtrListIterator<AppletItem> it(itemList_);
+ TQPtrListIterator<AppletItem> it(itemList_);
for (uint i = 0; it.current(); ++it, ++i)
{
@@ -280,12 +280,12 @@ namespace KPF
}
void
- Applet::mousePressEvent(QMouseEvent * ev)
+ Applet::mousePressEvent(TQMouseEvent * ev)
{
if (Qt::RightButton != ev->button() && Qt::LeftButton != ev->button())
return;
- switch (popup_->exec(QCursor::pos()))
+ switch (popup_->exec(TQCursor::pos()))
{
case NewServer:
slotNewServer();
@@ -301,7 +301,7 @@ namespace KPF
}
void
- Applet::slotNewServerAtLocation(const QString & location)
+ Applet::slotNewServerAtLocation(const TQString & location)
{
if (0 != wizard_)
{
@@ -316,8 +316,8 @@ namespace KPF
connect
(
wizard_,
- SIGNAL(dying(ServerWizard *)),
- SLOT(slotWizardDying(ServerWizard *))
+ TQT_SIGNAL(dying(ServerWizard *)),
+ TQT_SLOT(slotWizardDying(ServerWizard *))
);
wizard_->setLocation(location);
@@ -338,8 +338,8 @@ namespace KPF
connect
(
wizard_,
- SIGNAL(dying(ServerWizard *)),
- SLOT(slotWizardDying(ServerWizard *))
+ TQT_SIGNAL(dying(ServerWizard *)),
+ TQT_SLOT(slotWizardDying(ServerWizard *))
);
wizard_->show();
@@ -349,7 +349,7 @@ namespace KPF
void
Applet::slotWizardDying(ServerWizard * wiz)
{
- if (QDialog::Accepted == wiz->result())
+ if (TQDialog::Accepted == wiz->result())
{
WebServerManager::instance()->createServerLocal
(
@@ -367,9 +367,9 @@ namespace KPF
}
void
- Applet::drawContents(QPainter * p)
+ Applet::drawContents(TQPainter * p)
{
- QPixmap px;
+ TQPixmap px;
if (width() > 48)
px = KGlobal::iconLoader()->loadIcon("kpf", KIcon::Panel, 48);
@@ -380,7 +380,7 @@ namespace KPF
else
return;
- QRect r(contentsRect());
+ TQRect r(contentsRect());
p->drawPixmap
(
@@ -391,7 +391,7 @@ namespace KPF
}
void
- Applet::dragEnterEvent(QDragEnterEvent * e)
+ Applet::dragEnterEvent(TQDragEnterEvent * e)
{
KURL::List l;
@@ -403,14 +403,14 @@ namespace KPF
const KURL &url = l[0];
- if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
+ if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir())
return;
e->accept();
}
void
- Applet::dropEvent(QDropEvent * e)
+ Applet::dropEvent(TQDropEvent * e)
{
KURL::List l;
@@ -422,7 +422,7 @@ namespace KPF
const KURL &url = l[0];
- if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
+ if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir())
return;
e->accept();
@@ -438,15 +438,15 @@ namespace KPF
connect
(
i,
- SIGNAL(newServer()),
- SLOT(slotNewServer())
+ TQT_SIGNAL(newServer()),
+ TQT_SLOT(slotNewServer())
);
connect
(
i,
- SIGNAL(newServerAtLocation(const QString &)),
- SLOT(slotNewServerAtLocation(const QString &))
+ TQT_SIGNAL(newServerAtLocation(const TQString &)),
+ TQT_SLOT(slotNewServerAtLocation(const TQString &))
);
itemList_.append(i);
@@ -458,7 +458,7 @@ namespace KPF
void
Applet::slotServerDisabled(WebServer * server)
{
- QPtrListIterator<AppletItem> it(itemList_);
+ TQPtrListIterator<AppletItem> it(itemList_);
for (; it.current(); ++it)
{
diff --git a/kpf/src/Applet.h b/kpf/src/Applet.h
index 15802a37..fccdf8a0 100644
--- a/kpf/src/Applet.h
+++ b/kpf/src/Applet.h
@@ -24,7 +24,7 @@
#ifndef KPF_APPLET_H
#define KPF_APPLET_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kpanelapplet.h>
class QPopupMenu;
@@ -51,10 +51,10 @@ namespace KPF
Applet
(
- const QString & configFile,
+ const TQString & configFile,
Type = Normal,
int = 0,
- QWidget * = 0,
+ TQWidget * = 0,
const char * = 0
);
@@ -78,7 +78,7 @@ namespace KPF
* Called to create a new server when the path to the server is already
* known.
*/
- void slotNewServerAtLocation(const QString &);
+ void slotNewServerAtLocation(const TQString &);
/**
* Called to create a new server when the path to the server is unknown.
@@ -128,13 +128,13 @@ namespace KPF
/**
* Overridden to update layout accordingly.
*/
- virtual void moveEvent(QMoveEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void moveEvent(TQMoveEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/**
* Overridden to provide a context menu.
*/
- virtual void mousePressEvent(QMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
/**
* Updates the layout, moving AppletItem objects into proper positions.
@@ -145,19 +145,19 @@ namespace KPF
* Overridden to provide something other than a blank display when there
* are no existing AppletItem objects contained.
*/
- virtual void drawContents(QPainter *);
+ virtual void drawContents(TQPainter *);
/**
* Overridden to allow testing whether the dragged object points to a
* local directory.
*/
- virtual void dragEnterEvent(QDragEnterEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
/**
* Overridden to allow creating a new WebServer when the dropped object
* points to a local directory.
*/
- virtual void dropEvent(QDropEvent *);
+ virtual void dropEvent(TQDropEvent *);
private:
@@ -168,10 +168,10 @@ namespace KPF
};
ServerWizard * wizard_;
- QPopupMenu * popup_;
+ TQPopupMenu * popup_;
DCOPClient * dcopClient_;
- QPtrList<AppletItem> itemList_;
+ TQPtrList<AppletItem> itemList_;
};
}
diff --git a/kpf/src/AppletItem.cpp b/kpf/src/AppletItem.cpp
index e605f692..4c70640e 100644
--- a/kpf/src/AppletItem.cpp
+++ b/kpf/src/AppletItem.cpp
@@ -21,11 +21,11 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
+#include <tqcursor.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -43,8 +43,8 @@
namespace KPF
{
- AppletItem::AppletItem(WebServer * server, QWidget * parent)
- : QWidget (parent, "KPF::AppletItem"),
+ AppletItem::AppletItem(WebServer * server, TQWidget * parent)
+ : TQWidget (parent, "KPF::AppletItem"),
server_ (server),
configDialog_ (0L),
monitorWindow_ (0L),
@@ -60,9 +60,9 @@ namespace KPF
graph_->installEventFilter(this);
- (new QVBoxLayout(this))->addWidget(graph_);
+ (new TQVBoxLayout(this))->addWidget(graph_);
- QString popupTitle(i18n("kpf - %1").arg(server_->root()));
+ TQString popupTitle(i18n("kpf - %1").arg(server_->root()));
popup_ = new KPopupMenu(this);
@@ -94,8 +94,8 @@ namespace KPF
connect
(
monitorWindow_,
- SIGNAL(dying(ActiveMonitorWindow *)),
- SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *))
+ TQT_SIGNAL(dying(ActiveMonitorWindow *)),
+ TQT_SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *))
);
}
@@ -110,20 +110,20 @@ namespace KPF
void AppletItem::setBackground()
{
- QResizeEvent e(size(), size());
+ TQResizeEvent e(size(), size());
kapp->sendEvent(graph_, &e);
graph_->update();
}
bool
- AppletItem::eventFilter(QObject *, QEvent * ev)
+ AppletItem::eventFilter(TQObject *, TQEvent * ev)
{
switch (ev->type())
{
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
- QMouseEvent * e = static_cast<QMouseEvent *>(ev);
+ TQMouseEvent * e = static_cast<TQMouseEvent *>(ev);
if (0 == e)
{
@@ -157,9 +157,9 @@ namespace KPF
}
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- QMouseEvent * e = static_cast<QMouseEvent *>(ev);
+ TQMouseEvent * e = static_cast<TQMouseEvent *>(ev);
if (0 == e)
{
@@ -178,7 +178,7 @@ namespace KPF
popup_->changeItem
(Pause, SmallIcon("player_pause"), i18n("Pause"));
- switch (popup_->exec(QCursor::pos()))
+ switch (popup_->exec(TQCursor::pos()))
{
case NewServer:
emit(newServer());
@@ -212,9 +212,9 @@ namespace KPF
}
break;
- case QEvent::DragEnter:
+ case TQEvent::DragEnter:
{
- QDragEnterEvent * e = static_cast<QDragEnterEvent *>(ev);
+ TQDragEnterEvent * e = static_cast<TQDragEnterEvent *>(ev);
if (0 == e)
{
@@ -233,7 +233,7 @@ namespace KPF
const KURL &url = l[0];
- if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
+ if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir())
break;
e->accept();
@@ -241,9 +241,9 @@ namespace KPF
}
break;
- case QEvent::Drop:
+ case TQEvent::Drop:
{
- QDropEvent * e = static_cast<QDropEvent *>(ev);
+ TQDropEvent * e = static_cast<TQDropEvent *>(ev);
if (0 == e)
{
@@ -262,7 +262,7 @@ namespace KPF
const KURL &url = l[0];
- if (!url.isLocalFile() || !QFileInfo(url.path()).isDir())
+ if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir())
break;
e->accept();
@@ -320,8 +320,8 @@ namespace KPF
connect
(
monitorWindow_,
- SIGNAL(dying(ActiveMonitorWindow *)),
- SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *))
+ TQT_SIGNAL(dying(ActiveMonitorWindow *)),
+ TQT_SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *))
);
#endif
@@ -332,7 +332,7 @@ namespace KPF
void
AppletItem::removeServer()
{
- QTimer::singleShot(0, this, SLOT(slotSuicide()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSuicide()));
}
void
@@ -349,8 +349,8 @@ namespace KPF
connect
(
configDialog_,
- SIGNAL(dying(SingleServerConfigDialog *)),
- SLOT(slotConfigDialogDying(SingleServerConfigDialog *))
+ TQT_SIGNAL(dying(SingleServerConfigDialog *)),
+ TQT_SLOT(slotConfigDialogDying(SingleServerConfigDialog *))
);
configDialog_->show();
diff --git a/kpf/src/AppletItem.h b/kpf/src/AppletItem.h
index 013a6b0a..5c602e13 100644
--- a/kpf/src/AppletItem.h
+++ b/kpf/src/AppletItem.h
@@ -24,8 +24,8 @@
#ifndef KPF_APPLET_ITEM_H
#define KPF_APPLET_ITEM_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
class KPopupMenu;
@@ -53,7 +53,7 @@ namespace KPF
* @param server The WebServer object which will be monitored and
* controlled by this object.
*/
- AppletItem(WebServer * server, QWidget * parent);
+ AppletItem(WebServer * server, TQWidget * parent);
~AppletItem();
@@ -99,14 +99,14 @@ namespace KPF
/**
* Emitted when an URL pointing to a local directory has been dropped.
*/
- void newServerAtLocation(const QString &);
+ void newServerAtLocation(const TQString &);
protected:
/**
* Overridden to provide a context menu plus DnD capabilities.
*/
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
/**
* Called when the appropriate item is selected from the context menu.
diff --git a/kpf/src/BandwidthGraph.cpp b/kpf/src/BandwidthGraph.cpp
index a7f6c311..9acc85e5 100644
--- a/kpf/src/BandwidthGraph.cpp
+++ b/kpf/src/BandwidthGraph.cpp
@@ -21,9 +21,9 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -40,10 +40,10 @@ namespace KPF
(
WebServer * server,
OverlaySelect overlaySelect,
- QWidget * parent,
+ TQWidget * parent,
const char * name
)
- : QWidget (parent, name, WRepaintNoErase),
+ : TQWidget (parent, name, WRepaintNoErase),
server_ (server),
max_ (0L),
overlaySelect_ (overlaySelect)
@@ -55,8 +55,8 @@ namespace KPF
connect
(
server_,
- SIGNAL(wholeServerOutput(ulong)),
- SLOT(slotOutput(ulong))
+ TQT_SIGNAL(wholeServerOutput(ulong)),
+ TQT_SLOT(slotOutput(ulong))
);
if (UseOverlays == overlaySelect_)
@@ -64,15 +64,15 @@ namespace KPF
connect
(
server_,
- SIGNAL(contentionChange(bool)), this,
- SLOT(slotServerContentionChange(bool))
+ TQT_SIGNAL(contentionChange(bool)), this,
+ TQT_SLOT(slotServerContentionChange(bool))
);
connect
(
server_,
- SIGNAL(pauseChange(bool)), this,
- SLOT(slotServerPauseChange(bool))
+ TQT_SIGNAL(pauseChange(bool)), this,
+ TQT_SLOT(slotServerPauseChange(bool))
);
}
@@ -87,27 +87,27 @@ namespace KPF
void
BandwidthGraph::setTooltip()
{
- QToolTip::add(this, i18n( "%1 on port %2" )
+ TQToolTip::add(this, i18n( "%1 on port %2" )
.arg( server_->root() ).arg( server_->listenPort() ) );
}
QRect
BandwidthGraph::contentsRect() const
{
- return QRect(1, 1, width() - 2, height() - 2);
+ return TQRect(1, 1, width() - 2, height() - 2);
}
void
BandwidthGraph::updateContents()
{
- QRect r(contentsRect());
+ TQRect r(contentsRect());
uint w = r.width();
uint h = r.height();
buffer_.fill(this, 0, 0);
- QPainter p(&buffer_);
+ TQPainter p(&buffer_);
p.drawPixmap( ( width()-bgPix_.width() )/2,
( height()-bgPix_.height() )/2, bgPix_ );
@@ -133,13 +133,13 @@ namespace KPF
}
void
- BandwidthGraph::paintEvent(QPaintEvent * e)
+ BandwidthGraph::paintEvent(TQPaintEvent * e)
{
bitBlt(this, e->rect().topLeft(), &buffer_, e->rect());
}
void
- BandwidthGraph::resizeEvent(QResizeEvent *)
+ BandwidthGraph::resizeEvent(TQResizeEvent *)
{
buffer_.resize(size());
@@ -150,14 +150,14 @@ namespace KPF
else if ( width() > 16 )
bgPix_ = KGlobal::iconLoader()->loadIcon( "kpf", KIcon::Panel, 16 );
else
- bgPix_.fill( this, QPoint( 0, 0 ) );
+ bgPix_.fill( this, TQPoint( 0, 0 ) );
KIconEffect::semiTransparent( bgPix_ );
if (width() < 2)
{
// We have 0 space. Make history 0 size.
- history_ = QMemArray<ulong>();
+ history_ = TQMemArray<ulong>();
return;
}
@@ -165,7 +165,7 @@ namespace KPF
if (w < history_.size())
{
- QMemArray<ulong> newHistory(w);
+ TQMemArray<ulong> newHistory(w);
uint sizeDiff = history_.size() - w;
@@ -176,7 +176,7 @@ namespace KPF
}
else if (w > history_.size())
{
- QMemArray<ulong> newHistory(w);
+ TQMemArray<ulong> newHistory(w);
uint sizeDiff = w - history_.size();
@@ -197,7 +197,7 @@ namespace KPF
void
BandwidthGraph::slotOutput(ulong l)
{
- QRect r(contentsRect());
+ TQRect r(contentsRect());
uint w = r.width();
uint h = r.height();
@@ -228,7 +228,7 @@ namespace KPF
}
void
- BandwidthGraph::drawOverlays(QPainter & p)
+ BandwidthGraph::drawOverlays(TQPainter & p)
{
if (NoOverlays == overlaySelect_)
return;
@@ -243,11 +243,11 @@ namespace KPF
if (overlayPixmap_.isNull())
{
- QString maxString;
+ TQString maxString;
- QString bs(i18n("%1 b/s"));
- QString kbs(i18n("%1 kb/s"));
- QString mbs(i18n("%1 Mb/s"));
+ TQString bs(i18n("%1 b/s"));
+ TQString kbs(i18n("%1 kb/s"));
+ TQString mbs(i18n("%1 Mb/s"));
if (max_ > 1024)
if (max_ > 1024 * 1024)
@@ -282,13 +282,13 @@ namespace KPF
QSize
BandwidthGraph::sizeHint() const
{
- return QSize(32, 32);
+ return TQSize(32, 32);
}
QSize
BandwidthGraph::minimumSizeHint() const
{
- return QSize(12, 12);
+ return TQSize(12, 12);
}
WebServer *
@@ -324,7 +324,7 @@ namespace KPF
}
else
{
- overlayPixmap_ = QPixmap();
+ overlayPixmap_ = TQPixmap();
}
}
}
diff --git a/kpf/src/BandwidthGraph.h b/kpf/src/BandwidthGraph.h
index e0cf51dd..3540ca5b 100644
--- a/kpf/src/BandwidthGraph.h
+++ b/kpf/src/BandwidthGraph.h
@@ -24,10 +24,10 @@
#ifndef KPF_BANDWIDTH_GRAPH_H
#define KPF_BANDWIDTH_GRAPH_H
-#include <qwidget.h>
-#include <qmemarray.h>
-#include <qpixmap.h>
-#include <qrect.h>
+#include <tqwidget.h>
+#include <tqmemarray.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
class QPainter;
@@ -61,7 +61,7 @@ namespace KPF
(
WebServer * server,
OverlaySelect overlaySelect,
- QWidget * parent = 0,
+ TQWidget * parent = 0,
const char * name = 0
);
@@ -75,12 +75,12 @@ namespace KPF
/**
* Overridden to provide reasonable default size and shape.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Overridden to provide reasonable minimum size and shape.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* @return the WebServer object given on construction.
@@ -111,22 +111,22 @@ namespace KPF
/**
* Overridden to provide graph drawing.
*/
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
/**
* Overridden to assist graph drawing.
*/
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/**
* Draw overlay icons to reflect status of associated WebServer.
*/
- virtual void drawOverlays(QPainter &);
+ virtual void drawOverlays(TQPainter &);
/**
* Provides a rectangle in which to draw the graph itself.
*/
- virtual QRect contentsRect() const;
+ virtual TQRect contentsRect() const;
/**
* Called when the status of the associated WebServer changes.
@@ -144,17 +144,17 @@ namespace KPF
void updateContents();
- QMemArray<ulong> history_;
+ TQMemArray<ulong> history_;
WebServer * server_;
- QPixmap buffer_, bgPix_;
+ TQPixmap buffer_, bgPix_;
ulong max_;
OverlaySelect overlaySelect_;
- QPixmap overlayPixmap_;
+ TQPixmap overlayPixmap_;
};
} // End namespace KPF
diff --git a/kpf/src/ByteRange.cpp b/kpf/src/ByteRange.cpp
index cdd0624b..2db5de6b 100644
--- a/kpf/src/ByteRange.cpp
+++ b/kpf/src/ByteRange.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "Defines.h"
#include "ByteRange.h"
@@ -101,13 +101,13 @@ namespace KPF
// Empty.
}
- ByteRangeList::ByteRangeList(const QString & _s, float /* protocol */)
+ ByteRangeList::ByteRangeList(const TQString & _s, float /* protocol */)
{
kpfDebug << "ByteRangeList parsing `" << _s << "'" << endl;
// Hey, parsing time :)
- QString s(_s);
+ TQString s(_s);
if ("bytes=" == s.left(6))
{
@@ -115,16 +115,16 @@ namespace KPF
s = s.stripWhiteSpace();
}
- QStringList byteRangeSpecList(QStringList::split(',', s));
+ TQStringList byteRangeSpecList(TQStringList::split(',', s));
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = byteRangeSpecList.begin(); it != byteRangeSpecList.end(); ++it)
addByteRange(*it);
}
void
- ByteRangeList::addByteRange(const QString & s)
+ ByteRangeList::addByteRange(const TQString & s)
{
kpfDebug << "addByteRange(" << s << ")" << endl;
@@ -136,9 +136,9 @@ namespace KPF
return;
}
- QString firstByte(s.left(dashPos).stripWhiteSpace());
+ TQString firstByte(s.left(dashPos).stripWhiteSpace());
- QString lastByte(s.mid(dashPos + 1).stripWhiteSpace());
+ TQString lastByte(s.mid(dashPos + 1).stripWhiteSpace());
ulong first;
diff --git a/kpf/src/ByteRange.h b/kpf/src/ByteRange.h
index 4dd0b841..4452bf70 100644
--- a/kpf/src/ByteRange.h
+++ b/kpf/src/ByteRange.h
@@ -24,8 +24,8 @@
#ifndef KPF_BYTE_RANGE_H
#define KPF_BYTE_RANGE_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KPF
{
@@ -102,7 +102,7 @@ namespace KPF
/**
* Encapsulates a list of ByteRange.
*/
- class ByteRangeList : public QValueList<ByteRange>
+ class ByteRangeList : public TQValueList<ByteRange>
{
public:
@@ -113,13 +113,13 @@ namespace KPF
* @param protocol specifies the HTTP protocol which should
* be assumed whilst parsing.
*/
- ByteRangeList(const QString &, float protocol);
+ ByteRangeList(const TQString &, float protocol);
/**
* Parses a byte range represented as a string and, if successful,
* appends the resultant ByteRange object to this list.
*/
- void addByteRange(const QString &);
+ void addByteRange(const TQString &);
};
} // End namespace KPF
diff --git a/kpf/src/ConfigDialogPage.cpp b/kpf/src/ConfigDialogPage.cpp
index 395bb681..657e96f0 100644
--- a/kpf/src/ConfigDialogPage.cpp
+++ b/kpf/src/ConfigDialogPage.cpp
@@ -21,12 +21,12 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kseparator.h>
@@ -43,32 +43,32 @@
namespace KPF
{
- ConfigDialogPage::ConfigDialogPage(WebServer * server, QWidget * parent)
- : QWidget (parent, "KPF::ConfigDialogPage"),
+ ConfigDialogPage::ConfigDialogPage(WebServer * server, TQWidget * parent)
+ : TQWidget (parent, "KPF::ConfigDialogPage"),
server_ (server),
errorMessageConfigDialog_ (0L)
{
- l_listenPort_ = new QLabel(i18n("&Listen port:"), this);
- l_bandwidthLimit_ = new QLabel(i18n("&Bandwidth limit:"), this);
-// l_connectionLimit_ = new QLabel(i18n("Connection &limit"), this);
+ l_listenPort_ = new TQLabel(i18n("&Listen port:"), this);
+ l_bandwidthLimit_ = new TQLabel(i18n("&Bandwidth limit:"), this);
+// l_connectionLimit_ = new TQLabel(i18n("Connection &limit"), this);
- sb_listenPort_ = new QSpinBox(1, 65535, 1, this);
- sb_bandwidthLimit_ = new QSpinBox(1, 999999, 1, this);
-// sb_connectionLimit_ = new QSpinBox(1, 9999, 1, this);
+ sb_listenPort_ = new TQSpinBox(1, 65535, 1, this);
+ sb_bandwidthLimit_ = new TQSpinBox(1, 999999, 1, this);
+// sb_connectionLimit_ = new TQSpinBox(1, 9999, 1, this);
- l_serverName_ = new QLabel(i18n("&Server name:"), this);
- le_serverName_ = new QLineEdit(this);
+ l_serverName_ = new TQLabel(i18n("&Server name:"), this);
+ le_serverName_ = new TQLineEdit(this);
bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working;
l_serverName_->setEnabled(canPublish);
le_serverName_->setEnabled(canPublish);
- cb_followSymlinks_ = new QCheckBox(i18n("&Follow symbolic links"), this);
+ cb_followSymlinks_ = new TQCheckBox(i18n("&Follow symbolic links"), this);
// cb_customErrorMessages_ =
-// new QCheckBox(i18n("Use custom error messages"), this);
+// new TQCheckBox(i18n("Use custom error messages"), this);
-// pb_errorMessages_ = new QPushButton(i18n("&Configure..."), this);
+// pb_errorMessages_ = new TQPushButton(i18n("&Configure..."), this);
// pb_errorMessages_->setEnabled(false);
@@ -85,9 +85,9 @@ namespace KPF
// sb_connectionLimit_ ->setValue(Config::DefaultConnectionLimit);
cb_followSymlinks_ ->setChecked(Config::DefaultFollowSymlinks);
- QVBoxLayout * l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout * l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QGridLayout * l2 = new QGridLayout(l0);
+ TQGridLayout * l2 = new TQGridLayout(l0);
l2->addWidget(l_listenPort_, 0, 0);
l2->addWidget(sb_listenPort_, 0, 1);
@@ -101,7 +101,7 @@ namespace KPF
l0->addWidget(cb_followSymlinks_);
#if 0
- QHBoxLayout * l3 = new QHBoxLayout(l0);
+ TQHBoxLayout * l3 = new TQHBoxLayout(l0);
l3->addWidget(cb_customErrorMessages_);
l3->addWidget(pb_errorMessages_);
@@ -113,8 +113,8 @@ namespace KPF
connect
(
cb_customErrorMessages_,
- SIGNAL(toggled(bool)),
- SLOT(slotCustomErrorMessagesToggled(bool))
+ TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotCustomErrorMessagesToggled(bool))
);
#endif
@@ -122,12 +122,12 @@ namespace KPF
connect
(
pb_errorMessages_,
- SIGNAL(clicked()),
- SLOT(slotConfigureErrorMessages())
+ TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotConfigureErrorMessages())
);
#endif
- QString listenPortHelp =
+ TQString listenPortHelp =
i18n
(
"<p>"
@@ -136,7 +136,7 @@ namespace KPF
"</p>"
);
- QString bandwidthLimitHelp =
+ TQString bandwidthLimitHelp =
i18n
(
"<p>"
@@ -149,7 +149,7 @@ namespace KPF
"</p>"
);
- QString connectionLimitHelp =
+ TQString connectionLimitHelp =
i18n
(
"<p>"
@@ -158,7 +158,7 @@ namespace KPF
"</p>"
);
- QString followSymlinksHelp =
+ TQString followSymlinksHelp =
i18n
(
"<p>"
@@ -172,7 +172,7 @@ namespace KPF
"</p>"
);
- QString errorMessagesHelp =
+ TQString errorMessagesHelp =
i18n
(
"<p>"
@@ -182,37 +182,37 @@ namespace KPF
"</p>"
);
- QString serverNameHelp = KPF::HelpText::getServerNameHelp();
- QWhatsThis::add(l_listenPort_, listenPortHelp);
- QWhatsThis::add(sb_listenPort_, listenPortHelp);
- QWhatsThis::add(l_bandwidthLimit_, bandwidthLimitHelp);
- QWhatsThis::add(sb_bandwidthLimit_, bandwidthLimitHelp);
-// QWhatsThis::add(l_connectionLimit_, connectionLimitHelp);
-// QWhatsThis::add(sb_connectionLimit_, connectionLimitHelp);
- QWhatsThis::add(cb_followSymlinks_, followSymlinksHelp);
- QWhatsThis::add(l_serverName_, serverNameHelp);
- QWhatsThis::add(le_serverName_, serverNameHelp);
-// QWhatsThis::add(pb_errorMessages_, errorMessagesHelp);
+ TQString serverNameHelp = KPF::HelpText::getServerNameHelp();
+ TQWhatsThis::add(l_listenPort_, listenPortHelp);
+ TQWhatsThis::add(sb_listenPort_, listenPortHelp);
+ TQWhatsThis::add(l_bandwidthLimit_, bandwidthLimitHelp);
+ TQWhatsThis::add(sb_bandwidthLimit_, bandwidthLimitHelp);
+// TQWhatsThis::add(l_connectionLimit_, connectionLimitHelp);
+// TQWhatsThis::add(sb_connectionLimit_, connectionLimitHelp);
+ TQWhatsThis::add(cb_followSymlinks_, followSymlinksHelp);
+ TQWhatsThis::add(l_serverName_, serverNameHelp);
+ TQWhatsThis::add(le_serverName_, serverNameHelp);
+// TQWhatsThis::add(pb_errorMessages_, errorMessagesHelp);
connect
(
sb_listenPort_,
- SIGNAL(valueChanged(int)),
- SLOT(slotListenPortChanged(int))
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotListenPortChanged(int))
);
connect
(
sb_bandwidthLimit_,
- SIGNAL(valueChanged(int)),
- SLOT(slotBandwidthLimitChanged(int))
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotBandwidthLimitChanged(int))
);
connect
(
cb_followSymlinks_,
- SIGNAL(toggled(bool)),
- SLOT(slotFollowSymlinksToggled(bool))
+ TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotFollowSymlinksToggled(bool))
);
@@ -296,10 +296,10 @@ namespace KPF
return;
}
- QPtrList<WebServer>
+ TQPtrList<WebServer>
serverList(WebServerManager::instance()->serverListLocal());
- for (QPtrListIterator<WebServer> it(serverList); it.current(); ++it)
+ for (TQPtrListIterator<WebServer> it(serverList); it.current(); ++it)
{
if (it.current() == server_)
continue;
diff --git a/kpf/src/ConfigDialogPage.h b/kpf/src/ConfigDialogPage.h
index 8d41ea83..521b1077 100644
--- a/kpf/src/ConfigDialogPage.h
+++ b/kpf/src/ConfigDialogPage.h
@@ -24,8 +24,8 @@
#ifndef KPF_CONFIG_DIALOG_PAGE_H
#define KPF_CONFIG_DIALOG_PAGE_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
class QLabel;
class QSpinBox;
@@ -47,7 +47,7 @@ namespace KPF
public:
- ConfigDialogPage(WebServer *, QWidget * parent);
+ ConfigDialogPage(WebServer *, TQWidget * parent);
virtual ~ConfigDialogPage();
@@ -83,21 +83,21 @@ namespace KPF
WebServer * server_;
- QLabel * l_listenPort_;
- QLabel * l_bandwidthLimit_;
- QLabel * l_connectionLimit_;
+ TQLabel * l_listenPort_;
+ TQLabel * l_bandwidthLimit_;
+ TQLabel * l_connectionLimit_;
QLabel * l_serverName_;
- QSpinBox * sb_listenPort_;
- QSpinBox * sb_bandwidthLimit_;
- QSpinBox * sb_connectionLimit_;
+ TQSpinBox * sb_listenPort_;
+ TQSpinBox * sb_bandwidthLimit_;
+ TQSpinBox * sb_connectionLimit_;
- QCheckBox * cb_followSymlinks_;
+ TQCheckBox * cb_followSymlinks_;
- QLineEdit * le_serverName_;
+ TQLineEdit * le_serverName_;
- QCheckBox * cb_customErrorMessages_;
- QPushButton * pb_errorMessages_;
+ TQCheckBox * cb_customErrorMessages_;
+ TQPushButton * pb_errorMessages_;
ErrorMessageConfigDialog * errorMessageConfigDialog_;
};
diff --git a/kpf/src/Defaults.cpp b/kpf/src/Defaults.cpp
index 691ca0f2..07e42c39 100644
--- a/kpf/src/Defaults.cpp
+++ b/kpf/src/Defaults.cpp
@@ -34,7 +34,7 @@ namespace KPF
const bool DefaultFollowSymlinks = false;
const bool DefaultCustomErrors = false;
const bool DefaultPaused = false;
- const QString& DefaultServername = QString::null;
+ const TQString& DefaultServername = TQString::null;
static const char Name[] = "kpfappletrc";
static const char KeyServerRootList[] = "ServerRootList";
@@ -47,48 +47,48 @@ namespace KPF
static const char KeyPaused[] = "Paused";
static const char KeyServerName[] = "ServerName";
- QString name()
+ TQString name()
{
- return QString::fromUtf8(Name);
+ return TQString::fromUtf8(Name);
}
- QString key(Option o)
+ TQString key(Option o)
{
switch (o)
{
case ServerRootList:
- return QString::fromUtf8(KeyServerRootList);
+ return TQString::fromUtf8(KeyServerRootList);
case GroupPrefix:
- return QString::fromUtf8(KeyGroupPrefix);
+ return TQString::fromUtf8(KeyGroupPrefix);
case ListenPort:
- return QString::fromUtf8(KeyListenPort);
+ return TQString::fromUtf8(KeyListenPort);
case BandwidthLimit:
- return QString::fromUtf8(KeyBandwidthLimit);
+ return TQString::fromUtf8(KeyBandwidthLimit);
case ConnectionLimit:
- return QString::fromUtf8(KeyConnectionLimit);
+ return TQString::fromUtf8(KeyConnectionLimit);
case FollowSymlinks:
- return QString::fromUtf8(KeyFollowSymlinks);
+ return TQString::fromUtf8(KeyFollowSymlinks);
case CustomErrors:
- return QString::fromUtf8(KeyCustomErrors);
+ return TQString::fromUtf8(KeyCustomErrors);
case Paused:
- return QString::fromUtf8(KeyPaused);
+ return TQString::fromUtf8(KeyPaused);
case ServerName:
- return QString::fromUtf8(KeyServerName);
+ return TQString::fromUtf8(KeyServerName);
/* default intentionally left out to have the compiler generate
* warnings in case we add values to the enumeration but forget
* to extend this switch.
*/
}
- return QString::null;
+ return TQString::null;
}
} // End namespace Config
diff --git a/kpf/src/Defaults.h b/kpf/src/Defaults.h
index d49339fe..0a9b6ddc 100644
--- a/kpf/src/Defaults.h
+++ b/kpf/src/Defaults.h
@@ -24,7 +24,7 @@
#ifndef KPF_DEFAULTS_H
#define KPF_DEFAULTS_H
-#include <qstring.h>
+#include <tqstring.h>
namespace KPF
{
@@ -56,12 +56,12 @@ namespace KPF
/**
* Name to be used for configuration file.
*/
- QString name();
+ TQString name();
/**
* Config key to use when accessing option.
*/
- QString key(Option);
+ TQString key(Option);
} // End namespace Config
diff --git a/kpf/src/DirSelectWidget.cpp b/kpf/src/DirSelectWidget.cpp
index bd36ffeb..a405dcb0 100644
--- a/kpf/src/DirSelectWidget.cpp
+++ b/kpf/src/DirSelectWidget.cpp
@@ -21,8 +21,8 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include "DirSelectWidget.h"
#include "DirSelectWidget.moc"
@@ -33,13 +33,13 @@ namespace KPF
{
public:
- QString pathToMakeVisible;
+ TQString pathToMakeVisible;
};
DirSelectWidget::DirSelectWidget
(
- const QString & pathToMakeVisible,
- QWidget * parent,
+ const TQString & pathToMakeVisible,
+ TQWidget * parent,
const char * name
)
: KListView(parent, name)
@@ -52,11 +52,11 @@ namespace KPF
connect
(
this,
- SIGNAL(expanded(QListViewItem *)),
- SLOT(slotExpanded(QListViewItem *))
+ TQT_SIGNAL(expanded(TQListViewItem *)),
+ TQT_SLOT(slotExpanded(TQListViewItem *))
);
- QListViewItem * root = new QListViewItem(this, "/");
+ TQListViewItem * root = new TQListViewItem(this, "/");
root->setExpandable(true);
@@ -69,7 +69,7 @@ namespace KPF
}
void
- DirSelectWidget::timerEvent(QTimerEvent *)
+ DirSelectWidget::timerEvent(TQTimerEvent *)
{
killTimers();
@@ -78,32 +78,32 @@ namespace KPF
}
void
- DirSelectWidget::slotExpanded(QListViewItem * item)
+ DirSelectWidget::slotExpanded(TQListViewItem * item)
{
if (0 != item->firstChild())
return;
- QString p(path(item));
+ TQString p(path(item));
- QDir dir(p);
+ TQDir dir(p);
const QFileInfoList * entryInfoList =
- dir.entryInfoList(QDir::Dirs | QDir::Readable);
+ dir.entryInfoList(TQDir::Dirs | TQDir::Readable);
for (QFileInfoListIterator it(*entryInfoList); it.current(); ++it)
{
if (it.current()->isDir() && it.current()->isReadable())
{
- QListViewItem * i = new QListViewItem(item, it.current()->fileName());
+ TQListViewItem * i = new TQListViewItem(item, it.current()->fileName());
i->setExpandable(true);
}
}
}
QString
- DirSelectWidget::path(QListViewItem * item) const
+ DirSelectWidget::path(TQListViewItem * item) const
{
- QString ret(item->text(0));
+ TQString ret(item->text(0));
while (0 != (item = item->parent()))
ret.prepend("/" + item->text(0));
diff --git a/kpf/src/DirSelectWidget.h b/kpf/src/DirSelectWidget.h
index 1f4c9eaf..6bb2194f 100644
--- a/kpf/src/DirSelectWidget.h
+++ b/kpf/src/DirSelectWidget.h
@@ -39,8 +39,8 @@ namespace KPF
DirSelectWidget
(
- const QString & pathToMakeVisible = "/",
- QWidget * = 0,
+ const TQString & pathToMakeVisible = "/",
+ TQWidget * = 0,
const char * = 0
);
@@ -48,12 +48,12 @@ namespace KPF
protected slots:
- void slotExpanded(QListViewItem * item);
+ void slotExpanded(TQListViewItem * item);
protected:
- void timerEvent(QTimerEvent *);
- QString path(QListViewItem * item) const;
+ void timerEvent(TQTimerEvent *);
+ TQString path(TQListViewItem * item) const;
private:
diff --git a/kpf/src/DirectoryLister.cpp b/kpf/src/DirectoryLister.cpp
index bfd0127b..b642d912 100644
--- a/kpf/src/DirectoryLister.cpp
+++ b/kpf/src/DirectoryLister.cpp
@@ -23,12 +23,12 @@
#include <cmath>
-#include <qapplication.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qstylesheet.h>
-#include <qpalette.h>
-#include <qtextstream.h>
+#include <tqapplication.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqstylesheet.h>
+#include <tqpalette.h>
+#include <tqtextstream.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <kmimetype.h>
@@ -49,25 +49,25 @@ namespace KPF
}
};
- QString colorToCSS(const QColor &c)
+ TQString colorToCSS(const TQColor &c)
{
return
"rgb("
- + QString::number(c.red())
+ + TQString::number(c.red())
+ ", "
- + QString::number(c.green())
+ + TQString::number(c.green())
+ ", "
- + QString::number(c.blue())
+ + TQString::number(c.blue())
+ ")";
}
- QByteArray buildHTML(const QString & title, const QString & body)
+ TQByteArray buildHTML(const TQString & title, const TQString & body)
{
- QPalette pal = qApp->palette();
- QByteArray temp_string;
- QTextStream html(temp_string, IO_WriteOnly);
+ TQPalette pal = qApp->palette();
+ TQByteArray temp_string;
+ TQTextStream html(temp_string, IO_WriteOnly);
- html.setEncoding(QTextStream::UnicodeUTF8);
+ html.setEncoding(TQTextStream::UnicodeUTF8);
html
<< "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
@@ -90,10 +90,10 @@ namespace KPF
<< endl
<< "table.filelist { "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground))
<< "; "
<< "background-color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Background))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Background))
<< "; "
<< "border: thin outset; "
<< "width: 100%; "
@@ -106,10 +106,10 @@ namespace KPF
<< endl
<< "td.norm { "
<< "background-color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Base))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Base))
<< "; "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground))
<< "; "
<< "}"
<< endl
@@ -118,27 +118,27 @@ namespace KPF
<< colorToCSS
(
KGlobalSettings::calculateAlternateBackgroundColor
- (pal.color(QPalette::Normal, QColorGroup::Base))
+ (pal.color(TQPalette::Normal, TQColorGroup::Base))
)
<< "; "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground))
<< "; "
<< "}"
<< endl
<< "a { "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Text))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Text))
<< "; "
<< "text-decoration: none; "
<< "}"
<< endl
<< "th.listheading { "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::ButtonText))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::ButtonText))
<< "; "
<< "background-color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Button))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Button))
<< "; "
<< "text-align: left; "
<< "white-space: nowrap; "
@@ -151,7 +151,7 @@ namespace KPF
<< endl
<< "div.sizeentry { "
<< "color: "
- << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Text))
+ << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Text))
<< "; "
<< "text-align: right; "
<< "}"
@@ -174,10 +174,10 @@ namespace KPF
return temp_string;
}
- QString prettySize(uint size)
+ TQString prettySize(uint size)
{
- QString suffix;
- QString temp;
+ TQString suffix;
+ TQString temp;
float floated_size;
if (size > 1023)
@@ -227,11 +227,11 @@ namespace KPF
}
QByteArray
- DirectoryLister::html(const QString & root, const QString & _path)
+ DirectoryLister::html(const TQString & root, const TQString & _path)
{
kpfDebug << "root: " << root << " path: " << _path << endl;
- QString path;
+ TQString path;
if (_path.right(1) != "/")
path = _path + "/";
@@ -241,7 +241,7 @@ namespace KPF
if (path[0] == '/')
path + "";
- QDir d(root + path);
+ TQDir d(root + path);
if (!d.exists())
{
@@ -253,7 +253,7 @@ namespace KPF
}
const QFileInfoList * infoList =
- d.entryInfoList(QDir::DefaultFilter, QDir::Name | QDir::DirsFirst);
+ d.entryInfoList(TQDir::DefaultFilter, TQDir::Name | TQDir::DirsFirst);
if (0 == infoList)
{
@@ -264,7 +264,7 @@ namespace KPF
);
}
- QString html;
+ TQString html;
html += "<table";
html += " width=\"100%\"";
@@ -279,7 +279,7 @@ namespace KPF
{
static int counter = 0;
- QFileInfo * fi(it.current());
+ TQFileInfo * fi(it.current());
if (
(fi->fileName()[0] == '.')
@@ -292,13 +292,13 @@ namespace KPF
++counter;
- QString td_class = (counter % 2) ? "alt" : "norm";
+ TQString td_class = (counter % 2) ? "alt" : "norm";
html += "<tr>\n";
html += "<td class=\"" + td_class + "\">";
- QString item_class = QString((fi->isDir()) ? "direntry" : "fileentry");
+ TQString item_class = TQString((fi->isDir()) ? "direntry" : "fileentry");
KURL fu(path+fi->fileName());
html +=
@@ -310,7 +310,7 @@ namespace KPF
+ "\">";
if (fi->fileName() != "..")
- html += QStyleSheet::escape(fi->fileName());
+ html += TQStyleSheet::escape(fi->fileName());
else
html += i18n("Parent Directory");
@@ -335,7 +335,7 @@ namespace KPF
return buildHTML
(
- i18n("Directory listing for %1").arg(QStyleSheet::escape(path)),
+ i18n("Directory listing for %1").arg(TQStyleSheet::escape(path)),
html
);
}
diff --git a/kpf/src/DirectoryLister.h b/kpf/src/DirectoryLister.h
index e1809202..51f7ee12 100644
--- a/kpf/src/DirectoryLister.h
+++ b/kpf/src/DirectoryLister.h
@@ -24,8 +24,8 @@
#ifndef KPF_DIRECTORY_LISTER_H
#define KPF_DIRECTORY_LISTER_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
namespace KPF
{
@@ -47,7 +47,7 @@ namespace KPF
* Get a directory listing (HTML) for the specified path. Uses
* cache if directory has not been modified since last read.
*/
- QByteArray html(const QString &root, const QString & path);
+ TQByteArray html(const TQString &root, const TQString & path);
uint headerLength() const;
uint footerLength() const;
diff --git a/kpf/src/ErrorMessageConfigDialog.cpp b/kpf/src/ErrorMessageConfigDialog.cpp
index 2f7cb43a..0a2833c6 100644
--- a/kpf/src/ErrorMessageConfigDialog.cpp
+++ b/kpf/src/ErrorMessageConfigDialog.cpp
@@ -24,9 +24,9 @@
#include "ErrorMessageConfigDialog.h"
#include "ErrorMessageConfigDialog.moc"
-#include <qlabel.h>
-#include <qframe.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <kconfig.h>
@@ -42,7 +42,7 @@ namespace KPF
ErrorMessageConfigDialog::ErrorMessageConfigDialog
(
WebServer * webServer,
- QWidget * parent
+ TQWidget * parent
)
: KDialogBase
(
@@ -56,16 +56,16 @@ namespace KPF
),
server_(webServer)
{
- QValueList<uint> codeList;
+ TQValueList<uint> codeList;
codeList << 400 << 403 << 404 << 412 << 416 << 500 << 501;
- QFrame * w = makeMainWidget();
+ TQFrame * w = makeMainWidget();
- QVBoxLayout * layout =
- new QVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout =
+ new TQVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint());
- QLabel * info =
+ TQLabel * info =
new QLabel
(
i18n
@@ -86,28 +86,28 @@ namespace KPF
layout->addWidget(info);
- QGridLayout * grid = new QGridLayout(layout, codeList.count(), 2);
+ TQGridLayout * grid = new TQGridLayout(layout, codeList.count(), 2);
- QString pattern(i18n("%1 %2"));
+ TQString pattern(i18n("%1 %2"));
KConfig config(Config::name());
config.setGroup("ErrorMessageOverrideFiles");
- QValueList<uint>::ConstIterator it;
+ TQValueList<uint>::ConstIterator it;
for (it = codeList.begin(); it != codeList.end(); ++it)
{
- QString originalPath =
- config.readPathEntry(QString::number(*it));
+ TQString originalPath =
+ config.readPathEntry(TQString::number(*it));
- QString responseName(translatedResponseName(*it));
+ TQString responseName(translatedResponseName(*it));
KURLRequester * requester = new KURLRequester(originalPath, w);
itemList_.append(new Item(*it, requester, responseName, originalPath));
- QLabel * l = new QLabel(pattern.arg(*it).arg(responseName), w);
+ TQLabel * l = new TQLabel(pattern.arg(*it).arg(responseName), w);
l->setBuddy(requester);
@@ -123,7 +123,7 @@ namespace KPF
}
void
- ErrorMessageConfigDialog::slotURLRequesterTextChanged(const QString &)
+ ErrorMessageConfigDialog::slotURLRequesterTextChanged(const TQString &)
{
}
@@ -134,13 +134,13 @@ namespace KPF
config.setGroup("ErrorMessageOverrideFiles");
- QPtrListIterator<Item> it(itemList_);
+ TQPtrListIterator<Item> it(itemList_);
for (; it.current(); ++it)
{
config.writePathEntry
(
- QString::number(it.current()->code),
+ TQString::number(it.current()->code),
it.current()->urlRequester->url()
);
}
diff --git a/kpf/src/ErrorMessageConfigDialog.h b/kpf/src/ErrorMessageConfigDialog.h
index 51bf4830..7ad71a40 100644
--- a/kpf/src/ErrorMessageConfigDialog.h
+++ b/kpf/src/ErrorMessageConfigDialog.h
@@ -24,7 +24,7 @@
#ifndef KPF_ERROR_MESSAGE_CONFIG_DIALOG_H
#define KPF_ERROR_MESSAGE_CONFIG_DIALOG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
class KURLRequester;
@@ -42,13 +42,13 @@ namespace KPF
public:
- ErrorMessageConfigDialog(WebServer *, QWidget * parent);
+ ErrorMessageConfigDialog(WebServer *, TQWidget * parent);
virtual ~ErrorMessageConfigDialog();
protected slots:
- void slotURLRequesterTextChanged(const QString &);
+ void slotURLRequesterTextChanged(const TQString &);
protected:
@@ -66,7 +66,7 @@ namespace KPF
{
public:
- Item(uint i, KURLRequester * r, QString s, QString p)
+ Item(uint i, KURLRequester * r, TQString s, TQString p)
: code (i),
urlRequester (r),
report (s),
@@ -76,11 +76,11 @@ namespace KPF
uint code;
KURLRequester * urlRequester;
- QString report;
- QString originalPath;
+ TQString report;
+ TQString originalPath;
};
- QPtrList<Item> itemList_;
+ TQPtrList<Item> itemList_;
};
}
diff --git a/kpf/src/Help.cpp b/kpf/src/Help.cpp
index 19c6ae26..45e67b1a 100644
--- a/kpf/src/Help.cpp
+++ b/kpf/src/Help.cpp
@@ -31,7 +31,7 @@ namespace KPF
namespace HelpText
{
- QString getServerNameHelp()
+ TQString getServerNameHelp()
{
switch(DNSSD::ServiceBrowser::isAvailable()) {
case DNSSD::ServiceBrowser::Working:
diff --git a/kpf/src/Help.h b/kpf/src/Help.h
index 12584213..39a5b044 100644
--- a/kpf/src/Help.h
+++ b/kpf/src/Help.h
@@ -24,7 +24,7 @@
#ifndef KPF_HELP_H
#define KPF_HELP_H
-#include <qstring.h>
+#include <tqstring.h>
namespace KPF
{
@@ -34,7 +34,7 @@ namespace KPF
namespace HelpText
{
- QString getServerNameHelp();
+ TQString getServerNameHelp();
} // End namespace HelpText
diff --git a/kpf/src/KPFInterface.cpp b/kpf/src/KPFInterface.cpp
index d12c751d..cc9c4bc5 100644
--- a/kpf/src/KPFInterface.cpp
+++ b/kpf/src/KPFInterface.cpp
@@ -42,7 +42,7 @@ KPFInterface::serverRootList()
{
QList<KPF::WebServer> l(KPF::WebServerManager::instance()->serverListLocal());
- QStringList ret;
+ TQStringList ret;
for (QListIterator<KPF::WebServer> it(l); it.current(); ++it)
ret << it.current()->root();
@@ -53,7 +53,7 @@ KPFInterface::serverRootList()
bool
KPFInterface::createServer
(
- QString root,
+ TQString root,
uint port,
uint bandwidthLimit,
uint connectionLimit,
@@ -87,42 +87,42 @@ KPFInterface::createServer
}
bool
-KPFInterface::disableServer(QString root)
+KPFInterface::disableServer(TQString root)
{
kpfDebug << "KPFInterface::disableServer(" << root << ")" << endl;
return KPF::WebServerManager::instance()->disableServer(root);
}
bool
-KPFInterface::restartServer(QString root)
+KPFInterface::restartServer(TQString root)
{
kpfDebug << "KPFInterface::restartServer(" << root << ")" << endl;
return KPF::WebServerManager::instance()->restartServer(root);
}
bool
-KPFInterface::reconfigureServer(QString root)
+KPFInterface::reconfigureServer(TQString root)
{
kpfDebug << "KPFInterface::reconfigureServer(" << root << ")" << endl;
return KPF::WebServerManager::instance()->reconfigureServer(root);
}
bool
-KPFInterface::pauseServer(QString root)
+KPFInterface::pauseServer(TQString root)
{
kpfDebug << "KPFInterface::pauseServer(" << root << ")" << endl;
return KPF::WebServerManager::instance()->pauseServer(root, true);
}
bool
-KPFInterface::unpauseServer(QString root)
+KPFInterface::unpauseServer(TQString root)
{
kpfDebug << "KPFInterface::unpauseServer(" << root << ")" << endl;
return KPF::WebServerManager::instance()->pauseServer(root, false);
}
bool
-KPFInterface::serverPaused(QString root)
+KPFInterface::serverPaused(TQString root)
{
kpfDebug << "KPFInterface::serverPaused(" << root << ")" << endl;
return KPF::WebServerManager::instance()->serverPaused(root);
diff --git a/kpf/src/KPFInterface.h b/kpf/src/KPFInterface.h
index facd482c..a4d54f02 100644
--- a/kpf/src/KPFInterface.h
+++ b/kpf/src/KPFInterface.h
@@ -45,23 +45,23 @@ class KPFInterface : virtual public DCOPObject
/**
* @return list of root directories used by WebServer objects.
*/
- virtual QStringList serverRootList();
+ virtual TQStringList serverRootList();
virtual bool createServer
(
- QString root,
+ TQString root,
uint port,
uint bandwidthLimit = KPF::Config::DefaultBandwidthLimit,
uint connectionLimit = KPF::Config::DefaultConnectionLimit,
bool followSymlinks = KPF::Config::DefaultFollowSymlinks
);
- virtual bool disableServer (QString root);
- virtual bool restartServer (QString root);
- virtual bool reconfigureServer (QString root);
- virtual bool pauseServer (QString root);
- virtual bool unpauseServer (QString root);
- virtual bool serverPaused (QString root);
+ virtual bool disableServer (TQString root);
+ virtual bool restartServer (TQString root);
+ virtual bool reconfigureServer (TQString root);
+ virtual bool pauseServer (TQString root);
+ virtual bool unpauseServer (TQString root);
+ virtual bool serverPaused (TQString root);
};
#endif
diff --git a/kpf/src/PortValidator.cpp b/kpf/src/PortValidator.cpp
index 01c2074e..b841377c 100644
--- a/kpf/src/PortValidator.cpp
+++ b/kpf/src/PortValidator.cpp
@@ -27,21 +27,21 @@
namespace KPF
{
- PortValidator::PortValidator(QObject * parent, const char * name)
- : QValidator(parent, name)
+ PortValidator::PortValidator(TQObject * parent, const char * name)
+ : TQValidator(parent, name)
{
// Empty.
}
- QValidator::State
- PortValidator::validate(QString & input, int & /* unused */) const
+ TQValidator::State
+ PortValidator::validate(TQString & input, int & /* unused */) const
{
uint port(input.toUInt());
- QPtrList<WebServer>
+ TQPtrList<WebServer>
serverList(WebServerManager::instance()->serverListLocal());
- for (QPtrListIterator<WebServer> it(serverList); it.current(); ++it)
+ for (TQPtrListIterator<WebServer> it(serverList); it.current(); ++it)
{
if (it.current()->listenPort() == port)
{
diff --git a/kpf/src/PortValidator.h b/kpf/src/PortValidator.h
index c86d0d01..cba5cbfc 100644
--- a/kpf/src/PortValidator.h
+++ b/kpf/src/PortValidator.h
@@ -24,7 +24,7 @@
#ifndef KPF_PORT_VALIDATOR_H
#define KPF_PORT_VALIDATOR_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
namespace KPF
{
@@ -36,9 +36,9 @@ namespace KPF
{
public:
- PortValidator(QObject * parent, const char * name = 0);
+ PortValidator(TQObject * parent, const char * name = 0);
- virtual State validate(QString & input, int & pos) const;
+ virtual State validate(TQString & input, int & pos) const;
};
} // End namespace KPF
diff --git a/kpf/src/PropertiesDialogPlugin.cpp b/kpf/src/PropertiesDialogPlugin.cpp
index e86743e3..b53422ba 100644
--- a/kpf/src/PropertiesDialogPlugin.cpp
+++ b/kpf/src/PropertiesDialogPlugin.cpp
@@ -21,17 +21,17 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qtimer.h>
-#include <qdir.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwidgetstack.h>
+#include <tqtimer.h>
+#include <tqdir.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -106,7 +106,7 @@ namespace KPF
uint listenPort;
uint bandwidthLimit;
// uint connectionLimit;
- QString serverName;
+ TQString serverName;
bool followSymlinks;
};
@@ -132,25 +132,25 @@ namespace KPF
{
}
- QLabel * l_listenPort;
- QLabel * l_bandwidthLimit;
-// QLabel * l_connectionLimit;
- QLabel * l_serverName;
- QLabel * l_kpfStatus;
+ TQLabel * l_listenPort;
+ TQLabel * l_bandwidthLimit;
+// TQLabel * l_connectionLimit;
+ TQLabel * l_serverName;
+ TQLabel * l_kpfStatus;
- QSpinBox * sb_listenPort;
- QSpinBox * sb_bandwidthLimit;
-// QSpinBox * sb_connectionLimit;
- QLineEdit * le_serverName;
+ TQSpinBox * sb_listenPort;
+ TQSpinBox * sb_bandwidthLimit;
+// TQSpinBox * sb_connectionLimit;
+ TQLineEdit * le_serverName;
- QCheckBox * cb_followSymlinks;
- QCheckBox * cb_share;
+ TQCheckBox * cb_followSymlinks;
+ TQCheckBox * cb_share;
- QPushButton * pb_startKPF;
+ TQPushButton * pb_startKPF;
- QWidgetStack * stack;
- QWidget * initWidget;
- QWidget * configWidget;
+ TQWidgetStack * stack;
+ TQWidget * initWidget;
+ TQWidget * configWidget;
WebServerManager_stub * webServerManagerInterface;
@@ -164,7 +164,7 @@ namespace KPF
PropertiesDialogPlugin::PropertiesDialogPlugin(KPropertiesDialog * dialog,
const char *,
- const QStringList &)
+ const TQStringList &)
: KPropsDlgPlugin(dialog)
{
d = new Private;
@@ -175,19 +175,19 @@ namespace KPF
d->url = dialog->kurl();
if (
- d->url == QDir::homeDirPath()
- || d->url == "file:" + QDir::homeDirPath()
+ d->url == TQDir::homeDirPath()
+ || d->url == "file:" + TQDir::homeDirPath()
)
{
// Don't even show ourselves if it's the home dir
return;
}
- QWidget * widget = dialog->addPage(i18n("&Sharing"));
+ TQWidget * widget = dialog->addPage(i18n("&Sharing"));
- d->stack = new QWidgetStack(widget);
+ d->stack = new TQWidgetStack(widget);
- QVBoxLayout * stackLayout = new QVBoxLayout(widget);
+ TQVBoxLayout * stackLayout = new TQVBoxLayout(widget);
stackLayout->addWidget(d->stack);
d->initWidget = createInitWidget(d->stack);
@@ -201,15 +201,15 @@ namespace KPF
connect
(
kapp->dcopClient(),
- SIGNAL(applicationRegistered(const QCString &)),
- SLOT(slotApplicationRegistered(const QCString &))
+ TQT_SIGNAL(applicationRegistered(const TQCString &)),
+ TQT_SLOT(slotApplicationRegistered(const TQCString &))
);
connect
(
kapp->dcopClient(),
- SIGNAL(applicationRemoved(const QCString &)),
- SLOT(slotApplicationUnregistered(const QCString &))
+ TQT_SIGNAL(applicationRemoved(const TQCString &)),
+ TQT_SLOT(slotApplicationUnregistered(const TQCString &))
);
d->kpfRunning = kapp->dcopClient()->isApplicationRegistered("kpf");
@@ -272,12 +272,12 @@ namespace KPF
d->cb_followSymlinks ->setEnabled(b);
}
- QWidget *
- PropertiesDialogPlugin::createInitWidget(QWidget * parent)
+ TQWidget *
+ PropertiesDialogPlugin::createInitWidget(TQWidget * parent)
{
- QWidget * w = new QWidget(parent);
+ TQWidget * w = new TQWidget(parent);
- QLabel * about =
+ TQLabel * about =
new QLabel
(
i18n
@@ -292,52 +292,52 @@ namespace KPF
);
d->pb_startKPF
- = new QPushButton(i18n("Start Applet"), w);
+ = new TQPushButton(i18n("Start Applet"), w);
- QVBoxLayout * l = new QVBoxLayout(w);
+ TQVBoxLayout * l = new TQVBoxLayout(w);
l->addWidget(about);
d->l_kpfStatus =
- new QLabel(i18n("Applet status: <strong>not running</strong>"), w);
+ new TQLabel(i18n("Applet status: <strong>not running</strong>"), w);
l->addWidget(d->l_kpfStatus);
- QHBoxLayout * l2 = new QHBoxLayout(l);
+ TQHBoxLayout * l2 = new TQHBoxLayout(l);
l2->addStretch(1);
l2->addWidget(d->pb_startKPF);
l->addStretch(1);
- connect(d->pb_startKPF, SIGNAL(clicked()), SLOT(slotStartKPF()));
+ connect(d->pb_startKPF, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartKPF()));
return w;
}
- QWidget *
- PropertiesDialogPlugin::createConfigWidget(QWidget * parent)
+ TQWidget *
+ PropertiesDialogPlugin::createConfigWidget(TQWidget * parent)
{
- QWidget * w = new QWidget(parent);
+ TQWidget * w = new TQWidget(parent);
d->cb_share =
- new QCheckBox(i18n("Share this directory on the &Web"), w);
+ new TQCheckBox(i18n("Share this directory on the &Web"), w);
- d->l_listenPort = new QLabel(i18n("&Listen port:"), w);
- d->l_bandwidthLimit = new QLabel(i18n("&Bandwidth limit:"), w);
-// d->l_connectionLimit = new QLabel(i18n("Connection &limit"), w);
- d->l_serverName = new QLabel(i18n("&Server name:"), w);
+ d->l_listenPort = new TQLabel(i18n("&Listen port:"), w);
+ d->l_bandwidthLimit = new TQLabel(i18n("&Bandwidth limit:"), w);
+// d->l_connectionLimit = new TQLabel(i18n("Connection &limit"), w);
+ d->l_serverName = new TQLabel(i18n("&Server name:"), w);
bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working;
d->l_serverName->setEnabled(canPublish);
- d->sb_listenPort = new QSpinBox(1000, 999999, 1, w);
- d->sb_bandwidthLimit = new QSpinBox(1, 999999, 1, w);
-// d->sb_connectionLimit = new QSpinBox(1, 9999, 1, w);
- d->le_serverName = new QLineEdit( w);
+ d->sb_listenPort = new TQSpinBox(1000, 999999, 1, w);
+ d->sb_bandwidthLimit = new TQSpinBox(1, 999999, 1, w);
+// d->sb_connectionLimit = new TQSpinBox(1, 9999, 1, w);
+ d->le_serverName = new TQLineEdit( w);
d->le_serverName->setEnabled(canPublish);
d->cb_followSymlinks =
- new QCheckBox(i18n("&Follow symbolic links"), w);
+ new TQCheckBox(i18n("&Follow symbolic links"), w);
d->l_listenPort ->setBuddy(d->sb_listenPort);
d->l_serverName ->setBuddy(d->le_serverName);
@@ -350,14 +350,14 @@ namespace KPF
// d->sb_connectionLimit ->setValue(Config::DefaultConnectionLimit);
d->cb_followSymlinks ->setChecked(Config::DefaultFollowSymlinks);
- QVBoxLayout * l0 =
- new QVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * l0 =
+ new TQVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint());
l0->addWidget(d->cb_share);
- l0->addWidget(new KSeparator(QFrame::HLine, w));
+ l0->addWidget(new KSeparator(TQFrame::HLine, w));
- QGridLayout * l2 = new QGridLayout(l0);
+ TQGridLayout * l2 = new TQGridLayout(l0);
l2->addWidget(d->l_listenPort, 0, 0);
l2->addWidget(d->sb_listenPort, 0, 1);
@@ -372,7 +372,7 @@ namespace KPF
l0->addStretch(1);
- QString shareHelp =
+ TQString shareHelp =
i18n
(
"<p>"
@@ -395,9 +395,9 @@ namespace KPF
" (%1)"
"</p>"
)
- .arg(QDir::homeDirPath());
+ .arg(TQDir::homeDirPath());
- QString listenPortHelp =
+ TQString listenPortHelp =
i18n
(
"<p>"
@@ -406,7 +406,7 @@ namespace KPF
"</p>"
);
- QString bandwidthLimitHelp =
+ TQString bandwidthLimitHelp =
i18n
(
"<p>"
@@ -419,7 +419,7 @@ namespace KPF
"</p>"
);
- QString connectionLimitHelp =
+ TQString connectionLimitHelp =
i18n
(
"<p>"
@@ -428,7 +428,7 @@ namespace KPF
"</p>"
);
- QString followSymlinksHelp =
+ TQString followSymlinksHelp =
i18n
(
"<p>"
@@ -441,64 +441,64 @@ namespace KPF
" risk. Use only if you understand the issues involved."
"</p>"
);
- QString serverNameHelp = KPF::HelpText::getServerNameHelp();
+ TQString serverNameHelp = KPF::HelpText::getServerNameHelp();
- QWhatsThis::add(d->cb_share, shareHelp);
- QWhatsThis::add(d->l_listenPort, listenPortHelp);
- QWhatsThis::add(d->sb_listenPort, listenPortHelp);
- QWhatsThis::add(d->l_bandwidthLimit, bandwidthLimitHelp);
- QWhatsThis::add(d->sb_bandwidthLimit, bandwidthLimitHelp);
-// QWhatsThis::add(d->l_connectionLimit, connectionLimitHelp);
-// QWhatsThis::add(d->sb_connectionLimit, connectionLimitHelp);
- QWhatsThis::add(d->l_serverName, serverNameHelp);
- QWhatsThis::add(d->le_serverName, serverNameHelp);
- QWhatsThis::add(d->cb_followSymlinks, followSymlinksHelp);
+ TQWhatsThis::add(d->cb_share, shareHelp);
+ TQWhatsThis::add(d->l_listenPort, listenPortHelp);
+ TQWhatsThis::add(d->sb_listenPort, listenPortHelp);
+ TQWhatsThis::add(d->l_bandwidthLimit, bandwidthLimitHelp);
+ TQWhatsThis::add(d->sb_bandwidthLimit, bandwidthLimitHelp);
+// TQWhatsThis::add(d->l_connectionLimit, connectionLimitHelp);
+// TQWhatsThis::add(d->sb_connectionLimit, connectionLimitHelp);
+ TQWhatsThis::add(d->l_serverName, serverNameHelp);
+ TQWhatsThis::add(d->le_serverName, serverNameHelp);
+ TQWhatsThis::add(d->cb_followSymlinks, followSymlinksHelp);
- connect(d->cb_share, SIGNAL(toggled(bool)), SLOT(slotSharingToggled(bool)));
+ connect(d->cb_share, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSharingToggled(bool)));
slotSharingToggled(false);
connect
(
d->cb_share,
- SIGNAL(toggled(bool)),
- SLOT(slotChanged())
+ TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotChanged())
);
connect
(
d->sb_listenPort,
- SIGNAL(valueChanged(int)),
- SLOT(slotChanged())
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotChanged())
);
connect
(
d->sb_bandwidthLimit,
- SIGNAL(valueChanged(int)),
- SLOT(slotChanged())
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotChanged())
);
#if 0
connect
(
d->sb_connectionLimit,
- SIGNAL(valueChanged(int)),
- SLOT(slotChanged())
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotChanged())
);
#endif
connect
(
d->le_serverName,
- SIGNAL(textChanged(const QString&)),
- SLOT(slotChanged())
+ TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotChanged())
);
connect
(
d->cb_followSymlinks,
- SIGNAL(toggled(bool)),
- SLOT(slotChanged())
+ TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotChanged())
);
return w;
@@ -511,9 +511,9 @@ namespace KPF
->setText(i18n("Applet status: <strong>starting...</strong>"));
kapp->dcopClient()
- ->send("kicker", "default", "addApplet(QString)", "kpfapplet.desktop");
+ ->send("kicker", "default", "addApplet(TQString)", "kpfapplet.desktop");
- QTimer::singleShot(4 * 1000, this, SLOT(slotStartKPFFailed()));
+ TQTimer::singleShot(4 * 1000, this, TQT_SLOT(slotStartKPFFailed()));
}
void
@@ -526,7 +526,7 @@ namespace KPF
}
void
- PropertiesDialogPlugin::slotApplicationRegistered(const QCString & s)
+ PropertiesDialogPlugin::slotApplicationRegistered(const TQCString & s)
{
if ("kpf" == s)
{
@@ -544,7 +544,7 @@ namespace KPF
}
void
- PropertiesDialogPlugin::slotApplicationUnregistered(const QCString & s)
+ PropertiesDialogPlugin::slotApplicationUnregistered(const TQCString & s)
{
if ("kpf" == s)
{
@@ -629,7 +629,7 @@ namespace KPF
void
PropertiesDialogPlugin::getServerRef()
{
- QValueList<DCOPRef> serverRefList =
+ TQValueList<DCOPRef> serverRefList =
d->webServerManagerInterface->serverList();
if (DCOPStub::CallFailed == d->webServerManagerInterface->status())
@@ -641,7 +641,7 @@ namespace KPF
d->webServerRef.clear();
- QValueList<DCOPRef>::ConstIterator it(serverRefList.begin());
+ TQValueList<DCOPRef>::ConstIterator it(serverRefList.begin());
for (; it != serverRefList.end(); ++it)
{
@@ -660,7 +660,7 @@ namespace KPF
bool
PropertiesDialogPlugin::userAcceptsWarning() const
{
- QString noWarningKey("DoNotWarnAboutSharingDirectoriesViaHTTP");
+ TQString noWarningKey("DoNotWarnAboutSharingDirectoriesViaHTTP");
KConfig * config(KGlobal::config());
diff --git a/kpf/src/PropertiesDialogPlugin.h b/kpf/src/PropertiesDialogPlugin.h
index 5881080a..8406f4c2 100644
--- a/kpf/src/PropertiesDialogPlugin.h
+++ b/kpf/src/PropertiesDialogPlugin.h
@@ -40,7 +40,7 @@ namespace KPF
public:
- PropertiesDialogPlugin(KPropertiesDialog *, const char *, const QStringList &);
+ PropertiesDialogPlugin(KPropertiesDialog *, const char *, const TQStringList &);
virtual ~PropertiesDialogPlugin();
@@ -52,8 +52,8 @@ namespace KPF
void slotStartKPF();
void slotStartKPFFailed();
- void slotApplicationRegistered(const QCString &);
- void slotApplicationUnregistered(const QCString &);
+ void slotApplicationRegistered(const TQCString &);
+ void slotApplicationUnregistered(const TQCString &);
void slotChanged();
@@ -64,8 +64,8 @@ namespace KPF
void updateGUIFromCurrentState();
void updateWantedStateFromGUI();
- QWidget * createInitWidget(QWidget * parent);
- QWidget * createConfigWidget(QWidget * parent);
+ TQWidget * createInitWidget(TQWidget * parent);
+ TQWidget * createConfigWidget(TQWidget * parent);
void readSettings();
void setControlsEnabled(bool);
diff --git a/kpf/src/Request.cpp b/kpf/src/Request.cpp
index 01735363..442e4993 100644
--- a/kpf/src/Request.cpp
+++ b/kpf/src/Request.cpp
@@ -23,7 +23,7 @@
#include <climits> // For ULONG_MAX
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kurl.h>
#include "Defines.h"
@@ -50,25 +50,25 @@ namespace KPF
}
void
- Request::parseHeaders(const QStringList & buf)
+ Request::parseHeaders(const TQStringList & buf)
{
- for (QStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it)
+ for (TQStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it)
{
- QString line(*it);
+ TQString line(*it);
int colonPos = line.find(':');
if (-1 != colonPos)
{
- QString name(line.left(colonPos).stripWhiteSpace().lower());
- QString value(line.mid(colonPos + 1).stripWhiteSpace());
+ TQString name(line.left(colonPos).stripWhiteSpace().lower());
+ TQString value(line.mid(colonPos + 1).stripWhiteSpace());
handleHeader(name, value);
}
}
}
void
- Request::handleHeader(const QString & name, const QString & value)
+ Request::handleHeader(const TQString & name, const TQString & value)
{
if ("host" == name)
{
@@ -80,21 +80,21 @@ namespace KPF
}
else if ("if-modified-since" == name)
{
- QDateTime dt;
+ TQDateTime dt;
if (parseDate(value, dt))
setIfModifiedSince(dt);
}
else if ("if-unmodified-since" == name)
{
- QDateTime dt;
+ TQDateTime dt;
if (parseDate(value, dt))
setIfUnmodifiedSince(dt);
}
else if ("connection" == name)
{
- QString v(value.lower());
+ TQString v(value.lower());
if ("keep-alive" == v)
{
@@ -108,9 +108,9 @@ namespace KPF
}
void
- Request::setProtocol(const QString & _s)
+ Request::setProtocol(const TQString & _s)
{
- QString s(_s);
+ TQString s(_s);
s.remove(0, 5);
@@ -131,7 +131,7 @@ namespace KPF
}
void
- Request::setMethod(const QString & s)
+ Request::setMethod(const TQString & s)
{
if ("GET" == s)
method_ = Get;
@@ -148,7 +148,7 @@ namespace KPF
}
void
- Request::setPath(const QString & s)
+ Request::setPath(const TQString & s)
{
KURL p(s);
path_ = clean(p.path());
@@ -162,21 +162,21 @@ namespace KPF
}
void
- Request::setHost(const QString & s)
+ Request::setHost(const TQString & s)
{
host_ = s;
haveHost_ = true;
}
void
- Request::setIfModifiedSince(const QDateTime & dt)
+ Request::setIfModifiedSince(const TQDateTime & dt)
{
ifModifiedSince_ = dt;
haveIfModifiedSince_ = true;
}
void
- Request::setIfUnmodifiedSince(const QDateTime & dt)
+ Request::setIfUnmodifiedSince(const TQDateTime & dt)
{
ifUnmodifiedSince_ = dt;
haveIfUnmodifiedSince_ = true;
@@ -251,10 +251,10 @@ namespace KPF
QCString
Request::protocolString() const
{
- QCString s("HTTP/");
- s += QCString().setNum(protocolMajor_);
+ TQCString s("HTTP/");
+ s += TQCString().setNum(protocolMajor_);
s += '.';
- s += QCString().setNum(protocolMinor_);
+ s += TQCString().setNum(protocolMinor_);
return s;
}
@@ -271,7 +271,7 @@ namespace KPF
}
void
- Request::setRange(const QString & s)
+ Request::setRange(const TQString & s)
{
kpfDebug << "Request::setRange(`" << s << "')" << endl;
@@ -346,17 +346,17 @@ namespace KPF
expectContinue_ = false;
haveRange_ = false;
persist_ = false;
- path_ = QString::null;
- host_ = QString::null;
- ifModifiedSince_ = QDateTime();
- ifUnmodifiedSince_ = QDateTime();
+ path_ = TQString::null;
+ host_ = TQString::null;
+ ifModifiedSince_ = TQDateTime();
+ ifUnmodifiedSince_ = TQDateTime();
range_.clear();
}
QString
- Request::clean(const QString & _path) const
+ Request::clean(const TQString & _path) const
{
- QString s(_path);
+ TQString s(_path);
while (s.endsWith("/./"))
s.truncate(s.length() - 2);
@@ -366,7 +366,7 @@ namespace KPF
// Double slash -> slash.
- QRegExp r("\\/\\/+");
+ TQRegExp r("\\/\\/+");
s.replace(r, "/");
return s;
diff --git a/kpf/src/Request.h b/kpf/src/Request.h
index 92034c9c..d31d5ef8 100644
--- a/kpf/src/Request.h
+++ b/kpf/src/Request.h
@@ -24,9 +24,9 @@
#ifndef KPF_REQUEST_H
#define KPF_REQUEST_H
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include "ByteRange.h"
@@ -58,12 +58,12 @@ namespace KPF
* Take a list of headers and parse them, setting our values
* appropriately.
*/
- void parseHeaders(const QStringList &);
+ void parseHeaders(const TQStringList &);
/**
* Parse one header line and set whatever value is appropriate.
*/
- void handleHeader(const QString & name, const QString & value);
+ void handleHeader(const TQString & name, const TQString & value);
/**
* HTTP has had a few revisions (protocols) since birth. Here you may
@@ -71,7 +71,7 @@ namespace KPF
* version of setProtocol parses a string of the form
* "HTTP/major.minor", where major and minor are integers.
*/
- void setProtocol (const QString &);
+ void setProtocol (const TQString &);
/**
* HTTP has had a few revisions (protocols) since birth. Here you may
@@ -83,7 +83,7 @@ namespace KPF
* Specify the 'method' requested by the client. This version parses
* a string.
*/
- void setMethod (const QString &);
+ void setMethod (const TQString &);
/**
* Specify the 'method' requested by the client.
@@ -94,26 +94,26 @@ namespace KPF
* Set the path to the requested resource. The path is
* immediately decoded and canonicalised.
*/
- void setPath (const QString &);
+ void setPath (const TQString &);
/**
* HTTP/1.1 requests must have a "Host:" header.
*/
- void setHost (const QString &);
+ void setHost (const TQString &);
/**
* HTTP/1.1 allows an "If-Modified-Since" header, specifying that
* the requested resource should only be retrieved if the resource
* has been modified since a certain date and time.
*/
- void setIfModifiedSince (const QDateTime &);
+ void setIfModifiedSince (const TQDateTime &);
/**
* HTTP/1.1 allows an "If-Unmodified-Since" header, specifying that
* the requested resource should only be retrieved if the resource
* has NOT been modified since a certain date and time.
*/
- void setIfUnmodifiedSince (const QDateTime &);
+ void setIfUnmodifiedSince (const TQDateTime &);
/**
* HTTP/1.1 allows an "Expect: 100-continue" header, specifying
@@ -125,7 +125,7 @@ namespace KPF
* Specify a range of bytes which should be retrieved from the
* resource. See RFC 2616.
*/
- void setRange (const QString &);
+ void setRange (const TQString &);
/**
* HTTP/1.1 allows "persistent" connections. These may be specified
@@ -172,27 +172,27 @@ namespace KPF
/**
* @return the path that was set with (and modified by) setPath()
*/
- QString path() const;
+ TQString path() const;
/**
* @return the host that was set previously.
*/
- QString host() const;
+ TQString host() const;
/**
* @return the date/time set by @ref setIfModifiedSince previously.
*/
- QDateTime ifModifiedSince() const;
+ TQDateTime ifModifiedSince() const;
/**
* @return the date/time set by @ref setIfUnmodifiedSince previously.
*/
- QDateTime ifUnmodifiedSince() const;
+ TQDateTime ifUnmodifiedSince() const;
/**
* @return the protocol as a string, e.g. "HTTP/1.1".
*/
- QCString protocolString() const;
+ TQCString protocolString() const;
/**
* @return true if @ref setExpectContinue was used previously.
@@ -223,7 +223,7 @@ namespace KPF
* Clean up the path given in a request, so it's more like what we
* expect.
*/
- QString clean(const QString & path) const;
+ TQString clean(const TQString & path) const;
private:
@@ -239,10 +239,10 @@ namespace KPF
bool persist_;
// End order dependency
- QString path_;
- QString host_;
- QDateTime ifModifiedSince_;
- QDateTime ifUnmodifiedSince_;
+ TQString path_;
+ TQString host_;
+ TQDateTime ifModifiedSince_;
+ TQDateTime ifUnmodifiedSince_;
ByteRange range_;
};
diff --git a/kpf/src/Resource.cpp b/kpf/src/Resource.cpp
index d5e77072..6c3dad91 100644
--- a/kpf/src/Resource.cpp
+++ b/kpf/src/Resource.cpp
@@ -21,11 +21,11 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kmimetype.h>
@@ -50,17 +50,17 @@ namespace KPF
{
}
- QString root;
+ TQString root;
FileType fileType;
- QString path;
- QFile file;
- QFileInfo fileInfo;
- QDir dir;
+ TQString path;
+ TQFile file;
+ TQFileInfo fileInfo;
+ TQDir dir;
uint size;
bool sizeCalculated;
uint offset;
- QByteArray html;
+ TQByteArray html;
};
Resource::Resource()
@@ -75,7 +75,7 @@ namespace KPF
}
void
- Resource::setPath(const QString & root, const QString & relativePath)
+ Resource::setPath(const TQString & root, const TQString & relativePath)
{
kpfDebug << "setPath(`" << root << "',`" << relativePath << "'" << endl;
@@ -99,13 +99,13 @@ namespace KPF
// Does the path actually point to a directory ?
- if (QFileInfo(d->root + d->path).isDir())
+ if (TQFileInfo(d->root + d->path).isDir())
{
kpfDebug << "Path points to directory" << endl;
// Does an index.html exist in that directory ?
- if (QFileInfo(d->root + d->path + "index.html").exists())
+ if (TQFileInfo(d->root + d->path + "index.html").exists())
{
kpfDebug << "Found index.html" << endl;
@@ -129,7 +129,7 @@ namespace KPF
kpfDebug << "NOT Directory requested" << endl;
}
- kpfDebug << "QFileInfo::setFile(`" << d->root << "' + `" << d->path << "'" << endl;
+ kpfDebug << "TQFileInfo::setFile(`" << d->root << "' + `" << d->path << "'" << endl;
d->fileInfo.setFile(d->root + d->path);
}
@@ -296,18 +296,18 @@ namespace KPF
if (d->fileInfo.isSymLink())
return true;
- QString path(d->fileInfo.dirPath());
+ TQString path(d->fileInfo.dirPath());
- QStringList l(QStringList::split('/', path));
+ TQStringList l(TQStringList::split('/', path));
- QString testPath;
+ TQString testPath;
- for (QStringList::ConstIterator it(l.begin()); it != l.end(); ++it)
+ for (TQStringList::ConstIterator it(l.begin()); it != l.end(); ++it)
{
testPath += '/';
testPath += *it;
- if (QFileInfo(testPath).isSymLink())
+ if (TQFileInfo(testPath).isSymLink())
return true;
}
diff --git a/kpf/src/Resource.h b/kpf/src/Resource.h
index 870daed7..f6e0044c 100644
--- a/kpf/src/Resource.h
+++ b/kpf/src/Resource.h
@@ -24,8 +24,8 @@
#ifndef KPF_RESOURCE_H
#define KPF_RESOURCE_H
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KPF
{
@@ -51,7 +51,7 @@ namespace KPF
/**
* Reset this object and tell it what the new paths are.
*/
- void setPath(const QString & root, const QString & relativePath);
+ void setPath(const TQString & root, const TQString & relativePath);
/**
* @return true if the file was opened ok or the dir was readable.
@@ -96,7 +96,7 @@ namespace KPF
/**
* @return mtime of resource.
*/
- QDateTime lastModified() const;
+ TQDateTime lastModified() const;
/**
* @return size of file, or size of HTML that will be generated.
@@ -123,7 +123,7 @@ namespace KPF
* @return mime type of file if available. If dir, returns text/html.
* If nothing available, returns text/plain.
*/
- QString mimeType() const;
+ TQString mimeType() const;
/**
* Reset to initial state.
diff --git a/kpf/src/Response.cpp b/kpf/src/Response.cpp
index f9ce46d8..a52de893 100644
--- a/kpf/src/Response.cpp
+++ b/kpf/src/Response.cpp
@@ -21,9 +21,9 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kconfig.h>
@@ -79,7 +79,7 @@ namespace KPF
QCString
Response::text(const Request & request) const
{
- QString s;
+ TQString s;
// XXX: Ensure that all codes we know about are enumerated here.
switch (code_)
@@ -89,8 +89,8 @@ namespace KPF
case 304:
if (request.protocol() >= 1.0)
{
- s = QString(request.protocolString())
- + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_));
+ s = TQString(request.protocolString())
+ + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_));
}
break;
@@ -102,8 +102,8 @@ namespace KPF
case 500:
case 501:
case 505:
- s = QString(request.protocolString())
- + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_))
+ s = TQString(request.protocolString())
+ + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_))
+ data(code_, request);
break;
@@ -118,13 +118,13 @@ namespace KPF
QString
Response::data(uint code, const Request & request) const
{
- QString contentType = "Content-Type: text/html; charset=utf-8\r\n";
+ TQString contentType = "Content-Type: text/html; charset=utf-8\r\n";
KConfig config(Config::name());
config.setGroup("General");
- QString html;
+ TQString html;
if
(
@@ -134,26 +134,26 @@ namespace KPF
{
config.setGroup("ErrorMessageOverrideFiles");
- QString filename = config.readPathEntry(QString::number(code));
+ TQString filename = config.readPathEntry(TQString::number(code));
if (!filename.isEmpty())
{
- QFile f(filename);
+ TQFile f(filename);
if (f.open(IO_ReadOnly))
{
- QRegExp regexpMessage ("ERROR_MESSAGE");
- QRegExp regexpCode ("ERROR_CODE");
- QRegExp regexpResource ("RESOURCE");
+ TQRegExp regexpMessage ("ERROR_MESSAGE");
+ TQRegExp regexpCode ("ERROR_CODE");
+ TQRegExp regexpResource ("RESOURCE");
- QTextStream str(&f);
+ TQTextStream str(&f);
while (!str.atEnd())
{
- QString line(str.readLine());
+ TQString line(str.readLine());
line.replace(regexpMessage, responseName(code));
- line.replace(regexpCode, QString::number(code));
+ line.replace(regexpCode, TQString::number(code));
line.replace(regexpResource, request.path());
html = line + "\r\n";
@@ -177,8 +177,8 @@ namespace KPF
html += "</body>\r\n</html>\r\n";
}
- QString contentLength =
- QString("Content-Length: %1\r\n").arg(html.length());
+ TQString contentLength =
+ TQString("Content-Length: %1\r\n").arg(html.length());
return (contentType + contentLength + "\r\n" + html);
}
diff --git a/kpf/src/Response.h b/kpf/src/Response.h
index c24ba69c..d4da0706 100644
--- a/kpf/src/Response.h
+++ b/kpf/src/Response.h
@@ -76,7 +76,7 @@ namespace KPF
* @return header/body data to send to the client. This string is
* constructed differently depending on HTTP response code.
*/
- QCString text(const Request &) const;
+ TQCString text(const Request &) const;
/**
* Reset to initial state.
@@ -89,7 +89,7 @@ namespace KPF
* @internal
* Create HTML.
*/
- QString data(uint, const Request &) const;
+ TQString data(uint, const Request &) const;
private:
diff --git a/kpf/src/RootValidator.cpp b/kpf/src/RootValidator.cpp
index 17d6a43a..00fae54d 100644
--- a/kpf/src/RootValidator.cpp
+++ b/kpf/src/RootValidator.cpp
@@ -21,23 +21,23 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include "RootValidator.h"
#include "WebServerManager.h"
namespace KPF
{
- RootValidator::RootValidator(QObject * parent, const char * name)
- : QValidator(parent, name)
+ RootValidator::RootValidator(TQObject * parent, const char * name)
+ : TQValidator(parent, name)
{
}
- QValidator::State
- RootValidator::validate(QString & input, int & /* unused */) const
+ TQValidator::State
+ RootValidator::validate(TQString & input, int & /* unused */) const
{
- QString root(input);
+ TQString root(input);
if ('/' == root.at(root.length() - 1))
{
@@ -49,13 +49,13 @@ namespace KPF
if (0 != WebServerManager::instance()->server(root))
return Intermediate;
- QFileInfo fi(root);
+ TQFileInfo fi(root);
if (!fi.isDir())
return Intermediate;
// Disabling disallowing of ~, on request.
-// if (fi.dirPath() == QDir::homeDirPath())
+// if (fi.dirPath() == TQDir::homeDirPath())
// return Intermediate;
return Acceptable;
diff --git a/kpf/src/RootValidator.h b/kpf/src/RootValidator.h
index 5ac96829..020816f7 100644
--- a/kpf/src/RootValidator.h
+++ b/kpf/src/RootValidator.h
@@ -24,7 +24,7 @@
#ifndef KPF_ROOT_VALIDATOR_H
#define KPF_ROOT_VALIDATOR_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
namespace KPF
{
@@ -36,9 +36,9 @@ namespace KPF
{
public:
- RootValidator(QObject * parent, const char * name = 0);
+ RootValidator(TQObject * parent, const char * name = 0);
- virtual State validate(QString & input, int & pos) const;
+ virtual State validate(TQString & input, int & pos) const;
};
} // End namespace KPF
diff --git a/kpf/src/Server.cpp b/kpf/src/Server.cpp
index 3e59281a..90d94209 100644
--- a/kpf/src/Server.cpp
+++ b/kpf/src/Server.cpp
@@ -38,12 +38,12 @@ namespace KPF
Server::Server
(
- const QString & dir,
+ const TQString & dir,
bool followSymlinks,
int socket,
WebServer * parent
)
- : QObject(parent, "Server")
+ : TQObject(parent, "Server")
{
d = new Private;
@@ -53,38 +53,38 @@ namespace KPF
d->followSymlinks = followSymlinks;
- d->birth = QDateTime::currentDateTime();
+ d->birth = TQDateTime::currentDateTime();
d->socket.setSocket(socket);
- connect(&(d->socket), SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
+ connect(&(d->socket), TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead()));
connect
(
&(d->socket),
- SIGNAL(bytesWritten(int)),
- SLOT(slotBytesWritten(int))
+ TQT_SIGNAL(bytesWritten(int)),
+ TQT_SLOT(slotBytesWritten(int))
);
connect
(
&(d->socket),
- SIGNAL(connectionClosed()),
- SLOT(slotConnectionClosed())
+ TQT_SIGNAL(connectionClosed()),
+ TQT_SLOT(slotConnectionClosed())
);
connect
(
&(d->idleTimer),
- SIGNAL(timeout()),
- SLOT(slotTimeout())
+ TQT_SIGNAL(timeout()),
+ TQT_SLOT(slotTimeout())
);
connect
(
&(d->readTimer),
- SIGNAL(timeout()),
- SLOT(slotRead())
+ TQT_SIGNAL(timeout()),
+ TQT_SLOT(slotRead())
);
// If nothing happens for a bit, cancel ourselves.
@@ -128,7 +128,7 @@ namespace KPF
{
kpfDebug << d->id << ": socket.canReadLine" << endl;
- QString line(d->socket.readLine().stripWhiteSpace());
+ TQString line(d->socket.readLine().stripWhiteSpace());
#ifdef KPF_TRAFFIC_DEBUG
kpfDebug
@@ -194,7 +194,7 @@ namespace KPF
}
bool
- Server::readRequest(const QString & line)
+ Server::readRequest(const TQString & line)
{
++d->requestCount;
@@ -205,9 +205,9 @@ namespace KPF
<< line << "'" << endl;
#endif
- QStringList l(QStringList::split(' ', line));
+ TQStringList l(TQStringList::split(' ', line));
- // A request usually looks like METHOD PATH PROTOCOL but we don't
+ // A request usually looks like TQT_METHOD PATH PROTOCOL but we don't
// require PROTOCOL - we just assume HTTP/0.9 and act accordingly.
if (l.count() == 2)
@@ -226,7 +226,7 @@ namespace KPF
d->request.setMethod (l[0]);
d->request.setPath (l[1]);
- d->request.setProtocol (l.count() == 3 ? l[2] : QString::null);
+ d->request.setProtocol (l.count() == 3 ? l[2] : TQString::null);
// Before we check the request, say we received it.
@@ -238,7 +238,7 @@ namespace KPF
bool
Server::checkRequest()
{
- // We only handle METHOD of GET or HEAD.
+ // We only handle TQT_METHOD of GET or HEAD.
if (Request::Unsupported == d->request.method())
{
@@ -336,7 +336,7 @@ namespace KPF
// This would be cleaner if there was a QValueQueue.
// Basically we 'dequeue' the first line from incomingHeaderBuffer.
- QString line(d->incomingLineBuffer.first());
+ TQString line(d->incomingLineBuffer.first());
d->incomingLineBuffer.remove(d->incomingLineBuffer.begin());
// Unless the line is empty, this is (in theory) a header.
@@ -393,7 +393,7 @@ namespace KPF
{
// The path to the requested resource is relative to our root.
- QString filename = d->dir + '/' + d->request.path();
+ TQString filename = d->dir + '/' + d->request.path();
kpfDebug << d->id << ": filename: " << filename << endl;
@@ -550,25 +550,25 @@ namespace KPF
if (206 == d->response.code())
{
- QString line = "Content-Range: bytes ";
+ TQString line = "Content-Range: bytes ";
- line += QString::number(d->request.range().first());
+ line += TQString::number(d->request.range().first());
line += '-';
if (d->request.range().haveLast())
- line += QString::number(d->request.range().last());
+ line += TQString::number(d->request.range().last());
else
- line += QString::number(d->resource.size() - 1);
+ line += TQString::number(d->resource.size() - 1);
line += '/';
- line += QString::number(d->resource.size());
+ line += TQString::number(d->resource.size());
writeLine(line);
}
- writeLine("Content-Length: " + QString::number(d->fileBytesLeft));
+ writeLine("Content-Length: " + TQString::number(d->fileBytesLeft));
}
if (d->requestCount >= MaxKeepAlive && d->request.protocol() >= 1.1)
@@ -689,12 +689,12 @@ namespace KPF
}
void
- Server::writeLine(const QString & line)
+ Server::writeLine(const TQString & line)
{
// Fill a buffer. We're not allowed to send anything out until our
// controller calls write().
- QCString s(line.utf8() + "\r\n");
+ TQCString s(line.utf8() + "\r\n");
d->headerBytesLeft += s.length();
d->outgoingHeaderBuffer += s;
@@ -717,7 +717,7 @@ namespace KPF
// Request from the Response object the text that should be sent
// back to the client.
- QCString s(d->response.text(d->request));
+ TQCString s(d->response.text(d->request));
// Tell our Response object how long it will be in total (it doesn't
// know its total size until we tell it about the resource size.)
@@ -754,7 +754,7 @@ namespace KPF
d->socket.close();
- d->death = QDateTime::currentDateTime();
+ d->death = TQDateTime::currentDateTime();
emit(finished(this));
}
@@ -789,7 +789,7 @@ namespace KPF
// If the socket has been closed (e.g. the remote end hung up)
// then we just give up.
- if (QSocket::Connection != d->socket.state())
+ if (TQSocket::Connection != d->socket.state())
{
kpfDebug << d->id << ": Socket closed by client -> finished" << endl;
setFinished(Flush);
@@ -1020,7 +1020,7 @@ namespace KPF
bytesToWrite = min(bytesToWrite, d->socket.outputBufferLeft());
- QByteArray a(bytesToWrite);
+ TQByteArray a(bytesToWrite);
if (0 == bytesToWrite)
return true;
@@ -1049,14 +1049,14 @@ namespace KPF
kpfDebug
<< d->id
<< ": Wrote file data: `"
- << QCString(a.data(), fileBytesWritten)
+ << TQCString(a.data(), fileBytesWritten)
<< "'"
<< endl;
#endif
// We should have been able to write the full amount to the socket,
// because we tested d->socket.outputBufferLeft(). If we didn't
- // manage to write that much, either we have a bug or QSocket does.
+ // manage to write that much, either we have a bug or TQSocket does.
if (fileBytesWritten < fileBytesRead)
{
diff --git a/kpf/src/Server.h b/kpf/src/Server.h
index 8d26a167..c83f4a3d 100644
--- a/kpf/src/Server.h
+++ b/kpf/src/Server.h
@@ -24,9 +24,9 @@
#ifndef KPF_SERVER_H
#define KPF_SERVER_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qhostaddress.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqhostaddress.h>
#include "Request.h"
#include "Response.h"
@@ -64,7 +64,7 @@ namespace KPF
*/
Server
(
- const QString & dir,
+ const TQString & dir,
bool followSymlinks,
int socket,
WebServer * parent
@@ -78,7 +78,7 @@ namespace KPF
/**
* @return address of client that has connected to us.
*/
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
/**
* @return Request object associated with this connection.
@@ -109,12 +109,12 @@ namespace KPF
/**
* @return date and time this object was created.
*/
- QDateTime birth() const;
+ TQDateTime birth() const;
/**
* @return date and time all activity was completed.
*/
- QDateTime death() const;
+ TQDateTime death() const;
/**
* @return number of bytes remaining to send to client.
@@ -164,10 +164,10 @@ namespace KPF
};
void setFinished (FlushSelect);
- void writeLine (const QString &);
+ void writeLine (const TQString &);
void prepareResponse ();
void respond (uint code, ulong size = 0);
- bool readRequest (const QString &);
+ bool readRequest (const TQString &);
bool checkRequest ();
void handleRequest ();
void readHeaders ();
diff --git a/kpf/src/ServerPrivate.h b/kpf/src/ServerPrivate.h
index fcf7fd39..91d6424a 100644
--- a/kpf/src/ServerPrivate.h
+++ b/kpf/src/ServerPrivate.h
@@ -24,8 +24,8 @@
#ifndef KPF_SERVER_PRIVATE_H
#define KPF_SERVER_PRIVATE_H
-#include <qcstring.h>
-#include <qtimer.h>
+#include <tqcstring.h>
+#include <tqtimer.h>
#include "ServerSocket.h"
#include "Server.h"
@@ -57,17 +57,17 @@ namespace KPF
uint requestCount;
// End order dependency
- QString dir;
+ TQString dir;
Request request;
Response response;
Resource resource;
- QStringList incomingHeaderLineBuffer;
- QStringList incomingLineBuffer;
- QDateTime birth;
- QDateTime death;
- QCString outgoingHeaderBuffer;
- QTimer idleTimer;
- QTimer readTimer;
+ TQStringList incomingHeaderLineBuffer;
+ TQStringList incomingLineBuffer;
+ TQDateTime birth;
+ TQDateTime death;
+ TQCString outgoingHeaderBuffer;
+ TQTimer idleTimer;
+ TQTimer readTimer;
ulong id;
static ulong ID;
};
diff --git a/kpf/src/ServerSocket.cpp b/kpf/src/ServerSocket.cpp
index 9f39ac57..38d419a5 100644
--- a/kpf/src/ServerSocket.cpp
+++ b/kpf/src/ServerSocket.cpp
@@ -21,15 +21,15 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qsocketdevice.h>
+#include <tqsocketdevice.h>
#include "Defines.h"
#include "ServerSocket.h"
namespace KPF
{
- ServerSocket::ServerSocket(QObject * parent, const char * name)
- : QSocket(parent, name)
+ ServerSocket::ServerSocket(TQObject * parent, const char * name)
+ : TQSocket(parent, name)
{
// Empty.
}
diff --git a/kpf/src/ServerSocket.h b/kpf/src/ServerSocket.h
index 14a2e2d8..76618c9b 100644
--- a/kpf/src/ServerSocket.h
+++ b/kpf/src/ServerSocket.h
@@ -24,7 +24,7 @@
#ifndef KPF_SERVER_SOCKET_H
#define KPF_SERVER_SOCKET_H
-#include <qsocket.h>
+#include <tqsocket.h>
namespace KPF
{
@@ -36,7 +36,7 @@ namespace KPF
{
public:
- ServerSocket(QObject * parent, const char * name = 0);
+ ServerSocket(TQObject * parent, const char * name = 0);
uint outputBufferLeft();
};
diff --git a/kpf/src/ServerWizard.cpp b/kpf/src/ServerWizard.cpp
index 8ca47e22..840c64d9 100644
--- a/kpf/src/ServerWizard.cpp
+++ b/kpf/src/ServerWizard.cpp
@@ -21,12 +21,12 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qdir.h>
-#include <qptrlist.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqdir.h>
+#include <tqptrlist.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -46,18 +46,18 @@
namespace KPF
{
- ServerWizard::ServerWizard(QWidget * parent)
+ ServerWizard::ServerWizard(TQWidget * parent)
: KWizard(parent, "KPF::ServerWizard", true)
{
setCaption(i18n("New Server - %1").arg("kpf"));
- page1_ = new QWidget(this);
- page2_ = new QWidget(this);
- page3_ = new QWidget(this);
-// page4_ = new QWidget(this);
- page5_ = new QWidget(this);
+ page1_ = new TQWidget(this);
+ page2_ = new TQWidget(this);
+ page3_ = new TQWidget(this);
+// page4_ = new TQWidget(this);
+ page5_ = new TQWidget(this);
- QLabel * l_rootDirectoryHelp =
+ TQLabel * l_rootDirectoryHelp =
new QLabel
(
i18n
@@ -74,7 +74,7 @@ namespace KPF
page1_
);
- QLabel * l_listenPortHelp =
+ TQLabel * l_listenPortHelp =
new QLabel
(
i18n
@@ -87,7 +87,7 @@ namespace KPF
page2_
);
- QLabel * l_bandwidthLimitHelp =
+ TQLabel * l_bandwidthLimitHelp =
new QLabel
(
i18n
@@ -104,7 +104,7 @@ namespace KPF
page3_
);
/*
- QLabel * l_connectionLimitHelp =
+ TQLabel * l_connectionLimitHelp =
new QLabel
(
i18n
@@ -118,42 +118,42 @@ namespace KPF
);
*/
bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working;
- QLabel * l_serverNameHelp =
+ TQLabel * l_serverNameHelp =
new QLabel
(
KPF::HelpText::getServerNameHelp(),
page5_
);
- QLabel * l_root_ =
- new QLabel(i18n("&Root directory:"), page1_);
+ TQLabel * l_root_ =
+ new TQLabel(i18n("&Root directory:"), page1_);
- QLabel * l_listenPort_ =
- new QLabel(i18n("&Listen port:"), page2_);
+ TQLabel * l_listenPort_ =
+ new TQLabel(i18n("&Listen port:"), page2_);
- QLabel * l_bandwidthLimit_ =
- new QLabel(i18n("&Bandwidth limit:"), page3_);
+ TQLabel * l_bandwidthLimit_ =
+ new TQLabel(i18n("&Bandwidth limit:"), page3_);
-// QLabel * l_connectionLimit_ =
-// new QLabel(i18n("Connection &limit"), page4_);
+// TQLabel * l_connectionLimit_ =
+// new TQLabel(i18n("Connection &limit"), page4_);
- QLabel * l_serverName_ =
- new QLabel(i18n("&Server name:"), page5_);
+ TQLabel * l_serverName_ =
+ new TQLabel(i18n("&Server name:"), page5_);
if(!canPublish)
l_serverName_->setEnabled(false);
kur_root_ = new KURLRequester(page1_);
- sb_listenPort_ = new QSpinBox(1, 65535, 1, page2_);
+ sb_listenPort_ = new TQSpinBox(1, 65535, 1, page2_);
- sb_bandwidthLimit_ = new QSpinBox(1, 999999, 1, page3_);
-// sb_connectionLimit_ = new QSpinBox(1, 9999, 1, page4_);
+ sb_bandwidthLimit_ = new TQSpinBox(1, 999999, 1, page3_);
+// sb_connectionLimit_ = new TQSpinBox(1, 9999, 1, page4_);
char hostname[255];
gethostname(hostname, 255-2);
hostname[255-1]=0;
- le_serverName_ = new QLineEdit(hostname, page5_);
+ le_serverName_ = new TQLineEdit(hostname, page5_);
if(!canPublish)
le_serverName_->setEnabled(false);
@@ -171,20 +171,20 @@ namespace KPF
sb_bandwidthLimit_ ->setSuffix(i18n(" kB/s"));
// sb_connectionLimit_ ->setValue(Config::DefaultConnectionLimit);
- QVBoxLayout * layout1 =
- new QVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout1 =
+ new TQVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout2 =
- new QVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout2 =
+ new TQVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout3 =
- new QVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout3 =
+ new TQVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint());
-// QVBoxLayout * layout4 =
-// new QVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint());
+// TQVBoxLayout * layout4 =
+// new TQVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout * layout5 =
- new QVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout * layout5 =
+ new TQVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint());
layout1->addWidget(l_rootDirectoryHelp);
layout2->addWidget(l_listenPortHelp);
@@ -192,35 +192,35 @@ namespace KPF
// layout4->addWidget(l_connectionLimitHelp);
layout5->addWidget(l_serverNameHelp);
- QHBoxLayout * layout10 = new QHBoxLayout(layout1);
+ TQHBoxLayout * layout10 = new TQHBoxLayout(layout1);
layout10->addWidget(l_root_);
layout10->addWidget(kur_root_);
layout1->addStretch(1);
- QHBoxLayout * layout20 = new QHBoxLayout(layout2);
+ TQHBoxLayout * layout20 = new TQHBoxLayout(layout2);
layout20->addWidget(l_listenPort_);
layout20->addWidget(sb_listenPort_);
layout2->addStretch(1);
- QHBoxLayout * layout30 = new QHBoxLayout(layout3);
+ TQHBoxLayout * layout30 = new TQHBoxLayout(layout3);
layout30->addWidget(l_bandwidthLimit_);
layout30->addWidget(sb_bandwidthLimit_);
layout3->addStretch(1);
-// QHBoxLayout * layout40 = new QHBoxLayout(layout4);
+// TQHBoxLayout * layout40 = new TQHBoxLayout(layout4);
// layout40->addWidget(l_connectionLimit_);
// layout40->addWidget(sb_connectionLimit_);
// layout4->addStretch(1);
- QHBoxLayout * layout50 = new QHBoxLayout(layout5);
+ TQHBoxLayout * layout50 = new TQHBoxLayout(layout5);
layout50->addWidget(l_serverName_);
layout50->addWidget(le_serverName_);
@@ -231,7 +231,7 @@ namespace KPF
// addPage(page4_, i18n("Connection Limit"));
addPage(page5_, i18n("Server Name"));
- kur_root_->setURL(QDir::homeDirPath() + "/public_html");
+ kur_root_->setURL(TQDir::homeDirPath() + "/public_html");
kur_root_->setMode
(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
@@ -244,8 +244,8 @@ namespace KPF
connect
(
kur_root_,
- SIGNAL(textChanged(const QString &)),
- SLOT(slotServerRootChanged(const QString &))
+ TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(slotServerRootChanged(const TQString &))
);
// Used for setting the caption on the file dialog.
@@ -253,8 +253,8 @@ namespace KPF
connect
(
kur_root_,
- SIGNAL(openFileDialog(KURLRequester *)),
- SLOT(slotOpenFileDialog(KURLRequester *))
+ TQT_SIGNAL(openFileDialog(KURLRequester *)),
+ TQT_SLOT(slotOpenFileDialog(KURLRequester *))
);
// This slot sets the 'Next' button on page 2 to enabled/disabled
@@ -263,8 +263,8 @@ namespace KPF
connect
(
sb_listenPort_,
- SIGNAL(valueChanged(int)),
- SLOT(slotListenPortChanged(int))
+ TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotListenPortChanged(int))
);
// Update 'Next' button on page 1.
@@ -281,7 +281,7 @@ namespace KPF
}
void
- ServerWizard::setLocation(const QString & location)
+ ServerWizard::setLocation(const TQString & location)
{
kur_root_->setURL(location);
}
@@ -319,14 +319,14 @@ namespace KPF
void
ServerWizard::accept()
{
- QWizard::accept();
+ TQWizard::accept();
emit(dying(this));
}
void
ServerWizard::reject()
{
- QWizard::reject();
+ TQWizard::reject();
emit(dying(this));
}
@@ -339,10 +339,10 @@ namespace KPF
return;
}
- QPtrList<WebServer>
+ TQPtrList<WebServer>
serverList(WebServerManager::instance()->serverListLocal());
- for (QPtrListIterator<WebServer> it(serverList); it.current(); ++it)
+ for (TQPtrListIterator<WebServer> it(serverList); it.current(); ++it)
{
if (it.current()->listenPort() == uint(newPort))
{
@@ -355,9 +355,9 @@ namespace KPF
}
void
- ServerWizard::slotServerRootChanged(const QString & _root)
+ ServerWizard::slotServerRootChanged(const TQString & _root)
{
- QString root(_root);
+ TQString root(_root);
kpfDebug << root << endl;
@@ -373,9 +373,9 @@ namespace KPF
if ("/" != root.right(1))
root += "/";
- QFileInfo fi(root);
+ TQFileInfo fi(root);
- if (!fi.isDir()) // || (fi.dirPath() == QDir::homeDirPath()))
+ if (!fi.isDir()) // || (fi.dirPath() == TQDir::homeDirPath()))
{
kpfDebug << root << " isn't a dir" << endl; //, or it's $HOME" << endl;
setNextEnabled(page1_, false);
diff --git a/kpf/src/ServerWizard.h b/kpf/src/ServerWizard.h
index a484b8eb..670d94d0 100644
--- a/kpf/src/ServerWizard.h
+++ b/kpf/src/ServerWizard.h
@@ -41,17 +41,17 @@ namespace KPF
public:
- ServerWizard(QWidget * parent = 0);
+ ServerWizard(TQWidget * parent = 0);
virtual ~ServerWizard();
- void setLocation(const QString &);
+ void setLocation(const TQString &);
- QString root() const;
+ TQString root() const;
uint listenPort() const;
uint bandwidthLimit() const;
uint connectionLimit() const;
- QString serverName() const;
+ TQString serverName() const;
signals:
@@ -61,7 +61,7 @@ namespace KPF
virtual void accept();
virtual void reject();
- void slotServerRootChanged(const QString &);
+ void slotServerRootChanged(const TQString &);
void slotListenPortChanged(int);
void slotOpenFileDialog(KURLRequester *);
@@ -73,16 +73,16 @@ namespace KPF
KURLRequester * kur_root_;
- QSpinBox * sb_listenPort_;
- QSpinBox * sb_bandwidthLimit_;
- QSpinBox * sb_connectionLimit_;
- QLineEdit * le_serverName_;
-
- QWidget * page1_;
- QWidget * page2_;
- QWidget * page3_;
- QWidget * page4_;
- QWidget * page5_;
+ TQSpinBox * sb_listenPort_;
+ TQSpinBox * sb_bandwidthLimit_;
+ TQSpinBox * sb_connectionLimit_;
+ TQLineEdit * le_serverName_;
+
+ TQWidget * page1_;
+ TQWidget * page2_;
+ TQWidget * page3_;
+ TQWidget * page4_;
+ TQWidget * page5_;
};
}
diff --git a/kpf/src/SingleServerConfigDialog.cpp b/kpf/src/SingleServerConfigDialog.cpp
index 6fa1792b..c39f944b 100644
--- a/kpf/src/SingleServerConfigDialog.cpp
+++ b/kpf/src/SingleServerConfigDialog.cpp
@@ -33,7 +33,7 @@ namespace KPF
SingleServerConfigDialog::SingleServerConfigDialog
(
WebServer * server,
- QWidget * parent
+ TQWidget * parent
)
: KDialogBase
(
@@ -52,13 +52,13 @@ namespace KPF
connect
(
widget_,
- SIGNAL(ok(bool)),
- SLOT(slotOk(bool))
+ TQT_SIGNAL(ok(bool)),
+ TQT_SLOT(slotOk(bool))
);
setMainWidget(widget_);
- connect(this, SIGNAL(finished()), SLOT(slotFinished()));
+ connect(this, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished()));
widget_->checkOk();
}
diff --git a/kpf/src/SingleServerConfigDialog.h b/kpf/src/SingleServerConfigDialog.h
index a6f1c17f..e9bb415c 100644
--- a/kpf/src/SingleServerConfigDialog.h
+++ b/kpf/src/SingleServerConfigDialog.h
@@ -40,7 +40,7 @@ namespace KPF
public:
- SingleServerConfigDialog(WebServer *, QWidget * parent);
+ SingleServerConfigDialog(WebServer *, TQWidget * parent);
virtual ~SingleServerConfigDialog();
diff --git a/kpf/src/StartingKPFDialog.cpp b/kpf/src/StartingKPFDialog.cpp
index 19b073bd..15a50d47 100644
--- a/kpf/src/StartingKPFDialog.cpp
+++ b/kpf/src/StartingKPFDialog.cpp
@@ -21,10 +21,10 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -44,10 +44,10 @@ namespace KPF
// Empty.
}
- QTimer timer;
+ TQTimer timer;
};
- StartingKPFDialog::StartingKPFDialog(QWidget * parent)
+ StartingKPFDialog::StartingKPFDialog(TQWidget * parent)
:
KDialogBase
(
@@ -62,16 +62,16 @@ namespace KPF
{
d = new Private;
- QFrame * mainWidget = makeMainWidget();
+ TQFrame * mainWidget = makeMainWidget();
- QLabel * about =
+ TQLabel * about =
new QLabel
(
i18n("Starting kpf..."),
mainWidget
);
- QVBoxLayout * layout = new QVBoxLayout(mainWidget);
+ TQVBoxLayout * layout = new TQVBoxLayout(mainWidget);
layout->addWidget(about);
@@ -80,14 +80,14 @@ namespace KPF
connect
(
kapp->dcopClient(),
- SIGNAL(applicationRegistered(const QCString &)),
- SLOT(slotApplicationRegistered(const QCString &))
+ TQT_SIGNAL(applicationRegistered(const TQCString &)),
+ TQT_SLOT(slotApplicationRegistered(const TQCString &))
);
kapp->dcopClient()
- ->send("kicker", "default", "addApplet(QString)", "kpfapplet.desktop");
+ ->send("kicker", "default", "addApplet(TQString)", "kpfapplet.desktop");
- connect(&d->timer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(&d->timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
enableButtonOK(false);
enableButtonCancel(true);
@@ -124,7 +124,7 @@ namespace KPF
}
void
- StartingKPFDialog::slotApplicationRegistered(const QCString & id)
+ StartingKPFDialog::slotApplicationRegistered(const TQCString & id)
{
if ("kpf" == id)
{
diff --git a/kpf/src/StartingKPFDialog.h b/kpf/src/StartingKPFDialog.h
index cbeca549..9dc7b651 100644
--- a/kpf/src/StartingKPFDialog.h
+++ b/kpf/src/StartingKPFDialog.h
@@ -38,14 +38,14 @@ namespace KPF
public:
- StartingKPFDialog(QWidget * parent);
+ StartingKPFDialog(TQWidget * parent);
virtual ~StartingKPFDialog();
protected slots:
void slotTimeout();
- void slotApplicationRegistered(const QCString &);
+ void slotApplicationRegistered(const TQCString &);
protected:
diff --git a/kpf/src/Utils.cpp b/kpf/src/Utils.cpp
index a867a998..08f3318a 100644
--- a/kpf/src/Utils.cpp
+++ b/kpf/src/Utils.cpp
@@ -24,8 +24,8 @@
#include <ctime>
#include <clocale>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
@@ -36,11 +36,11 @@ namespace KPF
{
static bool dateInitDone = false;
- static QStringList monthList;
+ static TQStringList monthList;
static const char rfc1123Format[] = "%a, %d %b %Y %H:%M:%S GMT";
- static time_t qDateTimeToTimeT(const QDateTime & t)
+ static time_t qDateTimeToTimeT(const TQDateTime & t)
{
struct tm tempTm;
@@ -52,7 +52,7 @@ namespace KPF
tempTm.tm_sec = t.time().second();
tempTm.tm_isdst = -1;
- // Fix up differences between QDateTime and tm.
+ // Fix up differences between TQDateTime and tm.
tempTm.tm_year -= 1900;
@@ -62,18 +62,18 @@ namespace KPF
}
QDateTime
- toGMT(const QDateTime & dt)
+ toGMT(const TQDateTime & dt)
{
time_t dtAsTimeT = qDateTimeToTimeT(dt);
struct tm * dtAsGmTm = ::gmtime(&dtAsTimeT);
if (0 == dtAsGmTm)
- return QDateTime();
+ return TQDateTime();
time_t dtAsGmTimeT = ::mktime(dtAsGmTm);
- QDateTime ret;
+ TQDateTime ret;
ret.setTime_t(dtAsGmTimeT);
@@ -103,13 +103,13 @@ namespace KPF
;
}
- QString dateString()
+ TQString dateString()
{
- return dateString(QDateTime::currentDateTime());
+ return dateString(TQDateTime::currentDateTime());
}
- QString dateString(const QDateTime & t)
+ TQString dateString(const TQDateTime & t)
{
time_t asTimeT = qDateTimeToTimeT(t);
@@ -118,7 +118,7 @@ namespace KPF
if (0 == asTm)
{
kpfDebug << "::gmtime() failed" << endl;
- return QString::null;
+ return TQString::null;
}
asTm->tm_isdst = -1;
@@ -129,25 +129,25 @@ namespace KPF
// Ensure we use locale "C" for strftime.
- QCString oldLC_ALL = ::strdup(::setlocale(LC_TIME, "C"));
- QCString oldLC_TIME = ::strdup(::setlocale(LC_ALL, "C"));
+ TQCString oldLC_ALL = ::strdup(::setlocale(LC_TIME, "C"));
+ TQCString oldLC_TIME = ::strdup(::setlocale(LC_ALL, "C"));
{
::strftime(static_cast<char *>(buf), len, rfc1123Format, asTm);
}
::setlocale(LC_TIME, oldLC_TIME.data());
::setlocale(LC_ALL, oldLC_ALL.data());
- return QString::fromUtf8(buf);
+ return TQString::fromUtf8(buf);
}
bool
- parseDate(const QString & s, QDateTime & dt)
+ parseDate(const TQString & s, TQDateTime & dt)
{
dateInit();
// kpfDebug << "Parsing date `" << s << "'" << endl;
- QStringList l(QStringList::split(' ', s));
+ TQStringList l(TQStringList::split(' ', s));
switch (l.count())
{
@@ -173,7 +173,7 @@ namespace KPF
}
bool
- parseDateRFC1123(const QStringList & l, QDateTime & dt)
+ parseDateRFC1123(const TQStringList & l, TQDateTime & dt)
{
if ("GMT" != l[5])
return false;
@@ -183,7 +183,7 @@ namespace KPF
bool haveMonth = false;
uint month = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = monthList.begin(); it != monthList.end(); ++it)
{
@@ -201,7 +201,7 @@ namespace KPF
uint year(l[3].toUInt());
- QStringList timeTokenList(QStringList::split(':', l[4]));
+ TQStringList timeTokenList(TQStringList::split(':', l[4]));
if (3 != timeTokenList.count())
return false;
@@ -210,19 +210,19 @@ namespace KPF
uint minutes (timeTokenList[1].toUInt());
uint seconds (timeTokenList[2].toUInt());
- dt.setDate(QDate(year, month + 1, day));
- dt.setTime(QTime(hours, minutes, seconds));
+ dt.setDate(TQDate(year, month + 1, day));
+ dt.setTime(TQTime(hours, minutes, seconds));
return dt.isValid();
}
bool
- parseDateRFC850(const QStringList & l, QDateTime & dt)
+ parseDateRFC850(const TQStringList & l, TQDateTime & dt)
{
if ("GMT" != l[3])
return false;
- QStringList dateTokenList(QStringList::split('-', l[1]));
+ TQStringList dateTokenList(TQStringList::split('-', l[1]));
if (3 != dateTokenList.count())
return false;
@@ -232,7 +232,7 @@ namespace KPF
bool haveMonth = false;
uint month = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = monthList.begin(); it != monthList.end(); ++it)
{
@@ -255,7 +255,7 @@ namespace KPF
else if (year < 100)
year += 1900;
- QStringList timeTokenList(QStringList::split(':', l[2]));
+ TQStringList timeTokenList(TQStringList::split(':', l[2]));
if (3 != timeTokenList.count())
return false;
@@ -264,19 +264,19 @@ namespace KPF
uint minutes (timeTokenList[1].toUInt());
uint seconds (timeTokenList[2].toUInt());
- dt.setDate(QDate(year, month + 1, day));
- dt.setTime(QTime(hours, minutes, seconds));
+ dt.setDate(TQDate(year, month + 1, day));
+ dt.setTime(TQTime(hours, minutes, seconds));
return dt.isValid();
}
bool
- parseDateAscTime(const QStringList & l, QDateTime & dt)
+ parseDateAscTime(const TQStringList & l, TQDateTime & dt)
{
bool haveMonth = false;
uint month = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = monthList.begin(); it != monthList.end(); ++it)
{
@@ -294,7 +294,7 @@ namespace KPF
uint day(l[2].toUInt());
- QStringList timeTokenList(QStringList::split(':', l[3]));
+ TQStringList timeTokenList(TQStringList::split(':', l[3]));
if (3 != timeTokenList.count())
return false;
@@ -305,8 +305,8 @@ namespace KPF
uint year(l[4].toUInt());
- dt.setDate(QDate(year, month + 1, day));
- dt.setTime(QTime(hours, minutes, seconds));
+ dt.setDate(TQDate(year, month + 1, day));
+ dt.setTime(TQTime(hours, minutes, seconds));
return dt.isValid();
}
@@ -314,7 +314,7 @@ namespace KPF
QString
translatedResponseName(uint code)
{
- QString s;
+ TQString s;
switch (code)
{
@@ -362,7 +362,7 @@ namespace KPF
QString
responseName(uint code)
{
- QString s;
+ TQString s;
switch (code)
{
diff --git a/kpf/src/Utils.h b/kpf/src/Utils.h
index 6a81dfa8..12e55507 100644
--- a/kpf/src/Utils.h
+++ b/kpf/src/Utils.h
@@ -24,10 +24,10 @@
#ifndef KPF_UTILS_H
#define KPF_UTILS_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
/**
* Used to keep all parts of the kpf application out of the global namespace.
@@ -49,63 +49,63 @@ namespace KPF
/**
* @return the current date and time as an HTTP/1.1 compliant date string.
*/
- QString dateString();
+ TQString dateString();
/**
- * @return the passed QDateTime as an HTTP/1.1 compliant date string.
+ * @return the passed TQDateTime as an HTTP/1.1 compliant date string.
*/
- QString dateString(const QDateTime & dt);
+ TQString dateString(const TQDateTime & dt);
/**
- * Parse an HTTP/1.1 date to a QDateTime.
- * @param ret the QDateTime representation (result of parsing)
+ * Parse an HTTP/1.1 date to a TQDateTime.
+ * @param ret the TQDateTime representation (result of parsing)
* @return true if the date is an an acceptable format.
*/
- bool parseDate(const QString &, QDateTime & ret);
+ bool parseDate(const TQString &, TQDateTime & ret);
/**
- * Parse an RFC 1123 format date to a QDateTime. Usually called by
+ * Parse an RFC 1123 format date to a TQDateTime. Usually called by
* @ref parseDate.
*/
- bool parseDateRFC1123(const QStringList &, QDateTime &);
+ bool parseDateRFC1123(const TQStringList &, TQDateTime &);
/**
- * Parse an RFC 850 format date to a QDateTime. Usually called by
+ * Parse an RFC 850 format date to a TQDateTime. Usually called by
* @ref parseDate.
*/
- bool parseDateRFC850(const QStringList &, QDateTime &);
+ bool parseDateRFC850(const TQStringList &, TQDateTime &);
/**
- * Parse an asctime(3) format date to a QDateTime. Usually called by
+ * Parse an asctime(3) format date to a TQDateTime. Usually called by
* @ref parseDate.
*/
- bool parseDateAscTime(const QStringList &, QDateTime &);
+ bool parseDateAscTime(const TQStringList &, TQDateTime &);
/**
* @return i18n(HTTP response message for code)
*/
- QString translatedResponseName(uint code);
+ TQString translatedResponseName(uint code);
/**
* @return HTTP response message for code
*/
- QString responseName(uint code);
+ TQString responseName(uint code);
/**
- * @return the passed QDateTime converted GMT, honouring daylight
+ * @return the passed TQDateTime converted GMT, honouring daylight
* saving time if necessary.
*/
- QDateTime toGMT(const QDateTime &);
+ TQDateTime toGMT(const TQDateTime &);
/**
* Unquote hex quoted chars in string.
*/
- QString unquote(const QString &);
+ TQString unquote(const TQString &);
/**
* Quote naughty chars in %xx format.
*/
- QString quote(const QString &);
+ TQString quote(const TQString &);
} // End namespace KPF
diff --git a/kpf/src/WebServer.cpp b/kpf/src/WebServer.cpp
index 37301f09..b7fd944b 100644
--- a/kpf/src/WebServer.cpp
+++ b/kpf/src/WebServer.cpp
@@ -27,9 +27,9 @@
#include <unistd.h>
// Qt includes
-#include <qsocket.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
// KDE includes
#include "config.h"
@@ -81,13 +81,13 @@ namespace KPF
WebServerSocket * socket;
uint listenPort;
uint connectionLimit;
- QPtrList<Server> serverList;
- QString root;
- QString serverName;
- QTimer writeTimer;
- QTimer resetOutputTimer;
- QTimer bindTimer;
- QTimer backlogTimer;
+ TQPtrList<Server> serverList;
+ TQString root;
+ TQString serverName;
+ TQTimer writeTimer;
+ TQTimer resetOutputTimer;
+ TQTimer bindTimer;
+ TQTimer backlogTimer;
ulong bandwidthLimit;
ulong lastTotalOutput;
ulong totalOutput;
@@ -95,14 +95,14 @@ namespace KPF
bool paused;
bool followSymlinks;
bool customErrorMessages;
- QValueList<int> backlog;
+ TQValueList<int> backlog;
DNSSD::PublicService* service;
};
- WebServer::WebServer(const QString & root)
- : DCOPObject(QCString("WebServer_") + root.utf8()),
- QObject()
+ WebServer::WebServer(const TQString & root)
+ : DCOPObject(TQCString("WebServer_") + root.utf8()),
+ TQObject()
{
d = new Private;
@@ -110,10 +110,10 @@ namespace KPF
loadConfig();
publish();
- connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind()));
- connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite()));
- connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput()));
- connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog()));
+ connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind()));
+ connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite()));
+ connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput()));
+ connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog()));
d->bindTimer .start( 0, true);
d->resetOutputTimer .start(1000 / SamplesPerSecond, false);
@@ -122,15 +122,15 @@ namespace KPF
WebServer::WebServer
(
- const QString & root,
+ const TQString & root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString & serverName
+ const TQString & serverName
)
- : DCOPObject(QCString("WebServer_") + root.utf8()),
- QObject()
+ : DCOPObject(TQCString("WebServer_") + root.utf8()),
+ TQObject()
{
d = new Private;
@@ -144,10 +144,10 @@ namespace KPF
saveConfig();
publish();
- connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind()));
- connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite()));
- connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput()));
- connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog()));
+ connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind()));
+ connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite()));
+ connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput()));
+ connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog()));
d->bindTimer .start( 0, true);
d->resetOutputTimer .start(1000 / SamplesPerSecond, false);
@@ -164,7 +164,7 @@ namespace KPF
void WebServer::publish()
{
d->service = new DNSSD::PublicService(d->serverName,"_http._tcp",d->listenPort);
- connect(d->service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool)));
+ connect(d->service,TQT_SIGNAL(published(bool)),this,TQT_SLOT(wasPublished(bool)));
d->service->publishAsync();
}
@@ -195,7 +195,7 @@ namespace KPF
emit(contentionChange(d->portContention));
if (!d->portContention)
- connect(d->socket, SIGNAL(connection(int)), SLOT(slotConnection(int)));
+ connect(d->socket, TQT_SIGNAL(connection(int)), TQT_SLOT(slotConnection(int)));
else
{
@@ -277,18 +277,18 @@ namespace KPF
connect
(
s,
- SIGNAL(output(Server *, ulong)),
- SLOT(slotOutput(Server *, ulong))
+ TQT_SIGNAL(output(Server *, ulong)),
+ TQT_SLOT(slotOutput(Server *, ulong))
);
- connect(s, SIGNAL(finished(Server *)), SLOT(slotFinished(Server *)));
- connect(s, SIGNAL(request(Server *)), SIGNAL(request(Server *)));
- connect(s, SIGNAL(response(Server *)), SIGNAL(response(Server *)));
+ connect(s, TQT_SIGNAL(finished(Server *)), TQT_SLOT(slotFinished(Server *)));
+ connect(s, TQT_SIGNAL(request(Server *)), TQT_SIGNAL(request(Server *)));
+ connect(s, TQT_SIGNAL(response(Server *)), TQT_SIGNAL(response(Server *)));
d->serverList.append(s);
connect
- (s, SIGNAL(readyToWrite(Server *)), SLOT(slotReadyToWrite(Server *)));
+ (s, TQT_SIGNAL(readyToWrite(Server *)), TQT_SLOT(slotReadyToWrite(Server *)));
emit(connection(s));
@@ -311,7 +311,7 @@ namespace KPF
void
WebServer::killAllConnections()
{
- QPtrListIterator<Server> it(d->serverList);
+ TQPtrListIterator<Server> it(d->serverList);
for (; it.current(); ++it)
it.current()->cancel();
@@ -449,7 +449,7 @@ namespace KPF
if (d->serverList.isEmpty())
return;
- QPtrListIterator<Server> it(d->serverList);
+ TQPtrListIterator<Server> it(d->serverList);
for (; it.current(); ++it)
{
@@ -551,7 +551,7 @@ namespace KPF
return d->serverName;
}
void
- WebServer::setServerName(const QString& serverName)
+ WebServer::setServerName(const TQString& serverName)
{
d->serverName=serverName;
}
@@ -569,7 +569,7 @@ namespace KPF
ulong bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString& serverName
+ const TQString& serverName
)
{
d->listenPort = listenPort;
diff --git a/kpf/src/WebServer.h b/kpf/src/WebServer.h
index ae9d9383..4940e863 100644
--- a/kpf/src/WebServer.h
+++ b/kpf/src/WebServer.h
@@ -25,7 +25,7 @@
#define KPF_WEB_SERVER_H
#include <dcopobject.h>
-#include <qserversocket.h>
+#include <tqserversocket.h>
#include "Defaults.h"
#include "Request.h"
@@ -42,7 +42,7 @@ namespace KPF
* Maintains concurrent connection limit, using a backlog to queue incoming
* connections which cannot be served immediately.
*/
- class WebServer : public QObject, virtual public DCOPObject
+ class WebServer : public TQObject, virtual public DCOPObject
{
K_DCOP
Q_OBJECT
@@ -56,7 +56,7 @@ namespace KPF
* Server objects, which much ensure that only files from the root and
* its child directories are served.
*/
- WebServer(const QString & root);
+ WebServer(const TQString & root);
/**
* @param root Virtual root directory for servers. Passed to all created
@@ -65,12 +65,12 @@ namespace KPF
*/
WebServer
(
- const QString & root,
+ const TQString & root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString & serverName
+ const TQString & serverName
);
virtual ~WebServer();
@@ -87,12 +87,12 @@ namespace KPF
/**
* @return virtual root.
*/
- QString root();
+ TQString root();
/**
* @return server name
*/
- QString serverName();
+ TQString serverName();
/**
* @return amount of bytes that may be sent out per second, in total
@@ -143,7 +143,7 @@ namespace KPF
/**
* Set server name
*/
- void setServerName (const QString&);
+ void setServerName (const TQString&);
/**
* Set whether requests may include symbolic links in their path.
@@ -165,7 +165,7 @@ namespace KPF
ulong bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString& serverName
+ const TQString& serverName
);
/**
diff --git a/kpf/src/WebServerManager.cpp b/kpf/src/WebServerManager.cpp
index feec661d..08075fe8 100644
--- a/kpf/src/WebServerManager.cpp
+++ b/kpf/src/WebServerManager.cpp
@@ -54,7 +54,7 @@ namespace KPF
WebServerManager::WebServerManager()
: DCOPObject("WebServerManager"),
- QObject()
+ TQObject()
{
serverList_.setAutoDelete(true);
}
@@ -64,7 +64,7 @@ namespace KPF
// Empty.
}
- QPtrList<WebServer>
+ TQPtrList<WebServer>
WebServerManager::serverListLocal()
{
return serverList_;
@@ -73,12 +73,12 @@ namespace KPF
WebServer *
WebServerManager::createServerLocal
(
- const QString & root,
+ const TQString & root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString & serverName
+ const TQString & serverName
)
{
if (0 != server(root))
@@ -112,9 +112,9 @@ namespace KPF
config.setGroup("General");
- QStringList serverRootList = config.readListEntry("ServerRootList");
+ TQStringList serverRootList = config.readListEntry("ServerRootList");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = serverRootList.begin(); it != serverRootList.end(); ++it)
{
@@ -132,9 +132,9 @@ namespace KPF
config.setGroup("General");
- QPtrListIterator<WebServer> it(serverList_);
+ TQPtrListIterator<WebServer> it(serverList_);
- QStringList serverRootList;
+ TQStringList serverRootList;
for (; it.current(); ++it)
serverRootList << it.current()->root();
@@ -145,9 +145,9 @@ namespace KPF
}
WebServer *
- WebServerManager::server(const QString & root)
+ WebServerManager::server(const TQString & root)
{
- QPtrListIterator<WebServer> it(serverList_);
+ TQPtrListIterator<WebServer> it(serverList_);
for (; it.current(); ++it)
{
@@ -168,7 +168,7 @@ namespace KPF
}
bool
- WebServerManager::disableServer(const QString & root)
+ WebServerManager::disableServer(const TQString & root)
{
WebServer * existing = server(root);
@@ -186,12 +186,12 @@ namespace KPF
}
}
- QValueList<DCOPRef>
+ TQValueList<DCOPRef>
WebServerManager::serverList()
{
- QValueList<DCOPRef> l;
+ TQValueList<DCOPRef> l;
- QPtrListIterator<WebServer> it(serverList_);
+ TQPtrListIterator<WebServer> it(serverList_);
for (; it.current(); ++it)
l << DCOPRef(it.current());
@@ -202,12 +202,12 @@ namespace KPF
DCOPRef
WebServerManager::createServer
(
- QString root,
+ TQString root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- QString serverName
+ TQString serverName
)
{
WebServer * server = createServerLocal
@@ -228,7 +228,7 @@ namespace KPF
WebServer_stub webServer
(serverRef.app(), serverRef.object());
- QString root = webServer.root();
+ TQString root = webServer.root();
if (DCOPStub::CallFailed == webServer.status())
{
@@ -252,9 +252,9 @@ namespace KPF
}
bool
- WebServerManager::hasServer(const QString & s)
+ WebServerManager::hasServer(const TQString & s)
{
- QString root(s);
+ TQString root(s);
if ('/' == root.at(root.length() - 1))
{
@@ -270,7 +270,7 @@ namespace KPF
{
bool ok = true;
- for (QPtrListIterator<WebServer> it(serverList_); it.current(); ++it)
+ for (TQPtrListIterator<WebServer> it(serverList_); it.current(); ++it)
{
if (it.current()->listenPort() == port)
{
diff --git a/kpf/src/WebServerManager.h b/kpf/src/WebServerManager.h
index 6faa8a30..daa8db33 100644
--- a/kpf/src/WebServerManager.h
+++ b/kpf/src/WebServerManager.h
@@ -29,7 +29,7 @@
#include "Defaults.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace KPF
{
@@ -40,7 +40,7 @@ namespace KPF
* creating WebServer objects at startup (based on settings) and
* on demand. Destroys WebServer objects on demand.
*/
- class WebServerManager : public QObject, virtual public DCOPObject
+ class WebServerManager : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -58,7 +58,7 @@ namespace KPF
* @return a list of pointers to WebServer objects managed
* by this object.
*/
- QPtrList<WebServer> serverListLocal();
+ TQPtrList<WebServer> serverListLocal();
/**
* @return a pointer to a new WebServer object, with the root
@@ -67,18 +67,18 @@ namespace KPF
*/
WebServer * createServerLocal
(
- const QString & root,
+ const TQString & root,
uint listenPort,
uint bandwidthLimit = Config::DefaultBandwidthLimit,
uint connectionLimit = Config::DefaultConnectionLimit,
bool followSymlinks = Config::DefaultFollowSymlinks,
- const QString & serverName = QString::null
+ const TQString & serverName = TQString::null
);
/**
* Disables a WebServer and updates the configuration.
*/
- bool disableServer(const QString & root);
+ bool disableServer(const TQString & root);
/**
* Loads the configuration.
@@ -96,49 +96,49 @@ namespace KPF
/**
* Find a WebServer or return 0.
*/
- WebServer * server(const QString & root);
+ WebServer * server(const TQString & root);
/**
* Ask a server to re-read its configuration.
*/
- bool reconfigureServer(const QString & root);
+ bool reconfigureServer(const TQString & root);
/**
* Pause/unpause a server.
*/
- bool pauseServer(const QString & root, bool);
+ bool pauseServer(const TQString & root, bool);
/**
* @return whether the server is paused.
*/
- bool serverPaused(const QString & root);
+ bool serverPaused(const TQString & root);
/**
* Restart a server.
*/
- bool restartServer(const QString & root);
+ bool restartServer(const TQString & root);
/**
* @return if a Server object with the specified root exists. Handles
* the two possible variations of trailing slash, i.e. existing and not
* existing.
*/
- bool hasServer(const QString & root);
+ bool hasServer(const TQString & root);
uint nextFreePort() const;
k_dcop:
- QValueList<DCOPRef> serverList();
+ TQValueList<DCOPRef> serverList();
DCOPRef createServer
(
- QString root,
+ TQString root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- QString serverName
+ TQString serverName
);
void disableServer(DCOPRef);
@@ -164,7 +164,7 @@ namespace KPF
static WebServerManager * instance_;
void load();
- QPtrList<WebServer> serverList_;
+ TQPtrList<WebServer> serverList_;
};
} // End namespace KPF
diff --git a/kpf/src/WebServerSocket.cpp b/kpf/src/WebServerSocket.cpp
index 4dfa6626..fceaa6c1 100644
--- a/kpf/src/WebServerSocket.cpp
+++ b/kpf/src/WebServerSocket.cpp
@@ -27,7 +27,7 @@
namespace KPF
{
WebServerSocket::WebServerSocket(Q_UINT16 port, uint maxconn)
- : QServerSocket(port, maxconn, 0L)
+ : TQServerSocket(port, maxconn, 0L)
{
// Empty.
}
diff --git a/kpf/src/WebServerSocket.h b/kpf/src/WebServerSocket.h
index f45e0d70..bebd6a79 100644
--- a/kpf/src/WebServerSocket.h
+++ b/kpf/src/WebServerSocket.h
@@ -24,7 +24,7 @@
#ifndef WEB_SERVER_SOCKET_H
#define WEB_SERVER_SOCKET_H
-#include <qserversocket.h>
+#include <tqserversocket.h>
namespace KPF
{
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index e9dcdc4c..76c5f02e 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -29,7 +29,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -52,8 +52,8 @@ extern PPPData gpppdata;
// Helper functions
//
/////////////////////////////////////////////////////////////////////////////
-static QString timet2qstring(time_t t) {
- QString s;
+static TQString timet2qstring(time_t t) {
+ TQString s;
s.sprintf("%lu", t);
return s;
@@ -67,14 +67,14 @@ static QString timet2qstring(time_t t) {
// accounting is accomplished withing it's derived classes
//
/////////////////////////////////////////////////////////////////////////////
-AccountingBase::AccountingBase(QObject *parent) :
- QObject(parent),
+AccountingBase::AccountingBase(TQObject *parent) :
+ TQObject(parent),
_total(0),
_session(0)
{
- QDate dt = QDate::currentDate();
- LogFileName = QString("%1-%2.log")
- .arg(QDate::shortMonthName(dt.month()))
+ TQDate dt = TQDate::currentDate();
+ LogFileName = TQString("%1-%2.log")
+ .arg(TQDate::shortMonthName(dt.month()))
.arg(dt.year(), 4);
LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
@@ -101,8 +101,8 @@ double AccountingBase::session() const {
// set costs back to zero ( typically once per month)
-void AccountingBase::resetCosts(const QString & accountname){
- QString prev_account = gpppdata.accname();
+void AccountingBase::resetCosts(const TQString & accountname){
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
gpppdata.setTotalCosts("");
@@ -111,8 +111,8 @@ void AccountingBase::resetCosts(const QString & accountname){
}
-void AccountingBase::resetVolume(const QString & accountname){
- QString prev_account = gpppdata.accname();
+void AccountingBase::resetVolume(const TQString & accountname){
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
gpppdata.setTotalBytes(0);
@@ -121,10 +121,10 @@ void AccountingBase::resetVolume(const QString & accountname){
}
-void AccountingBase::logMessage(QString s, bool newline) {
+void AccountingBase::logMessage(TQString s, bool newline) {
int old_umask = umask(0077);
- QFile f(LogFileName);
+ TQFile f(LogFileName);
bool result = f.open(IO_ReadWrite);
if(result) {
@@ -140,7 +140,7 @@ void AccountingBase::logMessage(QString s, bool newline) {
f.at(f.size());
}
- QCString tmp = s.local8Bit();
+ TQCString tmp = s.local8Bit();
f.writeBlock(tmp, tmp.length());
f.close();
}
@@ -150,13 +150,13 @@ void AccountingBase::logMessage(QString s, bool newline) {
}
-QString AccountingBase::getCosts(const QString & accountname) {
- QString prev_account = gpppdata.accname();
+TQString AccountingBase::getCosts(const TQString & accountname) {
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
- QString val = gpppdata.totalCosts();
+ TQString val = gpppdata.totalCosts();
// ### currency from rule file
- // QString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
+ // TQString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
gpppdata.setAccount(prev_account);
@@ -167,7 +167,7 @@ QString AccountingBase::getCosts(const QString & accountname) {
bool AccountingBase::saveCosts() {
if(!_name.isNull() && _name.length() > 0) {
- QString val;
+ TQString val;
val.setNum(total());
gpppdata.setTotalCosts(val);
@@ -180,9 +180,9 @@ bool AccountingBase::saveCosts() {
bool AccountingBase::loadCosts() {
- QString val = gpppdata.totalCosts();
+ TQString val = gpppdata.totalCosts();
- if(val.isNull()) // QString will segfault if isnull and toDouble called
+ if(val.isNull()) // TQString will segfault if isnull and toDouble called
_total = 0.0;
else {
bool ok;
@@ -195,10 +195,10 @@ bool AccountingBase::loadCosts() {
}
-QString AccountingBase::getAccountingFile(const QString &accountname) {
- QString f = "kppp/Rules/";
+TQString AccountingBase::getAccountingFile(const TQString &accountname) {
+ TQString f = "kppp/Rules/";
f += accountname;
- QString d = locate("data", f);
+ TQString d = locate("data", f);
if(d.isNull())
return "";
@@ -212,7 +212,7 @@ QString AccountingBase::getAccountingFile(const QString &accountname) {
// Accounting class for ruleset files
//
/////////////////////////////////////////////////////////////////////////////
-Accounting::Accounting(QObject *parent, PPPStats *st) :
+Accounting::Accounting(TQObject *parent, PPPStats *st) :
AccountingBase(parent),
acct_timer_id(0),
update_timer_id(0),
@@ -226,14 +226,14 @@ bool Accounting::running() const {
}
-void Accounting::timerEvent(QTimerEvent *t) {
+void Accounting::timerEvent(TQTimerEvent *t) {
if(t->timerId() == acct_timer_id) {
double newCosts;
double newLen;
double connect_time = difftime(time(0), start_time);
- rules.getActiveRule(QDateTime::currentDateTime(), connect_time, newCosts, newLen);
+ rules.getActiveRule(TQDateTime::currentDateTime(), connect_time, newCosts, newLen);
if(newLen < 1) { // changed to < 1
slotStop();
return; // no default rule found
@@ -279,13 +279,13 @@ void Accounting::slotStart() {
_lastcosts = 0.0;
_lastlen = 0.0;
_session = rules.perConnectionCosts();
- rules.setStartTime(QDateTime::currentDateTime());
+ rules.setStartTime(TQDateTime::currentDateTime());
acct_timer_id = startTimer(1);
if(UPDATE_TIME > 0)
update_timer_id = startTimer(UPDATE_TIME);
start_time = time(0);
- QString s;
+ TQString s;
s = timet2qstring(start_time);
s += ":";
s += gpppdata.accname();
@@ -305,7 +305,7 @@ void Accounting::slotStop() {
acct_timer_id = 0;
update_timer_id = 0;
- QString s;
+ TQString s;
s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
timet2qstring(time(0)).utf8().data(),
session(),
@@ -319,16 +319,16 @@ void Accounting::slotStop() {
}
-bool Accounting::loadRuleSet(const QString & name) {
+bool Accounting::loadRuleSet(const TQString & name) {
if (name.isEmpty()) {
rules.load(""); // delete old rules
return TRUE;
}
- QString d = AccountingBase::getAccountingFile(name);
+ TQString d = AccountingBase::getAccountingFile(name);
- QFileInfo fg(d);
+ TQFileInfo fg(d);
if(fg.exists()) {
int ret = rules.load(d);
_name = rules.name();
@@ -358,7 +358,7 @@ double Accounting::session() const {
-ExecutableAccounting::ExecutableAccounting(PPPStats *st, QObject *parent) :
+ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *parent) :
AccountingBase(parent),
proc(0),
stats(st)
@@ -371,19 +371,19 @@ bool ExecutableAccounting::running() const {
}
-bool ExecutableAccounting::loadRuleSet(const QString &) {
- QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
- return (access(QFile::encodeName(s), X_OK) == 0);
+bool ExecutableAccounting::loadRuleSet(const TQString &) {
+ TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ return (access(TQFile::encodeName(s), X_OK) == 0);
}
void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*buflen*/) {
- QString field[8];
+ TQString field[8];
int nFields = 0;
int pos, last_pos = 0;
// split string
- QString b(buffer);
+ TQString b(buffer);
pos = b.find(':');
while(pos != -1 && nFields < 8) {
field[nFields++] = b.mid(last_pos, pos-last_pos);
@@ -394,8 +394,8 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
for(int i = 0; i < nFields;i++)
fprintf(stderr, "FIELD[%d] = %s\n", i, field[i].local8Bit().data());
- QString __total, __session;
- QString s(buffer);
+ TQString __total, __session;
+ TQString s(buffer);
int del1, del2, del3;
del1 = s.find(':');
@@ -433,14 +433,14 @@ void ExecutableAccounting::slotStart() {
slotStop(); // just to make sure
loadCosts();
- QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
proc = new KProcess;
- QString s_total;
+ TQString s_total;
s_total.sprintf("%0.8f", total());
*proc << s << s_total;
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, SLOT(gotData(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, TQT_SLOT(gotData(KProcess *, char *, int)));
proc->start();
time_t start_time = time(0);
@@ -460,7 +460,7 @@ void ExecutableAccounting::slotStop() {
delete proc;
proc = 0;
- QString s;
+ TQString s;
s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
timet2qstring(time(0)).local8Bit().data(),
session(),
diff --git a/kppp/accounting.h b/kppp/accounting.h
index 303d5c22..4fe65591 100644
--- a/kppp/accounting.h
+++ b/kppp/accounting.h
@@ -26,7 +26,7 @@
#ifndef __ACCOUNTING__H__
#define __ACCOUNTING__H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kprocess.h>
#include "ruleset.h"
@@ -37,40 +37,40 @@ class PPPStats;
// Accounting base class
//
/////////////////////////////////////////////////////////////////////////////
-class AccountingBase : public QObject {
+class AccountingBase : public TQObject {
Q_OBJECT
public:
- AccountingBase(QObject *parent);
+ AccountingBase(TQObject *parent);
virtual ~AccountingBase();
virtual double total() const;
virtual double session() const;
virtual bool running() const { return false; };
- virtual bool loadRuleSet(const QString & name) = 0;
+ virtual bool loadRuleSet(const TQString & name) = 0;
public slots:
virtual void slotStart() {};
virtual void slotStop() {};
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
protected:
- void logMessage(QString, bool = FALSE);
+ void logMessage(TQString, bool = FALSE);
bool saveCosts();
bool loadCosts();
- QString LogFileName;
+ TQString LogFileName;
double _total, _session;
- QString _name;
+ TQString _name;
// static members
public:
- static void resetCosts(const QString & accountname);
- static void resetVolume(const QString & accountname);
- static QString getCosts(const QString & accountname);
- static QString getAccountingFile(const QString &accountname);
+ static void resetCosts(const TQString & accountname);
+ static void resetVolume(const TQString & accountname);
+ static TQString getCosts(const TQString & accountname);
+ static TQString getAccountingFile(const TQString &accountname);
};
@@ -82,23 +82,23 @@ public:
class Accounting : public AccountingBase {
Q_OBJECT
public:
- Accounting(QObject *parent, PPPStats *st);
+ Accounting(TQObject *parent, PPPStats *st);
virtual double total() const;
virtual double session() const;
- virtual bool loadRuleSet(const QString & name);
+ virtual bool loadRuleSet(const TQString & name);
virtual bool running() const;
private:
- virtual void timerEvent(QTimerEvent *t);
+ virtual void timerEvent(TQTimerEvent *t);
public slots:
virtual void slotStart();
virtual void slotStop();
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
private:
int acct_timer_id;
@@ -119,9 +119,9 @@ private:
class ExecutableAccounting : public AccountingBase {
Q_OBJECT
public:
- ExecutableAccounting(PPPStats *st, QObject *parent = 0);
+ ExecutableAccounting(PPPStats *st, TQObject *parent = 0);
- virtual bool loadRuleSet(const QString & );
+ virtual bool loadRuleSet(const TQString & );
virtual bool running() const;
public slots:
@@ -132,12 +132,12 @@ private slots:
void gotData(KProcess *proc, char *buffer, int buflen);
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
private:
KProcess *proc;
- QString currency;
- QString provider;
+ TQString currency;
+ TQString provider;
PPPStats *stats;
};
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
index 25023ad4..d374e6c6 100644
--- a/kppp/accounts.cpp
+++ b/kppp/accounts.cpp
@@ -24,12 +24,12 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qtabdialog.h>
-#include <qwhatsthis.h>
-#include <qmessagebox.h>
+#include <tqlayout.h>
+#include <tqtabdialog.h>
+#include <tqwhatsthis.h>
+#include <tqmessagebox.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -39,7 +39,7 @@
#include <kwin.h>
#include <kdialogbase.h>
#include <kstdguiitem.h>
-#include <qvgroupbox.h>
+#include <tqvgroupbox.h>
#include <errno.h>
@@ -51,29 +51,29 @@
void parseargs(char* buf, char** args);
-AccountWidget::AccountWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+AccountWidget::AccountWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
int min = 0;
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
// add a hbox
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addLayout(l11);
- accountlist_l = new QListBox(parent);
+ accountlist_l = new TQListBox(parent);
accountlist_l->setMinimumSize(160, 128);
- connect(accountlist_l, SIGNAL(highlighted(int)),
- this, SLOT(slotListBoxSelect(int)));
- connect(accountlist_l, SIGNAL(selected(int)),
- this, SLOT(editaccount()));
+ connect(accountlist_l, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotListBoxSelect(int)));
+ connect(accountlist_l, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(editaccount()));
l11->addWidget(accountlist_l, 10);
- QVBoxLayout *l111 = new QVBoxLayout;
+ TQVBoxLayout *l111 = new QVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new QPushButton(i18n("&Edit..."), parent);
- connect(edit_b, SIGNAL(clicked()), SLOT(editaccount()));
- QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+ edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editaccount()));
+ TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
min = edit_b->sizeHint().width();
min = QMAX(70,min);
@@ -81,60 +81,60 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
l111->addWidget(edit_b);
- new_b = new QPushButton(i18n("&New..."), parent);
- connect(new_b, SIGNAL(clicked()), SLOT(newaccount()));
+ new_b = new TQPushButton(i18n("&New..."), parent);
+ connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newaccount()));
l111->addWidget(new_b);
- QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new QPushButton(i18n("Co&py"), parent);
- connect(copy_b, SIGNAL(clicked()), SLOT(copyaccount()));
+ copy_b = new TQPushButton(i18n("Co&py"), parent);
+ connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copyaccount()));
l111->addWidget(copy_b);
- QWhatsThis::add(copy_b,
+ TQWhatsThis::add(copy_b,
i18n("Makes a copy of the selected account. All\n"
"settings of the selected account are copied\n"
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new QPushButton(i18n("De&lete"), parent);
- connect(delete_b, SIGNAL(clicked()), SLOT(deleteaccount()));
+ delete_b = new TQPushButton(i18n("De&lete"), parent);
+ connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deleteaccount()));
l111->addWidget(delete_b);
- QWhatsThis::add(delete_b,
+ TQWhatsThis::add(delete_b,
i18n("<p>Deletes the selected account\n\n"
"<font color=\"red\"><b>Use with care!</b></font>"));
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
l1->addStretch(1);
l1->addLayout(l12);
- QVBoxLayout *l121 = new QVBoxLayout;
+ TQVBoxLayout *l121 = new QVBoxLayout;
l12->addLayout(l121);
l121->addStretch(1);
- costlabel = new QLabel(i18n("Phone costs:"), parent);
+ costlabel = new TQLabel(i18n("Phone costs:"), parent);
costlabel->setEnabled(FALSE);
l121->addWidget(costlabel);
- costedit = new QLineEdit(parent);
- costedit->setFocusPolicy(QWidget::NoFocus);
+ costedit = new TQLineEdit(parent);
+ costedit->setFocusPolicy(TQWidget::NoFocus);
costedit->setFixedHeight(costedit->sizeHint().height());
costedit->setEnabled(FALSE);
l121->addWidget(costedit);
l121->addStretch(1);
- QString tmp = i18n("<p>This shows the accumulated phone costs\n"
+ TQString tmp = i18n("<p>This shows the accumulated phone costs\n"
"for the selected account.\n"
"\n"
"<b>Important</b>: If you have more than one \n"
"account - beware, this is <b>NOT</b> the sum \n"
"of the phone costs of all your accounts!");
- QWhatsThis::add(costlabel, tmp);
- QWhatsThis::add(costedit, tmp);
+ TQWhatsThis::add(costlabel, tmp);
+ TQWhatsThis::add(costedit, tmp);
- vollabel = new QLabel(i18n("Volume:"), parent);
+ vollabel = new TQLabel(i18n("Volume:"), parent);
vollabel->setEnabled(FALSE);
l121->addWidget(vollabel);
- voledit = new QLineEdit(parent,"voledit");
- voledit->setFocusPolicy(QWidget::NoFocus);
+ voledit = new TQLineEdit(parent,"voledit");
+ voledit->setFocusPolicy(TQWidget::NoFocus);
voledit->setFixedHeight(voledit->sizeHint().height());
voledit->setEnabled(FALSE);
l121->addWidget(voledit);
@@ -145,23 +145,23 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
"\n"
"<a href=\"#volaccounting\">More on volume accounting</a>");
- QWhatsThis::add(vollabel,tmp);
- QWhatsThis::add(voledit, tmp);
+ TQWhatsThis::add(vollabel,tmp);
+ TQWhatsThis::add(voledit, tmp);
- QVBoxLayout *l122 = new QVBoxLayout;
+ TQVBoxLayout *l122 = new QVBoxLayout;
l12->addStretch(1);
l12->addLayout(l122);
l122->addStretch(1);
- reset = new QPushButton(i18n("&Reset..."), parent);
+ reset = new TQPushButton(i18n("&Reset..."), parent);
reset->setEnabled(FALSE);
- connect(reset, SIGNAL(clicked()),
- this, SLOT(resetClicked()));
+ connect(reset, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(resetClicked()));
l122->addWidget(reset);
- log = new QPushButton(i18n("&View Logs"), parent);
- connect(log, SIGNAL(clicked()),
- this, SLOT(viewLogClicked()));
+ log = new TQPushButton(i18n("&View Logs"), parent);
+ connect(log, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(viewLogClicked()));
l122->addWidget(log);
l122->addStretch(1);
@@ -185,7 +185,7 @@ void AccountWidget::slotListBoxSelect(int idx) {
edit_b->setEnabled((bool)(idx != -1));
copy_b->setEnabled((bool)(idx != -1));
if(idx!=-1) {
- QString account = gpppdata.accname();
+ TQString account = gpppdata.accname();
gpppdata.setAccountByIndex(accountlist_l->currentItem());
reset->setEnabled(TRUE);
costlabel->setEnabled(TRUE);
@@ -211,7 +211,7 @@ void AccountWidget::slotListBoxSelect(int idx) {
void AccountWidget::viewLogClicked(){
- QApplication::flushX();
+ TQApplication::flushX();
if(fork() == 0) {
if (setgid(getgid()) < 0 && errno != EPERM)
_exit(2);
@@ -249,7 +249,7 @@ void AccountWidget::editaccount() {
int result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
accountlist_l->changeItem(gpppdata.accname(),accountlist_l->currentItem());
emit resetaccounts();
gpppdata.save();
@@ -291,7 +291,7 @@ void AccountWidget::newaccount() {
return;
}
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
accountlist_l->insertItem(gpppdata.accname());
accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()),
true);
@@ -323,7 +323,7 @@ void AccountWidget::copyaccount() {
void AccountWidget::deleteaccount() {
- QString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
+ TQString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
.arg(accountlist_l->text(accountlist_l->currentItem()));
if(KMessageBox::warningYesNo(this, s, i18n("Confirm"), KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::cancel()) != KMessageBox::Yes)
@@ -341,7 +341,7 @@ void AccountWidget::deleteaccount() {
int AccountWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -351,7 +351,7 @@ int AccountWidget::doTab(){
tabWindow->setCaption(i18n("New Account"));
isnewaccount = true;
} else {
- QString tit = i18n("Edit Account: ");
+ TQString tit = i18n("Edit Account: ");
tit += gpppdata.accname();
tabWindow->setCaption(tit);
isnewaccount = false;
@@ -372,7 +372,7 @@ int AccountWidget::doTab(){
result = tabWindow->exec();
ok = true;
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
if (script_w->check()) {
if(dial_w->save()) {
ip_w->save();
@@ -400,10 +400,10 @@ int AccountWidget::doTab(){
}
-QString AccountWidget::prettyPrintVolume(unsigned int n) {
+TQString AccountWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -415,7 +415,7 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
@@ -426,25 +426,25 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) {
// Queries the user what to reset: costs, volume or both
//
/////////////////////////////////////////////////////////////////////////////
-QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) {
+QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
setCaption(i18n("Reset Accounting"));
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QVGroupBox *f = new QVGroupBox(i18n("What to Reset"), this);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQVGroupBox *f = new TQVGroupBox(i18n("What to Reset"), this);
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
- costs = new QCheckBox(i18n("Reset the accumulated p&hone costs"), f);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
+ costs = new TQCheckBox(i18n("Reset the accumulated p&hone costs"), f);
costs->setChecked(true);
l1->addWidget(costs);
- QWhatsThis::add(costs, i18n("Check this to set the phone costs\n"
+ TQWhatsThis::add(costs, i18n("Check this to set the phone costs\n"
"to zero. Typically you will want to\n"
"do this once a month."));
- volume = new QCheckBox(i18n("Reset &volume accounting"), f);
+ volume = new TQCheckBox(i18n("Reset &volume accounting"), f);
volume->setChecked(true);
l1->addWidget(volume);
- QWhatsThis::add(volume, i18n("Check this to set the volume accounting\n"
+ TQWhatsThis::add(volume, i18n("Check this to set the volume accounting\n"
"to zero. Typically you will want to do this\n"
"once a month."));
@@ -457,14 +457,14 @@ QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) {
KButtonBox *bbox = new KButtonBox(this);
bbox->addStretch(1);
- QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bbox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+ TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
- connect(ok, SIGNAL(clicked()),
- this, SLOT(accepted()));
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
+ connect(ok, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accepted()));
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
bbox->layout();
tl->addWidget(bbox);
diff --git a/kppp/accounts.h b/kppp/accounts.h
index bb04478b..155c1658 100644
--- a/kppp/accounts.h
+++ b/kppp/accounts.h
@@ -27,9 +27,9 @@
#ifndef _ACCOUNTS_H_
#define _ACCOUNTS_H_
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include "acctselect.h"
class KDialogBase;
@@ -42,10 +42,10 @@ class IPWidget;
class DNSWidget;
class GatewayWidget;
-class AccountWidget : public QWidget {
+class AccountWidget : public TQWidget {
Q_OBJECT
public:
- AccountWidget( QWidget *parent=0, const char *name=0 );
+ AccountWidget( TQWidget *parent=0, const char *name=0 );
~AccountWidget() {}
private slots:
@@ -62,11 +62,11 @@ private:
signals:
void resetaccounts();
- void resetCosts(const QString &);
- void resetVolume(const QString &);
+ void resetCosts(const TQString &);
+ void resetVolume(const TQString &);
private:
- QString prettyPrintVolume(unsigned int);
+ TQString prettyPrintVolume(unsigned int);
KDialogBase *tabWindow;
DialWidget *dial_w;
@@ -76,25 +76,25 @@ private:
GatewayWidget *gateway_w;
ScriptWidget *script_w;
- QPushButton *reset;
- QPushButton *log;
- QLabel *costlabel;
- QLineEdit *costedit;
- QLabel *vollabel;
- QLineEdit *voledit;
-
- QListBox *accountlist_l;
- QPushButton *edit_b;
- QPushButton *copy_b;
- QPushButton *new_b;
- QPushButton *delete_b;
+ TQPushButton *reset;
+ TQPushButton *log;
+ TQLabel *costlabel;
+ TQLineEdit *costedit;
+ TQLabel *vollabel;
+ TQLineEdit *voledit;
+
+ TQListBox *accountlist_l;
+ TQPushButton *edit_b;
+ TQPushButton *copy_b;
+ TQPushButton *new_b;
+ TQPushButton *delete_b;
};
-class QueryReset : public QDialog {
+class QueryReset : public TQDialog {
Q_OBJECT
public:
- QueryReset(QWidget *parent);
+ QueryReset(TQWidget *parent);
enum {COSTS=1, VOLUME=2};
@@ -102,7 +102,7 @@ private slots:
void accepted();
private:
- QCheckBox *costs, *volume;
+ TQCheckBox *costs, *volume;
};
#endif
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
index 7c22e030..56a28cb4 100644
--- a/kppp/acctselect.cpp
+++ b/kppp/acctselect.cpp
@@ -33,15 +33,15 @@
//---------------------------------------------------------------------------
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kurllabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qwmatrix.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqwmatrix.h>
+#include <tqcheckbox.h>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -52,38 +52,38 @@
#include "pppdata.h"
-AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, const char *name)
- : QWidget(parent, name),
+AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, const char *name)
+ : TQWidget(parent, name),
isnewaccount(_isnewaccount)
{
- QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- enable_accounting = new QCheckBox(i18n("&Enable accounting"), parent);
+ enable_accounting = new TQCheckBox(i18n("&Enable accounting"), parent);
l1->addWidget(enable_accounting, 1);
- connect(enable_accounting, SIGNAL(toggled(bool)), this, SLOT(enableItems(bool)));
+ connect(enable_accounting, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableItems(bool)));
// insert the tree widget
- tl = new QListView(parent, "treewidget");
+ tl = new TQListView(parent, "treewidget");
- connect(tl, SIGNAL(selectionChanged(QListViewItem*)), this,
- SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(tl, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
tl->setMinimumSize(220, 200);
l1->addWidget(tl, 1);
KURLLabel *up = new KURLLabel(parent);
up->setText(i18n("Check for rule updates"));
up->setURL("http://developer.kde.org/~kppp/rules.html");
- connect(up, SIGNAL(leftClickedURL(const QString&)), SLOT(openURL(const QString&)));
+ connect(up, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(const TQString&)));
l1->addWidget(up, 1);
// label to display the currently selected ruleset
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addSpacing(10);
l1->addLayout(l11);
- QLabel *lsel = new QLabel(i18n("Selected:"), parent);
- selected = new QLabel(parent);
- selected->setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
+ TQLabel *lsel = new TQLabel(i18n("Selected:"), parent);
+ selected = new TQLabel(parent);
+ selected->setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel);
selected->setLineWidth(1);
selected->setFixedHeight(selected->sizeHint().height() + 16);
l11->addWidget(lsel, 0);
@@ -92,10 +92,10 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// volume accounting
l1->addStretch(1);
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
l1->addLayout(l12);
- QLabel *usevol_l = new QLabel(i18n("Volume accounting:"), parent);
- use_vol = new QComboBox(parent);
+ TQLabel *usevol_l = new TQLabel(i18n("Volume accounting:"), parent);
+ use_vol = new TQComboBox(parent);
use_vol->insertItem(i18n("No Accounting"), 0);
use_vol->insertItem(i18n("Bytes In"), 1);
use_vol->insertItem(i18n("Bytes Out"), 2);
@@ -109,7 +109,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// scale the pixmap
if(pmfolder.width() > 0) {
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(16.0/pmfolder.width(), 16.0/pmfolder.width());
pmfolder = pmfolder.xForm(wm);
}
@@ -119,7 +119,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// scale the pixmap
if(pmfile.width() > 0) {
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(16.0/pmfile.width(), 16.0/pmfile.width());
pmfile = pmfile.xForm(wm);
}
@@ -132,7 +132,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
}
-QString AccountingSelector::fileNameToName(QString s) {
+TQString AccountingSelector::fileNameToName(TQString s) {
s.replace('_', " ");
return KURL::decode_string(s);
@@ -140,16 +140,16 @@ QString AccountingSelector::fileNameToName(QString s) {
}
-QString AccountingSelector::nameToFileName(QString s) {
+TQString AccountingSelector::nameToFileName(TQString s) {
s.replace(' ', "_");
return s;
}
-QListViewItem *AccountingSelector::findByName(QString name)
+TQListViewItem *AccountingSelector::findByName(TQString name)
{
- QListViewItem *ch = tl->firstChild();
+ TQListViewItem *ch = tl->firstChild();
while(ch) {
if(ch->text(0) == name)
return ch;
@@ -159,9 +159,9 @@ QListViewItem *AccountingSelector::findByName(QString name)
}
-void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
+void AccountingSelector::insertDir(TQDir d, TQListViewItem *root) {
- QListViewItem* tli = 0;
+ TQListViewItem* tli = 0;
// sanity check
if(!d.exists() || !d.isReadable())
@@ -170,45 +170,45 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
// set up filter
d.setNameFilter("*.rst");
- d.setFilter(QDir::Files);
- d.setSorting(QDir::Name);
+ d.setFilter(TQDir::Files);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the list and insert into the widget
while((fi = it.current())) {
++it;
- QString samename = fi->fileName();
+ TQString samename = fi->fileName();
- QListViewItem *i = findByName(samename);
+ TQListViewItem *i = findByName(samename);
// skip this file if already in tree
if(i)
continue;
// check if this is the file we should mark
- QString name = fileNameToName(fi->baseName(true));
+ TQString name = fileNameToName(fi->baseName(true));
if(root)
- tli = new QListViewItem(root, name);
+ tli = new TQListViewItem(root, name);
else
- tli = new QListViewItem(tl, name);
+ tli = new TQListViewItem(tl, name);
tli->setPixmap(0, pmfile);
// check if this is the item we are searching for
// (only in "Edit"-mode, not in "New"-mode
if(!isnewaccount && !edit_s.isEmpty() &&
- (edit_s == QString(fi->filePath()).right(edit_s.length()))) {
+ (edit_s == TQString(fi->filePath()).right(edit_s.length()))) {
edit_item = tli;
}
}
// set up a filter for the directories
- d.setFilter(QDir::Dirs);
+ d.setFilter(TQDir::Dirs);
d.setNameFilter("*");
const QFileInfoList *dlist = d.entryInfoList();
QFileInfoListIterator dit(*dlist);
@@ -217,25 +217,25 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
// skip "." and ".." directories
if(fi->fileName().left(1) != ".") {
// convert to human-readable name
- QString name = fileNameToName(fi->fileName());
+ TQString name = fileNameToName(fi->fileName());
// if the tree already has an item with this name,
// skip creation and use this one, otherwise
// create a new entry
- QListViewItem *i = findByName(name);
+ TQListViewItem *i = findByName(name);
if(!i) {
- QListViewItem* item;
+ TQListViewItem* item;
if(root)
- item = new QListViewItem(root, name);
+ item = new TQListViewItem(root, name);
else
- item = new QListViewItem(tl, name);
+ item = new TQListViewItem(tl, name);
item->setPixmap(0, pmfolder);
- insertDir(QDir(fi->filePath()), item);
+ insertDir(TQDir(fi->filePath()), item);
} else
- insertDir(QDir(fi->filePath()), i);
+ insertDir(TQDir(fi->filePath()), i);
}
++dit;
}
@@ -256,10 +256,10 @@ void AccountingSelector::setupTreeWidget() {
tl->setRootIsDecorated(true);
// look in ~/.kde/share/apps/kppp/Rules and $KDEDIR/share/apps/kppp/Rules
- QStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
- for (QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
+ for (TQStringList::ConstIterator it = dirs.begin();
it != dirs.end(); it++) {
- insertDir(QDir((*it) + "Rules"), 0);
+ insertDir(TQDir((*it) + "Rules"), 0);
}
// when mode is "Edit", then hightlight the
@@ -281,8 +281,8 @@ void AccountingSelector::enableItems(bool enabled) {
if(!enabled || (!tl->currentItem()))
selected->setText(i18n("(none)"));
else {
- QListViewItem* i = tl->currentItem();
- QString s;
+ TQListViewItem* i = tl->currentItem();
+ TQString s;
while(i) {
s = "/" + i->text(0) + s;
i = i->parent();
@@ -295,7 +295,7 @@ void AccountingSelector::enableItems(bool enabled) {
}
-void AccountingSelector::slotSelectionChanged(QListViewItem* i) {
+void AccountingSelector::slotSelectionChanged(TQListViewItem* i) {
if(!i || i->childCount())
return;
@@ -322,7 +322,7 @@ bool AccountingSelector::save() {
return true;
}
-void AccountingSelector::openURL(const QString &url) {
+void AccountingSelector::openURL(const TQString &url) {
new KRun( KURL( url ) );
}
diff --git a/kppp/acctselect.h b/kppp/acctselect.h
index 42730dd3..7a4b319a 100644
--- a/kppp/acctselect.h
+++ b/kppp/acctselect.h
@@ -35,9 +35,9 @@
#ifndef __ACCTSELECT__H__
#define __ACCTSELECT__H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
class QCheckBox;
class QComboBox;
@@ -45,35 +45,35 @@ class QLabel;
class QListView;
class QListViewItem;
-class AccountingSelector : public QWidget {
+class AccountingSelector : public TQWidget {
Q_OBJECT
public:
- AccountingSelector(QWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
+ AccountingSelector(TQWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
~AccountingSelector() {}
bool save();
private:
- QListViewItem *findByName(QString name);
+ TQListViewItem *findByName(TQString name);
void setupTreeWidget();
- void insertDir(QDir, QListViewItem * = 0);
- QString fileNameToName(QString);
- QString nameToFileName(QString);
+ void insertDir(TQDir, TQListViewItem * = 0);
+ TQString fileNameToName(TQString);
+ TQString nameToFileName(TQString);
private slots:
- void openURL(const QString &);
+ void openURL(const TQString &);
void enableItems(bool);
- void slotSelectionChanged(QListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
private:
- QCheckBox *enable_accounting;
- QListView *tl;
- QComboBox *use_vol;
- QPixmap pmfolder, pmfile;
- QLabel *selected;
+ TQCheckBox *enable_accounting;
+ TQListView *tl;
+ TQComboBox *use_vol;
+ TQPixmap pmfolder, pmfile;
+ TQLabel *selected;
- QListViewItem *edit_item;
- QString edit_s;
+ TQListViewItem *edit_item;
+ TQString edit_s;
bool isnewaccount;
};
diff --git a/kppp/connect.cpp b/kppp/connect.cpp
index 01e615cc..0ab7f662 100644
--- a/kppp/connect.cpp
+++ b/kppp/connect.cpp
@@ -26,8 +26,8 @@
#include <config.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -74,12 +74,12 @@
extern KPPPWidget *p_kppp;
-QString old_hostname;
+TQString old_hostname;
bool modified_hostname;
-ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
- : QWidget(parent, name),
+ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st)
+ : TQWidget(parent, name),
// initialize some important variables
myreadbuffer(""),
main_timer_ID(0),
@@ -100,15 +100,15 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
{
modified_hostname = false;
- QVBoxLayout *tl = new QVBoxLayout(this, 8, 10);
- QString tit = i18n("Connecting to: ");
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 8, 10);
+ TQString tit = i18n("Connecting to: ");
setCaption(tit);
- QHBoxLayout *l0 = new QHBoxLayout(10);
+ TQHBoxLayout *l0 = new TQHBoxLayout(10);
tl->addLayout(l0);
l0->addSpacing(10);
- messg = new QLabel(this, "messg");
- messg->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ messg = new TQLabel(this, "messg");
+ messg->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
messg->setAlignment(AlignCenter);
messg->setText(i18n("Unable to create modem lock file."));
messg->setMinimumHeight(messg->sizeHint().height() + 5);
@@ -119,17 +119,17 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
l0->addWidget(messg);
l0->addSpacing(10);
- QHBoxLayout *l1 = new QHBoxLayout(10);
+ TQHBoxLayout *l1 = new TQHBoxLayout(10);
tl->addLayout(l1);
l1->addStretch(1);
- debug = new QPushButton(i18n("&Log"), this);
+ debug = new TQPushButton(i18n("&Log"), this);
debug->setToggleButton(true);
- connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow()));
+ connect(debug, TQT_SIGNAL(clicked()), TQT_SIGNAL(toggleDebugWindow()));
cancel = new KPushButton(KStdGuiItem::cancel(), this);
cancel->setFocus();
- connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
int maxw = QMAX(cancel->sizeHint().width(),
debug->sizeHint().width());
@@ -142,25 +142,25 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
setFixedSize(sizeHint());
- pausetimer = new QTimer(this);
- connect(pausetimer, SIGNAL(timeout()), SLOT(pause()));
+ pausetimer = new TQTimer(this);
+ connect(pausetimer, TQT_SIGNAL(timeout()), TQT_SLOT(pause()));
kapp->processEvents();
- timeout_timer = new QTimer(this);
- connect(timeout_timer, SIGNAL(timeout()), SLOT(script_timed_out()));
+ timeout_timer = new TQTimer(this);
+ connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(script_timed_out()));
- inittimer = new QTimer(this);
- connect(inittimer, SIGNAL(timeout()), SLOT(init()));
+ inittimer = new TQTimer(this);
+ connect(inittimer, TQT_SIGNAL(timeout()), TQT_SLOT(init()));
- if_timeout_timer = new QTimer(this);
- connect(if_timeout_timer, SIGNAL(timeout()), SLOT(if_waiting_timed_out()));
+ if_timeout_timer = new TQTimer(this);
+ connect(if_timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_timed_out()));
- connect(this,SIGNAL(if_waiting_signal()),this,SLOT(if_waiting_slot()));
+ connect(this,TQT_SIGNAL(if_waiting_signal()),this,TQT_SLOT(if_waiting_slot()));
prompt = new PWEntry( this, "pw" );
- if_timer = new QTimer(this);
- connect(if_timer,SIGNAL(timeout()), SLOT(if_waiting_slot()));
+ if_timer = new TQTimer(this);
+ connect(if_timer,TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_slot()));
}
@@ -210,13 +210,13 @@ void ConnectWidget::init() {
comlist = &gpppdata.scriptType();
arglist = &gpppdata.script();
- QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
setCaption(tit);
kapp->processEvents();
// signal other applications that we are about to get connected
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", TQByteArray());
// run the "before-connect" command
if (!gpppdata.command_before_connect().isEmpty()) {
@@ -224,7 +224,7 @@ void ConnectWidget::init() {
emit debugMessage(i18n("Running pre-startup command..."));
kapp->processEvents();
- QApplication::flushX();
+ TQApplication::flushX();
pid_t id = execute_command(gpppdata.command_before_connect());
int i, status;
@@ -259,7 +259,7 @@ void ConnectWidget::init() {
semaphore = false;
Modem::modem->stop();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
// if we are stuck anywhere we will time out
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -278,7 +278,7 @@ void ConnectWidget::init() {
}
-void ConnectWidget::timerEvent(QTimerEvent *) {
+void ConnectWidget::timerEvent(TQTimerEvent *) {
if (semaphore || pausing)
return;
@@ -296,7 +296,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
substate = 0;
}
- QString initStr = gpppdata.modemInitStr(substate);
+ TQString initStr = gpppdata.modemInitStr(substate);
if (!initStr.isEmpty()) {
// send a carriage return and then wait a bit so that the modem will
// let us issue commands.
@@ -328,8 +328,8 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (vmain == 5) {
if(!expecting) {
- QString sToneDuration = "ATS11=" + QString::number(gpppdata.modemToneDuration());
- QString msg = i18n("Setting ") + sToneDuration;
+ TQString sToneDuration = "ATS11=" + TQString::number(gpppdata.modemToneDuration());
+ TQString msg = i18n("Setting ") + sToneDuration;
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemInitResp());
@@ -356,7 +356,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
emit debugMessage(i18n("Setting speaker volume..."));
setExpect(gpppdata.modemInitResp());
- QString vol("AT");
+ TQString vol("AT");
vol += gpppdata.volumeInitString();
writeline(vol);
usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
@@ -368,7 +368,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if(vmain == 4) {
if(!expecting) {
if(!gpppdata.waitForDialTone() || gpppdata.waitCallback()) {
- QString msg = i18n("Turning off dial tone waiting...");
+ TQString msg = i18n("Turning off dial tone waiting...");
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemInitResp());
@@ -387,7 +387,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->start(gpppdata.modemTimeout()*1000);
if(gpppdata.waitCallback()) {
- QString msg = i18n("Waiting for callback...");
+ TQString msg = i18n("Waiting for callback...");
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemRingResp());
@@ -395,14 +395,14 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
return;
}
- QStringList &plist = gpppdata.phonenumbers();
- QString bmarg= gpppdata.dialPrefix();
+ TQStringList &plist = gpppdata.phonenumbers();
+ TQString bmarg= gpppdata.dialPrefix();
bmarg += *plist.at(dialnumber);
- QString bm = i18n("Dialing %1").arg(bmarg);
+ TQString bm = i18n("Dialing %1").arg(bmarg);
messg->setText(bm);
emit debugMessage(bm);
- QString pn = gpppdata.modemDialStr();
+ TQString pn = gpppdata.modemDialStr();
pn += gpppdata.dialPrefix();
pn += *plist.at(dialnumber);
if(++dialnumber >= plist.count())
@@ -434,7 +434,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
Modem::modem->hangup();
if(gpppdata.busyWait() > 0) {
- QString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -467,7 +467,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->start(gpppdata.modemTimeout()*1000);
if(gpppdata.busyWait() > 0) {
- QString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -553,7 +553,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Scan") {
- QString bm = i18n("Scanning %1").arg(scriptArgument);
+ TQString bm = i18n("Scanning %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -563,7 +563,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Save") {
- QString bm = i18n("Saving %1").arg(scriptArgument);
+ TQString bm = i18n("Saving %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -581,12 +581,12 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") {
- QString bm = i18n("Sending %1");
+ TQString bm = i18n("Sending %1");
// replace %USERNAME% and %PASSWORD%
- QString arg = scriptArgument;
- QRegExp re1("%USERNAME%");
- QRegExp re2("%PASSWORD%");
+ TQString arg = scriptArgument;
+ TQRegExp re1("%USERNAME%");
+ TQRegExp re2("%PASSWORD%");
arg = arg.replace(re1, gpppdata.storedUsername());
arg = arg.replace(re2, gpppdata.storedPassword());
@@ -606,7 +606,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Expect") {
- QString bm = i18n("Expecting %1").arg(scriptArgument);
+ TQString bm = i18n("Expecting %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -620,7 +620,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "Pause") {
- QString bm = i18n("Pause %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Pause %1 seconds").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -637,7 +637,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->stop();
- QString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -672,11 +672,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "ID") {
- QString bm = i18n("ID %1").arg(scriptArgument);
+ TQString bm = i18n("ID %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
- QString idstring = gpppdata.storedUsername();
+ TQString idstring = gpppdata.storedUsername();
if(!idstring.isEmpty() && firstrunID) {
// the user entered an Id on the main kppp dialog
@@ -708,11 +708,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Password") {
- QString bm = i18n("Password %1").arg(scriptArgument);
+ TQString bm = i18n("Password %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
- QString pwstring = gpppdata.password();
+ TQString pwstring = gpppdata.password();
if(!pwstring.isEmpty() && firstrunPW) {
// the user entered a password on the main kppp dialog
@@ -745,13 +745,13 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Prompt") {
- QString bm = i18n("Prompting %1");
+ TQString bm = i18n("Prompting %1");
// if the scriptindex (aka the prompt text) includes a ## marker
// this marker should get substituted with the contents of our stored
// variable (from the subsequent scan).
- QString ts = scriptArgument;
+ TQString ts = scriptArgument;
int vstart = ts.find( "##" );
if( vstart != -1 ) {
ts.remove( vstart, 2 );
@@ -782,7 +782,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "PWPrompt") {
- QString bm = i18n("PW Prompt %1").arg(scriptArgument);
+ TQString bm = i18n("PW Prompt %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -807,7 +807,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "LoopStart") {
- QString bm = i18n("Loop Start %1").arg(scriptArgument);
+ TQString bm = i18n("Loop Start %1").arg(scriptArgument);
// The incrementing of the scriptindex MUST be before the
// call to setExpect otherwise the expect will miss a string that is
@@ -832,7 +832,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "LoopEnd") {
- QString bm = i18n("Loop End %1").arg(scriptArgument);
+ TQString bm = i18n("Loop End %1").arg(scriptArgument);
if ( loopnest <= 0 ) {
bm = i18n("LoopEnd without matching Start. Line: %1").arg(bm);
vmain=20;
@@ -902,7 +902,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
}
- // Close the tty. This prevents the QTimer::singleShot() in
+ // Close the tty. This prevents the TQTimer::singleShot() in
// Modem::readtty() from re-enabling the socket notifier.
// The port is still held open by the helper process.
Modem::modem->closetty();
@@ -1003,7 +1003,7 @@ void ConnectWidget::checkBuffers() {
scanvar = scanvar.stripWhiteSpace();
// Show the Variabel content in the debug window
- QString sv = i18n("Scan Var: %1").arg(scanvar);
+ TQString sv = i18n("Scan Var: %1").arg(scanvar);
emit debugMessage(sv);
}
@@ -1013,7 +1013,7 @@ void ConnectWidget::checkBuffers() {
// keep everything after the expected string
readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length());
- QString ts = i18n("Found: %1").arg(expectstr);
+ TQString ts = i18n("Found: %1").arg(expectstr);
emit debugMessage(ts);
if (loopend) {
@@ -1024,7 +1024,7 @@ void ConnectWidget::checkBuffers() {
if (loopend && readbuffer.contains(loopstr[loopnest])) {
expecting = false;
readbuffer = "";
- QString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
+ TQString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
emit debugMessage(ts);
scriptindex = loopstartindex[loopnest];
loopend = false;
@@ -1032,7 +1032,7 @@ void ConnectWidget::checkBuffers() {
}
// notify event loop if expected string was found
if(!expecting)
- timerEvent((QTimerEvent *) 0);
+ timerEvent((TQTimerEvent *) 0);
}
}
@@ -1112,22 +1112,22 @@ void ConnectWidget::script_timed_out() {
}
-void ConnectWidget::setScan(const QString &n) {
+void ConnectWidget::setScan(const TQString &n) {
scanning = true;
scanstr = n;
scanbuffer = "";
- QString ts = i18n("Scanning: %1").arg(n);
+ TQString ts = i18n("Scanning: %1").arg(n);
emit debugMessage(ts);
}
-void ConnectWidget::setExpect(const QString &n) {
+void ConnectWidget::setExpect(const TQString &n) {
expecting = true;
expectstr = n;
- QString ts = i18n("Expecting: %1").arg(n);
- ts.replace(QRegExp("\n"), "<LF>");
+ TQString ts = i18n("Expecting: %1").arg(n);
+ ts.replace(TQRegExp("\n"), "<LF>");
emit debugMessage(ts);
// check if the expected string is in the read buffer already.
@@ -1192,7 +1192,7 @@ void ConnectWidget::if_waiting_slot() {
auto_hostname();
// signal other applications that we are connected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", TQByteArray());
if(!gpppdata.command_on_connect().isEmpty()) {
messg->setText(i18n("Running startup command..."));
@@ -1239,7 +1239,7 @@ void ConnectWidget::if_waiting_slot() {
bool ConnectWidget::execppp() {
- QString command;
+ TQString command;
command = "pppd";
@@ -1276,7 +1276,7 @@ bool ConnectWidget::execppp() {
// the english/i18n mix below is ugly but we want to keep working
// after someone changed the code to use i18n'ed config values
- QString flowCtrl = gpppdata.flowcontrol();
+ TQString flowCtrl = gpppdata.flowcontrol();
if(flowCtrl != "None" && flowCtrl != i18n("None")) {
if(flowCtrl == "CRTSCTS" || flowCtrl == "Hardware [CRTSCTS]" ||
flowCtrl == i18n("Hardware [CRTSCTS]"))
@@ -1291,8 +1291,8 @@ bool ConnectWidget::execppp() {
if(gpppdata.autoDNS())
command += " usepeerdns";
- QStringList &arglist = gpppdata.pppdArgument();
- for ( QStringList::Iterator it = arglist.begin();
+ TQStringList &arglist = gpppdata.pppdArgument();
+ for ( TQStringList::Iterator it = arglist.begin();
it != arglist.end();
++it )
{
@@ -1308,7 +1308,7 @@ bool ConnectWidget::execppp() {
} else {
command += " callback ";
command += gpppdata.callbackType() == CBTYPE_ADMIN ?
- QString("0") : gpppdata.callbackPhone();
+ TQString("0") : gpppdata.callbackPhone();
}
} else
gpppdata.setWaitCallback(false);
@@ -1350,17 +1350,17 @@ bool ConnectWidget::execppp() {
}
-void ConnectWidget::closeEvent( QCloseEvent *e ) {
+void ConnectWidget::closeEvent( TQCloseEvent *e ) {
e->ignore();
emit cancelbutton();
}
-void ConnectWidget::setMsg(const QString &msg) {
+void ConnectWidget::setMsg(const TQString &msg) {
messg->setText(msg);
}
-void ConnectWidget::writeline(const QString &s) {
+void ConnectWidget::writeline(const TQString &s) {
Modem::modem->writeLine(s.local8Bit());
}
@@ -1368,7 +1368,7 @@ void ConnectWidget::writeline(const QString &s) {
void auto_hostname() {
struct in_addr local_ip;
struct hostent *hostname_entry;
- QString new_hostname;
+ TQString new_hostname;
int dot;
char tmp_str[100]; // buffer overflow safe
@@ -1398,11 +1398,11 @@ void auto_hostname() {
// Replace the DNS domain entry in the /etc/resolv.conf file and
// disable the nameserver entries if option is enabled
-void add_domain(const QString &domain) {
+void add_domain(const TQString &domain) {
int fd;
char c;
- QString resolv[MAX_RESOLVCONF_LINES];
+ TQString resolv[MAX_RESOLVCONF_LINES];
if (domain.isEmpty())
return;
@@ -1422,7 +1422,7 @@ void add_domain(const QString &domain) {
if ((c != '\n') && (i < MAX_RESOLVCONF_LINES)) i++;
if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
- QCString tmp = "domain " + domain.local8Bit() +
+ TQCString tmp = "domain " + domain.local8Bit() +
" \t\t#kppp temp entry\n";
write(fd, tmp.data(), tmp.length());
@@ -1432,12 +1432,12 @@ void add_domain(const QString &domain) {
&& !resolv[j].contains("#kppp temp entry")
&& gpppdata.exDNSDisabled()))
&& !resolv[j].contains("#entry disabled by kppp")) {
- QCString tmp = "# " + resolv[j].local8Bit() +
+ TQCString tmp = "# " + resolv[j].local8Bit() +
" \t#entry disabled by kppp\n";
write(fd, tmp, tmp.length());
}
else {
- QCString tmp = resolv[j].local8Bit() + "\n";
+ TQCString tmp = resolv[j].local8Bit() + "\n";
write(fd, tmp, tmp.length());
}
}
@@ -1453,12 +1453,12 @@ void adddns()
int fd;
if ((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) {
- QStringList &dnslist = gpppdata.dns();
- for ( QStringList::Iterator it = dnslist.begin();
+ TQStringList &dnslist = gpppdata.dns();
+ for ( TQStringList::Iterator it = dnslist.begin();
it != dnslist.end();
++it )
{
- QCString dns = "nameserver " + (*it).local8Bit() +
+ TQCString dns = "nameserver " + (*it).local8Bit() +
" \t#kppp temp entry\n";
write(fd, dns.data(), dns.length());
}
@@ -1493,7 +1493,7 @@ void removedns() {
int fd;
char c;
- QString resolv[MAX_RESOLVCONF_LINES];
+ TQString resolv[MAX_RESOLVCONF_LINES];
if((fd = Requester::rq->openResolv(O_RDONLY)) >= 0) {
@@ -1512,12 +1512,12 @@ void removedns() {
for(int j=0; j < i; j++) {
if(resolv[j].contains("#kppp temp entry")) continue;
if(resolv[j].contains("#entry disabled by kppp")) {
- QCString tmp = resolv[j].local8Bit();
+ TQCString tmp = resolv[j].local8Bit();
write(fd, tmp.data()+2, tmp.length() - 27);
write(fd, "\n", 1);
}
else {
- QCString tmp = resolv[j].local8Bit() + "\n";
+ TQCString tmp = resolv[j].local8Bit() + "\n";
write(fd, tmp, tmp.length());
}
}
diff --git a/kppp/connect.h b/kppp/connect.h
index d6008c15..c387a84b 100644
--- a/kppp/connect.h
+++ b/kppp/connect.h
@@ -29,10 +29,10 @@
#ifndef _CONNECT_H_
#define _CONNECT_H_
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qevent.h>
+#include <tqlabel.h>
+#include <tqevent.h>
#include "kpppconfig.h"
#include "pwentry.h"
@@ -43,15 +43,15 @@
class PPPStats;
-class ConnectWidget : public QWidget {
+class ConnectWidget : public TQWidget {
Q_OBJECT
public:
- ConnectWidget(QWidget *parent, const char *name, PPPStats *st);
+ ConnectWidget(TQWidget *parent, const char *name, PPPStats *st);
~ConnectWidget();
public:
void set_con_speed_string();
- void setMsg(const QString &);
+ void setMsg(const TQString &);
void pppdDied();
// these are only necessary to prevent the user from clicking in the cancel
@@ -60,8 +60,8 @@ public:
void enableButtons();
protected:
- void timerEvent(QTimerEvent *);
- void closeEvent( QCloseEvent *e );
+ void timerEvent(TQTimerEvent *);
+ void closeEvent( TQCloseEvent *e );
private slots:
void readChar(unsigned char);
@@ -77,7 +77,7 @@ public slots:
signals:
void if_waiting_signal();
- void debugMessage(const QString &);
+ void debugMessage(const TQString &);
void toggleDebugWindow();
void closeDebugWindow();
void debugPutChar(unsigned char);
@@ -85,43 +85,43 @@ signals:
void stopAccounting();
public:
- QString myreadbuffer; // we want to keep every thing in order to fish for the
+ TQString myreadbuffer; // we want to keep every thing in order to fish for the
// connection speed later on
- QPushButton *debug;
+ TQPushButton *debug;
int main_timer_ID;
private:
int vmain;
int substate;
int scriptindex;
- QString scriptCommand, scriptArgument;
- QStringList *comlist, *arglist;
+ TQString scriptCommand, scriptArgument;
+ TQStringList *comlist, *arglist;
// static const int maxloopnest=(MAX_SCRIPT_ENTRIES/2);
int loopnest;
int loopstartindex[MAXLOOPNEST];
bool loopend;
- QString loopstr[MAXLOOPNEST];
+ TQString loopstr[MAXLOOPNEST];
bool semaphore;
- QTimer *inittimer;
+ TQTimer *inittimer;
- QTimer *timeout_timer;
+ TQTimer *timeout_timer;
bool execppp();
- void writeline(const QString &);
+ void writeline(const TQString &);
void checkBuffers();
- void setExpect(const QString &);
+ void setExpect(const TQString &);
bool expecting;
- QString expectstr;
+ TQString expectstr;
- QString readbuffer;
+ TQString readbuffer;
- void setScan(const QString &);
- QString scanvar;
- QString scanstr;
- QString scanbuffer;
+ void setScan(const TQString &);
+ TQString scanvar;
+ TQString scanstr;
+ TQString scanbuffer;
bool scanning;
bool pausing;
@@ -129,11 +129,11 @@ private:
LoginTerm *termwindow;
int scriptTimeout;
- QTimer *pausetimer;
- QTimer *if_timer;
- QTimer *if_timeout_timer;
+ TQTimer *pausetimer;
+ TQTimer *if_timer;
+ TQTimer *if_timeout_timer;
- QLabel *messg;
+ TQLabel *messg;
KPushButton *cancel;
bool firstrunID;
@@ -150,7 +150,7 @@ extern void killppp();
void adddns();
void addpeerdns();
void removedns();
-void add_domain(const QString & newdomain);
+void add_domain(const TQString & newdomain);
void auto_hostname();
#endif
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
index cc287bb9..e485d862 100644
--- a/kppp/conwindow.cpp
+++ b/kppp/conwindow.cpp
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "conwindow.h"
#include "docking.h"
#include "pppdata.h"
@@ -31,9 +31,9 @@
extern PPPData gpppdata;
-ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
+ConWindow::ConWindow(TQWidget *parent, const char *name,TQWidget *mainwidget,
PPPStats *st)
- : QWidget(parent, name, 0),
+ : TQWidget(parent, name, 0),
minutes(0),
seconds(0),
hours(0),
@@ -43,34 +43,34 @@ ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
accountingEnabled(false),
volumeAccountingEnabled(false)
{
- info1 = new QLabel(i18n("Connected at:"), this);
- info2 = new QLabel("", this);
+ info1 = new TQLabel(i18n("Connected at:"), this);
+ info2 = new TQLabel("", this);
- timelabel1 = new QLabel(i18n("Time connected:"), this);
- timelabel2 = new QLabel("000:00:00", this);
+ timelabel1 = new TQLabel(i18n("Time connected:"), this);
+ timelabel2 = new TQLabel("000:00:00", this);
- vollabel = new QLabel(i18n("Volume:"), this);
- volinfo = new QLabel("", this);
+ vollabel = new TQLabel(i18n("Volume:"), this);
+ volinfo = new TQLabel("", this);
// now the stuff for accounting
- session_bill_l = new QLabel(i18n("Session bill:"), this);
- session_bill = new QLabel("", this);
- total_bill_l = new QLabel(i18n("Total bill:"), this);
- total_bill = new QLabel("", this);
+ session_bill_l = new TQLabel(i18n("Session bill:"), this);
+ session_bill = new TQLabel("", this);
+ total_bill_l = new TQLabel(i18n("Total bill:"), this);
+ total_bill = new TQLabel("", this);
setCaption("kppp");
- cancelbutton = new QPushButton(this);
+ cancelbutton = new TQPushButton(this);
cancelbutton->setText(i18n("&Disconnect"));
- connect(cancelbutton, SIGNAL(clicked()), mainwidget, SLOT(disconnect()));
+ connect(cancelbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(disconnect()));
- statsbutton = new QPushButton(this);
+ statsbutton = new TQPushButton(this);
statsbutton->setText(i18n("De&tails"));
statsbutton->setFocus();
- connect(statsbutton, SIGNAL(clicked()), mainwidget, SLOT(showStats()));
+ connect(statsbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(showStats()));
- clocktimer = new QTimer(this);
- connect(clocktimer, SIGNAL(timeout()), SLOT(timeclick()));
+ clocktimer = new TQTimer(this);
+ connect(clocktimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeclick()));
// read window position from config file
int p_x, p_y;
@@ -83,20 +83,20 @@ ConWindow::~ConWindow() {
}
// save window position when window was closed
-bool ConWindow::event(QEvent *e) {
- if (e->type() == QEvent::Hide)
+bool ConWindow::event(TQEvent *e) {
+ if (e->type() == TQEvent::Hide)
{
gpppdata.setWinPosConWin(x(), y());
return true;
}
else
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QString ConWindow::prettyPrintVolume(unsigned int n) {
+TQString ConWindow::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -108,7 +108,7 @@ QString ConWindow::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
@@ -123,21 +123,21 @@ void ConWindow::accounting(bool on) {
delete tl1;
// add layout now
- tl1 = new QVBoxLayout(this, 10, 10);
+ tl1 = new TQVBoxLayout(this, 10, 10);
tl1->addSpacing(5);
- QHBoxLayout *tl = new QHBoxLayout;
+ TQHBoxLayout *tl = new QHBoxLayout;
tl1->addLayout(tl);
tl->addSpacing(20);
- QGridLayout *l1;
+ TQGridLayout *l1;
int vol_lines = 0;
if(gpppdata.VolAcctEnabled())
vol_lines = 1;
if(accountingEnabled)
- l1 = new QGridLayout(4 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(4 + vol_lines, 2, 5);
else
- l1 = new QGridLayout(2 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(2 + vol_lines, 2, 5);
tl->addLayout(l1);
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
@@ -148,9 +148,9 @@ void ConWindow::accounting(bool on) {
total_bill->setAlignment(AlignRight|AlignVCenter);
volinfo->setAlignment(AlignRight|AlignVCenter);
// make sure that there's enough space for the bills
- QString s1 = session_bill->text();
- QString s2 = total_bill->text();
- QString s3 = volinfo->text();
+ TQString s1 = session_bill->text();
+ TQString s2 = total_bill->text();
+ TQString s3 = volinfo->text();
session_bill->setText("888888.88 XXX");
total_bill->setText("888888.88 XXX");
@@ -204,7 +204,7 @@ void ConWindow::accounting(bool on) {
}
tl->addSpacing(10);
- QVBoxLayout *l2 = new QVBoxLayout(5);
+ TQVBoxLayout *l2 = new TQVBoxLayout(5);
tl->addLayout(l2);
l2->addStretch(1);
l2->addWidget(statsbutton);
@@ -218,8 +218,8 @@ void ConWindow::accounting(bool on) {
/*
do not overwrite position read from config
// If this gets re-enabled, fix it for Xinerama before committing to CVS.
- setGeometry((QApplication::desktop()->width() - width()) / 2,
- (QApplication::desktop()->height() - height())/2,
+ setGeometry((TQApplication::desktop()->width() - width()) / 2,
+ (TQApplication::desktop()->height() - height())/2,
width(),
height());
*/
@@ -236,7 +236,7 @@ void ConWindow::startClock() {
minutes = 0;
seconds = 0;
hours = 0;
- QString title ;
+ TQString title ;
title = gpppdata.accname();
@@ -250,7 +250,7 @@ void ConWindow::startClock() {
}
-void ConWindow::setConnectionSpeed(const QString &speed) {
+void ConWindow::setConnectionSpeed(const TQString &speed) {
info2->setText(speed);
}
@@ -261,7 +261,7 @@ void ConWindow::stopClock() {
void ConWindow::timeclick() {
- QString tooltip = i18n("Connection: %1\n"
+ TQString tooltip = i18n("Connection: %1\n"
"Connected at: %2\n"
"Time connected: %3")
.arg(gpppdata.accname()).arg(info2->text())
@@ -317,11 +317,11 @@ void ConWindow::timeclick() {
setCaption(caption_string);
}
- QToolTip::add(DockWidget::dock_widget, tooltip);
+ TQToolTip::add(DockWidget::dock_widget, tooltip);
}
-void ConWindow::closeEvent( QCloseEvent *e ){
+void ConWindow::closeEvent( TQCloseEvent *e ){
// we don't want to lose the
// conwindow since this is our last connection kppp.
// if we lost it we could only kill the program by hand to get on with life.
@@ -332,7 +332,7 @@ void ConWindow::closeEvent( QCloseEvent *e ){
}
-void ConWindow::slotAccounting(QString total, QString session) {
+void ConWindow::slotAccounting(TQString total, TQString session) {
total_bill->setText(total);
session_bill->setText(session);
}
diff --git a/kppp/conwindow.h b/kppp/conwindow.h
index d7f0bf43..fd3609de 100644
--- a/kppp/conwindow.h
+++ b/kppp/conwindow.h
@@ -26,62 +26,62 @@
#define _CONWINDOW_H_
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qframe.h>
-#include <qevent.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqframe.h>
+#include <tqevent.h>
+#include <tqlayout.h>
class PPPStats;
-class ConWindow : public QWidget {
+class ConWindow : public TQWidget {
Q_OBJECT
public:
- ConWindow(QWidget *parent, const char *name,QWidget *main, PPPStats *st);
+ ConWindow(TQWidget *parent, const char *name,TQWidget *main, PPPStats *st);
~ConWindow();
protected:
- void closeEvent( QCloseEvent *e );
- bool event( QEvent *e );
+ void closeEvent( TQCloseEvent *e );
+ bool event( TQEvent *e );
private slots:
void timeclick();
void dock();
public:
- void setConnectionSpeed(const QString&);
+ void setConnectionSpeed(const TQString&);
void startClock();
void stopClock();
void accounting(bool); // show/ hide accounting info
public slots:
- void slotAccounting(QString, QString);
+ void slotAccounting(TQString, TQString);
private:
- QLabel *info1;
- QLabel *info2;
- QPushButton *cancelbutton;
- QPushButton *statsbutton;
- QString prettyPrintVolume(unsigned int);
+ TQLabel *info1;
+ TQLabel *info2;
+ TQPushButton *cancelbutton;
+ TQPushButton *statsbutton;
+ TQString prettyPrintVolume(unsigned int);
int minutes;
int seconds;
int hours;
int days;
- QFrame *fline;
- QLabel *timelabel1;
- QLabel *timelabel2;
- QLabel *total_bill, *total_bill_l;
- QLabel *session_bill, *session_bill_l;
- QString caption_string;
- QString time_string2;
- QString time_string;
- QTimer *clocktimer;
- QVBoxLayout *tl1;
- QLabel *vollabel;
- QLabel *volinfo;
+ TQFrame *fline;
+ TQLabel *timelabel1;
+ TQLabel *timelabel2;
+ TQLabel *total_bill, *total_bill_l;
+ TQLabel *session_bill, *session_bill_l;
+ TQString caption_string;
+ TQString time_string2;
+ TQString time_string;
+ TQTimer *clocktimer;
+ TQVBoxLayout *tl1;
+ TQLabel *vollabel;
+ TQLabel *volinfo;
PPPStats *stats;
bool accountingEnabled;
bool volumeAccountingEnabled;
diff --git a/kppp/debug.cpp b/kppp/debug.cpp
index e551bdea..3dee5797 100644
--- a/kppp/debug.cpp
+++ b/kppp/debug.cpp
@@ -29,24 +29,24 @@
extern KPPPWidget *p_kppp;
-myMultiEdit::myMultiEdit(QWidget *parent, const char *name)
- : QMultiLineEdit(parent, name)
+myMultiEdit::myMultiEdit(TQWidget *parent, const char *name)
+ : TQMultiLineEdit(parent, name)
{
setReadOnly(true);
}
void myMultiEdit::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
}
void myMultiEdit::newLine() {
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::newLine();
}
-DebugWidget::DebugWidget(QWidget *parent, const char *name)
- : QDialog(parent, name, FALSE)
+DebugWidget::DebugWidget(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, FALSE)
{
setCaption(i18n("Login Script Debug Window"));
@@ -54,29 +54,29 @@ DebugWidget::DebugWidget(QWidget *parent, const char *name)
text_window->setGeometry(2,5,400, 300);
// text_window->setReadOnly(FALSE);
- statuslabel = new QLabel("", this, "statuslabel");
+ statuslabel = new TQLabel("", this, "statuslabel");
- statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ statuslabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statuslabel->setAlignment( AlignLeft|AlignVCenter );
statuslabel->setGeometry(2, 307, 400, 20);
//statusPageLabel->setFont( KGlobalSettings::generalFont() );
- dismiss = new QPushButton(this);
+ dismiss = new TQPushButton(this);
dismiss->setGeometry(330,340,70,30);
dismiss->setText(i18n("&Close"));
dismiss->setFocus();
- connect(dismiss, SIGNAL(clicked()), SLOT(hide()));
+ connect(dismiss, TQT_SIGNAL(clicked()), TQT_SLOT(hide()));
- /* fline = new QFrame(this,"line");
- fline->setFrameStyle(QFrame::HLine |QFrame::Sunken);
+ /* fline = new TQFrame(this,"line");
+ fline->setFrameStyle(TQFrame::HLine |TQFrame::Sunken);
fline->setGeometry(2,332,398,5);*/
adjustSize();
setMinimumSize(width(),height());
}
-void DebugWidget::hideEvent(QHideEvent *)
+void DebugWidget::hideEvent(TQHideEvent *)
{
assert(p_kppp);
p_kppp->con->debug->setOn(false);
@@ -88,7 +88,7 @@ void DebugWidget::clear() {
void DebugWidget::addChar(unsigned char c) {
- QString stuff;
+ TQString stuff;
if(c == '\r' || c == '\n') {
if(c == '\n')
@@ -98,17 +98,17 @@ void DebugWidget::addChar(unsigned char c) {
}
-void DebugWidget::statusLabel(const QString &s) {
+void DebugWidget::statusLabel(const TQString &s) {
statuslabel->setText(s);
}
/*
-void DebugWidget::keyPressEvent(QKeyEvent *k) {
+void DebugWidget::keyPressEvent(TQKeyEvent *k) {
}
*/
-void DebugWidget::resizeEvent(QResizeEvent *e){
+void DebugWidget::resizeEvent(TQResizeEvent *e){
int w = width() ;
int h = height();
e = e;
diff --git a/kppp/debug.h b/kppp/debug.h
index 06eeddf6..a1a73be9 100644
--- a/kppp/debug.h
+++ b/kppp/debug.h
@@ -24,46 +24,46 @@
#ifndef _DEBUGWIDGET_
#define _DEBUGWIDGET_
-#include <qdialog.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
+#include <tqdialog.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
-class myMultiEdit : public QMultiLineEdit {
+class myMultiEdit : public TQMultiLineEdit {
public:
- myMultiEdit(QWidget *parent=0, const char *name=0);
+ myMultiEdit(TQWidget *parent=0, const char *name=0);
void newLine();
void insertChar(unsigned char c);
};
-class DebugWidget : public QDialog {
+class DebugWidget : public TQDialog {
Q_OBJECT
public:
- DebugWidget(QWidget *parent=0, const char *name=0);
+ DebugWidget(TQWidget *parent=0, const char *name=0);
void clear();
public slots:
- void statusLabel(const QString &);
+ void statusLabel(const TQString &);
void toggleVisibility();
void addChar(unsigned char);
protected:
- virtual void hideEvent(QHideEvent *);
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void hideEvent(TQHideEvent *);
+ virtual void resizeEvent(TQResizeEvent *e);
private:
void enter();
- QFrame *fline;
- QPushButton *dismiss;
+ TQFrame *fline;
+ TQPushButton *dismiss;
myMultiEdit *text_window;
- QLabel *statuslabel;
+ TQLabel *statuslabel;
};
#endif
diff --git a/kppp/docking.cpp b/kppp/docking.cpp
index d3f449a1..e5cd0c5e 100644
--- a/kppp/docking.cpp
+++ b/kppp/docking.cpp
@@ -38,7 +38,7 @@ extern KPPPWidget *p_kppp;
// static member
DockWidget *DockWidget::dock_widget = 0;
-DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st)
+DockWidget::DockWidget(TQWidget *parent, const char *name, PPPStats *st)
: KSystemTray(parent, name), stats(st) {
// load pixmaps
@@ -50,12 +50,12 @@ DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st)
// popup menu for right mouse button
popup_m = contextMenu();
toggleID = popup_m->insertItem(i18n("Restore"),
- this, SLOT(toggle_window_state()));
- popup_m->insertItem(i18n("Details"), p_kppp, SLOT(showStats()));
+ this, TQT_SLOT(toggle_window_state()));
+ popup_m->insertItem(i18n("Details"), p_kppp, TQT_SLOT(showStats()));
popup_m->insertSeparator();
- popup_m->insertItem(i18n("Disconnect"), p_kppp, SLOT(disconnect()));
+ popup_m->insertItem(i18n("Disconnect"), p_kppp, TQT_SLOT(disconnect()));
// connect to stats for little modem animation
- connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+ connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int)));
DockWidget::dock_widget = this;
}
@@ -66,7 +66,7 @@ DockWidget::~DockWidget() {
}
-void DockWidget::paintEvent (QPaintEvent *) {
+void DockWidget::paintEvent (TQPaintEvent *) {
paintIcon(PPPStats::BytesNone);
}
@@ -74,7 +74,7 @@ void DockWidget::paintEvent (QPaintEvent *) {
void DockWidget::paintIcon (int status) {
// animate modem lights
- const QPixmap *pixmap;
+ const TQPixmap *pixmap;
if(isVisible()) {
switch(status)
@@ -112,7 +112,7 @@ void DockWidget::stop_stats() {
}
-void DockWidget::mousePressEvent(QMouseEvent *e) {
+void DockWidget::mousePressEvent(TQMouseEvent *e) {
// open/close connect-window on right mouse button
if ( e->button() == LeftButton ) {
toggle_window_state();
@@ -120,7 +120,7 @@ void DockWidget::mousePressEvent(QMouseEvent *e) {
// open popup menu on left mouse button
if ( e->button() == RightButton ) {
- QString text;
+ TQString text;
if(p_kppp->con_win->isVisible())
text = i18n("Minimize");
else
diff --git a/kppp/docking.h b/kppp/docking.h
index d35e8977..93c6d344 100644
--- a/kppp/docking.h
+++ b/kppp/docking.h
@@ -28,7 +28,7 @@
#ifndef _DOCKING_H_
#define _DOCKING_H_
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ksystemtray.h>
class PPPStats;
@@ -36,16 +36,16 @@ class PPPStats;
class DockWidget : public KSystemTray {
Q_OBJECT
public:
- DockWidget(QWidget * parent, const char *name, PPPStats *st);
+ DockWidget(TQWidget * parent, const char *name, PPPStats *st);
~DockWidget();
protected:
- void paintEvent(QPaintEvent *e);
- void showEvent(QShowEvent *) { }
+ void paintEvent(TQPaintEvent *e);
+ void showEvent(TQShowEvent *) { }
private slots:
void toggle_window_state();
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
public slots:
void paintIcon(int);
@@ -61,10 +61,10 @@ private:
KPopupMenu *popup_m;
- QPixmap dock_none_pixmap;
- QPixmap dock_left_pixmap;
- QPixmap dock_right_pixmap;
- QPixmap dock_both_pixmap;
+ TQPixmap dock_none_pixmap;
+ TQPixmap dock_left_pixmap;
+ TQPixmap dock_right_pixmap;
+ TQPixmap dock_both_pixmap;
};
#endif
diff --git a/kppp/edit.cpp b/kppp/edit.cpp
index 7b47c1ba..cc26a889 100644
--- a/kppp/edit.cpp
+++ b/kppp/edit.cpp
@@ -25,16 +25,16 @@
#include <string.h>
#include <termios.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kmessagebox.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <kbuttonbox.h>
#include <klocale.h>
-#include <qvgroupbox.h>
-#include <qhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
#include <kdialog.h>
#include <kwin.h>
@@ -44,61 +44,61 @@
#include "iplined.h"
#include "auth.h"
-DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
const int GRIDROWS = 8;
- QGridLayout *tl = new QGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
- connect_label = new QLabel(i18n("Connection &name:"), parent);
+ connect_label = new TQLabel(i18n("Connection &name:"), parent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new QLineEdit(parent);
+ connectname_l = new TQLineEdit(parent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
tl->addWidget(connectname_l, 0, 1);
- QString tmp = i18n("Type in a unique name for this connection");
+ TQString tmp = i18n("Type in a unique name for this connection");
- QWhatsThis::add(connect_label,tmp);
- QWhatsThis::add(connectname_l,tmp);
+ TQWhatsThis::add(connect_label,tmp);
+ TQWhatsThis::add(connectname_l,tmp);
- number_label = new QLabel(i18n("P&hone number:"), parent);
+ number_label = new TQLabel(i18n("P&hone number:"), parent);
number_label->setAlignment(AlignTop|AlignLeft);
tl->addWidget(number_label, 1, 0);
- QHBoxLayout *lpn = new QHBoxLayout(5);
+ TQHBoxLayout *lpn = new TQHBoxLayout(5);
tl->addLayout(lpn, 1, 1);
- numbers = new QListBox(parent);
+ numbers = new TQListBox(parent);
number_label->setBuddy(numbers);
numbers->setMinimumSize(120, 70);
lpn->addWidget(numbers);
- QVBoxLayout *lpn1 = new QVBoxLayout;
+ TQVBoxLayout *lpn1 = new QVBoxLayout;
lpn->addLayout(lpn1);
- add = new QPushButton(i18n("&Add..."), parent);
- del = new QPushButton(i18n("&Remove"), parent);
+ add = new TQPushButton(i18n("&Add..."), parent);
+ del = new TQPushButton(i18n("&Remove"), parent);
- up = new QPushButton(parent);
+ up = new TQPushButton(parent);
up->setIconSet(BarIconSet("up"));
- down = new QPushButton(parent);
+ down = new TQPushButton(parent);
down->setIconSet(BarIconSet("down"));
lpn1->addWidget(add);
lpn1->addWidget(del);
lpn1->addStretch(1);
lpn1->addWidget(up);
lpn1->addWidget(down);
- connect(add, SIGNAL(clicked()),
- this, SLOT(addNumber()));
- connect(del, SIGNAL(clicked()),
- this, SLOT(delNumber()));
- connect(up, SIGNAL(clicked()),
- this, SLOT(upNumber()));
- connect(down, SIGNAL(clicked()),
- this, SLOT(downNumber()));
- connect(numbers, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ connect(add, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addNumber()));
+ connect(del, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(delNumber()));
+ connect(up, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(upNumber()));
+ connect(down, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(downNumber()));
+ connect(numbers, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
numbersChanged();
tmp = i18n("<p>Specifies the phone numbers to dial. You\n"
@@ -109,13 +109,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"When a number is busy or fails, <i>kppp</i> will \n"
"try the next number and so on");
- QWhatsThis::add(number_label,tmp);
- QWhatsThis::add(numbers,tmp);
+ TQWhatsThis::add(number_label,tmp);
+ TQWhatsThis::add(numbers,tmp);
- auth_l = new QLabel(i18n("A&uthentication:"), parent);
+ auth_l = new TQLabel(i18n("A&uthentication:"), parent);
tl->addWidget(auth_l, 3, 0);
- auth = new QComboBox(parent);
+ auth = new TQComboBox(parent);
auth_l->setBuddy(auth);
auth->insertItem(i18n("Script-based"));
auth->insertItem(i18n("PAP"));
@@ -133,13 +133,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"choose CHAP, because it's much safer. If you don't know\n"
"whether PAP or CHAP is right, choose PAP/CHAP.");
- QWhatsThis::add(auth_l,tmp);
- QWhatsThis::add(auth,tmp);
+ TQWhatsThis::add(auth_l,tmp);
+ TQWhatsThis::add(auth,tmp);
- store_password = new QCheckBox(i18n("Store &password"), parent);
+ store_password = new TQCheckBox(i18n("Store &password"), parent);
store_password->setChecked(true);
tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
- QWhatsThis::add(store_password,
+ TQWhatsThis::add(store_password,
i18n("<p>When this is turned on, your ISP password\n"
"will be saved in <i>kppp</i>'s config file, so\n"
"you do not need to type it in every time.\n"
@@ -149,36 +149,36 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"readable only to you. Make sure nobody\n"
"gains access to this file!"));
- cbtype_l = new QLabel(i18n("&Callback type:"), parent);
+ cbtype_l = new TQLabel(i18n("&Callback type:"), parent);
tl->addWidget(cbtype_l, 5, 0);
- cbtype = new QComboBox(parent);
+ cbtype = new TQComboBox(parent);
cbtype_l->setBuddy(cbtype);
cbtype->insertItem(i18n("None"));
cbtype->insertItem(i18n("Administrator-defined"));
cbtype->insertItem(i18n("User-defined"));
- connect(cbtype, SIGNAL(highlighted(int)),
- this, SLOT(cbtypeChanged(int)));
+ connect(cbtype, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(cbtypeChanged(int)));
tl->addWidget(cbtype, 5, 1);
tmp = i18n("Callback type");
- QWhatsThis::add(cbtype_l,tmp);
- QWhatsThis::add(cbtype,tmp);
+ TQWhatsThis::add(cbtype_l,tmp);
+ TQWhatsThis::add(cbtype,tmp);
- cbphone_l = new QLabel(i18n("Call&back number:"), parent);
+ cbphone_l = new TQLabel(i18n("Call&back number:"), parent);
tl->addWidget(cbphone_l, 6, 0);
- cbphone = new QLineEdit(parent);
+ cbphone = new TQLineEdit(parent);
cbphone_l->setBuddy(cbphone);
cbphone->setMaxLength(140);
tl->addWidget(cbphone, 6, 1);
tmp = i18n("Callback phone number");
- QWhatsThis::add(cbphone_l,tmp);
- QWhatsThis::add(cbphone,tmp);
+ TQWhatsThis::add(cbphone_l,tmp);
+ TQWhatsThis::add(cbphone,tmp);
- pppdargs = new QPushButton(i18n("Customize &pppd Arguments..."), parent);
- connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton()));
+ pppdargs = new TQPushButton(i18n("Customize &pppd Arguments..."), parent);
+ connect(pppdargs, TQT_SIGNAL(clicked()), TQT_SLOT(pppdargsbutton()));
tl->addMultiCellWidget(pppdargs, 7, 7, 0, 1, AlignCenter);
// Set defaults if editing an existing connection
@@ -186,8 +186,8 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
connectname_l->setText(gpppdata.accname());
// insert the phone numbers into the listbox
- QString n = gpppdata.phonenumber();
- QString tmp = "";
+ TQString n = gpppdata.phonenumber();
+ TQString tmp = "";
uint idx = 0;
while(idx != n.length()) {
if(n[idx] == ':') {
@@ -226,7 +226,7 @@ bool DialWidget::save() {
} else {
gpppdata.setAccname(connectname_l->text());
- QString number = "";
+ TQString number = "";
for(uint i = 0; i < numbers->count(); i++) {
if(i != 0)
number += ":";
@@ -281,7 +281,7 @@ void DialWidget::delNumber() {
void DialWidget::upNumber() {
int idx = numbers->currentItem();
if(idx != -1) {
- QString item = numbers->text(idx);
+ TQString item = numbers->text(idx);
numbers->removeItem(idx);
numbers->insertItem(item, idx-1);
numbers->setCurrentItem(idx-1);
@@ -293,7 +293,7 @@ void DialWidget::upNumber() {
void DialWidget::downNumber() {
int idx = numbers->currentItem();
if(idx != -1) {
- QString item = numbers->text(idx);
+ TQString item = numbers->text(idx);
numbers->removeItem(idx);
numbers->insertItem(item, idx+1);
numbers->setCurrentItem(idx+1);
@@ -312,12 +312,12 @@ void DialWidget::pppdargsbutton() {
/////////////////////////////////////////////////////////////////////////////
// ExecWidget
/////////////////////////////////////////////////////////////////////////////
-ExecWidget::ExecWidget(QWidget *parent, bool isnewaccount, const char *name) :
- QWidget(parent, name)
+ExecWidget::ExecWidget(TQWidget *parent, bool isnewaccount, const char *name) :
+ TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- QLabel *l = new QLabel(\
+ TQLabel *l = new TQLabel(\
i18n("Here you can select commands to run at certain stages of the\n"
"connection. The commands are run with your real user id, so\n"
"you cannot run any commands here requiring root permissions\n"
@@ -328,31 +328,31 @@ i18n("Here you can select commands to run at certain stages of the\n"
tl->addWidget(l);
tl->addStretch(1);
- QGridLayout *l1 = new QGridLayout(4, 2, 10);
+ TQGridLayout *l1 = new TQGridLayout(4, 2, 10);
tl->addLayout(l1);
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
- before_connect_l = new QLabel(i18n("&Before connect:"), parent);
+ before_connect_l = new TQLabel(i18n("&Before connect:"), parent);
before_connect_l->setAlignment(AlignVCenter);
l1->addWidget(before_connect_l, 0, 0);
- before_connect = new QLineEdit(parent);
+ before_connect = new TQLineEdit(parent);
before_connect_l->setBuddy(before_connect);
before_connect->setMaxLength(COMMAND_SIZE);
l1->addWidget(before_connect, 0, 1);
- QString tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
+ TQString tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
"is established. It is called immediately before\n"
"dialing has begun.\n\n"
"This might be useful, e.g. to stop HylaFAX blocking the\n"
"modem.");
- QWhatsThis::add(before_connect_l,tmp);
- QWhatsThis::add(before_connect,tmp);
+ TQWhatsThis::add(before_connect_l,tmp);
+ TQWhatsThis::add(before_connect,tmp);
- command_label = new QLabel(i18n("&Upon connect:"), parent);
+ command_label = new TQLabel(i18n("&Upon connect:"), parent);
command_label->setAlignment(AlignVCenter);
l1->addWidget(command_label, 1, 0);
- command = new QLineEdit(parent);
+ command = new TQLineEdit(parent);
command_label->setBuddy(command);
command->setMaxLength(COMMAND_SIZE);
l1->addWidget(command, 1, 1);
@@ -362,14 +362,14 @@ i18n("Here you can select commands to run at certain stages of the\n"
"\n"
"Very useful for fetching mail and news");
- QWhatsThis::add(command_label,tmp);
- QWhatsThis::add(command,tmp);
+ TQWhatsThis::add(command_label,tmp);
+ TQWhatsThis::add(command,tmp);
- predisconnect_label = new QLabel(i18n("Before &disconnect:"),
+ predisconnect_label = new TQLabel(i18n("Before &disconnect:"),
parent);
predisconnect_label->setAlignment(AlignVCenter);
l1->addWidget(predisconnect_label, 2, 0);
- predisconnect = new QLineEdit(parent);
+ predisconnect = new TQLineEdit(parent);
predisconnect_label->setBuddy(predisconnect);
predisconnect->setMaxLength(COMMAND_SIZE);
l1->addWidget(predisconnect, 2, 1);
@@ -377,23 +377,23 @@ i18n("Here you can select commands to run at certain stages of the\n"
"is closed. The connection will stay open until\n"
"the program exits.");
- QWhatsThis::add(predisconnect_label,tmp);
- QWhatsThis::add(predisconnect,tmp);
+ TQWhatsThis::add(predisconnect_label,tmp);
+ TQWhatsThis::add(predisconnect,tmp);
- discommand_label = new QLabel(i18n("U&pon disconnect:"),
+ discommand_label = new TQLabel(i18n("U&pon disconnect:"),
parent);
discommand_label->setAlignment(AlignVCenter);
l1->addWidget(discommand_label, 3, 0);
- discommand = new QLineEdit(parent);
+ discommand = new TQLineEdit(parent);
discommand_label->setBuddy(discommand);
discommand->setMaxLength(COMMAND_SIZE);
l1->addWidget(discommand, 3, 1);
tmp = i18n("Allows you to run a program <b>after</b> a connection\n"
"has been closed.");
- QWhatsThis::add(discommand_label,tmp);
- QWhatsThis::add(discommand,tmp);
+ TQWhatsThis::add(discommand_label,tmp);
+ TQWhatsThis::add(discommand,tmp);
// extra space between entries
l1->addRowSpacing(1, 5);
@@ -427,23 +427,23 @@ bool ExecWidget::save() {
// IPWidget
//
/////////////////////////////////////////////////////////////////////////////
-IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), parent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new QButtonGroup(parent);
+ rb = new TQButtonGroup(parent);
rb->hide();
- connect(rb, SIGNAL(clicked(int)),
- SLOT(hitIPSelect(int)));
+ connect(rb, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(hitIPSelect(int)));
- dynamicadd_rb = new QRadioButton(box);
+ dynamicadd_rb = new TQRadioButton(box);
dynamicadd_rb->setText(i18n("Dynamic IP address"));
- QWhatsThis::add(dynamicadd_rb,
+ TQWhatsThis::add(dynamicadd_rb,
i18n("Select this option when your computer gets an\n"
"internet address (IP) every time a\n"
"connection is made.\n"
@@ -451,23 +451,23 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
"Almost every Internet Service Provider uses\n"
"this method, so this should be turned on."));
- staticadd_rb = new QRadioButton(box);
+ staticadd_rb = new TQRadioButton(box);
staticadd_rb->setText(i18n("Static IP address"));
rb->insert(dynamicadd_rb, 0);
rb->insert(staticadd_rb, 1);
- QWhatsThis::add(staticadd_rb,
+ TQWhatsThis::add(staticadd_rb,
i18n("Select this option when your computer has a\n"
"fixed internet address (IP). Most computers\n"
"don't have this, so you should probably select\n"
"dynamic IP addressing unless you know what you\n"
"are doing."));
- QWidget *ipWidget = new QWidget(box);
- QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2);
+ TQWidget *ipWidget = new TQWidget(box);
+ TQGridLayout *ipLayout = new TQGridLayout(ipWidget, 2, 2);
ipLayout->setSpacing(KDialog::spacingHint());
- ipaddress_label = new QLabel(i18n("&IP address:"), ipWidget);
- QString tmp = i18n("If your computer has a permanent internet\n"
+ ipaddress_label = new TQLabel(i18n("&IP address:"), ipWidget);
+ TQString tmp = i18n("If your computer has a permanent internet\n"
"address, you must supply your IP address here.");
ipLayout->addWidget(ipaddress_label, 0, 0);
@@ -475,10 +475,10 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
ipaddress_label->setBuddy(ipaddress_l);
ipLayout->addWidget(ipaddress_l, 0, 1);
- QWhatsThis::add(ipaddress_label,tmp);
- QWhatsThis::add(ipaddress_l,tmp);
+ TQWhatsThis::add(ipaddress_label,tmp);
+ TQWhatsThis::add(ipaddress_l,tmp);
- sub_label = new QLabel(i18n("&Subnet mask:"), ipWidget);
+ sub_label = new TQLabel(i18n("&Subnet mask:"), ipWidget);
tmp = i18n("<p>If your computer has a static Internet address,\n"
"you must supply a network mask here. In almost\n"
"all cases this netmask will be <b>255.255.255.0</b>,\n"
@@ -491,15 +491,15 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
sub_label->setBuddy(subnetmask_l);
ipLayout->addWidget(subnetmask_l, 1, 1);
- QWhatsThis::add(sub_label,tmp);
- QWhatsThis::add(subnetmask_l,tmp);
+ TQWhatsThis::add(sub_label,tmp);
+ TQWhatsThis::add(subnetmask_l,tmp);
- autoname = new QCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
+ autoname = new TQCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
autoname->setChecked(gpppdata.autoname());
- connect(autoname,SIGNAL(toggled(bool)),
- this,SLOT(autoname_t(bool)));
+ connect(autoname,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(autoname_t(bool)));
- QWhatsThis::add(autoname,
+ TQWhatsThis::add(autoname,
i18n("<p>Whenever you connect, this reconfigures\n"
"your hostname to match the IP address you\n"
"got from the PPP server. This may be useful\n"
@@ -583,20 +583,20 @@ void IPWidget::hitIPSelect( int i ) {
-DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- // box = new QGroupBox(parent);
- QGridLayout *tl = new QGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
+ // box = new TQGroupBox(parent);
+ TQGridLayout *tl = new TQGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
- dnsdomain_label = new QLabel(i18n("Domain &name:"), parent);
+ dnsdomain_label = new TQLabel(i18n("Domain &name:"), parent);
tl->addWidget(dnsdomain_label, 0, 0);
- dnsdomain = new QLineEdit(parent);
+ dnsdomain = new TQLineEdit(parent);
dnsdomain_label->setBuddy(dnsdomain);
dnsdomain->setMaxLength(DOMAIN_SIZE);
tl->addWidget(dnsdomain, 0, 1);
- QString tmp = i18n("If you enter a domain name here, this domain\n"
+ TQString tmp = i18n("If you enter a domain name here, this domain\n"
"name is used for your computer while you are\n"
"connected. When the connection is closed, the\n"
"original domain name of your computer is\n"
@@ -605,39 +605,39 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
"If you leave this field blank, no changes are\n"
"made to the domain name.");
- QWhatsThis::add(dnsdomain_label,tmp);
- QWhatsThis::add(dnsdomain,tmp);
+ TQWhatsThis::add(dnsdomain_label,tmp);
+ TQWhatsThis::add(dnsdomain,tmp);
- conf_label = new QLabel(i18n("C&onfiguration:"), parent);
+ conf_label = new TQLabel(i18n("C&onfiguration:"), parent);
tl->addWidget(conf_label, 1, 0);
- bg = new QButtonGroup("Group", this);
+ bg = new TQButtonGroup("Group", this);
conf_label->setBuddy(bg);
- connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int)));
+ connect(bg, TQT_SIGNAL(clicked(int)), TQT_SLOT(DNS_Mode_Selected(int)));
bg->hide();
- autodns = new QRadioButton(i18n("Automatic"), parent);
+ autodns = new TQRadioButton(i18n("Automatic"), parent);
bg->insert(autodns, 0);
tl->addWidget(autodns, 1, 1);
// no automatic DNS detection for pppd < 2.3.7
if(!gpppdata.pppdVersionMin(2, 3, 7))
autodns->setEnabled(false);
- mandns = new QRadioButton(i18n("Manual"), parent);
+ mandns = new TQRadioButton(i18n("Manual"), parent);
bg->insert(mandns, 1);
tl->addWidget(mandns, 2, 1);
- dns_label = new QLabel(i18n("DNS &IP address:"), parent);
+ dns_label = new TQLabel(i18n("DNS &IP address:"), parent);
tl->addWidget(dns_label, 3, 0);
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
tl->addLayout(l2, 3, 1);
dnsipaddr = new IPLineEdit(parent);
dns_label->setBuddy(dnsipaddr);
- connect(dnsipaddr, SIGNAL(returnPressed()),
- SLOT(adddns()));
- connect(dnsipaddr, SIGNAL(textChanged(const QString &)),
- SLOT(DNS_Edit_Changed(const QString &)));
+ connect(dnsipaddr, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(adddns()));
+ connect(dnsipaddr, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(DNS_Edit_Changed(const TQString &)));
l2->addWidget(dnsipaddr, 1);
l2->addStretch(1);
tmp = i18n("<p>Allows you to specify a new DNS server to be\n"
@@ -648,56 +648,56 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
"To add a DNS server, type in the IP address of\n"
"the DNS server here and click on <b>Add</b>");
- QWhatsThis::add(dns_label, tmp);
- QWhatsThis::add(dnsipaddr, tmp);
+ TQWhatsThis::add(dns_label, tmp);
+ TQWhatsThis::add(dnsipaddr, tmp);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1, 4, 1);
- add = new QPushButton(i18n("&Add"), parent);
- connect(add, SIGNAL(clicked()), SLOT(adddns()));
+ add = new TQPushButton(i18n("&Add"), parent);
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(adddns()));
int width = add->sizeHint().width();
width = QMAX(width,60);
add->setMinimumWidth(width);
l1->addWidget(add);
l1->addStretch(1);
- QWhatsThis::add(add,
+ TQWhatsThis::add(add,
i18n("Click this button to add the DNS server\n"
"specified in the field above. The entry\n"
"will then be added to the list below"));
- remove = new QPushButton(i18n("&Remove"), parent);
- connect(remove, SIGNAL(clicked()), SLOT(removedns()));
+ remove = new TQPushButton(i18n("&Remove"), parent);
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removedns()));
width = remove->sizeHint().width();
width = QMAX(width,60);
remove->setMinimumWidth(width);
l1->addWidget(remove);
- QWhatsThis::add(remove,
+ TQWhatsThis::add(remove,
i18n("Click this button to remove the selected DNS\n"
"server entry from the list below"));
- servers_label = new QLabel(i18n("DNS address &list:"), parent);
+ servers_label = new TQLabel(i18n("DNS address &list:"), parent);
servers_label->setAlignment(AlignTop|AlignLeft);
tl->addWidget(servers_label, 5, 0);
- dnsservers = new QListBox(parent);
+ dnsservers = new TQListBox(parent);
servers_label->setBuddy(dnsservers);
dnsservers->setMinimumSize(150, 80);
- connect(dnsservers, SIGNAL(highlighted(int)),
- SLOT(DNS_Entry_Selected(int)));
+ connect(dnsservers, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(DNS_Entry_Selected(int)));
tl->addWidget(dnsservers, 5, 1);
tmp = i18n("<p>This shows all defined DNS servers to use\n"
"while you are connected. Use the <b>Add</b> and\n"
"<b>Remove</b> buttons to modify the list");
- QWhatsThis::add(servers_label,tmp);
- QWhatsThis::add(dnsservers,tmp);
+ TQWhatsThis::add(servers_label,tmp);
+ TQWhatsThis::add(dnsservers,tmp);
- exdnsdisabled_toggle = new QCheckBox(i18n( \
+ exdnsdisabled_toggle = new TQCheckBox(i18n( \
"&Disable existing DNS servers during connection"),
parent);
exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled());
tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter);
- QWhatsThis::add(exdnsdisabled_toggle,
+ TQWhatsThis::add(exdnsdisabled_toggle,
i18n("<p>When this option is selected, all DNS\n"
"servers specified in <tt>/etc/resolv.conf</tt> are\n"
"temporary disabled while the dialup connection\n"
@@ -722,8 +722,8 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
tl->activate();
}
-void DNSWidget::DNS_Edit_Changed(const QString &text) {
- QRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
+void DNSWidget::DNS_Edit_Changed(const TQString &text) {
+ TQRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
add->setEnabled(text.find(r) != -1);
}
@@ -746,13 +746,13 @@ void DNSWidget::DNS_Mode_Selected(int mode) {
void DNSWidget::save() {
gpppdata.setAutoDNS(bg->id(bg->selected()) == 0);
- QStringList serverlist;
+ TQStringList serverlist;
for(uint i=0; i < dnsservers->count(); i++)
serverlist.append(dnsservers->text(i));
gpppdata.setDns(serverlist);
// strip leading dot
- QString s(dnsdomain->text());
+ TQString s(dnsdomain->text());
if(s.left(1) == ".")
gpppdata.setDomain(s.mid(1));
else
@@ -782,23 +782,23 @@ void DNSWidget::removedns() {
//
// GatewayWidget
//
-GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+GatewayWidget::GatewayWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), parent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new QButtonGroup(parent);
+ rb = new TQButtonGroup(parent);
rb->hide();
- connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int)));
+ connect(rb, TQT_SIGNAL(clicked(int)), TQT_SLOT(hitGatewaySelect(int)));
- defaultgateway = new QRadioButton(box);
+ defaultgateway = new TQRadioButton(box);
defaultgateway->setText(i18n("Default gateway"));
rb->insert(defaultgateway, 0);
- QWhatsThis::add(defaultgateway,
+ TQWhatsThis::add(defaultgateway,
i18n("This makes the PPP peer computer (the computer\n"
"you are connected to with your modem) to act as\n"
"a gateway. Your computer will send all packets not\n"
@@ -809,21 +809,21 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na
"probably leave this option on."));
- staticgateway = new QRadioButton(box);
+ staticgateway = new TQRadioButton(box);
staticgateway->setText(i18n("Static gateway"));
rb->insert(staticgateway, 1);
- QWhatsThis::add(staticgateway,
+ TQWhatsThis::add(staticgateway,
i18n("<p>Allows you to specify which computer you want\n"
"to use as gateway (see <i>Default Gateway</i> above)"));
- QHBox *gateBox = new QHBox(box);
- gate_label = new QLabel(i18n("Gateway &IP address:"), gateBox);
+ TQHBox *gateBox = new TQHBox(box);
+ gate_label = new TQLabel(i18n("Gateway &IP address:"), gateBox);
gatewayaddr = new IPLineEdit(gateBox);
gate_label->setBuddy(gatewayaddr);
- defaultroute = new QCheckBox(i18n("&Assign the default route to this gateway"),
+ defaultroute = new TQCheckBox(i18n("&Assign the default route to this gateway"),
parent);
- QWhatsThis::add(defaultroute,
+ TQWhatsThis::add(defaultroute,
i18n("If this option is enabled, all packets not\n"
"going to the local net are routed through\n"
"the PPP connection.\n"
@@ -874,42 +874,42 @@ void GatewayWidget::hitGatewaySelect( int i ) {
-ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+ScriptWidget::ScriptWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
se = new ScriptEdit(parent);
- connect(se, SIGNAL(returnPressed()), SLOT(addButton()));
+ connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(addButton()));
tl->addWidget(se);
// insert equal-sized buttons
KButtonBox *bbox = new KButtonBox(parent);
add = bbox->addButton(i18n("&Add"));
- connect(add, SIGNAL(clicked()), SLOT(addButton()));
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addButton()));
bbox->addStretch(1);
insert = bbox->addButton(i18n("&Insert"));
- connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
+ connect(insert, TQT_SIGNAL(clicked()), TQT_SLOT(insertButton()));
bbox->addStretch(1);
remove = bbox->addButton(i18n("&Remove"));
- connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeButton()));
bbox->layout();
tl->addWidget(bbox);
- QHBoxLayout *l12 = new QHBoxLayout(0);
+ TQHBoxLayout *l12 = new TQHBoxLayout(0);
tl->addLayout(l12);
- stl = new QListBox(parent);
- stl->setVScrollBarMode( QScrollView::AlwaysOff );
- connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int)));
- stl->setMinimumSize(QSize(70, 140));
+ stl = new TQListBox(parent);
+ stl->setVScrollBarMode( TQScrollView::AlwaysOff );
+ connect(stl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(stlhighlighted(int)));
+ stl->setMinimumSize(TQSize(70, 140));
- sl = new QListBox(parent);
- sl->setVScrollBarMode( QScrollView::AlwaysOff );
- connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int)));
- sl->setMinimumSize(QSize(150, 140));
+ sl = new TQListBox(parent);
+ sl->setVScrollBarMode( TQScrollView::AlwaysOff );
+ connect(sl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slhighlighted(int)));
+ sl->setMinimumSize(TQSize(150, 140));
- slb = new QScrollBar(parent);
+ slb = new TQScrollBar(parent);
slb->setFixedWidth(slb->sizeHint().width());
- connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int)));
+ connect(slb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrolling(int)));
l12->addWidget(stl, 1);
l12->addWidget(sl, 3);
@@ -917,10 +917,10 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name
//load data from gpppdata
if(!isnewaccount) {
- QStringList &comlist = gpppdata.scriptType();
- QStringList &arglist = gpppdata.script();
- QStringList::Iterator itcom = comlist.begin();
- QStringList::Iterator itarg = arglist.begin();
+ TQStringList &comlist = gpppdata.scriptType();
+ TQStringList &arglist = gpppdata.script();
+ TQStringList::Iterator itcom = comlist.begin();
+ TQStringList::Iterator itarg = arglist.begin();
for ( ;
itcom != comlist.end() && itarg != arglist.end();
@@ -959,7 +959,7 @@ bool ScriptWidget::check() {
void ScriptWidget::save() {
- QStringList typelist, arglist;
+ TQStringList typelist, arglist;
for(uint i=0; i < sl->count(); i++) {
typelist.append(stl->text(i));
arglist.append(sl->text(i));
@@ -1201,21 +1201,21 @@ void ScriptWidget::removeButton() {
// Used to specify a new phone number
//
/////////////////////////////////////////////////////////////////////////////
-PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
+PhoneNumberDialog::PhoneNumberDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QHBox *hbox = new QHBox(this);
+ TQHBox *hbox = new TQHBox(this);
setMainWidget(hbox);
hbox->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Enter a phone number:"), hbox);
+ new TQLabel(i18n("Enter a phone number:"), hbox);
le = newLineEdit(14, hbox);
le->setMinimumWidth(125);
- connect(le, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(le, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
le->setFocus();
textChanged("");
@@ -1224,14 +1224,14 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, t
}
-QString PhoneNumberDialog::phoneNumber() {
- QString s = le->text();
+TQString PhoneNumberDialog::phoneNumber() {
+ TQString s = le->text();
return s;
}
-void PhoneNumberDialog::textChanged(const QString &s) {
+void PhoneNumberDialog::textChanged(const TQString &s) {
enableButtonOK(s.length() > 0);
}
diff --git a/kppp/edit.h b/kppp/edit.h
index 3b435c0b..b0412079 100644
--- a/kppp/edit.h
+++ b/kppp/edit.h
@@ -29,17 +29,17 @@
#ifndef _EDIT_H_
#define _EDIT_H_
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qscrollbar.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqscrollbar.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include "scriptedit.h"
#include "kpppconfig.h"
@@ -47,10 +47,10 @@
class IPLineEdit;
-class DialWidget : public QWidget {
+class DialWidget : public TQWidget {
Q_OBJECT
public:
- DialWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DialWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~DialWidget() {}
public slots:
@@ -65,22 +65,22 @@ public slots:
void downNumber();
private:
- QLineEdit *connectname_l;
- QLabel *connect_label;
- QLabel *number_label;
- QPushButton *pppdargs;
- QComboBox *auth;
- QLabel *auth_l;
- QCheckBox *store_password;
+ TQLineEdit *connectname_l;
+ TQLabel *connect_label;
+ TQLabel *number_label;
+ TQPushButton *pppdargs;
+ TQComboBox *auth;
+ TQLabel *auth_l;
+ TQCheckBox *store_password;
// callback support
- QComboBox *cbtype;
- QLabel *cbtype_l;
- QLineEdit *cbphone;
- QLabel *cbphone_l;
+ TQComboBox *cbtype;
+ TQLabel *cbtype_l;
+ TQLineEdit *cbphone;
+ TQLabel *cbphone_l;
// for the phonenumber selection
- QPushButton *add, *del, *up, *down;
- QListBox *numbers;
+ TQPushButton *add, *del, *up, *down;
+ TQListBox *numbers;
};
@@ -89,33 +89,33 @@ private:
// tab-window to select what to execute when
//
/////////////////////////////////////////////////////////////////////////////
-class ExecWidget : public QWidget {
+class ExecWidget : public TQWidget {
Q_OBJECT
public:
- ExecWidget(QWidget *parent=0, bool isnewaccount=true, const char *name=0);
+ ExecWidget(TQWidget *parent=0, bool isnewaccount=true, const char *name=0);
public slots:
bool save();
private:
- QLineEdit *before_connect;
- QLabel *before_connect_l;
+ TQLineEdit *before_connect;
+ TQLabel *before_connect_l;
- QLineEdit *command;
- QLabel *command_label;
+ TQLineEdit *command;
+ TQLabel *command_label;
- QLineEdit *predisconnect;
- QLabel *predisconnect_label;
+ TQLineEdit *predisconnect;
+ TQLabel *predisconnect_label;
- QLineEdit *discommand;
- QLabel *discommand_label;
+ TQLineEdit *discommand;
+ TQLabel *discommand_label;
};
-class IPWidget : public QWidget {
+class IPWidget : public TQWidget {
Q_OBJECT
public:
- IPWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ IPWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~IPWidget() {}
public slots:
@@ -126,26 +126,26 @@ protected slots:
void autoname_t(bool on);
private:
- QLabel *ipaddress_label;
- QLabel *sub_label;
- QGroupBox *box1;
- QVGroupBox *box;
+ TQLabel *ipaddress_label;
+ TQLabel *sub_label;
+ TQGroupBox *box1;
+ TQVGroupBox *box;
- QButtonGroup *rb;
- QRadioButton *dynamicadd_rb;
- QRadioButton *staticadd_rb;
+ TQButtonGroup *rb;
+ TQRadioButton *dynamicadd_rb;
+ TQRadioButton *staticadd_rb;
IPLineEdit *ipaddress_l;
IPLineEdit *subnetmask_l;
- QCheckBox *autoname;
+ TQCheckBox *autoname;
};
-class DNSWidget : public QWidget {
+class DNSWidget : public TQWidget {
Q_OBJECT
public:
- DNSWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DNSWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~DNSWidget() {}
public slots:
@@ -154,30 +154,30 @@ public slots:
protected slots:
void adddns();
void removedns();
- void DNS_Edit_Changed(const QString &);
+ void DNS_Edit_Changed(const TQString &);
void DNS_Entry_Selected(int);
void DNS_Mode_Selected(int);
private:
- QLabel *conf_label;
- QButtonGroup *bg;
- QRadioButton *autodns, *mandns;
- QLabel *dns_label;
- QLabel *servers_label;
+ TQLabel *conf_label;
+ TQButtonGroup *bg;
+ TQRadioButton *autodns, *mandns;
+ TQLabel *dns_label;
+ TQLabel *servers_label;
IPLineEdit *dnsipaddr;
- QPushButton *add;
- QPushButton *remove;
- QListBox *dnsservers;
- QLineEdit *dnsdomain;
- QLabel *dnsdomain_label;
- QCheckBox *exdnsdisabled_toggle;
+ TQPushButton *add;
+ TQPushButton *remove;
+ TQListBox *dnsservers;
+ TQLineEdit *dnsdomain;
+ TQLabel *dnsdomain_label;
+ TQCheckBox *exdnsdisabled_toggle;
};
-class GatewayWidget : public QWidget {
+class GatewayWidget : public TQWidget {
Q_OBJECT
public:
- GatewayWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ GatewayWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~GatewayWidget() {}
public slots:
@@ -187,21 +187,21 @@ private slots:
void hitGatewaySelect( int );
private:
- QGroupBox *box;
- QLabel *gate_label;
- QGroupBox *box1;
- QButtonGroup *rb;
- QRadioButton *defaultgateway;
- QRadioButton *staticgateway;
+ TQGroupBox *box;
+ TQLabel *gate_label;
+ TQGroupBox *box1;
+ TQButtonGroup *rb;
+ TQRadioButton *defaultgateway;
+ TQRadioButton *staticgateway;
IPLineEdit *gatewayaddr;
- QCheckBox *defaultroute;
+ TQCheckBox *defaultroute;
};
-class ScriptWidget : public QWidget {
+class ScriptWidget : public TQWidget {
Q_OBJECT
public:
- ScriptWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ScriptWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~ScriptWidget() {}
public slots:
@@ -224,12 +224,12 @@ private:
void adjustScrollBar();
ScriptEdit *se;
- QPushButton *add;
- QPushButton *remove;
- QPushButton *insert;
- QListBox *sl, *stl;
+ TQPushButton *add;
+ TQPushButton *remove;
+ TQPushButton *insert;
+ TQListBox *sl, *stl;
- QScrollBar *slb;
+ TQScrollBar *slb;
};
@@ -241,15 +241,15 @@ private:
class PhoneNumberDialog : public KDialogBase {
Q_OBJECT
public:
- PhoneNumberDialog(QWidget *parent = 0);
+ PhoneNumberDialog(TQWidget *parent = 0);
- QString phoneNumber();
+ TQString phoneNumber();
private slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
private:
- QLineEdit *le;
+ TQLineEdit *le;
};
diff --git a/kppp/general.cpp b/kppp/general.cpp
index e136a1b5..f6a88bfd 100644
--- a/kppp/general.cpp
+++ b/kppp/general.cpp
@@ -26,10 +26,10 @@
#include <termios.h>
#include <string.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
-#include <qslider.h>
+#include <tqslider.h>
#include "general.h"
#include "version.h"
#include "miniterm.h"
@@ -38,49 +38,49 @@
#include "devices.h"
#include "pppdata.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qgrid.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
/////////////////////////////////////////////////////////////////////////////
//
// Widget containing misc. configuration options
//
/////////////////////////////////////////////////////////////////////////////
-GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
- : QWidget(parent, name)
+GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- QHBoxLayout *hbox = new QHBoxLayout(tl);
- QLabel *label;
- label = new QLabel(i18n("pppd version:"), parent);
+ TQHBoxLayout *hbox = new TQHBoxLayout(tl);
+ TQLabel *label;
+ label = new TQLabel(i18n("pppd version:"), parent);
hbox->addWidget(label);
- QString version = gpppdata.pppdVersion();
+ TQString version = gpppdata.pppdVersion();
if(version == "0.0.0")
version = "unknown";
- label = new QLabel(version, parent);
- label->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ label = new TQLabel(version, parent);
+ label->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
hbox->addWidget(label);
KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), parent);
pppdTimeout->setLabel(i18n("pppd &timeout:"));
pppdTimeout->setRange(1, TIMEOUT_SIZE, 5, true);
pppdTimeout->setSuffix(i18n(" sec"));
- connect(pppdTimeout, SIGNAL(valueChanged(int)),
- SLOT(pppdtimeoutchanged(int)));
+ connect(pppdTimeout, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(pppdtimeoutchanged(int)));
tl->addWidget(pppdTimeout);
- QString tmp = i18n("<i>kppp</i> will wait this number of seconds\n"
+ TQString tmp = i18n("<i>kppp</i> will wait this number of seconds\n"
"to see if a PPP connection is established.\n"
"If no connection is made in this time frame,\n"
"<i>kppp</i> will give up and kill pppd.");
- QWhatsThis::add(pppdTimeout,tmp);
+ TQWhatsThis::add(pppdTimeout,tmp);
label->setBuddy(pppdTimeout);
tl->addSpacing(10);
- QCheckBox *chkBox;
- chkBox = new QCheckBox(i18n("Doc&k into panel on connect"), parent);
- QWhatsThis::add(chkBox,
+ TQCheckBox *chkBox;
+ chkBox = new TQCheckBox(i18n("Doc&k into panel on connect"), parent);
+ TQWhatsThis::add(chkBox,
i18n("<p>After a connection is established, the\n"
"window is minimized and a small icon\n"
"in the KDE panel represents this window.\n"
@@ -90,50 +90,50 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
"size."));
chkBox->setChecked(gpppdata.get_dock_into_panel());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(docking_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(docking_toggled(bool)));
tl->addWidget(chkBox);
- chkBox = new QCheckBox(i18n("A&utomatic redial on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("A&utomatic redial on disconnect"), parent);
chkBox->setChecked(gpppdata.automatic_redial());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(redial_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(redial_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>When a connection is established and\n"
"it somehow gets disconnected, <i>kppp</i>\n"
"will try to reconnect to the same account.\n"
"\n"
"See <a href=\"#redial\">here</a> for more on this topic."));
- chkBox = new QCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
+ chkBox = new TQCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
chkBox->setChecked(gpppdata.get_redial_on_nocarrier());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(nocarrier_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(nocarrier_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>When dialing if modem returns NO CARRIER\n"
"the program will make a new attempt to redial\n"
"instead of waiting for user to click <CANCEL>\n"
"button."));
- chkBox = new QCheckBox(i18n("&Show clock on caption"), parent);
+ chkBox = new TQCheckBox(i18n("&Show clock on caption"), parent);
chkBox->setChecked(gpppdata.get_show_clock_on_caption());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(caption_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(caption_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("When this option is checked, the window\n"
"title shows the time since a connection\n"
"was established. Very useful, so you \n"
"should turn this on"));
- chkBox = new QCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
+ chkBox = new TQCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
chkBox->setChecked(gpppdata.get_xserver_exit_disconnect());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(xserver_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(xserver_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>Checking this option will close any\n"
"open connection when the X-server is\n"
"shut down. You should enable this option\n"
@@ -141,21 +141,21 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
"\n"
"See <a href=\"#disxserver\">here</a> for more on this."));
- chkBox = new QCheckBox(i18n("&Quit on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("&Quit on disconnect"), parent);
chkBox->setChecked(gpppdata.quit_on_disconnect());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(quit_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(quit_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("When this option is turned on, <i>kppp</i>\n"
"will be closed when you disconnect"));
- chkBox = new QCheckBox(i18n("Minimi&ze window on connect"), parent);
+ chkBox = new TQCheckBox(i18n("Minimi&ze window on connect"), parent);
chkBox->setChecked(gpppdata.get_iconify_on_connect());
- connect(chkBox,SIGNAL(toggled(bool)),
- this,SLOT(iconify_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(iconify_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("Iconifies <i>kppp</i>'s window when a\n"
"connection is established"));
@@ -203,28 +203,28 @@ void GeneralWidget::pppdtimeoutchanged(int n) {
}
-ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
- : QWidget(parent, name)
+ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
+ : TQWidget(parent, name)
{
- QGridLayout *tl = new QGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
- connect_label = new QLabel(i18n("Modem &name:"), parent);
+ connect_label = new TQLabel(i18n("Modem &name:"), parent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new QLineEdit(parent);
+ connectname_l = new TQLineEdit(parent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
tl->addWidget(connectname_l, 0, 1);
- QString tmp = i18n("Type in a unique name for this modem");
+ TQString tmp = i18n("Type in a unique name for this modem");
- QWhatsThis::add(connect_label,tmp);
- QWhatsThis::add(connectname_l,tmp);
+ TQWhatsThis::add(connect_label,tmp);
+ TQWhatsThis::add(connectname_l,tmp);
- label1 = new QLabel(i18n("Modem de&vice:"), parent);
+ label1 = new TQLabel(i18n("Modem de&vice:"), parent);
tl->addWidget(label1, 1, 0);
- modemdevice = new QComboBox(false, parent);
+ modemdevice = new TQComboBox(false, parent);
label1->setBuddy(modemdevice);
// ### deviceExist mechanism not functional right now
bool deviceExist = false;
@@ -238,8 +238,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
modemdevice->insertItem(gpppdata.modemDevice());
tl->addWidget(modemdevice, 1, 1);
-/* connect(modemdevice, SIGNAL(activated(int)),
- SLOT(setmodemdc(int)));*/
+/* connect(modemdevice, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(setmodemdc(int)));*/
tmp = i18n("This specifies the serial port your modem is attached \n"
"to. On Linux/x86, typically this is either /dev/ttyS0 \n"
"(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n"
@@ -248,14 +248,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"emulation (most cards under Linux support this), you\n"
"should select one of the /dev/ttyIx devices.");
- QWhatsThis::add(label1,tmp);
- QWhatsThis::add(modemdevice,tmp);
+ TQWhatsThis::add(label1,tmp);
+ TQWhatsThis::add(modemdevice,tmp);
- label2 = new QLabel(i18n("&Flow control:"), parent);
+ label2 = new TQLabel(i18n("&Flow control:"), parent);
tl->addWidget(label2, 2, 0);
- flowcontrol = new QComboBox(false, parent);
+ flowcontrol = new TQComboBox(false, parent);
label2->setBuddy(flowcontrol);
flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); // sync with pppdata.cpp
flowcontrol->insertItem(i18n("Software [XON/XOFF]"));
@@ -266,8 +266,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
flowListItem << "None";
tl->addWidget(flowcontrol, 2, 1);
- /*connect(flowcontrol, SIGNAL(activated(int)),
- SLOT(setflowcontrol(int)));*/
+ /*connect(flowcontrol, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(setflowcontrol(int)));*/
tmp = i18n("<p>Specifies how the serial port and modem\n"
"communicate. You should not change this unless\n"
@@ -275,19 +275,19 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"\n"
"<b>Default</b>: CRTSCTS");
- QWhatsThis::add(label2,tmp);
- QWhatsThis::add(flowcontrol,tmp);
+ TQWhatsThis::add(label2,tmp);
+ TQWhatsThis::add(flowcontrol,tmp);
- labelenter = new QLabel(i18n("&Line termination:"), parent);
+ labelenter = new TQLabel(i18n("&Line termination:"), parent);
tl->addWidget(labelenter, 3, 0);
- enter = new QComboBox(false, parent);
+ enter = new TQComboBox(false, parent);
labelenter->setBuddy(enter);
enter->insertItem("CR");
enter->insertItem("LF");
enter->insertItem("CR/LF");
tl->addWidget(enter, 3, 1);
- /* connect(enter, SIGNAL(activated(int)), SLOT(setenter(int)));*/
+ /* connect(enter, TQT_SIGNAL(activated(int)), TQT_SLOT(setenter(int)));*/
tmp = i18n("<p>Specifies how AT commands are sent to your\n"
"modem. Most modems will work fine with the\n"
"default <i>CR/LF</i>. If your modem does not react\n"
@@ -296,12 +296,12 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"\n"
"<b>Default</b>: CR/LF");
- QWhatsThis::add(labelenter,tmp);
- QWhatsThis::add(enter, tmp);
+ TQWhatsThis::add(labelenter,tmp);
+ TQWhatsThis::add(enter, tmp);
- baud_label = new QLabel(i18n("Co&nnection speed:"), parent);
+ baud_label = new TQLabel(i18n("Co&nnection speed:"), parent);
tl->addWidget(baud_label, 4, 0);
- baud_c = new QComboBox(parent);
+ baud_c = new TQComboBox(parent);
baud_label->setBuddy(baud_c);
static const char *baudrates[] = {
@@ -336,8 +336,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
baud_c->insertItem(baudrates[k]);
baud_c->setCurrentItem(3);
- /*connect(baud_c, SIGNAL(activated(int)),
- this, SLOT(speed_selection(int)));*/
+ /*connect(baud_c, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(speed_selection(int)));*/
tl->addWidget(baud_c, 4, 1);
tmp = i18n("Specifies the speed your modem and the serial\n"
@@ -347,8 +347,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"If you have connection problems, try to reduce\n"
"this value.");
- QWhatsThis::add(baud_label,tmp);
- QWhatsThis::add(baud_c,tmp);
+ TQWhatsThis::add(baud_label,tmp);
+ TQWhatsThis::add(baud_c,tmp);
for(int i=0; i <= enter->count()-1; i++) {
if(gpppdata.enter() == enter->text(i))
@@ -358,14 +358,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
tl->addRowSpacing(4, 10);
//Modem Lock File
- modemlockfile = new QCheckBox(i18n("&Use lock file"), parent);
+ modemlockfile = new TQCheckBox(i18n("&Use lock file"), parent);
modemlockfile->setChecked(gpppdata.modemLockFile());
-/* connect(modemlockfile, SIGNAL(toggled(bool)),
- SLOT(modemlockfilechanged(bool)));*/
+/* connect(modemlockfile, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(modemlockfilechanged(bool)));*/
tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1);
// l12->addStretch(1);
- QWhatsThis::add(modemlockfile,
+ TQWhatsThis::add(modemlockfile,
i18n("<p>To prevent other programs from accessing the\n"
"modem while a connection is established, a\n"
"file can be created to indicate that the modem\n"
@@ -382,11 +382,11 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
modemtimeout->setLabel(i18n("Modem &timeout:"));
modemtimeout->setRange(1, 120, 1);
modemtimeout->setSuffix(i18n(" sec"));
-/* connect(modemtimeout, SIGNAL(valueChanged(int)),
- SLOT(modemtimeoutchanged(int)));*/
+/* connect(modemtimeout, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(modemtimeoutchanged(int)));*/
tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1);
- QWhatsThis::add(modemtimeout,
+ TQWhatsThis::add(modemtimeout,
i18n("This specifies how long <i>kppp</i> waits for a\n"
"<i>CONNECT</i> response from your modem. The\n"
"recommended value is 30 seconds."));
@@ -445,17 +445,17 @@ bool ModemWidget::save()
}
-ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
- : QWidget(parent, name)
+ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), parent);
+ waitfordt = new TQCheckBox(i18n("&Wait for dial tone before dialing"), parent);
waitfordt->setChecked(gpppdata.waitForDialTone());
- // connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool)));
+ // connect(waitfordt, TQT_SIGNAL(toggled(bool)), TQT_SLOT(waitfordtchanged(bool)));
l1->addWidget(waitfordt);
- QWhatsThis::add(waitfordt,
+ TQWhatsThis::add(waitfordt,
i18n("<p>Normally the modem waits for a dial tone\n"
"from your phone line, indicating that it can\n"
"start to dial a number. If your modem does not\n"
@@ -468,10 +468,10 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
busywait->setLabel(i18n("B&usy wait:"));
busywait->setRange(0, 300, 5, true);
busywait->setSuffix(i18n(" sec"));
- // connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int)));
+ // connect(busywait, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(busywaitchanged(int)));
l1->addWidget(busywait);
- QWhatsThis::add(busywait,
+ TQWhatsThis::add(busywait,
i18n("Specifies the number of seconds to wait before\n"
"redial if all dialed numbers are busy. This is\n"
"necessary because some modems get stuck if the\n"
@@ -482,21 +482,21 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
l1->addSpacing(10);
- QHBoxLayout *hbl = new QHBoxLayout;
+ TQHBoxLayout *hbl = new QHBoxLayout;
hbl->setSpacing(KDialog::spacingHint());
- QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), parent);
+ TQLabel *volumeLabel = new TQLabel(i18n("Modem &volume:"), parent);
hbl->addWidget(volumeLabel);
- volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, parent);
+ volume = new TQSlider(0, 2, 1, gpppdata.volume(), TQSlider::Horizontal, parent);
volumeLabel->setBuddy(volume);
- volume->setTickmarks(QSlider::Below);
+ volume->setTickmarks(TQSlider::Below);
hbl->addWidget(volume);
l1->addLayout(hbl);
- /* connect(volume, SIGNAL(valueChanged(int)),
- this, SLOT(volumeChanged(int)));*/
- QString tmp = i18n("Most modems have a speaker which makes\n"
+ /* connect(volume, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeChanged(int)));*/
+ TQString tmp = i18n("Most modems have a speaker which makes\n"
"a lot of noise when dialing. Here you can\n"
"either turn this completely off or select a\n"
"lower volume.\n"
@@ -504,20 +504,20 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"If this does not work for your modem,\n"
"you must modify the modem volume command.");
- QWhatsThis::add(volumeLabel,tmp);
- QWhatsThis::add(volume, tmp);
+ TQWhatsThis::add(volumeLabel,tmp);
+ TQWhatsThis::add(volume, tmp);
l1->addSpacing(20);
#if 0
- chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), parent);
+ chkbox1 = new TQCheckBox(i18n("Modem asserts CD line"), parent);
chkbox1->setChecked(gpppdata.UseCDLine());
- connect(chkbox1,SIGNAL(toggled(bool)),
- this,SLOT(use_cdline_toggled(bool)));
+ connect(chkbox1,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(use_cdline_toggled(bool)));
l12->addWidget(chkbox1);
l12->addStretch(1);
l1->addStretch(1);
- QWhatsThis::add(chkbox1,
+ TQWhatsThis::add(chkbox1,
i18n("This controls how <i>kppp</i> detects that the modem\n"
"is not responding. Unless you are having\n"
"problems with this, do not modify this setting.\n"
@@ -525,13 +525,13 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"<b>Default</b>: Off"));
#endif
- modemcmds = new QPushButton(i18n("Mod&em Commands..."), parent);
- QWhatsThis::add(modemcmds,
+ modemcmds = new TQPushButton(i18n("Mod&em Commands..."), parent);
+ TQWhatsThis::add(modemcmds,
i18n("Allows you to change the AT command for\n"
"your modem."));
- modeminfo_button = new QPushButton(i18n("&Query Modem..."), parent);
- QWhatsThis::add(modeminfo_button,
+ modeminfo_button = new TQPushButton(i18n("&Query Modem..."), parent);
+ TQWhatsThis::add(modeminfo_button,
i18n("Most modems support the ATI command set to\n"
"find out vendor and revision of your modem.\n"
"\n"
@@ -539,16 +539,16 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"this information. It can be useful to help\n"
"you set up the modem"));
- terminal_button = new QPushButton(i18n("&Terminal..."), parent);
- QWhatsThis::add(terminal_button,
+ terminal_button = new TQPushButton(i18n("&Terminal..."), parent);
+ TQWhatsThis::add(terminal_button,
i18n("Opens the built-in terminal program. You\n"
"can use this if you want to play around\n"
"with your modem's AT command set"));
- QHBoxLayout *hbox = new QHBoxLayout();
+ TQHBoxLayout *hbox = new TQHBoxLayout();
l1->addLayout(hbox);
hbox->addStretch(1);
- QVBoxLayout *vbox = new QVBoxLayout();
+ TQVBoxLayout *vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addWidget(modemcmds);
@@ -558,12 +558,12 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
hbox->addStretch(1);
l1->addStretch(1);
- connect(modemcmds, SIGNAL(clicked()),
- SLOT(modemcmdsbutton()));
- connect(modeminfo_button, SIGNAL(clicked()),
- SLOT(query_modem()));
- connect(terminal_button, SIGNAL(clicked()),
- SLOT(terminal()));
+ connect(modemcmds, TQT_SIGNAL(clicked()),
+ TQT_SLOT(modemcmdsbutton()));
+ connect(modeminfo_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(query_modem()));
+ connect(terminal_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(terminal()));
// Create the Modem Command so if the window is not opened they are autosaved anyway
mc = new ModemCommands(this);
@@ -607,55 +607,55 @@ bool ModemWidget2::save()
// Setup widget for the graph
//
/////////////////////////////////////////////////////////////////////////////
-GraphSetup::GraphSetup(QWidget *parent, const char *name) :
- QWidget(parent, name)
+GraphSetup::GraphSetup(TQWidget *parent, const char *name) :
+ TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent);
+ TQVBoxLayout *tl = new TQVBoxLayout(parent);
bool enable;
- QColor bg, text, in, out;
+ TQColor bg, text, in, out;
gpppdata.graphingOptions(enable, bg, text, in, out);
- enable_check = new QCheckBox(i18n("&Enable throughput graph"), parent);
+ enable_check = new TQCheckBox(i18n("&Enable throughput graph"), parent);
tl->addWidget(enable_check);
- grpColor = new QGroupBox(2, Qt::Horizontal,
+ grpColor = new TQGroupBox(2, Qt::Horizontal,
i18n("Graph Colors"), parent);
tl->addWidget(grpColor);
- QLabel *label;
+ TQLabel *label;
- label = new QLabel(i18n("Bac&kground:"), grpColor);
+ label = new TQLabel(i18n("Bac&kground:"), grpColor);
bg_color = new KColorButton(bg, grpColor);
bg_color->setFixedSize(80, 24);
label->setBuddy(bg_color);
- label = new QLabel(i18n("&Text:"), grpColor);
+ label = new TQLabel(i18n("&Text:"), grpColor);
text_color = new KColorButton(text, grpColor);
text_color->setFixedSize(80, 24);
label->setBuddy(text_color);
- label = new QLabel(i18n("I&nput bytes:"), grpColor);
+ label = new TQLabel(i18n("I&nput bytes:"), grpColor);
in_color = new KColorButton(in, grpColor);
in_color->setFixedSize(80, 24);
label->setBuddy(in_color);
- label = new QLabel(i18n("O&utput bytes:"), grpColor);
+ label = new TQLabel(i18n("O&utput bytes:"), grpColor);
out_color = new KColorButton(out, grpColor);
out_color->setFixedSize(80, 24);
label->setBuddy(out_color);
tl->addStretch();
- connect(enable_check, SIGNAL(toggled(bool)), this, SLOT(enableToggled(bool)));
- connect(bg_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(text_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(in_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(out_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
+ connect(enable_check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableToggled(bool)));
+ connect(bg_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(text_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(in_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(out_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
tl->activate();
@@ -669,7 +669,7 @@ void GraphSetup::enableToggled(bool b) {
}
-void GraphSetup::colorChanged(const QColor &) {
+void GraphSetup::colorChanged(const TQColor &) {
save();
}
diff --git a/kppp/general.h b/kppp/general.h
index 9fc22105..29d77738 100644
--- a/kppp/general.h
+++ b/kppp/general.h
@@ -25,22 +25,22 @@
#ifndef _GENERAL_H_
#define _GENERAL_H_
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kcolorbutton.h>
class QSlider;
class KIntNumInput;
class ModemCommands;
-class GeneralWidget : public QWidget {
+class GeneralWidget : public TQWidget {
Q_OBJECT
public:
- GeneralWidget( QWidget *parent=0, const char *name=0 );
+ GeneralWidget( TQWidget *parent=0, const char *name=0 );
private slots:
void pppdtimeoutchanged(int);
@@ -55,39 +55,39 @@ private slots:
};
-class ModemWidget : public QWidget {
+class ModemWidget : public TQWidget {
Q_OBJECT
public:
- ModemWidget(QWidget *parent=0, bool isnewmodem=true, const char *name=0);
+ ModemWidget(TQWidget *parent=0, bool isnewmodem=true, const char *name=0);
bool save();
- QLineEdit *connectName() { return connectname_l;}
+ TQLineEdit *connectName() { return connectname_l;}
private slots:
private:
- QLineEdit *connectname_l;
- QLabel *connect_label;
+ TQLineEdit *connectname_l;
+ TQLabel *connect_label;
- QComboBox *enter;
- QLabel *label1;
- QLabel *label2;
- QLabel *labeltmp;
- QLabel *labelenter;
- QComboBox *modemdevice;
- QComboBox *flowcontrol;
+ TQComboBox *enter;
+ TQLabel *label1;
+ TQLabel *label2;
+ TQLabel *labeltmp;
+ TQLabel *labelenter;
+ TQComboBox *modemdevice;
+ TQComboBox *flowcontrol;
- QComboBox *baud_c;
- QLabel *baud_label;
+ TQComboBox *baud_c;
+ TQLabel *baud_label;
KIntNumInput *modemtimeout;
- QCheckBox *modemlockfile;
- QStringList flowListItem;
+ TQCheckBox *modemlockfile;
+ TQStringList flowListItem;
};
-class ModemWidget2 : public QWidget {
+class ModemWidget2 : public TQWidget {
Q_OBJECT
public:
- ModemWidget2(QWidget *parent=0, const char *name=0);
+ ModemWidget2(TQWidget *parent=0, const char *name=0);
bool save();
private slots:
@@ -97,33 +97,33 @@ private slots:
void query_modem();
private:
- QLabel *labeltmp;
- QPushButton *modemcmds;
- QPushButton *modeminfo_button;
- QPushButton *terminal_button;
- QFrame *fline;
- QCheckBox *waitfordt;
+ TQLabel *labeltmp;
+ TQPushButton *modemcmds;
+ TQPushButton *modeminfo_button;
+ TQPushButton *terminal_button;
+ TQFrame *fline;
+ TQCheckBox *waitfordt;
KIntNumInput *busywait;
- QCheckBox *chkbox1;
- QSlider *volume;
+ TQCheckBox *chkbox1;
+ TQSlider *volume;
ModemCommands* mc;
};
-class GraphSetup : public QWidget {
+class GraphSetup : public TQWidget {
Q_OBJECT
public:
- GraphSetup(QWidget *parent = 0, const char *name = 0);
+ GraphSetup(TQWidget *parent = 0, const char *name = 0);
private slots:
void enableToggled(bool);
- void colorChanged(const QColor &);
+ void colorChanged(const TQColor &);
private:
void save();
- QGroupBox *grpColor;
- QCheckBox *enable_check;
+ TQGroupBox *grpColor;
+ TQCheckBox *enable_check;
KColorButton *bg_color;
KColorButton *text_color;
diff --git a/kppp/iplined.cpp b/kppp/iplined.cpp
index f63c446f..197b13a6 100644
--- a/kppp/iplined.cpp
+++ b/kppp/iplined.cpp
@@ -26,17 +26,17 @@
#include "iplined.h"
-IPLineEdit::IPLineEdit( QWidget *parent, const char *name )
+IPLineEdit::IPLineEdit( TQWidget *parent, const char *name )
: KRestrictedLine(parent, name, "0123456789.")
{
setMaxLength(3 * 4 + 1 * 3);
}
-QSize IPLineEdit::sizeHint() const {
- QFontMetrics fm = fontMetrics();
+TQSize IPLineEdit::sizeHint() const {
+ TQFontMetrics fm = fontMetrics();
- QSize s;
- s.setHeight(QLineEdit::sizeHint().height());
+ TQSize s;
+ s.setHeight(TQLineEdit::sizeHint().height());
s.setWidth(fm.boundingRect("888.888.888.888XX").width());
return s;
}
diff --git a/kppp/iplined.h b/kppp/iplined.h
index 24517e46..b978b6f5 100644
--- a/kppp/iplined.h
+++ b/kppp/iplined.h
@@ -31,10 +31,10 @@
class IPLineEdit : public KRestrictedLine {
public:
- IPLineEdit( QWidget *parent=0, const char *name=0 );
+ IPLineEdit( TQWidget *parent=0, const char *name=0 );
~IPLineEdit() {}
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
};
#endif
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
index 9572efbf..2006489e 100644
--- a/kppp/kpppwidget.cpp
+++ b/kppp/kpppwidget.cpp
@@ -24,16 +24,16 @@
#include "kpppwidget.h"
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <kdialogbase.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -74,8 +74,8 @@
extern KPPPWidget *p_kppp;
-KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
- : DCOPObject( "KpppIface" ), QWidget(parent, name)
+KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
+ : DCOPObject( "KpppIface" ), TQWidget(parent, name)
, acct(0)
, m_bCmdlAccount (false)
, m_bCmdlModem (false)
@@ -90,45 +90,45 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
installEventFilter(this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
- l1 = new QGridLayout(4, 4);
+ l1 = new TQGridLayout(4, 4);
tl->addLayout(l1);
l1->addColSpacing(0, 10);
l1->addColSpacing(3, 10);
l1->setColStretch(1, 3);
l1->setColStretch(2, 4);
- label1 = new QLabel(i18n("C&onnect to: "), this);
+ label1 = new TQLabel(i18n("C&onnect to: "), this);
l1->addWidget(label1, 0, 1);
- connectto_c = new QComboBox(false, this);
+ connectto_c = new TQComboBox(false, this);
label1->setBuddy(connectto_c);
- connect(connectto_c, SIGNAL(activated(int)),
- SLOT(newdefaultaccount(int)));
+ connect(connectto_c, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(newdefaultaccount(int)));
l1->addWidget(connectto_c, 0, 2);
- label7 = new QLabel(i18n("Use &modem: "), this);
+ label7 = new TQLabel(i18n("Use &modem: "), this);
// l1->addWidget(label7, 1, 1); (done in resetmodems())
- modem_c = new QComboBox(false, this);
+ modem_c = new TQComboBox(false, this);
label7->setBuddy(connectto_c);
m_bModemCShown = false;
- connect(modem_c, SIGNAL(activated(int)),
- SLOT(newdefaultmodem(int)));
+ connect(modem_c, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(newdefaultmodem(int)));
// l1->addWidget(modem_c, 1, 2); (done in resetmodems())
- ID_Label = new QLabel(i18n("&Login ID:"), this);
+ ID_Label = new TQLabel(i18n("&Login ID:"), this);
l1->addWidget(ID_Label, 2, 1);
// the entry line for usernames
- ID_Edit = new QLineEdit(this);
+ ID_Edit = new TQLineEdit(this);
ID_Label->setBuddy(ID_Edit);
l1->addWidget(ID_Edit, 2, 2);
- connect(ID_Edit, SIGNAL(returnPressed()),
- this, SLOT(enterPressedInID()));
- QString tmp = i18n("<p>Type in the username that you got from your\n"
+ connect(ID_Edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(enterPressedInID()));
+ TQString tmp = i18n("<p>Type in the username that you got from your\n"
"ISP. This is especially important for PAP\n"
"and CHAP. You may omit this when you use\n"
"terminal-based or script-based authentication.\n"
@@ -136,18 +136,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
"<b>Important</b>: case is important here:\n"
"<i>myusername</i> is not the same as <i>MyUserName</i>.");
- QWhatsThis::add(ID_Label,tmp);
- QWhatsThis::add(ID_Edit,tmp);
+ TQWhatsThis::add(ID_Label,tmp);
+ TQWhatsThis::add(ID_Edit,tmp);
- PW_Label = new QLabel(i18n("&Password:"), this);
+ PW_Label = new TQLabel(i18n("&Password:"), this);
l1->addWidget(PW_Label, 3, 1);
- PW_Edit= new QLineEdit(this);
+ PW_Edit= new TQLineEdit(this);
PW_Label->setBuddy(PW_Edit);
- PW_Edit->setEchoMode(QLineEdit::Password);
+ PW_Edit->setEchoMode(TQLineEdit::Password);
l1->addWidget(PW_Edit, 3, 2);
- connect(PW_Edit, SIGNAL(returnPressed()),
- this, SLOT(enterPressedInPW()));
+ connect(PW_Edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(enterPressedInPW()));
tmp = i18n("<p>Type in the password that you got from your\n"
"ISP. This is especially important for PAP\n"
@@ -157,21 +157,21 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
"<b>Important</b>: case is important here:\n"
"<i>mypassword</i> is not the same as <i>MyPassword</i>.");
- QWhatsThis::add(PW_Label,tmp);
- QWhatsThis::add(PW_Edit,tmp);
+ TQWhatsThis::add(PW_Label,tmp);
+ TQWhatsThis::add(PW_Edit,tmp);
- QHBoxLayout *l3 = new QHBoxLayout;
+ TQHBoxLayout *l3 = new QHBoxLayout;
tl->addSpacing(5);
tl->addLayout(l3);
tl->addSpacing(5);
l3->addSpacing(10);
- log = new QCheckBox(i18n("Show lo&g window"), this);
- connect(log, SIGNAL(toggled(bool)),
- this, SLOT(log_window_toggled(bool)));
+ log = new TQCheckBox(i18n("Show lo&g window"), this);
+ connect(log, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(log_window_toggled(bool)));
log->setChecked(gpppdata.get_show_log_window());
l3->addWidget(log);
- QWhatsThis::add(log,
+ TQWhatsThis::add(log,
i18n("<p>This controls whether a log window is shown.\n"
"A log window shows the communication between\n"
"<i>kppp</i> and your modem. This will help you\n"
@@ -183,17 +183,17 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
fline = new KSeparator( KSeparator::HLine, this);
tl->addWidget(fline);
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
tl->addLayout(l2);
int minw = 0;
quit_b = new KPushButton(KStdGuiItem::quit(), this);
- connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton()));
+ connect( quit_b, TQT_SIGNAL(clicked()), TQT_SLOT(quitbutton()));
if(quit_b->sizeHint().width() > minw)
minw = quit_b->sizeHint().width();
setup_b = new KPushButton(KGuiItem(i18n("Co&nfigure..."), "configure"), this);
- connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton()));
+ connect( setup_b, TQT_SIGNAL(clicked()), TQT_SLOT(expandbutton()));
if(setup_b->sizeHint().width() > minw)
minw = setup_b->sizeHint().width();
@@ -201,18 +201,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
setup_b->setEnabled(false);
help_b = new KPushButton(KStdGuiItem::help(), this);
- connect( help_b, SIGNAL(clicked()), SLOT(helpbutton()));
+ connect( help_b, TQT_SIGNAL(clicked()), TQT_SLOT(helpbutton()));
KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true);
- help_b->setPopup((QPopupMenu*)helpMenu->menu());
+ help_b->setPopup((TQPopupMenu*)helpMenu->menu());
if(help_b->sizeHint().width() > minw)
minw = help_b->sizeHint().width();
- connect_b = new QPushButton(i18n("&Connect"), this);
+ connect_b = new TQPushButton(i18n("&Connect"), this);
connect_b->setDefault(true);
connect_b->setFocus();
- connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect()));
+ connect(connect_b, TQT_SIGNAL(clicked()), TQT_SLOT(beginConnect()));
if(connect_b->sizeHint().width() > minw)
minw = connect_b->sizeHint().width();
@@ -233,7 +233,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
// we also connect cmld_start to the beginConnect so that I can run
// the dialer through a command line argument
- connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect()));
+ connect(this,TQT_SIGNAL(cmdl_start()),this,TQT_SLOT(beginConnect()));
stats = new PPPStats;
@@ -256,28 +256,28 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
resetmodems();
con = new ConnectWidget(0, "con", stats);
KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() );
- connect(this, SIGNAL(begin_connect()),con, SLOT(preinit()));
+ connect(this, TQT_SIGNAL(begin_connect()),con, TQT_SLOT(preinit()));
- QRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
+ TQRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110);
// connect the ConnectWidgets various signals
- connect(con, SIGNAL(closeDebugWindow()),
- debugwindow, SLOT(hide()));
- connect(con, SIGNAL(debugMessage(const QString &)),
- debugwindow, SLOT(statusLabel(const QString &)));
- connect(con, SIGNAL(toggleDebugWindow()),
- debugwindow, SLOT(toggleVisibility()));
- connect(con, SIGNAL(debugPutChar(unsigned char)),
- debugwindow, SLOT(addChar(unsigned char)));
- connect(con, SIGNAL(startAccounting()),
- this, SLOT(startAccounting()));
- connect(con, SIGNAL(stopAccounting()),
- this, SLOT(stopAccounting()));
- connect(KApplication::kApplication(), SIGNAL(saveYourself()),
- this, SLOT(saveMyself()));
- connect(KApplication::kApplication(), SIGNAL(shutDown()),
- this, SLOT(shutDown()));
+ connect(con, TQT_SIGNAL(closeDebugWindow()),
+ debugwindow, TQT_SLOT(hide()));
+ connect(con, TQT_SIGNAL(debugMessage(const TQString &)),
+ debugwindow, TQT_SLOT(statusLabel(const TQString &)));
+ connect(con, TQT_SIGNAL(toggleDebugWindow()),
+ debugwindow, TQT_SLOT(toggleVisibility()));
+ connect(con, TQT_SIGNAL(debugPutChar(unsigned char)),
+ debugwindow, TQT_SLOT(addChar(unsigned char)));
+ connect(con, TQT_SIGNAL(startAccounting()),
+ this, TQT_SLOT(startAccounting()));
+ connect(con, TQT_SIGNAL(stopAccounting()),
+ this, TQT_SLOT(stopAccounting()));
+ connect(KApplication::kApplication(), TQT_SIGNAL(saveYourself()),
+ this, TQT_SLOT(saveMyself()));
+ connect(KApplication::kApplication(), TQT_SIGNAL(shutDown()),
+ this, TQT_SLOT(shutDown()));
debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55,
debugwindow->width(),debugwindow->height());
@@ -304,7 +304,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
if(m_bCmdlModem){
bool result = gpppdata.setModem(m_strCmdlModem);
if (!result){
- QString string;
+ TQString string;
string = i18n("No such Modem:\n%1\nFalling back to default").arg(m_strCmdlModem);
KMessageBox::error(this, string);
m_bCmdlModem = false;
@@ -314,7 +314,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
if(m_bCmdlAccount){
bool result = gpppdata.setAccount(m_strCmdlAccount);
if (!result){
- QString string;
+ TQString string;
string = i18n("No such Account:\n%1").arg(m_strCmdlAccount);
KMessageBox::error(this, string);
m_bCmdlAccount = false;
@@ -341,8 +341,8 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
// this timer will delay the actual disconnection DISCONNECTION_DELAY ms
// to give applications time to shutdown, logout, whatever..
- disconnectTimer = new QTimer(this);
- connect(disconnectTimer, SIGNAL(timeout()), this, SLOT(delayedDisconnect()));
+ disconnectTimer = new TQTimer(this);
+ connect(disconnectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(delayedDisconnect()));
}
KPPPWidget::~KPPPWidget()
@@ -350,8 +350,8 @@ KPPPWidget::~KPPPWidget()
delete stats;
}
-bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
- if(e->type() == QEvent::User) {
+bool KPPPWidget::eventFilter(TQObject *o, TQEvent *e) {
+ if(e->type() == TQEvent::User) {
switch(((SignalEvent*)e)->sigType()) {
case SIGINT:
kdDebug(5002) << "Received a SIGINT" << endl;
@@ -368,8 +368,8 @@ bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
}
if(o == connect_b) {
- if(e->type() == QEvent::KeyPress) {
- if(connect_b->hasFocus() && ((QKeyEvent *)e)->key() == Qt::Key_Return) {
+ if(e->type() == TQEvent::KeyPress) {
+ if(connect_b->hasFocus() && ((TQKeyEvent *)e)->key() == Qt::Key_Return) {
beginConnect();
return true;
}
@@ -391,16 +391,16 @@ void KPPPWidget::prepareSetupDialog() {
// tabWindow->setFixedSize( 365, 375 );
accounts = new AccountWidget(tabWindow->addPage( i18n("&Accounts"), i18n("Account Setup") ) );
- connect(accounts, SIGNAL(resetaccounts()),
- this, SLOT(resetaccounts()));
- connect(accounts, SIGNAL(resetCosts(const QString &)),
- this, SLOT(resetCosts(const QString &)));
- connect(accounts, SIGNAL(resetVolume(const QString &)),
- this, SLOT(resetVolume(const QString &)));
+ connect(accounts, TQT_SIGNAL(resetaccounts()),
+ this, TQT_SLOT(resetaccounts()));
+ connect(accounts, TQT_SIGNAL(resetCosts(const TQString &)),
+ this, TQT_SLOT(resetCosts(const TQString &)));
+ connect(accounts, TQT_SIGNAL(resetVolume(const TQString &)),
+ this, TQT_SLOT(resetVolume(const TQString &)));
modems = new ModemsWidget(tabWindow->addPage( i18n("&Modems"), i18n("Modems Setup") ) );
- connect(modems, SIGNAL(resetmodems()),
- this, SLOT(resetmodems()));
+ connect(modems, TQT_SIGNAL(resetmodems()),
+ this, TQT_SLOT(resetmodems()));
graph = new GraphSetup( tabWindow->addPage( i18n("&Graph"), i18n("Throughput Graph" ) ) );
general = new GeneralWidget( tabWindow->addPage( i18n("M&isc"), i18n("Miscellaneous Settings") ) );
@@ -476,11 +476,11 @@ void KPPPWidget::resetaccounts() {
PW_Edit->setText(gpppdata.storedPassword());
}
- connect(ID_Edit, SIGNAL(textChanged(const QString &)),
- this, SLOT(usernameChanged(const QString &)));
+ connect(ID_Edit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(usernameChanged(const TQString &)));
- connect(PW_Edit, SIGNAL(textChanged(const QString &)),
- this, SLOT(passwordChanged(const QString &)));
+ connect(PW_Edit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(passwordChanged(const TQString &)));
if (ID_Edit->text().isEmpty())
ID_Edit->setFocus();
@@ -580,10 +580,10 @@ void KPPPWidget::sigPPPDDied() {
// stop the disconnect timer (just in case)
disconnectTimer->stop();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
kdDebug(5002) << "Executing command on disconnect since pppd has died." << endl;
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
stopAccounting();
@@ -611,7 +611,7 @@ void KPPPWidget::sigPPPDDied() {
gpppdata.setpppdRunning(false);
// // not in a signal handler !!! KNotifyClient::beep();
- QString msg;
+ TQString msg;
if (gpppdata.pppdError() == E_IF_TIMEOUT)
msg = i18n("Timeout expired while waiting for the PPP interface "
"to come up.");
@@ -661,7 +661,7 @@ void KPPPWidget::sigChld() {
// if(id == helperPid && helperPid != -1) {
// kdDebug(5002) << "It was the setuid child that died" << endl;
// helperPid = -1;
- QString msg = i18n("kppp's helper process just died.\n"
+ TQString msg = i18n("kppp's helper process just died.\n"
"Since further execution would be pointless, "
"kppp will shut down now.");
KMessageBox::error(0L, msg);
@@ -700,7 +700,7 @@ void KPPPWidget::beginConnect() {
gpppdata.setPassword(gpppdata.storedPassword());
}
- QFileInfo info(pppdPath());
+ TQFileInfo info(pppdPath());
if(!info.exists()){
KMessageBox::error(this, i18n("Cannot find the PPP daemon!\n"
@@ -711,7 +711,7 @@ void KPPPWidget::beginConnect() {
#if 0
if(!info.isExecutable()){
- QString string;
+ TQString string;
string = i18n("kppp cannot execute:\n %1\n"
"Please make sure that you have given kppp "
"setuid permission and that "
@@ -723,16 +723,16 @@ void KPPPWidget::beginConnect() {
#endif
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
device = gpppdata.modemDevice();
- QFileInfo info2(device);
+ TQFileInfo info2(device);
if(!info2.exists()){
- QString string;
+ TQString string;
string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
"your modem device properly "
"and/or adjust the location of the modem device on "
@@ -758,7 +758,7 @@ void KPPPWidget::beginConnect() {
if(!Requester::rq->setSecret(gpppdata.authMethod(),
encodeWord(gpppdata.storedUsername()),
encodeWord(gpppdata.password()))) {
- QString s;
+ TQString s;
s = i18n("Cannot create PAP/CHAP authentication\n"
"file \"%1\"").arg(PAP_AUTH_FILE);
KMessageBox::error(this, s);
@@ -768,14 +768,14 @@ void KPPPWidget::beginConnect() {
}
if (gpppdata.phonenumber().isEmpty()) {
- QString s = i18n("You must specify a telephone number.");
+ TQString s = i18n("You must specify a telephone number.");
KMessageBox::error(this, s);
return;
}
hide();
- QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
con->setCaption(tit);
con->enableButtons();
con->show();
@@ -797,7 +797,7 @@ void KPPPWidget::disconnect() {
if (disconnectTimer->isActive()) return; // you had already pressed disconnect before
// signal other applications that we are about to go offline now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", TQByteArray());
con_win->hide();
con->show();
con->disableButtons(); // will reenable them later in delayedDisconnect()
@@ -807,7 +807,7 @@ void KPPPWidget::disconnect() {
con->setMsg(i18n("Executing command before disconnection."));
kapp->processEvents();
- QApplication::flushX();
+ TQApplication::flushX();
pid_t id = execute_command(gpppdata.command_before_disconnect());
int i, status;
@@ -835,9 +835,9 @@ void KPPPWidget::delayedDisconnect() {
Requester::rq->killPPPDaemon();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
Requester::rq->removeSecret(AUTH_PAP);
@@ -879,9 +879,9 @@ void KPPPWidget::quitbutton() {
disconnectTimer->stop();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
removedns();
Modem::modem->unlockdevice();
@@ -910,24 +910,24 @@ void KPPPWidget::startAccounting() {
if(!gpppdata.AcctEnabled())
return;
- QString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ TQString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
// if(::access(d.data(), X_OK) != 0)
acct = new Accounting(this, stats);
// else
// acct = new ExecutableAccounting(this);
// connect to the accounting object
- connect(acct, SIGNAL(changed(QString, QString)),
- con_win, SLOT(slotAccounting(QString, QString)));
+ connect(acct, TQT_SIGNAL(changed(TQString, TQString)),
+ con_win, TQT_SLOT(slotAccounting(TQString, TQString)));
if(!acct->loadRuleSet(gpppdata.accountingFile())) {
- QString s= i18n("Can not load the accounting "
+ TQString s= i18n("Can not load the accounting "
"ruleset \"%1\".").arg(gpppdata.accountingFile());
// starting the messagebox with a timer will prevent us
// from blocking the calling function ConnectWidget::timerEvent
ruleset_load_errmsg = s;
- QTimer::singleShot(0, this, SLOT(rulesetLoadError()));
+ TQTimer::singleShot(0, this, TQT_SLOT(rulesetLoadError()));
return;
} else
acct->slotStart();
@@ -958,13 +958,13 @@ void KPPPWidget::showStats() {
}
-void KPPPWidget::usernameChanged(const QString &) {
+void KPPPWidget::usernameChanged(const TQString &) {
// store username for later use
gpppdata.setStoredUsername(ID_Edit->text());
}
-void KPPPWidget::passwordChanged(const QString &) {
+void KPPPWidget::passwordChanged(const TQString &) {
// store the password if so requested
if(gpppdata.storePassword())
gpppdata.setStoredPassword(PW_Edit->text());
@@ -973,17 +973,17 @@ void KPPPWidget::passwordChanged(const QString &) {
}
-void KPPPWidget::setPW_Edit(const QString &pw) {
+void KPPPWidget::setPW_Edit(const TQString &pw) {
PW_Edit->setText(pw);
}
-void KPPPWidget::resetCosts(const QString &s) {
+void KPPPWidget::resetCosts(const TQString &s) {
AccountingBase::resetCosts(s);
}
-void KPPPWidget::resetVolume(const QString &s) {
+void KPPPWidget::resetVolume(const TQString &s) {
AccountingBase::resetVolume(s);
}
@@ -992,9 +992,9 @@ void KPPPWidget::resetVolume(const QString &s) {
* If we write the username and password to the secrets file
* we'll therefore have to escape back slashes.
*/
-QString KPPPWidget::encodeWord(const QString &s) {
- QString r = s;
- r.replace(QRegExp("\\"), "\\\\");
+TQString KPPPWidget::encodeWord(const TQString &s) {
+ TQString r = s;
+ r.replace(TQRegExp("\\"), "\\\\");
return r;
}
@@ -1010,21 +1010,21 @@ void KPPPWidget::showNews() {
*/
#define QUICKHELP_HINT "Hint_QuickHelp"
if(gpppdata.readNumConfig(GENERAL_GRP, QUICKHELP_HINT, 0) == 0) {
- QDialog dlg(0, 0, true);
+ TQDialog dlg(0, 0, true);
dlg.setCaption(i18n("Recent Changes in KPPP"));
- QVBoxLayout *tl = new QVBoxLayout(&dlg, 10, 10);
- QHBoxLayout *l1 = new QHBoxLayout(10);
- QVBoxLayout *l2 = new QVBoxLayout(10);
+ TQVBoxLayout *tl = new TQVBoxLayout(&dlg, 10, 10);
+ TQHBoxLayout *l1 = new TQHBoxLayout(10);
+ TQVBoxLayout *l2 = new TQVBoxLayout(10);
tl->addLayout(l1);
- QLabel *icon = new QLabel(&dlg);
+ TQLabel *icon = new TQLabel(&dlg);
icon->setPixmap(BarIcon("exclamation"));
icon->setFixedSize(icon->sizeHint());
l1->addWidget(icon);
l1->addLayout(l2);
- QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
+ TQLabel *l = new TQLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
"called \"Quickhelp\". It's similar to a tooltip,\n"
"but you can activate it whenever you want.\n"
"\n"
@@ -1036,15 +1036,15 @@ void KPPPWidget::showNews() {
"To test it, right-click somewhere in this text."),
&dlg);
- QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg);
+ TQCheckBox *cb = new TQCheckBox(i18n("Don't show this hint again"), &dlg);
cb->setFixedSize(cb->sizeHint());
KButtonBox *bbox = new KButtonBox(&dlg);
bbox->addStretch(1);
- QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bbox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- dlg.connect(ok, SIGNAL(clicked()),
- &dlg, SLOT(accept()));
+ dlg.connect(ok, TQT_SIGNAL(clicked()),
+ &dlg, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
@@ -1052,12 +1052,12 @@ void KPPPWidget::showNews() {
l2->addWidget(cb);
tl->addWidget(bbox);
- QString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
+ TQString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
"This window will stay open until you\n"
"click a mouse button or a press a key.\n");
- QWhatsThis::add(cb,tmp);
- QWhatsThis::add(l, tmp);
+ TQWhatsThis::add(cb,tmp);
+ TQWhatsThis::add(l, tmp);
dlg.exec();
if(cb->isChecked()) {
diff --git a/kppp/kpppwidget.h b/kppp/kpppwidget.h
index 9ca88990..55f5b84a 100644
--- a/kppp/kpppwidget.h
+++ b/kppp/kpppwidget.h
@@ -27,7 +27,7 @@
#ifndef __KPPPWIDGET_H__
#define __KPPPWIDGET_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <dcopclient.h>
@@ -50,24 +50,24 @@ class PPPStats;
class KDialogBase;
class KPushButton;
-class SignalEvent : public QEvent {
+class SignalEvent : public TQEvent {
public:
- SignalEvent(int s) : QEvent(User), sig(s) { }
+ SignalEvent(int s) : TQEvent(User), sig(s) { }
int sigType() const { return sig; }
private:
int sig;
};
-class KPPPWidget : public QWidget, virtual public KpppIface {
+class KPPPWidget : public TQWidget, virtual public KpppIface {
Q_OBJECT
public:
- KPPPWidget( QWidget *parent=0, const char *name=0 );
+ KPPPWidget( TQWidget *parent=0, const char *name=0 );
~KPPPWidget();
- void setPW_Edit(const QString &);
- virtual bool eventFilter(QObject *, QEvent *);
+ void setPW_Edit(const TQString &);
+ virtual bool eventFilter(TQObject *, TQEvent *);
void setQuitOnDisconnect (bool b);
bool quitOnDisconnect () {return m_bQuitOnDisconnect;};
@@ -80,8 +80,8 @@ private slots:
void helpbutton();
void setup();
void rulesetLoadError();
- void usernameChanged(const QString &);
- void passwordChanged(const QString &);
+ void usernameChanged(const TQString &);
+ void passwordChanged(const TQString &);
void enterPressedInID();
void enterPressedInPW();
void saveMyself();
@@ -93,8 +93,8 @@ public slots:
void beginConnect();
void resetaccounts();
void resetmodems();
- void resetCosts(const QString &);
- void resetVolume(const QString &);
+ void resetCosts(const TQString &);
+ void resetVolume(const TQString &);
void disconnect();
void log_window_toggled(bool on);
void startAccounting();
@@ -106,10 +106,10 @@ signals:
void cmdl_start();
public:
- QCheckBox *log;
+ TQCheckBox *log;
bool connected;
DebugWidget *debugwindow;
- QString con_speed;
+ TQString con_speed;
ConnectWidget *con;
ConWindow *con_win;
PPPStatsDlg *statdlg;
@@ -122,32 +122,32 @@ private:
void interruptConnection();
void sigChld();
void sigPPPDDied();
- QString encodeWord(const QString &s);
+ TQString encodeWord(const TQString &s);
void showNews ();
void setButtons();
- QString ruleset_load_errmsg;
+ TQString ruleset_load_errmsg;
- QGridLayout *l1;
+ TQGridLayout *l1;
KPushButton *help_b;
KPushButton *setup_b;
- QFrame *fline;
- QFrame *fline1;
- QPushButton *connect_b;
- QComboBox *connectto_c;
- QComboBox *modem_c;
- QLabel *ID_Label;
- QLabel *PW_Label;
- QLineEdit *ID_Edit;
- QLineEdit *PW_Edit;
- QLabel *label1;
- QLabel *label2;
- QLabel *label3;
- QLabel *label4;
- QLabel *label5;
- QLabel *label6;
- QLabel *label7;
- QLabel *radio_label;
+ TQFrame *fline;
+ TQFrame *fline1;
+ TQPushButton *connect_b;
+ TQComboBox *connectto_c;
+ TQComboBox *modem_c;
+ TQLabel *ID_Label;
+ TQLabel *PW_Label;
+ TQLineEdit *ID_Edit;
+ TQLineEdit *PW_Edit;
+ TQLabel *label1;
+ TQLabel *label2;
+ TQLabel *label3;
+ TQLabel *label4;
+ TQLabel *label5;
+ TQLabel *label6;
+ TQLabel *label7;
+ TQLabel *radio_label;
KDialogBase *tabWindow;
@@ -158,15 +158,15 @@ private:
AboutWidget *about;
- QString m_strCmdlAccount;
- QString m_strCmdlModem;
+ TQString m_strCmdlAccount;
+ TQString m_strCmdlModem;
bool m_bQuitOnDisconnect;
bool m_bCmdlAccount;
bool m_bCmdlModem;
bool m_bModemCShown;
- QTimer *disconnectTimer;
+ TQTimer *disconnectTimer;
};
diff --git a/kppp/loginterm.cpp b/kppp/loginterm.cpp
index a0dbd2e2..2aeed5e4 100644
--- a/kppp/loginterm.cpp
+++ b/kppp/loginterm.cpp
@@ -35,8 +35,8 @@
extern KPPPWidget *p_kppp;
-LoginMultiLineEdit::LoginMultiLineEdit(QWidget *parent, const char *name)
- : QMultiLineEdit(parent, name)
+LoginMultiLineEdit::LoginMultiLineEdit(TQWidget *parent, const char *name)
+ : TQMultiLineEdit(parent, name)
{
}
@@ -47,25 +47,25 @@ LoginMultiLineEdit::~LoginMultiLineEdit() {
void LoginMultiLineEdit::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
p_kppp->debugwindow->addChar(c);
}
void LoginMultiLineEdit::myreturn() {
- QMultiLineEdit::home();
+ TQMultiLineEdit::home();
}
void LoginMultiLineEdit::mynewline() {
- QMultiLineEdit::end(FALSE);
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::end(FALSE);
+ TQMultiLineEdit::newLine();
p_kppp->debugwindow->addChar('\n');
}
-void LoginMultiLineEdit::keyPressEvent(QKeyEvent *k) {
+void LoginMultiLineEdit::keyPressEvent(TQKeyEvent *k) {
unsigned char c = (unsigned char) k->ascii();
if ((int)c == 0) return;
@@ -93,17 +93,17 @@ void LoginMultiLineEdit::readChar(unsigned char c) {
}
-LoginTerm::LoginTerm (QWidget *parent, const char *name)
- : QDialog(parent, name, FALSE)
+LoginTerm::LoginTerm (TQWidget *parent, const char *name)
+ : TQDialog(parent, name, FALSE)
{
setCaption(i18n("Login Terminal Window"));
setMinimumSize(300, 200);
setMaximumSize(600, 400);
resize(400, 300);
- QVBoxLayout *tl = new QVBoxLayout(this, 2);
- QGridLayout *vgr = new QGridLayout(2, 1);
- QGridLayout *hgr = new QGridLayout(1, 2, 30);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 2);
+ TQGridLayout *vgr = new TQGridLayout(2, 1);
+ TQGridLayout *hgr = new TQGridLayout(1, 2, 30);
tl->addLayout(vgr);
vgr->addLayout(hgr, 1, 0);
@@ -116,11 +116,11 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name)
cancel_b = new KPushButton(KStdGuiItem::cancel(), this, "cancel");
cancel_b->setFixedHeight(25);
- connect(cancel_b, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel_b, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
continue_b = new KPushButton(KStdGuiItem::cont(), this, "continue");
continue_b->setFixedHeight(25);
- connect(continue_b, SIGNAL(clicked()), SLOT(continuebutton()));
+ connect(continue_b, TQT_SIGNAL(clicked()), TQT_SLOT(continuebutton()));
int mwidth;
if (cancel_b->sizeHint().width() > continue_b->sizeHint().width())
@@ -136,7 +136,7 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name)
cont = false;
- Modem::modem->notify(text_window, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(text_window, TQT_SLOT(readChar(unsigned char)));
}
diff --git a/kppp/loginterm.h b/kppp/loginterm.h
index 1fa3f05d..1b8a0cc3 100644
--- a/kppp/loginterm.h
+++ b/kppp/loginterm.h
@@ -1,21 +1,21 @@
#ifndef _LOGINTERM_H_
#define _LOGINTERM_H_
-#include <qdialog.h>
-#include <qmultilineedit.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqdialog.h>
+#include <tqmultilineedit.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
-class LoginMultiLineEdit : public QMultiLineEdit {
+class LoginMultiLineEdit : public TQMultiLineEdit {
Q_OBJECT
public:
- LoginMultiLineEdit(QWidget *parent, const char *name);
+ LoginMultiLineEdit(TQWidget *parent, const char *name);
~LoginMultiLineEdit();
- void keyPressEvent(QKeyEvent *k);
+ void keyPressEvent(TQKeyEvent *k);
void insertChar(unsigned char c);
void myreturn();
void mynewline();
@@ -25,10 +25,10 @@ public slots:
};
-class LoginTerm : public QDialog {
+class LoginTerm : public TQDialog {
Q_OBJECT
public:
- LoginTerm(QWidget *parent, const char *name);
+ LoginTerm(TQWidget *parent, const char *name);
bool pressedContinue();
@@ -38,8 +38,8 @@ public slots:
private:
LoginMultiLineEdit *text_window;
- QPushButton *cancel_b;
- QPushButton *continue_b;
+ TQPushButton *cancel_b;
+ TQPushButton *continue_b;
bool cont;
};
diff --git a/kppp/logview/export.cpp b/kppp/logview/export.cpp
index 7f810a6a..14c614c4 100644
--- a/kppp/logview/export.cpp
+++ b/kppp/logview/export.cpp
@@ -22,17 +22,17 @@
#include "export.h"
-#include <qpushbutton.h>
-#include <qtextcodec.h>
+#include <tqpushbutton.h>
+#include <tqtextcodec.h>
class Export;
/***** ExportFormats *****/
static struct {
int id;
- QString name;
- QString desc;
- QString ext;
+ TQString name;
+ TQString desc;
+ TQString ext;
}
ExportFormats [] = {
@@ -47,7 +47,7 @@ ExportFormats [] = {
/***** ExportWizard *****/
-ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
+ExportWizard::ExportWizard(TQWidget *parent, const TQString &_date)
: KWizard(parent, "", true) {
date = _date;
@@ -56,13 +56,13 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
setCaption(i18n("Export Wizard for kPPP Logs"));
/* format-page */
- formatPage = new QWidget();
- QHBoxLayout *formatLayout = new QHBoxLayout(formatPage);
+ formatPage = new TQWidget();
+ TQHBoxLayout *formatLayout = new TQHBoxLayout(formatPage);
- typeList = new QListBox(formatPage);
- connect(typeList, SIGNAL(highlighted(int)), SLOT (typeHighlighted(int)));
+ typeList = new TQListBox(formatPage);
+ connect(typeList, TQT_SIGNAL(highlighted(int)), TQT_SLOT (typeHighlighted(int)));
typeList->setMinimumSize(50, 200);
- QToolTip::add(typeList, i18n("List with possible output formats"));
+ TQToolTip::add(typeList, i18n("List with possible output formats"));
int i=0;
while (ExportFormats[i].id) { // add each format to the list
typeList->insertItem(i18n(ExportFormats[i].name.utf8()));
@@ -72,7 +72,7 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
formatLayout->addWidget(typeList);
formatLayout->addSpacing(10);
- typeInfo = new QLabel(formatPage);
+ typeInfo = new TQLabel(formatPage);
typeInfo->setAlignment(Qt::AlignTop | Qt::WordBreak);
typeInfo->setText(i18n("<qt><b>Please choose the output format on the left side.</b></qt>"));
typeInfo->setMinimumSize(350, 200);
@@ -82,25 +82,25 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
/* filename-page */
- filenamePage = new QWidget();
- QVBoxLayout *filenameLayout = new QVBoxLayout( filenamePage );
+ filenamePage = new TQWidget();
+ TQVBoxLayout *filenameLayout = new TQVBoxLayout( filenamePage );
- QLabel *fnLbl = new QLabel(filenamePage);
+ TQLabel *fnLbl = new TQLabel(filenamePage);
fnLbl->setText(i18n("Filename:"));
filenameLayout->addWidget(fnLbl);
- fnLine = new QLineEdit(filenamePage);
+ fnLine = new TQLineEdit(filenamePage);
fnLine->setText(i18n("[No file selected]"));
fnLine->setReadOnly(true);
filenameLayout->addWidget(fnLine);
filenameLayout->addStretch(1);
- fnGet = new QPushButton(filenamePage);
+ fnGet = new TQPushButton(filenamePage);
fnGet->setText(i18n("&Select File..."));
fnGet->setMaximumWidth(200);
- QToolTip::add(fnGet, i18n("Select the filename of the exported output file"));
+ TQToolTip::add(fnGet, i18n("Select the filename of the exported output file"));
filenameLayout->addWidget(fnGet);
- connect(fnGet, SIGNAL(clicked()), SLOT(getFilename()));
+ connect(fnGet, TQT_SIGNAL(clicked()), TQT_SLOT(getFilename()));
filenameLayout->addStretch(2);
addPage(filenamePage, i18n("Selection of Filename"));
@@ -131,7 +131,7 @@ void ExportWizard::getFilename() {
if ( i == -1 )
return;
// prepare filter: e.g.: HTML (*.html *.HTML)
- QString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" +
+ TQString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" +
i18n(ExportFormats[i].name.utf8()) + " (*." + ExportFormats[i].ext + " *." +
ExportFormats[i].ext.upper() + ")";
@@ -144,7 +144,7 @@ void ExportWizard::getFilename() {
void ExportWizard::reject() {
hide();
- filename = QString::null;
+ filename = TQString::null;
}
void ExportWizard::accept() {
@@ -154,7 +154,7 @@ void ExportWizard::accept() {
/***** Export *****/
-Export::Export(const QString &_filename)
+Export::Export(const TQString &_filename)
: filename(_filename),
buffer("")
{
@@ -179,24 +179,24 @@ bool Export::closeFile() {
/***** CSVExport *****/
-CSVExport::CSVExport(const QString &filename, const QString &_separator)
+CSVExport::CSVExport(const TQString &filename, const TQString &_separator)
: Export(filename),
separator(_separator)
{
}
-void CSVExport::addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void CSVExport::addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
// no especially style
addDataline(a, b, c, d, e, f, g, h);
}
-void CSVExport::addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void CSVExport::addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
buffer+=a + separator +
b + separator +
c + separator +
@@ -217,14 +217,14 @@ void CSVExport::setFinishCode() {
/***** HTMLExport *****/
-HTMLExport::HTMLExport(const QString &filename, const QString &date)
+HTMLExport::HTMLExport(const TQString &filename, const TQString &date)
: Export(filename) {
- QString title = i18n("Connection log for %1").arg(date);
+ TQString title = i18n("Connection log for %1").arg(date);
buffer = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
buffer.append("<html>\n<head>\n <title>"+title+"</title>\n");
- buffer.append(QString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
- + QTextCodec::codecForLocale()->mimeName() +
- QString::fromLatin1("\">"));
+ buffer.append(TQString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
+ + TQTextCodec::codecForLocale()->mimeName() +
+ TQString::fromLatin1("\">"));
buffer.append("\n</head>\n<body>\n<h1>"+title+"</h1>\n\n");
buffer.append("<table width=\"100%\" border=\"1\">\n");
@@ -234,13 +234,13 @@ HTMLExport::HTMLExport(const QString &filename, const QString &date)
tdEndCode = "</td>";
}
-void HTMLExport::addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void HTMLExport::addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
// simply bold font
- QString bak1 = tdStartCode; tdStartCode.append("<b>");
- QString bak2 = tdEndCode; tdEndCode.prepend("</b>");
+ TQString bak1 = tdStartCode; tdStartCode.append("<b>");
+ TQString bak2 = tdEndCode; tdEndCode.prepend("</b>");
addDataline(a, b, c, d, e, f, g, h);
@@ -249,10 +249,10 @@ void HTMLExport::addHeadline(const QString &a, const QString &b,
tdEndCode = bak2;
}
-void HTMLExport::addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void HTMLExport::addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
buffer+= trStartCode +
tdStartCode + a + tdEndCode +
tdStartCode + b + tdEndCode +
diff --git a/kppp/logview/export.h b/kppp/logview/export.h
index f192e7d5..3c601e96 100644
--- a/kppp/logview/export.h
+++ b/kppp/logview/export.h
@@ -23,13 +23,13 @@
#ifndef KPPPEXPORT_H
#define KPPPEXPORT_H
-#include <qwidget.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
#include <kwizard.h>
#include <klocale.h>
@@ -41,11 +41,11 @@ class Export;
class ExportWizard : public KWizard {
Q_OBJECT
public:
- ExportWizard(QWidget *parent, const QString &_date);
+ ExportWizard(TQWidget *parent, const TQString &_date);
Export *createExportFilter();
int filterID;
- QString filename;
+ TQString filename;
public slots:
void typeHighlighted(int);
@@ -55,15 +55,15 @@ public slots:
void reject();
private:
- QWidget *formatPage;
- QListBox *typeList;
- QLabel *typeInfo;
+ TQWidget *formatPage;
+ TQListBox *typeList;
+ TQLabel *typeInfo;
- QWidget *filenamePage;
- QLineEdit *fnLine;
- QPushButton *fnGet;
+ TQWidget *filenamePage;
+ TQLineEdit *fnLine;
+ TQPushButton *fnGet;
- QString date;
+ TQString date;
};
@@ -71,68 +71,68 @@ private:
class Export {
public:
Export();
- Export(const QString &filename);
+ Export(const TQString &filename);
virtual ~Export();
bool openFile();
bool closeFile();
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) = 0;
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) = 0;
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) = 0;
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) = 0;
virtual void addEmptyLine() = 0;
virtual void setFinishCode() = 0;
protected:
- QFile file;
- QString filename;
- QString buffer;
+ TQFile file;
+ TQString filename;
+ TQString buffer;
};
/***** CSVExport *****/
class CSVExport : public Export {
public:
- CSVExport(const QString &filename, const QString &separator);
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
+ CSVExport(const TQString &filename, const TQString &separator);
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
virtual void addEmptyLine();
virtual void setFinishCode();
private:
- QString separator;
+ TQString separator;
};
/***** HTMLExport *****/
class HTMLExport : public Export {
public:
- HTMLExport(const QString &filename, const QString &date);
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
+ HTMLExport(const TQString &filename, const TQString &date);
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
virtual void addEmptyLine();
virtual void setFinishCode();
private:
- QString trStartCode;
- QString trEndCode;
- QString tdStartCode;
- QString tdEndCode;
+ TQString trStartCode;
+ TQString trEndCode;
+ TQString tdStartCode;
+ TQString tdEndCode;
};
#endif
diff --git a/kppp/logview/log.cpp b/kppp/logview/log.cpp
index b0251d53..93be0098 100644
--- a/kppp/logview/log.cpp
+++ b/kppp/logview/log.cpp
@@ -23,37 +23,37 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qprogressdialog.h>
-#include <qdir.h>
+#include <tqprogressdialog.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-QPtrList<LogInfo> logList;
-QProgressDialog *dlg;
+TQPtrList<LogInfo> logList;
+TQProgressDialog *dlg;
int loadLogs() {
int logsize = 0;
- QString logdirname = locateLocal("data", "kppp/Log/");
- QDir logdir(logdirname, "*.log");
+ TQString logdirname = locateLocal("data", "kppp/Log/");
+ TQDir logdir(logdirname, "*.log");
kdDebug(5002) << "logdirname: " << logdirname << endl;
// get log file size
const QFileInfoList *list = logdir.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0) {
logsize += fi->size();
++it;
}
- dlg = new QProgressDialog(i18n("Loading log files"),
- QString::null,
+ dlg = new TQProgressDialog(i18n("Loading log files"),
+ TQString::null,
logsize);
dlg->setProgress(0);
@@ -71,11 +71,11 @@ int loadLogs() {
return retval;
}
-int loadLog(QString fname) {
+int loadLog(TQString fname) {
FILE *f;
int warning=0;
- f = fopen(QFile::encodeName(fname), "r");
+ f = fopen(TQFile::encodeName(fname), "r");
if(f == NULL)
return 1;
diff --git a/kppp/logview/log.h b/kppp/logview/log.h
index 2297bd63..d8fa15cd 100644
--- a/kppp/logview/log.h
+++ b/kppp/logview/log.h
@@ -22,19 +22,19 @@
#define __LOG__H__
#include "loginfo.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
-typedef QPtrList<LogInfo> QLogInfoBase;
-typedef QPtrListIterator<LogInfo> QLogInfoIterator;
+typedef TQPtrList<LogInfo> QLogInfoBase;
+typedef TQPtrListIterator<LogInfo> QLogInfoIterator;
class QLogList : public QLogInfoBase {
public:
virtual int compareItems(Item, Item);
};
-extern QPtrList<LogInfo> logList;
+extern TQPtrList<LogInfo> logList;
int loadLogs();
-int loadLog(QString);
+int loadLog(TQString);
#endif
diff --git a/kppp/logview/loginfo.cpp b/kppp/logview/loginfo.cpp
index 9544f389..321ce7c5 100644
--- a/kppp/logview/loginfo.cpp
+++ b/kppp/logview/loginfo.cpp
@@ -33,27 +33,27 @@
char *mystrsep (char **stringp, const char *delim);
-LogInfo::LogInfo(QCString data) {
+LogInfo::LogInfo(TQCString data) {
parse(data);
}
-QDateTime LogInfo::from() const {
- QDateTime tm;
+TQDateTime LogInfo::from() const {
+ TQDateTime tm;
tm.setTime_t(_from);
return tm;
}
-QDateTime LogInfo::until() const {
- QDateTime tm;
+TQDateTime LogInfo::until() const {
+ TQDateTime tm;
tm.setTime_t(_until);
return tm;
}
-QString LogInfo::connectionName() const {
+TQString LogInfo::connectionName() const {
return _conname;
}
-QString LogInfo::currency() const {
+TQString LogInfo::currency() const {
return _currency;
}
@@ -84,7 +84,7 @@ int LogInfo::error() const {
return errorfield;
}
-void LogInfo::parse(QCString s) {
+void LogInfo::parse(TQCString s) {
errorfield = 0;
char *c = (char *)malloc(s.length() + 1), *csep;
strcpy(c, s);
@@ -101,7 +101,7 @@ void LogInfo::parse(QCString s) {
char *p = mystrsep(&csep, ":");
int i = 0;
while(i < 8 && p != 0) {
- QString token = QString::fromLocal8Bit(p);
+ TQString token = TQString::fromLocal8Bit(p);
switch(i) {
case 0:
diff --git a/kppp/logview/loginfo.h b/kppp/logview/loginfo.h
index 6e1fa7fc..de4b79fc 100644
--- a/kppp/logview/loginfo.h
+++ b/kppp/logview/loginfo.h
@@ -22,22 +22,22 @@
#define __LOGINFO__H__
#define MYDEBUG
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <time.h>
class LogInfo {
public:
- LogInfo(QCString data);
+ LogInfo(TQCString data);
int error() const;
- QDateTime from() const;
+ TQDateTime from() const;
time_t from_t() const { return _from; }
- QDateTime until() const;
+ TQDateTime until() const;
int duration() const;
- QString connectionName() const;
- QString currency() const;
+ TQString connectionName() const;
+ TQString currency() const;
double sessionCosts() const;
double totalCosts() const;
double bytesIn() const;
@@ -49,12 +49,12 @@ public:
#endif
private:
- void parse(QCString );
+ void parse(TQCString );
int errorfield;
time_t _from, _until;
- QString _conname, _currency;
+ TQString _conname, _currency;
double _session_cost, _total_cost;
double _bytes_in, _bytes_out;
};
diff --git a/kppp/logview/main.cpp b/kppp/logview/main.cpp
index ae877158..a533da38 100644
--- a/kppp/logview/main.cpp
+++ b/kppp/logview/main.cpp
@@ -55,11 +55,11 @@ TopWidget::TopWidget() : KMainWindow(0, "") {
setCaption(i18n("KPPP Log Viewer"));
- w = new QWidget(this);
+ w = new TQWidget(this);
- QBoxLayout *l = new QVBoxLayout(w, 5);
+ TQBoxLayout *l = new TQVBoxLayout(w, 5);
- td = new QTabWidget(w, "");
+ td = new TQTabWidget(w, "");
mw = new MonthlyWidget(td);
td->addTab(mw, i18n("Monthly Log"));
l->addWidget(td);
@@ -68,22 +68,22 @@ TopWidget::TopWidget() : KMainWindow(0, "") {
if(!kpppmode) {
// create menu
mb = new KMenuBar(this);
- QPopupMenu *fm = new QPopupMenu;
+ TQPopupMenu *fm = new QPopupMenu;
fm->insertItem(SmallIcon("exit"),KStdGuiItem::quit().text(), F_EXIT);
mb->insertItem(i18n("&File"), fm);
mb->setAccel(CTRL + Key_Q, F_EXIT);
- connect(mb, SIGNAL(activated(int)),
- this, SLOT(menuCallback(int)));
+ connect(mb, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(menuCallback(int)));
} else {
mb = 0;
- QPushButton *but = new KPushButton(KStdGuiItem::close(),w);
- QHBoxLayout *lh = new QHBoxLayout(l);
+ TQPushButton *but = new KPushButton(KStdGuiItem::close(),w);
+ TQHBoxLayout *lh = new TQHBoxLayout(l);
lh->addStretch(10);
lh->addWidget(but);
- connect(but, SIGNAL(clicked()),
- kapp, SLOT(quit()));
+ connect(but, TQT_SIGNAL(clicked()),
+ kapp, TQT_SLOT(quit()));
}
setMinimumSize(mw->sizeHint().width() + 15,
diff --git a/kppp/logview/main.h b/kppp/logview/main.h
index bb833a0f..db7ca8da 100644
--- a/kppp/logview/main.h
+++ b/kppp/logview/main.h
@@ -22,7 +22,7 @@
#define __MAIN__H__
#include <kmainwindow.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kmenubar.h>
#include "monthly.h"
@@ -38,8 +38,8 @@ private slots:
private:
MonthlyWidget *mw;
KMenuBar *mb;
- QWidget *w;
- QTabWidget *td;
+ TQWidget *w;
+ TQTabWidget *td;
};
#endif
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index b9aac7d3..904f2800 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -18,10 +18,10 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqheader.h>
#include <kcalendarsystem.h>
#include <klocale.h>
@@ -32,9 +32,9 @@
#include "monthly.h"
#include "export.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-static void formatBytes(double bytes, QString &result) {
+static void formatBytes(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
@@ -43,11 +43,11 @@ static void formatBytes(double bytes, QString &result) {
result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
-static void formatBytesMonth(double bytes, QString &result) {
+static void formatBytesMonth(double bytes, TQString &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
bytes = (bytes / day) * days;
@@ -59,8 +59,8 @@ static void formatBytesMonth(double bytes, QString &result) {
result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
-static void formatDuration(int seconds, QString &result) {
- QString sec;
+static void formatDuration(int seconds, TQString &result) {
+ TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
result = i18n("%1s").arg(sec);
@@ -73,15 +73,15 @@ static void formatDuration(int seconds, QString &result) {
.arg(sec);
}
-static void formatDurationMonth(int seconds, QString &result) {
+static void formatDurationMonth(int seconds, TQString &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
seconds = (seconds / day) * days;
- QString sec;
+ TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
result = i18n("%1s").arg(sec);
@@ -97,37 +97,37 @@ static void formatDurationMonth(int seconds, QString &result) {
static void costsMonth(double costs, double &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
result = (costs / day) * days;
}
-class LogListItem : public QListViewItem {
+class LogListItem : public TQListViewItem {
public:
LogListItem(LogInfo *l,
- QListView * parent,
- QString s1, QString s2,
- QString s3, QString s4,
- QString s5, QString s6,
- QString s7, QString s8)
- : QListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8),
+ TQListView * parent,
+ TQString s1, TQString s2,
+ TQString s3, TQString s4,
+ TQString s5, TQString s6,
+ TQString s7, TQString s8)
+ : TQListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8),
li(l)
{
}
- virtual void paintCell( QPainter *p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment );
- virtual QString key(int, bool) const;
+ virtual TQString key(int, bool) const;
LogInfo *li;
};
-void LogListItem::paintCell( QPainter *p, const QColorGroup & cg,
+void LogListItem::paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- QListViewItem::paintCell(p, cg, column, width, alignment);
+ TQListViewItem::paintCell(p, cg, column, width, alignment);
// double line above sum
//if(!li) {
@@ -136,12 +136,12 @@ void LogListItem::paintCell( QPainter *p, const QColorGroup & cg,
//}
}
-QString LogListItem::key(int c, bool ascending) const
+TQString LogListItem::key(int c, bool ascending) const
{
if (!li) // we want the sum to be always at the bottom
return ascending ? "z" : " ";
- QString k;
+ TQString k;
switch (c) {
case 0:
k = li->connectionName();
@@ -167,8 +167,8 @@ QString LogListItem::key(int c, bool ascending) const
return k;
}
-MonthlyWidget::MonthlyWidget(QWidget *parent) :
- QWidget(parent)
+MonthlyWidget::MonthlyWidget(TQWidget *parent) :
+ TQWidget(parent)
{
tl = 0;
@@ -194,9 +194,9 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
lv->setSorting(1);
lv->setMinimumWidth(180);
lv->setMinimumHeight(280);
- lv->setSelectionMode(QListView::Extended);
+ lv->setSelectionMode(TQListView::Extended);
selectionItem = 0L;
- connect(lv, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(lv, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
lv2 = new KListView(this);
lv2->addColumn(i18n("Connection"));
@@ -212,21 +212,21 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
lv2->setSorting(-1);
lv2->setItemMargin(2);
lv2->setMaximumHeight(100);
- lv2->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
- lv2->setSelectionMode(QListView::NoSelection);
+ lv2->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ lv2->setSelectionMode(TQListView::NoSelection);
- title = new QLabel("X", this);
- QFont f = title->font();
+ title = new TQLabel("X", this);
+ TQFont f = title->font();
f.setPointSize(f.pointSize() + 2);
f.setBold(TRUE);
title->setFont(f);
title->setFixedHeight(title->sizeHint().height()*2);
- cboConnections = new QComboBox(false, this); // add a combo box to select connections
+ cboConnections = new TQComboBox(false, this); // add a combo box to select connections
cboConnections->setMaximumWidth(200); // a resonable size
cboConnections->insertItem(i18n("All Connections")); // default to all connections
- connect(cboConnections, SIGNAL(activated(int)),
- this, SLOT(slotConnections(int)));
+ connect(cboConnections, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotConnections(int)));
bbox = new KButtonBox(this, Qt::Vertical);
prev = bbox->addButton(i18n("&Prev Month"));
@@ -236,14 +236,14 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
bbox->addStretch(1);
exportBttn = bbox->addButton(i18n("&Export..."));
- connect(prev, SIGNAL(released()),
- this, SLOT(prevMonth()));
- connect(next, SIGNAL(released()),
- this, SLOT(nextMonth()));
- connect(today, SIGNAL(released()),
- this, SLOT(currentMonth()));
- connect(exportBttn, SIGNAL(clicked()),
- this, SLOT(exportWizard()));
+ connect(prev, TQT_SIGNAL(released()),
+ this, TQT_SLOT(prevMonth()));
+ connect(next, TQT_SIGNAL(released()),
+ this, TQT_SLOT(nextMonth()));
+ connect(today, TQT_SIGNAL(released()),
+ this, TQT_SLOT(currentMonth()));
+ connect(exportBttn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(exportWizard()));
bbox->addStretch(8);
bbox->layout();
@@ -256,12 +256,12 @@ void MonthlyWidget::layoutWidget() {
if(tl)
delete tl;
- tl = new QGridLayout(this, 1, 1, 11, 16, "MainLayout");
+ tl = new TQGridLayout(this, 1, 1, 11, 16, "MainLayout");
tl->addWidget(title, 0, 0);
tl->addWidget(cboConnections, 0, 1);
- QLabel *l = new QLabel(this);
+ TQLabel *l = new TQLabel(this);
l->setText(i18n("Statistics:"));
- QFont f2 = l->font();
+ TQFont f2 = l->font();
f2.setPointSize(f2.pointSize() + 1);
f2.setBold(TRUE);
l->setFont(f2);
@@ -275,13 +275,13 @@ void MonthlyWidget::layoutWidget() {
tl->activate();
}
-int bestlen(QWidget *w, const char *s) {
+int bestlen(TQWidget *w, const char *s) {
return w->fontMetrics().boundingRect(s).width() + 8;
}
void MonthlyWidget::plotMonth() {
// name of the current connection
- QString con;
+ TQString con;
// for collecting monthly statistics
int count = 0;
@@ -293,12 +293,12 @@ void MonthlyWidget::plotMonth() {
lv2->clear();
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate startDate = periodeFirst();
+ TQDate startDate = periodeFirst();
for(int i = 0; i < (int)logList.count(); i++) {
LogInfo *li = logList.at(i);
- QDate logDate = li->from().date();
+ TQDate logDate = li->from().date();
if ( periodeFirst() <= logDate && periodeLast() >= logDate ) {
// get connection name for this line
con = li->connectionName();
@@ -330,7 +330,7 @@ void MonthlyWidget::plotMonth() {
duration += li->from().secsTo(li->until());
- QString _bin, _bout, b;
+ TQString _bin, _bout, b;
if(li->bytesIn() >= 0)
formatBytes(li->bytesIn(), _bin);
else
@@ -346,14 +346,14 @@ void MonthlyWidget::plotMonth() {
else
b = i18n("n/a");
- QString day;
+ TQString day;
day.sprintf("%2d", li->from().date().day());
- QString s_duration;
+ TQString s_duration;
formatDuration(li->from().secsTo(li->until()),
s_duration);
- QString s_lifrom, s_liuntil, s_costs;
+ TQString s_lifrom, s_liuntil, s_costs;
s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
@@ -363,7 +363,7 @@ void MonthlyWidget::plotMonth() {
}
if(count) {
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -380,25 +380,25 @@ void MonthlyWidget::plotMonth() {
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
selectionItem = new LogListItem(0, lv2,
i18n("Selection (%n connection)", "Selection (%n connections)", 0),
- QString::null, QString::null, QString::null,
- QString::null, QString::null, QString::null, QString::null);
+ TQString::null, TQString::null, TQString::null,
+ TQString::null, TQString::null, TQString::null, TQString::null);
(void) new LogListItem(0, lv2,
i18n("%n connection", "%n connections", count),
- s_duration, s_costs, _bin, _bout, QString::null, QString::null, QString::null);
+ s_duration, s_costs, _bin, _bout, TQString::null, TQString::null, TQString::null);
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
- QString m_bin, m_bout;
+ TQString m_bin, m_bout;
if(bin < 0)
_bin = i18n("n/a");
@@ -410,19 +410,19 @@ void MonthlyWidget::plotMonth() {
else
formatBytesMonth(bout, m_bout);
- QString m_duration;
+ TQString m_duration;
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
- (void) new QListViewItem(lv2, selectionItem,
+ (void) new TQListViewItem(lv2, selectionItem,
i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout,
- QString::null, QString::null, QString::null);
+ TQString::null, TQString::null, TQString::null);
}
}
- QString t;
+ TQString t;
if(lv->childCount() > 0) {
exportBttn->setEnabled(true); // export possibility
t = i18n("Connection log for %1 %2")
@@ -456,7 +456,7 @@ void MonthlyWidget::prevMonth() {
void MonthlyWidget::currentMonth() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate dt = QDate::currentDate();
+ TQDate dt = TQDate::currentDate();
calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
plotMonth();
@@ -464,7 +464,7 @@ void MonthlyWidget::currentMonth() {
void MonthlyWidget::exportWizard() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QString date = QString::fromLatin1("%1-%2") // e.g.: June-2001
+ TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001
.arg(calendar->monthName(periodeFirst()))
.arg(calendar->year(periodeFirst()));
@@ -473,7 +473,7 @@ void MonthlyWidget::exportWizard() {
if (wizard->filename.isEmpty()) { // wizard aborted...
return;
}
- if (QFile::exists(wizard->filename)) { // overwrite?
+ if (TQFile::exists(wizard->filename)) { // overwrite?
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0, i18n("A document with this name already exists."), i18n("Overwrite file?"), i18n("&Overwrite") /*, true*/)) { // no
return;
}
@@ -496,7 +496,7 @@ void MonthlyWidget::exportWizard() {
i18n("Duration"), i18n("Costs"), i18n("Bytes In"), i18n("Bytes Out") );
// name of the current connection
- QString con;
+ TQString con;
// for collecting monthly statistics
int count = 0;
@@ -507,7 +507,7 @@ void MonthlyWidget::exportWizard() {
for(int i = 0; i < (int)logList.count(); i++) {
LogInfo *li = logList.at(i);
- QDate logDate = li->from().date();
+ TQDate logDate = li->from().date();
if (periodeFirst() <= logDate && periodeLast() >= logDate ) {
// get connection name for this line
con = li->connectionName();
@@ -540,7 +540,7 @@ void MonthlyWidget::exportWizard() {
duration += li->from().secsTo(li->until());
- QString _bin, _bout, b;
+ TQString _bin, _bout, b;
if(li->bytesIn() >= 0)
formatBytes(li->bytesIn(), _bin);
else
@@ -556,15 +556,15 @@ void MonthlyWidget::exportWizard() {
else
b = i18n("n/a");
- QString day;
+ TQString day;
day.sprintf("%2d", li->from().date().day());
- QString con = li->connectionName();
+ TQString con = li->connectionName();
- QString s_duration;
+ TQString s_duration;
formatDuration(li->from().secsTo(li->until()),
s_duration);
- QString s_lifrom, s_liuntil, s_costs;
+ TQString s_lifrom, s_liuntil, s_costs;
s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
@@ -576,9 +576,9 @@ void MonthlyWidget::exportWizard() {
}
}
- if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
- QString m_bin, m_bout;
+ TQString m_bin, m_bout;
if(bin < 0)
m_bin = i18n("n/a");
else
@@ -589,21 +589,21 @@ void MonthlyWidget::exportWizard() {
else
formatBytesMonth(bout, m_bout);
- QString m_duration;
+ TQString m_duration;
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
- QString datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true);
+ TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
exportIFace->addEmptyLine();
exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
- QString::null, QString::null, QString::null, m_duration, m_costs, m_bin, m_bout);
+ TQString::null, TQString::null, TQString::null, m_duration, m_costs, m_bin, m_bout);
}
if(count) {
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -620,15 +620,15 @@ void MonthlyWidget::exportWizard() {
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
// call export methods
exportIFace->addEmptyLine();
- exportIFace->addDataline(i18n("%n connection", "%n connections", count), QString::null, QString::null, QString::null, s_duration,
+ exportIFace->addDataline(i18n("%n connection", "%n connections", count), TQString::null, TQString::null, TQString::null, s_duration,
s_costs, _bin, _bout);
exportIFace->setFinishCode();
@@ -643,12 +643,12 @@ void MonthlyWidget::exportWizard() {
delete exportIFace;
}
-QDate MonthlyWidget::periodeFirst() const
+TQDate MonthlyWidget::periodeFirst() const
{
return m_periodeFirst;
}
-QDate MonthlyWidget::periodeLast() const
+TQDate MonthlyWidget::periodeLast() const
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -666,7 +666,7 @@ void MonthlyWidget::slotSelectionChanged()
int duration = 0;
LogListItem *item;
LogInfo *li;
- QListViewItemIterator it(lv);
+ TQListViewItemIterator it(lv);
while ( it.current() )
{
item = dynamic_cast<LogListItem*>(it.current());
@@ -695,7 +695,7 @@ void MonthlyWidget::slotSelectionChanged()
}
if(count)
{
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -712,11 +712,11 @@ void MonthlyWidget::slotSelectionChanged()
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
selectionItem->setText(0, i18n("Selection (%n connection)", "Selection (%n connections)", count));
selectionItem->setText(1, s_duration);
selectionItem->setText(2, s_costs);
diff --git a/kppp/logview/monthly.h b/kppp/logview/monthly.h
index a77f7bfe..bfe5407e 100644
--- a/kppp/logview/monthly.h
+++ b/kppp/logview/monthly.h
@@ -23,12 +23,12 @@
#define __MONTHLY__H__
#include "log.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
#include <kbuttonbox.h>
@@ -36,10 +36,10 @@ class KListView;
class QComboBox;
class LogListItem;
-class MonthlyWidget : public QWidget {
+class MonthlyWidget : public TQWidget {
Q_OBJECT
public:
- MonthlyWidget(QWidget *parent = 0);
+ MonthlyWidget(TQWidget *parent = 0);
private slots:
void prevMonth();
@@ -56,25 +56,25 @@ private:
/**
* Returns the first day in the period
*/
- QDate periodeFirst() const;
+ TQDate periodeFirst() const;
/**
* Returns the last day in the period
*/
- QDate periodeLast() const;
+ TQDate periodeLast() const;
- QDate m_periodeFirst; // First day in month
+ TQDate m_periodeFirst; // First day in month
//int _month, _year;
- QComboBox *cboConnections;
+ TQComboBox *cboConnections;
KButtonBox *bbox;
KListView *lv;
KListView *lv2;
LogListItem* selectionItem;
- QLabel *title;
- QPushButton *next, *prev, *today, *exportBttn;
- QValueList<QString> lstConnections;
- QGridLayout *tl;
- QDateTime *dt;
+ TQLabel *title;
+ TQPushButton *next, *prev, *today, *exportBttn;
+ TQValueList<TQString> lstConnections;
+ TQGridLayout *tl;
+ TQDateTime *dt;
};
#endif
diff --git a/kppp/macros.h b/kppp/macros.h
index 134ec2cf..6f541b76 100644
--- a/kppp/macros.h
+++ b/kppp/macros.h
@@ -3,7 +3,7 @@
#ifndef __MACROS__H__
#define __MACROS__H__
-#include <qlayout.h>
+#include <tqlayout.h>
#define MIN_WIDTH(w) w->setMinimumWidth(w->sizeHint().width());
#define MIN_HEIGHT(w) w->setMinimumHeight(w->sizeHint().height());
diff --git a/kppp/main.cpp b/kppp/main.cpp
index 65548d17..753291ba 100644
--- a/kppp/main.cpp
+++ b/kppp/main.cpp
@@ -88,9 +88,9 @@ uid_t euid;
// helper process' pid
pid_t helperPid = -1;
-QString local_ip_address;
-QString remote_ip_address;
-QString pidfile;
+TQString local_ip_address;
+TQString remote_ip_address;
+TQString pidfile;
#if 0
extern "C" {
@@ -232,16 +232,16 @@ int main( int argc, char **argv ) {
// make sure that nobody can read the password from the
// config file
- QString configFile = KGlobal::dirs()->saveLocation("config")
- + QString(kapp->name()) + "rc";
- if(access(QFile::encodeName(configFile), F_OK) == 0)
- chmod(QFile::encodeName(configFile), S_IRUSR | S_IWUSR);
+ TQString configFile = KGlobal::dirs()->saveLocation("config")
+ + TQString(kapp->name()) + "rc";
+ if(access(TQFile::encodeName(configFile), F_OK) == 0)
+ chmod(TQFile::encodeName(configFile), S_IRUSR | S_IWUSR);
// do we really need to generate an empty directory structure here ?
KGlobal::dirs()->saveLocation("appdata", "Rules");
int pid = create_pidfile();
- QString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
+ TQString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
if(pid < 0) {
KMessageBox::error(0L, err_msg);
@@ -263,7 +263,7 @@ int main( int argc, char **argv ) {
gpppdata.open();
gpppdata.setAccountByIndex(0);
- QString s = argv[2];
+ TQString s = argv[2];
urlEncode(s);
kdDebug(5002) << s << endl;
@@ -272,7 +272,7 @@ int main( int argc, char **argv ) {
}
if (pid > 0) {
- QString msg = i18n("kppp has detected a %1 file.\n"
+ TQString msg = i18n("kppp has detected a %1 file.\n"
"Another instance of kppp seems to be "
"running under process-ID %2.\n"
"Please click Exit, make sure that you are "
@@ -322,8 +322,8 @@ int main( int argc, char **argv ) {
}
-pid_t execute_command (const QString & cmd) {
- QCString command = QFile::encodeName(cmd);
+pid_t execute_command (const TQString & cmd) {
+ TQCString command = TQFile::encodeName(cmd);
if (command.isEmpty() || command.length() > COMMAND_SIZE)
return (pid_t) -1;
@@ -331,7 +331,7 @@ pid_t execute_command (const QString & cmd) {
kdDebug(5002) << "Executing command: " << command << endl;
- QApplication::flushX();
+ TQApplication::flushX();
if((id = fork()) == 0) {
// don't bother dieppp()
signal(SIGCHLD, SIG_IGN);
@@ -361,10 +361,10 @@ pid_t create_pidfile() {
pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
- if(access(QFile::encodeName(pidfile), F_OK) == 0) {
+ if(access(TQFile::encodeName(pidfile), F_OK) == 0) {
- if((access(QFile::encodeName(pidfile), R_OK) < 0) ||
- (fd = open(QFile::encodeName(pidfile), O_RDONLY)) < 0)
+ if((access(TQFile::encodeName(pidfile), R_OK) < 0) ||
+ (fd = open(TQFile::encodeName(pidfile), O_RDONLY)) < 0)
return -1;
int sz = read(fd, &pidstr, 32);
@@ -393,7 +393,7 @@ pid_t create_pidfile() {
remove_pidfile();
}
- if((fd = open(QFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
+ if((fd = open(TQFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
return -1;
@@ -411,9 +411,9 @@ bool remove_pidfile() {
struct stat st;
// only remove regular files with user write permissions
- if(stat(QFile::encodeName(pidfile), &st) == 0 )
- if(S_ISREG(st.st_mode) && (access(QFile::encodeName(pidfile), W_OK) == 0)) {
- unlink(QFile::encodeName(pidfile));
+ if(stat(TQFile::encodeName(pidfile), &st) == 0 )
+ if(S_ISREG(st.st_mode) && (access(TQFile::encodeName(pidfile), W_OK) == 0)) {
+ unlink(TQFile::encodeName(pidfile));
return true;
}
@@ -436,7 +436,7 @@ void myShutDown() {
}
void sighandler(int sig) {
- QEvent *e = 0L;
+ TQEvent *e = 0L;
if(sig == SIGCHLD) {
pid_t id = wait(0L);
if(id >= 0 && id == helperPid) // helper process died
@@ -446,7 +446,7 @@ void sighandler(int sig) {
// let eventFilter() deal with this when we're back in the loop
if (e)
- QApplication::postEvent(p_kppp, e);
+ TQApplication::postEvent(p_kppp, e);
signal(sig, sighandler); // reinstall signal handler
}
diff --git a/kppp/main.h b/kppp/main.h
index a114f983..6551348d 100644
--- a/kppp/main.h
+++ b/kppp/main.h
@@ -38,7 +38,7 @@
void killpppd();
void sighandler(int);
-pid_t execute_command(const QString &);
+pid_t execute_command(const TQString &);
pid_t create_pidfile();
bool remove_pidfile();
void myShutDown();
diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp
index 94b342d5..06c01194 100644
--- a/kppp/miniterm.cpp
+++ b/kppp/miniterm.cpp
@@ -39,24 +39,24 @@
#include <kmenubar.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
extern PPPData gpppdata;
-MiniTerm::MiniTerm(QWidget *parent, const char *name)
- : QDialog(parent, name, true)
+MiniTerm::MiniTerm(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, true)
{
setCaption(i18n("Kppp Mini-Terminal"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- m_file = new QPopupMenu(this);
- m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, SLOT(cancelbutton()) );
- m_options = new QPopupMenu(this);
- m_options->insertItem(i18n("&Reset Modem"),this,SLOT(resetModem()));
+ m_file = new TQPopupMenu(this);
+ m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(cancelbutton()) );
+ m_options = new TQPopupMenu(this);
+ m_options->insertItem(i18n("&Reset Modem"),this,TQT_SLOT(resetModem()));
m_help =
new KHelpMenu(this,
i18n("MiniTerm - A terminal emulation for KPPP\n\n"
@@ -72,21 +72,21 @@ MiniTerm::MiniTerm(QWidget *parent, const char *name)
menubar->insertItem( i18n("&Modem"), m_options );
menubar->insertItem( KStdGuiItem::help().text(), m_help->menu());
- statusbar = new QLabel(this);
- statusbar->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ statusbar = new TQLabel(this);
+ statusbar->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
terminal = new MyTerm(this, "term");
setupToolbar();
- QVBoxLayout *layout=new QVBoxLayout(this);
+ TQVBoxLayout *layout=new TQVBoxLayout(this);
layout->addWidget(menubar);
layout->addWidget(toolbar);
layout->addWidget(terminal);
layout->addWidget(statusbar);
- inittimer = new QTimer(this);
- connect(inittimer,SIGNAL(timeout()),this,SLOT(init()));
+ inittimer = new TQTimer(this);
+ connect(inittimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(init()));
inittimer->start(500);
resize(550,400);
@@ -103,16 +103,16 @@ void MiniTerm::setupToolbar() {
toolbar = new KToolBar( this );
toolbar->insertButton("exit", 0,
- SIGNAL(clicked()), this,
- SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
toolbar->insertButton("back", 0,
- SIGNAL(clicked()), this,
- SLOT(resetModem()), TRUE, i18n("Reset Modem"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(resetModem()), TRUE, i18n("Reset Modem"));
toolbar->insertButton("help", 0,
- SIGNAL(clicked()), this,
- SLOT(help()), TRUE, i18n("Help"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(help()), TRUE, i18n("Help"));
toolbar->setBarPos( KToolBar::Top );
toolbar->setMovingEnabled(false);
@@ -154,7 +154,7 @@ void MiniTerm::init() {
kapp->processEvents();
kapp->processEvents();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -214,7 +214,7 @@ void MiniTerm::resetModem() {
}
-void MiniTerm::closeEvent( QCloseEvent *e ) {
+void MiniTerm::closeEvent( TQCloseEvent *e ) {
cancelbutton();
e->accept();
}
@@ -225,13 +225,13 @@ void MiniTerm::help() {
}
-MyTerm::MyTerm(QWidget *parent, const char* name)
- : QMultiLineEdit(parent, name)
+MyTerm::MyTerm(TQWidget *parent, const char* name)
+ : TQMultiLineEdit(parent, name)
{
setFont(KGlobalSettings::fixedFont());
}
-void MyTerm::keyPressEvent(QKeyEvent *k) {
+void MyTerm::keyPressEvent(TQKeyEvent *k) {
// ignore meta keys
if (k->ascii() == 0)
return;
@@ -244,22 +244,22 @@ void MyTerm::keyPressEvent(QKeyEvent *k) {
void MyTerm::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
}
void MyTerm::newLine() {
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::newLine();
}
void MyTerm::del() {
- QMultiLineEdit::del();
+ TQMultiLineEdit::del();
}
void MyTerm::backspace() {
- QMultiLineEdit::backspace();
+ TQMultiLineEdit::backspace();
}
@@ -269,13 +269,13 @@ void MyTerm::myreturn() {
getCursorPosition(&line,&column);
for (int i = 0; i < column;i++)
- QMultiLineEdit::cursorLeft();
+ TQMultiLineEdit::cursorLeft();
}
void MyTerm::mynewline() {
- QMultiLineEdit::end(FALSE);
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::end(FALSE);
+ TQMultiLineEdit::newLine();
}
#include "miniterm.moc"
diff --git a/kppp/miniterm.h b/kppp/miniterm.h
index f6d66549..c1d93bcf 100644
--- a/kppp/miniterm.h
+++ b/kppp/miniterm.h
@@ -28,10 +28,10 @@
#ifndef _MINITERM_H_
#define _MINITERM_H_
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qmultilineedit.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqmultilineedit.h>
#include <ktoolbar.h>
class KHelpMenu;
@@ -43,12 +43,12 @@ class KHelpMenu;
class QPushButton;
class QLabel;
-class MyTerm : public QMultiLineEdit {
+class MyTerm : public TQMultiLineEdit {
Q_OBJECT
public:
- MyTerm(QWidget *parent=0, const char *name=0);
+ MyTerm(TQWidget *parent=0, const char *name=0);
- void keyPressEvent (QKeyEvent*);
+ void keyPressEvent (TQKeyEvent*);
void insertChar(unsigned char c);
void newLine();
void backspace();
@@ -58,14 +58,14 @@ public:
};
-class MiniTerm : public QDialog {
+class MiniTerm : public TQDialog {
Q_OBJECT
public:
- MiniTerm(QWidget *parent=0, const char *name=0);
+ MiniTerm(TQWidget *parent=0, const char *name=0);
~MiniTerm();
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
public slots:
void cancelbutton();
@@ -77,26 +77,26 @@ public slots:
protected:
void setupToolbar();
- QPushButton *cancel;
+ TQPushButton *cancel;
MyTerm *terminal;
- QTimer *inittimer;
+ TQTimer *inittimer;
- QMenuBar * menubar;
+ TQMenuBar * menubar;
KToolBar * toolbar;
- QPopupMenu * m_file;
- QPopupMenu * m_edit;
- QPopupMenu * m_options;
+ TQPopupMenu * m_file;
+ TQPopupMenu * m_edit;
+ TQPopupMenu * m_options;
KHelpMenu * m_help;
- QLabel * statusbar;
- QPushButton *pb1;
- QPushButton *pb2;
- QPushButton *pb3;
- QPushButton *pb4;
-
- QPixmap pb1_pixmap;
- QPixmap pb2_pixmap;
- QPixmap pb3_pixmap;
- QPixmap pb4_pixmap;
+ TQLabel * statusbar;
+ TQPushButton *pb1;
+ TQPushButton *pb2;
+ TQPushButton *pb3;
+ TQPushButton *pb4;
+
+ TQPixmap pb1_pixmap;
+ TQPixmap pb2_pixmap;
+ TQPixmap pb3_pixmap;
+ TQPixmap pb4_pixmap;
};
diff --git a/kppp/modem.cpp b/kppp/modem.cpp
index 86ac3169..4d31fe59 100644
--- a/kppp/modem.cpp
+++ b/kppp/modem.cpp
@@ -30,7 +30,7 @@
#include <signal.h>
#include <sys/ioctl.h>
#include <setjmp.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <assert.h>
#include "modem.h"
@@ -120,7 +120,7 @@ speed_t Modem::modemspeed() {
bool Modem::opentty() {
// int flags;
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
@@ -183,7 +183,7 @@ bool Modem::opentty() {
// the english/i18n mix below is ugly but we want to keep working
// after someone changed the code to use i18n'ed config values
- QString flowCtrl = gpppdata.flowcontrol();
+ TQString flowCtrl = gpppdata.flowcontrol();
if(flowCtrl != "None" && flowCtrl != i18n("None")) {
if(flowCtrl == "CRTSCTS" || flowCtrl == i18n("Hardware [CRTSCTS]")) {
tty.c_cflag |= CRTSCTS;
@@ -252,14 +252,14 @@ void Modem::readtty(int) {
}
-void Modem::notify(const QObject *receiver, const char *member) {
- connect(this, SIGNAL(charWaiting(unsigned char)), receiver, member);
+void Modem::notify(const TQObject *receiver, const char *member) {
+ connect(this, TQT_SIGNAL(charWaiting(unsigned char)), receiver, member);
startNotifier();
}
void Modem::stop() {
- disconnect(SIGNAL(charWaiting(unsigned char)));
+ disconnect(TQT_SIGNAL(charWaiting(unsigned char)));
stopNotifier();
}
@@ -267,11 +267,11 @@ void Modem::stop() {
void Modem::startNotifier() {
if(modemfd >= 0) {
if(sn == 0) {
- sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this);
- connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
- kdDebug(5002) << "QSocketNotifier started!" << endl;
+ sn = new TQSocketNotifier(modemfd, TQSocketNotifier::Read, this);
+ connect(sn, TQT_SIGNAL(activated(int)), TQT_SLOT(readtty(int)));
+ kdDebug(5002) << "TQSocketNotifier started!" << endl;
} else {
- // Debug("QSocketNotifier re-enabled!");
+ // Debug("TQSocketNotifier re-enabled!");
sn->setEnabled(true);
}
}
@@ -284,7 +284,7 @@ void Modem::stopNotifier() {
disconnect(sn);
delete sn;
sn = 0;
- kdDebug(5002) << "QSocketNotifier stopped!" << endl;
+ kdDebug(5002) << "TQSocketNotifier stopped!" << endl;
}
}
@@ -314,7 +314,7 @@ bool Modem::writeLine(const char *buf) {
char *b = new char[len+2];
memcpy(b, buf, len);
// different modems seem to need different line terminations
- QString term = gpppdata.enter();
+ TQString term = gpppdata.enter();
if(term == "LF")
b[len++]='\n';
else if(term == "CR")
@@ -422,7 +422,7 @@ void Modem::escape_to_command_mode() {
// +3 because quiet time must be greater than guard time.
usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
- QCString tmp = gpppdata.modemEscapeStr().local8Bit();
+ TQCString tmp = gpppdata.modemEscapeStr().local8Bit();
write(modemfd, tmp.data(), tmp.length());
tcflush(modemfd, TCIOFLUSH);
usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
@@ -431,35 +431,35 @@ void Modem::escape_to_command_mode() {
}
-const QString Modem::modemMessage() {
+const TQString Modem::modemMessage() {
return errmsg;
}
-QString Modem::parseModemSpeed(const QString &s) {
+TQString Modem::parseModemSpeed(const TQString &s) {
// this is a small (and bad) parser for modem speeds
int rx = -1;
int tx = -1;
int i;
- QString result;
+ TQString result;
kdDebug(5002) << "Modem reported result string: " << s << endl;
const int RXMAX = 7;
const int TXMAX = 2;
- QRegExp rrx[RXMAX] = {
- QRegExp("[0-9]+[:/ ]RX", false),
- QRegExp("[0-9]+RX", false),
- QRegExp("[/: -][0-9]+[/: ]", false),
- QRegExp("[/: -][0-9]+$", false),
- QRegExp("CARRIER [^0-9]*[0-9]+", false),
- QRegExp("CONNECT [^0-9]*[0-9]+", false),
- QRegExp("[0-9]+") // panic mode
+ TQRegExp rrx[RXMAX] = {
+ TQRegExp("[0-9]+[:/ ]RX", false),
+ TQRegExp("[0-9]+RX", false),
+ TQRegExp("[/: -][0-9]+[/: ]", false),
+ TQRegExp("[/: -][0-9]+$", false),
+ TQRegExp("CARRIER [^0-9]*[0-9]+", false),
+ TQRegExp("CONNECT [^0-9]*[0-9]+", false),
+ TQRegExp("[0-9]+") // panic mode
};
- QRegExp trx[TXMAX] = {
- QRegExp("[0-9]+[:/ ]TX", false),
- QRegExp("[0-9]+TX", false)
+ TQRegExp trx[TXMAX] = {
+ TQRegExp("[0-9]+[:/ ]TX", false),
+ TQRegExp("[0-9]+TX", false)
};
for(i = 0; i < RXMAX; i++) {
@@ -471,7 +471,7 @@ QString Modem::parseModemSpeed(const QString &s) {
// rrx[i] has been matched, idx contains the start of the match
// and len contains how long the match is. Extract the match.
//
- QString sub = s.mid(idx, len);
+ TQString sub = s.mid(idx, len);
//
// Now extract the digits only from the match, which will
@@ -498,7 +498,7 @@ QString Modem::parseModemSpeed(const QString &s) {
// trx[i] has been matched, idx contains the start of the match
// and len contains how long the match is. Extract the match.
//
- QString sub = s.mid(idx, len);
+ TQString sub = s.mid(idx, len);
//
// Now extract the digits only from the match, which will then
@@ -545,17 +545,17 @@ int Modem::lockdevice() {
if (modem_is_locked)
return 1;
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
device = gpppdata.modemDevice();
- QString lockfile = LOCK_DIR"/LCK..";
+ TQString lockfile = LOCK_DIR"/LCK..";
lockfile += device.mid(5); // append everything after /dev/
- if(access(QFile::encodeName(lockfile), F_OK) == 0) {
- if ((fd = Requester::rq->openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
+ if(access(TQFile::encodeName(lockfile), F_OK) == 0) {
+ if ((fd = Requester::rq->openLockfile(TQFile::encodeName(lockfile), O_RDONLY)) >= 0) {
// Mario: it's not necessary to read more than lets say 32 bytes. If
// file has more than 32 bytes, skip the rest
char oldlock[33]; // safe
diff --git a/kppp/modem.h b/kppp/modem.h
index 6999263d..7e8f2376 100644
--- a/kppp/modem.h
+++ b/kppp/modem.h
@@ -27,13 +27,13 @@
#ifndef _MODEM_H_
#define _MODEM_H_
-#include <qdir.h>
+#include <tqdir.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <config.h>
@@ -41,7 +41,7 @@ class KCmdLineArgs;
void alarm_handler(int);
-class Modem : public QObject {
+class Modem : public TQObject {
Q_OBJECT
public:
Modem();
@@ -54,10 +54,10 @@ public:
bool writeLine(const char *);
bool dataMode() const { return data_mode; }
void setDataMode(bool set) { data_mode = set; }
- const QString modemMessage();
+ const TQString modemMessage();
speed_t modemspeed();
- static QString parseModemSpeed(const QString &);
- void notify(const QObject *, const char *);
+ static TQString parseModemSpeed(const TQString &);
+ void notify(const TQObject *, const char *);
void stop();
void flush();
@@ -81,9 +81,9 @@ private:
private:
int modemfd;
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
bool data_mode;
- QString errmsg;
+ TQString errmsg;
struct termios initial_tty;
struct termios tty;
bool modem_is_locked;
diff --git a/kppp/modemcmds.cpp b/kppp/modemcmds.cpp
index 3a34bb4d..04767ede 100644
--- a/kppp/modemcmds.cpp
+++ b/kppp/modemcmds.cpp
@@ -24,8 +24,8 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qslider.h>
+#include <tqlayout.h>
+#include <tqslider.h>
#include <kbuttonbox.h>
#include <stdlib.h>
#include <kapplication.h> // for getMiniIcon()
@@ -34,220 +34,220 @@
#include "pppdata.h"
#include <kwin.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); e->setFixedHeight(e->sizeHint().height()); e->setText(""); e->setMaxLength(MODEMSTR_SIZE);
// a little trick to make the label look like a disabled lineedit
-#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2);
+#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(TQLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); l->setLineWidth(2);
-ModemCommands::ModemCommands(QWidget *parent, const char *name)
+ModemCommands::ModemCommands(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Edit Modem Commands"), Ok|Cancel)
{
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QWidget *dummyWidget = new QWidget(this);
+ TQWidget *dummyWidget = new TQWidget(this);
setMainWidget(dummyWidget);
const int GRIDROWS = 22;
int row = 0;
// toplevel layout
- QVBoxLayout *tl = new QVBoxLayout(dummyWidget, 10, 4);
+ TQVBoxLayout *tl = new TQVBoxLayout(dummyWidget, 10, 4);
// add grid + frame
- QGridLayout *l1 = new QGridLayout(GRIDROWS, 4);
+ TQGridLayout *l1 = new TQGridLayout(GRIDROWS, 4);
tl->addLayout(l1);
- box = new QGroupBox(dummyWidget, "box");
+ box = new TQGroupBox(dummyWidget, "box");
l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3);
// put slider and label into a separate H-Box
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
l1->addLayout(l2, row, 2);
- lpreinitslider = new QLabel("MMMM", dummyWidget);
+ lpreinitslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(lpreinitslider);
- preinitslider = new QSlider(0, 300, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ preinitslider = new TQSlider(0, 300, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
preinitslider->setFixedHeight(preinitslider->sizeHint().height());
- connect(preinitslider, SIGNAL(valueChanged(int)),
- lpreinitslider, SLOT(setNum(int)));
+ connect(preinitslider, TQT_SIGNAL(valueChanged(int)),
+ lpreinitslider, TQT_SLOT(setNum(int)));
l2->addWidget(lpreinitslider, 0);
l2->addWidget(preinitslider, 1);
- lpreinit = new QLabel(i18n("Pre-init delay (sec/100):"), dummyWidget);
+ lpreinit = new TQLabel(i18n("Pre-init delay (sec/100):"), dummyWidget);
l1->addWidget(lpreinit, row++, 1);
for(int i = 0; i < PPPData::NumInitStrings; i++) {
- initstr[i] = new QLineEdit(dummyWidget);
- QLabel *initLabel = new QLabel(i18n("Initialization string %1:").arg(i + 1),
+ initstr[i] = new TQLineEdit(dummyWidget);
+ TQLabel *initLabel = new TQLabel(i18n("Initialization string %1:").arg(i + 1),
dummyWidget);
ADJUSTEDIT(initstr[i]);
l1->addWidget(initLabel, row, 1);
l1->addWidget(initstr[i], row++, 2);
}
- QHBoxLayout *l3 = new QHBoxLayout;
+ TQHBoxLayout *l3 = new QHBoxLayout;
l1->addLayout(l3, row, 2);
- linitslider = new QLabel("MMMM", dummyWidget);
+ linitslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(linitslider);
- initslider = new QSlider(1, 300, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ initslider = new TQSlider(1, 300, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
initslider->setFixedHeight(initslider->sizeHint().height());
- connect(initslider, SIGNAL(valueChanged(int)),
- linitslider, SLOT(setNum(int)));
+ connect(initslider, TQT_SIGNAL(valueChanged(int)),
+ linitslider, TQT_SLOT(setNum(int)));
l3->addWidget(linitslider, 0);
l3->addWidget(initslider, 1);
- label3 = new QLabel(i18n("Post-init delay (sec/100):"), dummyWidget);
+ label3 = new TQLabel(i18n("Post-init delay (sec/100):"), dummyWidget);
l1->addWidget(label3, row++, 1);
/* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */
- QHBoxLayout *l4 = new QHBoxLayout;
+ TQHBoxLayout *l4 = new QHBoxLayout;
l1->addLayout(l4, row, 2);
- ldurationslider = new QLabel("MMMM", dummyWidget);
+ ldurationslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(ldurationslider);
- durationslider = new QSlider(1, 255, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ durationslider = new TQSlider(1, 255, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
durationslider->setFixedHeight(durationslider->sizeHint().height());
- connect(durationslider, SIGNAL(valueChanged(int)),
- ldurationslider, SLOT(setNum(int)));
+ connect(durationslider, TQT_SIGNAL(valueChanged(int)),
+ ldurationslider, TQT_SLOT(setNum(int)));
l4->addWidget(ldurationslider, 0);
l4->addWidget(durationslider, 1);
- lduration = new QLabel(i18n("Dialing speed (sec/100):"), dummyWidget);
+ lduration = new TQLabel(i18n("Dialing speed (sec/100):"), dummyWidget);
l1->addWidget(lduration, row++, 1);
- initresp = new QLineEdit(dummyWidget);
- label2 = new QLabel(i18n("Init &response:"), dummyWidget);
+ initresp = new TQLineEdit(dummyWidget);
+ label2 = new TQLabel(i18n("Init &response:"), dummyWidget);
label2->setBuddy(initresp);
ADJUSTEDIT(initresp);
l1->addWidget(label2, row, 1);
l1->addWidget(initresp, row++, 2);
- nodetectdialtone = new QLineEdit(dummyWidget);
- lnodetectdialtone = new QLabel(i18n("No di&al tone detection:"), dummyWidget);
+ nodetectdialtone = new TQLineEdit(dummyWidget);
+ lnodetectdialtone = new TQLabel(i18n("No di&al tone detection:"), dummyWidget);
lnodetectdialtone->setBuddy(nodetectdialtone);
ADJUSTEDIT(nodetectdialtone);
l1->addWidget(lnodetectdialtone, row, 1);
l1->addWidget(nodetectdialtone, row++, 2);
- dialstr = new QLineEdit(dummyWidget);
- label4 = new QLabel(i18n("Dial &string:"),dummyWidget);
+ dialstr = new TQLineEdit(dummyWidget);
+ label4 = new TQLabel(i18n("Dial &string:"),dummyWidget);
label4->setBuddy(dialstr);
ADJUSTEDIT(dialstr);
l1->addWidget(label4, row, 1);
l1->addWidget(dialstr, row++, 2);
- connectresp = new QLineEdit(dummyWidget);
- label5 = new QLabel(i18n("Co&nnect response:"), dummyWidget);
+ connectresp = new TQLineEdit(dummyWidget);
+ label5 = new TQLabel(i18n("Co&nnect response:"), dummyWidget);
label5->setBuddy(connectresp);
ADJUSTEDIT(connectresp);
l1->addWidget(label5, row, 1);
l1->addWidget(connectresp, row++, 2);
- busyresp = new QLineEdit(dummyWidget);
- label6 = new QLabel(i18n("Busy response:"), dummyWidget);
+ busyresp = new TQLineEdit(dummyWidget);
+ label6 = new TQLabel(i18n("Busy response:"), dummyWidget);
ADJUSTEDIT(busyresp);
l1->addWidget(label6, row, 1);
l1->addWidget(busyresp, row++, 2);
- nocarrierresp = new QLineEdit(dummyWidget);
- label7 = new QLabel(i18n("No carr&ier response:"), dummyWidget);
+ nocarrierresp = new TQLineEdit(dummyWidget);
+ label7 = new TQLabel(i18n("No carr&ier response:"), dummyWidget);
label7->setBuddy(nocarrierresp);
ADJUSTEDIT(nocarrierresp);
l1->addWidget(label7, row, 1);
l1->addWidget(nocarrierresp, row++, 2);
- nodialtoneresp = new QLineEdit(dummyWidget);
- label8 = new QLabel(i18n("No dial tone response:"), dummyWidget);
+ nodialtoneresp = new TQLineEdit(dummyWidget);
+ label8 = new TQLabel(i18n("No dial tone response:"), dummyWidget);
ADJUSTEDIT(nodialtoneresp);
l1->addWidget(label8, row, 1);
l1->addWidget(nodialtoneresp, row++, 2);
- hangupstr = new QLineEdit(dummyWidget);
- label9 = new QLabel(i18n("&Hangup string:"), dummyWidget);
+ hangupstr = new TQLineEdit(dummyWidget);
+ label9 = new TQLabel(i18n("&Hangup string:"), dummyWidget);
label9->setBuddy(hangupstr);
ADJUSTEDIT(hangupstr);
l1->addWidget(label9, row, 1);
l1->addWidget(hangupstr, row++, 2);
- hangupresp = new QLineEdit(dummyWidget);
- label10 = new QLabel(i18n("Hangup response:"), dummyWidget);
+ hangupresp = new TQLineEdit(dummyWidget);
+ label10 = new TQLabel(i18n("Hangup response:"), dummyWidget);
ADJUSTEDIT(hangupresp);
l1->addWidget(label10, row, 1);
l1->addWidget(hangupresp, row++, 2);
- answerstr = new QLineEdit(dummyWidget);
- label11 = new QLabel(i18n("Answ&er string:"), dummyWidget);
+ answerstr = new TQLineEdit(dummyWidget);
+ label11 = new TQLabel(i18n("Answ&er string:"), dummyWidget);
label11->setBuddy(answerstr);
ADJUSTEDIT(answerstr);
l1->addWidget(label11, row, 1);
l1->addWidget(answerstr, row++, 2);
- ringresp = new QLineEdit(dummyWidget);
- label12 = new QLabel(i18n("Ring response:"), dummyWidget);
+ ringresp = new TQLineEdit(dummyWidget);
+ label12 = new TQLabel(i18n("Ring response:"), dummyWidget);
ADJUSTEDIT(ringresp);
l1->addWidget(label12, row, 1);
l1->addWidget(ringresp, row++, 2);
- answerresp = new QLineEdit(dummyWidget);
- label13 = new QLabel(i18n("Ans&wer response:"), dummyWidget);
+ answerresp = new TQLineEdit(dummyWidget);
+ label13 = new TQLabel(i18n("Ans&wer response:"), dummyWidget);
label13->setBuddy(answerresp);
ADJUSTEDIT(answerresp);
l1->addWidget(label13, row, 1);
l1->addWidget(answerresp, row++, 2);
- dlpresp = new QLineEdit(dummyWidget);
- label17 = new QLabel(i18n("DLP response:"), dummyWidget);
+ dlpresp = new TQLineEdit(dummyWidget);
+ label17 = new TQLabel(i18n("DLP response:"), dummyWidget);
ADJUSTEDIT(dlpresp);
l1->addWidget(label17, row, 1);
l1->addWidget(dlpresp, row++, 2);
- escapestr = new QLineEdit(dummyWidget);
- label14 = new QLabel(i18n("Escape strin&g:"), dummyWidget);
+ escapestr = new TQLineEdit(dummyWidget);
+ label14 = new TQLabel(i18n("Escape strin&g:"), dummyWidget);
label14->setBuddy(escapestr);
ADJUSTEDIT(escapestr);
l1->addWidget(label14, row, 1);
l1->addWidget(escapestr, row++, 2);
- escaperesp = new QLineEdit(dummyWidget);
- label15 = new QLabel(i18n("Escape response:"), dummyWidget);
+ escaperesp = new TQLineEdit(dummyWidget);
+ label15 = new TQLabel(i18n("Escape response:"), dummyWidget);
ADJUSTEDIT(escaperesp);
l1->addWidget(label15, row, 1);
l1->addWidget(escaperesp, row++, 2);
- QHBoxLayout *l5 = new QHBoxLayout;
+ TQHBoxLayout *l5 = new QHBoxLayout;
l1->addLayout(l5, row, 2);
- lslider = new QLabel("MMMM", dummyWidget);
+ lslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(lslider);
- slider = new QSlider(0, 255, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ slider = new TQSlider(0, 255, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
slider->setFixedHeight(slider->sizeHint().height());
- connect(slider, SIGNAL(valueChanged(int)),
- lslider, SLOT(setNum(int)));
+ connect(slider, TQT_SIGNAL(valueChanged(int)),
+ lslider, TQT_SLOT(setNum(int)));
l5->addWidget(lslider, 0);
l5->addWidget(slider, 1);
- label16 = new QLabel(i18n("Guard time (sec/50):"), dummyWidget);
+ label16 = new TQLabel(i18n("Guard time (sec/50):"), dummyWidget);
l1->addWidget(label16, row++, 1);
- QLabel *l = new QLabel(i18n("Volume off/low/high:"), dummyWidget);
+ TQLabel *l = new TQLabel(i18n("Volume off/low/high:"), dummyWidget);
l1->addWidget(l, row, 1);
- QHBoxLayout *l6 = new QHBoxLayout;
+ TQHBoxLayout *l6 = new QHBoxLayout;
l1->addLayout(l6, row++, 2);
- volume_off = new QLineEdit(dummyWidget);
+ volume_off = new TQLineEdit(dummyWidget);
volume_off->setFixedHeight(volume_off->sizeHint().height());
volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2));
- volume_medium = new QLineEdit(dummyWidget);
+ volume_medium = new TQLineEdit(dummyWidget);
volume_medium->setFixedHeight(volume_medium->sizeHint().height());
volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2));
- volume_high = new QLineEdit(dummyWidget);
+ volume_high = new TQLineEdit(dummyWidget);
volume_high->setFixedHeight(volume_high->sizeHint().height());
volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2));
l6->addWidget(volume_off);
diff --git a/kppp/modemcmds.h b/kppp/modemcmds.h
index 72f66895..7779471b 100644
--- a/kppp/modemcmds.h
+++ b/kppp/modemcmds.h
@@ -31,11 +31,11 @@
#ifndef _MODEMCMDS_H_
#define _MODEMCMDS_H_
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kdialogbase.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <pppdata.h>
class QLineEdit;
@@ -49,7 +49,7 @@ Q_OBJECT
public:
- ModemCommands(QWidget *parent=0, const char *name=0);
+ ModemCommands(TQWidget *parent=0, const char *name=0);
~ModemCommands() {}
private slots:
@@ -58,72 +58,72 @@ private slots:
private:
- QGroupBox *box;
+ TQGroupBox *box;
- QLineEdit *initstr[int(PPPData::NumInitStrings)];
+ TQLineEdit *initstr[int(PPPData::NumInitStrings)];
- QLineEdit *initresp;
- QLabel *label2;
+ TQLineEdit *initresp;
+ TQLabel *label2;
- QSlider *preinitslider;
- QLabel *lpreinitslider;
- QLabel *lpreinit;
+ TQSlider *preinitslider;
+ TQLabel *lpreinitslider;
+ TQLabel *lpreinit;
- QSlider *initslider;
- QLabel *linitslider;
- QLabel *label3;
+ TQSlider *initslider;
+ TQLabel *linitslider;
+ TQLabel *label3;
- QSlider *durationslider;
- QLabel *ldurationslider;
- QLabel *lduration;
+ TQSlider *durationslider;
+ TQLabel *ldurationslider;
+ TQLabel *lduration;
- QLineEdit *nodetectdialtone;
- QLabel *lnodetectdialtone;
+ TQLineEdit *nodetectdialtone;
+ TQLabel *lnodetectdialtone;
- QLineEdit *dialstr;
- QLabel *label4;
+ TQLineEdit *dialstr;
+ TQLabel *label4;
- QLineEdit *connectresp;
- QLabel *label5;
+ TQLineEdit *connectresp;
+ TQLabel *label5;
- QLineEdit *busyresp;
- QLabel *label6;
+ TQLineEdit *busyresp;
+ TQLabel *label6;
- QLineEdit *nocarrierresp;
- QLabel *label7;
+ TQLineEdit *nocarrierresp;
+ TQLabel *label7;
- QLineEdit *nodialtoneresp;
- QLabel *label8;
+ TQLineEdit *nodialtoneresp;
+ TQLabel *label8;
- QLineEdit *hangupstr;
- QLabel *label9;
+ TQLineEdit *hangupstr;
+ TQLabel *label9;
- QLineEdit *hangupresp;
- QLabel *label10;
+ TQLineEdit *hangupresp;
+ TQLabel *label10;
- QLineEdit *answerstr;
- QLabel *label11;
+ TQLineEdit *answerstr;
+ TQLabel *label11;
- QLineEdit *ringresp;
- QLabel *label12;
+ TQLineEdit *ringresp;
+ TQLabel *label12;
- QLineEdit *answerresp;
- QLabel *label13;
+ TQLineEdit *answerresp;
+ TQLabel *label13;
- QLineEdit *escapestr;
- QLabel *label14;
+ TQLineEdit *escapestr;
+ TQLabel *label14;
- QLineEdit *escaperesp;
- QLineEdit *dlpresp;
- QLabel *label17;
+ TQLineEdit *escaperesp;
+ TQLineEdit *dlpresp;
+ TQLabel *label17;
- QLabel *label15;
+ TQLabel *label15;
- QSlider *slider;
- QLabel *lslider;
- QLabel *label16;
+ TQSlider *slider;
+ TQLabel *lslider;
+ TQLabel *label16;
- QLineEdit *volume_off, *volume_medium, *volume_high;
+ TQLineEdit *volume_off, *volume_medium, *volume_high;
};
#endif
diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp
index c86be0fc..d762f5fa 100644
--- a/kppp/modemdb.cpp
+++ b/kppp/modemdb.cpp
@@ -32,21 +32,21 @@
//
//---------------------------------------------------------------------------
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kbuttonbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include "modemdb.h"
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kconfig.h>
#include <kstdguiitem.h>
-ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
+ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) {
// set up widgets and such
setCaption(i18n("Select Modem Type"));
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l1 = new QLabel(i18n("To set up your modem, first choose its vendor in the "
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l1 = new TQLabel(i18n("To set up your modem, first choose its vendor in the "
"list to the left, and then select the model from the "
"right list. If you don't know which modem you have, "
"you can try out one of the \"Generic\" modems."),
@@ -58,10 +58,10 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
tl->addSpacing(10);
- QHBoxLayout *tl1 = new QHBoxLayout(10);
+ TQHBoxLayout *tl1 = new TQHBoxLayout(10);
tl->addLayout(tl1, 1);
- vendor = new QListBox(this);
- model = new QListBox(this);
+ vendor = new TQListBox(this);
+ model = new TQListBox(this);
vendor->setMinimumSize(200, 130);
model->setMinimumSize(200, 130);
tl1->addWidget(vendor, 2);
@@ -81,16 +81,16 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
db = new ModemDatabase();
// set up signal/slots
- connect(ok, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(vendor, SIGNAL(highlighted(int)),
- this, SLOT(vendorSelected(int)));
- connect(model, SIGNAL(highlighted(int)),
- this, SLOT(modelSelected(int)));
- connect(model, SIGNAL(selected(int)),
- this, SLOT(selected(int)));
+ connect(ok, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
+ connect(vendor, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(vendorSelected(int)));
+ connect(model, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(modelSelected(int)));
+ connect(model, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(selected(int)));
// fill vendor list with life
vendor->insertStringList(*db->vendors());
@@ -107,8 +107,8 @@ ModemSelector::~ModemSelector() {
void ModemSelector::vendorSelected(int idx) {
ok->setEnabled(false);
- QString name = vendor->text(idx);
- QStringList *models = db->models(name);
+ TQString name = vendor->text(idx);
+ TQStringList *models = db->models(name);
model->clear();
model->insertStringList(*models);
@@ -139,14 +139,14 @@ ModemDatabase::~ModemDatabase() {
}
-const QStringList *ModemDatabase::vendors() {
+const TQStringList *ModemDatabase::vendors() {
return lvendors;
}
-QStringList *ModemDatabase::models(QString vendor) {
- QStringList *sl = new QStringList;
- QString s = i18n("<Generic>");
+TQStringList *ModemDatabase::models(TQString vendor) {
+ TQStringList *sl = new QStringList;
+ TQString s = i18n("<Generic>");
if(vendor == s)
vendor = i18n("<Generic>");
@@ -163,11 +163,11 @@ QStringList *ModemDatabase::models(QString vendor) {
}
-void ModemDatabase::loadModem(const QString &key, CharDict &dict) {
+void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
// KEntryIterator *it = modemDB->entryIterator(key);
// KEntryDictEntry *e;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// KEntryMapConstIterator e;
KEntry e;
map = modemDB->entryMap(key);
@@ -180,14 +180,14 @@ void ModemDatabase::loadModem(const QString &key, CharDict &dict) {
// e = it->current();
while(!it.key().isNull()) {
if(dict.find(it.key()) == 0) {
- dict.insert(it.key(), new QString(it.data()));
+ dict.insert(it.key(), new TQString(it.data()));
}
it++;
}
// check name attribute
if(dict["Name"] == 0 || key[0]=='!') {
- dict.replace("Name", new QString(key));
+ dict.replace("Name", new TQString(key));
}
// check parent attribute
@@ -206,8 +206,8 @@ void ModemDatabase::load() {
lvendors = new QStringList;
modems.setAutoDelete(true);
- QStringList list = modemDB->groupList();
- QStringList::Iterator it = list.begin();
+ TQStringList list = modemDB->groupList();
+ TQStringList::Iterator it = list.begin();
while(it != list.end()) {
modemDB->setGroup(*it);
CharDict *c = new CharDict;
@@ -216,16 +216,16 @@ void ModemDatabase::load() {
// if(strcmp(it->latin1(), "Common") == 0) {
if(*it == "Common") {
- QString s = i18n("Hayes(tm) compatible modem");
- c->replace("Name", new QString (s));
+ TQString s = i18n("Hayes(tm) compatible modem");
+ c->replace("Name", new TQString (s));
s = i18n("<Generic>");
- c->replace("Vendor", new QString(s));
+ c->replace("Vendor", new TQString(s));
}
modems.append(c);
if(modemDB->hasKey("Vendor")) {
- QString vendor = modemDB->readEntry("Vendor");
+ TQString vendor = modemDB->readEntry("Vendor");
if(lvendors->findIndex(vendor) == -1)
lvendors->append(vendor);
}
diff --git a/kppp/modemdb.h b/kppp/modemdb.h
index 92606697..35ddbcff 100644
--- a/kppp/modemdb.h
+++ b/kppp/modemdb.h
@@ -35,40 +35,40 @@
#ifndef __MODEMDB__H__
#define __MODEMDB__H__
-#include <qdialog.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
class KConfig;
class QListBox;
-typedef QDict<QString> CharDict;
+typedef TQDict<TQString> CharDict;
class ModemDatabase {
public:
ModemDatabase();
~ModemDatabase();
- const QStringList *vendors();
- QStringList *models(QString vendor);
+ const TQStringList *vendors();
+ TQStringList *models(TQString vendor);
void save(KConfig *);
private:
void load();
- void loadModem(const QString & key, CharDict &dict);
- QPtrList<CharDict> modems;
+ void loadModem(const TQString & key, CharDict &dict);
+ TQPtrList<CharDict> modems;
- QStringList *lvendors;
+ TQStringList *lvendors;
KConfig *modemDB;
};
-class ModemSelector : public QDialog {
+class ModemSelector : public TQDialog {
Q_OBJECT
public:
- ModemSelector(QWidget *parent = 0);
+ ModemSelector(TQWidget *parent = 0);
~ModemSelector();
private slots:
@@ -77,8 +77,8 @@ private slots:
void selected(int idx);
private:
- QPushButton *ok, *cancel;
- QListBox *vendor, *model;
+ TQPushButton *ok, *cancel;
+ TQListBox *vendor, *model;
ModemDatabase *db;
};
diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp
index bf7ed8dd..9e6668d8 100644
--- a/kppp/modeminfo.cpp
+++ b/kppp/modeminfo.cpp
@@ -25,8 +25,8 @@
*/
#include <unistd.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <kwin.h>
#include <kmessagebox.h>
#include <kapplication.h>
@@ -35,19 +35,19 @@
#include "modem.h"
#include <klocale.h>
-ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
- : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
+ : TQDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
{
setCaption(i18n("ATI Query"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
progressBar = new KProgress(this, "bar");
progressBar->setTotalSteps(8);
- statusBar = new QLabel(this,"sBar");
- statusBar->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ statusBar = new TQLabel(this,"sBar");
+ statusBar->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
statusBar->setAlignment(AlignCenter);
// This is a rather complicated case. Since we do not know which
@@ -67,9 +67,9 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
cancel = new KPushButton(KStdGuiItem::cancel(), this);
cancel->setFocus();
- connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
l1->addWidget(cancel);
@@ -80,14 +80,14 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
////////////////////////////////////////////////
- timeout_timer = new QTimer(this);
- connect(timeout_timer, SIGNAL(timeout()), SLOT(time_out_slot()));
+ timeout_timer = new TQTimer(this);
+ connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(time_out_slot()));
- scripttimer = new QTimer(this);
- connect(scripttimer, SIGNAL(timeout()), SLOT(do_script()));
+ scripttimer = new TQTimer(this);
+ connect(scripttimer, TQT_SIGNAL(timeout()), TQT_SLOT(do_script()));
timeout_timer->start(15000,TRUE); // 15 secs single shot
- QTimer::singleShot(500, this, SLOT(init()));
+ TQTimer::singleShot(500, this, TQT_SLOT(init()));
}
@@ -151,7 +151,7 @@ void ModemTransfer::init() {
// clear modem buffer
Modem::modem->flush();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -164,8 +164,8 @@ void ModemTransfer::init() {
void ModemTransfer::do_script() {
- QString msg;
- QString query;
+ TQString msg;
+ TQString query;
switch(step) {
case 0:
@@ -207,7 +207,7 @@ void ModemTransfer::readtty() {
if (step == 0)
return;
- readbuffer.replace(QRegExp("[\n\r]")," "); // remove stray \n and \r
+ readbuffer.replace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white
// space
@@ -234,23 +234,23 @@ void ModemTransfer::cancelbutton() {
}
-void ModemTransfer::closeEvent( QCloseEvent *e ) {
+void ModemTransfer::closeEvent( TQCloseEvent *e ) {
cancelbutton();
e->accept();
}
-ModemInfo::ModemInfo(QWidget *parent, const char* name)
- : QDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemInfo::ModemInfo(TQWidget *parent, const char* name)
+ : TQDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
{
- QString label_text;
+ TQString label_text;
setCaption(i18n("Modem Query Results"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
- QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5);
+ TQGridLayout *l1 = new TQGridLayout(NUM_OF_ATI, 2, 5);
tl->addLayout(l1, 1);
for(int i = 0 ; i < NUM_OF_ATI ; i++) {
@@ -260,31 +260,31 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name)
else
label_text.sprintf("ATI %d:", i );
- ati_label[i] = new QLabel(label_text, this);
+ ati_label[i] = new TQLabel(label_text, this);
l1->addWidget(ati_label[i], i, 0);
- ati_label_result[i] = new QLineEdit(this);
+ ati_label_result[i] = new TQLineEdit(this);
ati_label_result[i]->setMinimumWidth(fontMetrics().width('H') * 24);
l1->addWidget(ati_label_result[i], i, 1);
}
//tl->addSpacing(1);
- QHBoxLayout *l2 = new QHBoxLayout;
- QPushButton *ok = new KPushButton(KStdGuiItem::close(), this);
+ TQHBoxLayout *l2 = new QHBoxLayout;
+ TQPushButton *ok = new KPushButton(KStdGuiItem::close(), this);
ok->setDefault(TRUE);
ok->setFocus();
tl->addLayout(l2);
l2->addStretch(1);
- connect(ok, SIGNAL(clicked()), SLOT(accept()));
+ connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
l2->addWidget(ok);
setMinimumSize(sizeHint());
}
-void ModemInfo::setAtiString(int i, QString s) {
+void ModemInfo::setAtiString(int i, TQString s) {
if(i < NUM_OF_ATI)
ati_label_result[i]->setText(s);
}
diff --git a/kppp/modeminfo.h b/kppp/modeminfo.h
index dae93161..0298ecdd 100644
--- a/kppp/modeminfo.h
+++ b/kppp/modeminfo.h
@@ -28,21 +28,21 @@
#ifndef _MODEMINFO_H_
#define _MODEMINFO_H_
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qevent.h>
-#include <qtimer.h>
+#include <tqdialog.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqevent.h>
+#include <tqtimer.h>
#include <kprogress.h>
const int NUM_OF_ATI = 8;
-class ModemTransfer : public QDialog {
+class ModemTransfer : public TQDialog {
Q_OBJECT
public:
- ModemTransfer(QWidget *parent=0, const char *name=0);
+ ModemTransfer(TQWidget *parent=0, const char *name=0);
public slots:
void init();
@@ -56,33 +56,33 @@ private:
void ati_done();
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
private:
int step;
- QString readbuffer;
+ TQString readbuffer;
- QPushButton *cancel;
+ TQPushButton *cancel;
KProgress *progressBar;
- QLabel *statusBar;
+ TQLabel *statusBar;
- QTimer *timeout_timer;
- QTimer *scripttimer;
- QString ati_query_strings[NUM_OF_ATI];
+ TQTimer *timeout_timer;
+ TQTimer *scripttimer;
+ TQString ati_query_strings[NUM_OF_ATI];
};
-class ModemInfo : public QDialog {
+class ModemInfo : public TQDialog {
Q_OBJECT
public:
- ModemInfo(QWidget *parent=0, const char *name=0);
+ ModemInfo(TQWidget *parent=0, const char *name=0);
public:
- void setAtiString(int num, QString s);
+ void setAtiString(int num, TQString s);
private:
- QLabel *ati_label[NUM_OF_ATI];
- QLineEdit *ati_label_result[NUM_OF_ATI];
+ TQLabel *ati_label[NUM_OF_ATI];
+ TQLineEdit *ati_label_result[NUM_OF_ATI];
};
#endif
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
index f6970cc1..379b3c96 100644
--- a/kppp/modems.cpp
+++ b/kppp/modems.cpp
@@ -25,12 +25,12 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qtabdialog.h>
-#include <qwhatsthis.h>
-#include <qmessagebox.h>
+#include <tqlayout.h>
+#include <tqtabdialog.h>
+#include <tqwhatsthis.h>
+#include <tqmessagebox.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -39,7 +39,7 @@
#include <kglobal.h>
#include <kwin.h>
#include <kdialogbase.h>
-#include <qvgroupbox.h>
+#include <tqvgroupbox.h>
#include "general.h"
#include "pppdata.h"
@@ -50,29 +50,29 @@
void parseargs(char* buf, char** args);
-ModemsWidget::ModemsWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ModemsWidget::ModemsWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
int min = 0;
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
// add a hbox
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addLayout(l11);
- modemlist_l = new QListBox(parent);
+ modemlist_l = new TQListBox(parent);
modemlist_l->setMinimumSize(160, 128);
- connect(modemlist_l, SIGNAL(highlighted(int)),
- this, SLOT(slotListBoxSelect(int)));
- connect(modemlist_l, SIGNAL(selected(int)),
- this, SLOT(editmodem()));
+ connect(modemlist_l, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotListBoxSelect(int)));
+ connect(modemlist_l, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(editmodem()));
l11->addWidget(modemlist_l, 10);
- QVBoxLayout *l111 = new QVBoxLayout;
+ TQVBoxLayout *l111 = new QVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new QPushButton(i18n("&Edit..."), parent);
- connect(edit_b, SIGNAL(clicked()), SLOT(editmodem()));
- QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+ edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editmodem()));
+ TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
min = edit_b->sizeHint().width();
min = QMAX(70,min);
@@ -80,32 +80,32 @@ ModemsWidget::ModemsWidget( QWidget *parent, const char *name )
l111->addWidget(edit_b);
- new_b = new QPushButton(i18n("&New..."), parent);
- connect(new_b, SIGNAL(clicked()), SLOT(newmodem()));
+ new_b = new TQPushButton(i18n("&New..."), parent);
+ connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newmodem()));
l111->addWidget(new_b);
- QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new QPushButton(i18n("Co&py"), parent);
- connect(copy_b, SIGNAL(clicked()), SLOT(copymodem()));
+ copy_b = new TQPushButton(i18n("Co&py"), parent);
+ connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copymodem()));
l111->addWidget(copy_b);
- QWhatsThis::add(copy_b,
+ TQWhatsThis::add(copy_b,
i18n("Makes a copy of the selected account. All\n"
"settings of the selected account are copied\n"
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new QPushButton(i18n("De&lete"), parent);
- connect(delete_b, SIGNAL(clicked()), SLOT(deletemodem()));
+ delete_b = new TQPushButton(i18n("De&lete"), parent);
+ connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deletemodem()));
l111->addWidget(delete_b);
- QWhatsThis::add(delete_b,
+ TQWhatsThis::add(delete_b,
i18n("<p>Deletes the selected account\n\n"
"<font color=\"red\"><b>Use with care!</b></font>"));
//load up account list from gppdata to the list box
// but keep the current one selected in gpppdata
if(gpppdata.modemCount() > 0) {
- const QString currentmodem = gpppdata.modname();
+ const TQString currentmodem = gpppdata.modname();
for(int i=0; i <= gpppdata.modemCount()-1; i++) {
gpppdata.setModemByIndex(i);
modemlist_l->insertItem(gpppdata.modname());
@@ -125,7 +125,7 @@ void ModemsWidget::slotListBoxSelect(int idx) {
edit_b->setEnabled((bool)(idx != -1));
copy_b->setEnabled((bool)(idx != -1));
if(idx!=-1) {
- QString modem = gpppdata.modname();
+ TQString modem = gpppdata.modname();
gpppdata.setModemByIndex(modemlist_l->currentItem());
gpppdata.setModem(modem);
}
@@ -136,7 +136,7 @@ void ModemsWidget::editmodem() {
int result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
modemlist_l->changeItem(gpppdata.modname(),modemlist_l->currentItem());
emit resetmodems();
gpppdata.save();
@@ -157,7 +157,7 @@ void ModemsWidget::newmodem() {
result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
modemlist_l->insertItem(gpppdata.modname());
modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()),
true);
@@ -189,7 +189,7 @@ void ModemsWidget::copymodem() {
void ModemsWidget::deletemodem() {
- QString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
+ TQString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
.arg(modemlist_l->text(modemlist_l->currentItem()));
if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue)
@@ -207,7 +207,7 @@ void ModemsWidget::deletemodem() {
int ModemsWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -217,14 +217,14 @@ int ModemsWidget::doTab(){
tabWindow->setCaption(i18n("New Modem"));
isnewmodem = true;
} else {
- QString tit = i18n("Edit Modem: ");
+ TQString tit = i18n("Edit Modem: ");
tit += gpppdata.modname();
tabWindow->setCaption(tit);
isnewmodem = false;
}
modem1 = new ModemWidget(tabWindow->addPage( i18n("&Device"), i18n("Serial Device")), isnewmodem );
modem2 = new ModemWidget2(tabWindow->addPage( i18n("&Modem"), i18n("Modem Settings")));
- connect ( modem1->connectName(), SIGNAL(textChanged ( const QString & )), this, SLOT(modemNameChanged(const QString & )));
+ connect ( modem1->connectName(), TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(modemNameChanged(const TQString & )));
modemNameChanged(modem1->connectName()->text());
int result = 0;
@@ -234,7 +234,7 @@ int ModemsWidget::doTab(){
result = tabWindow->exec();
ok = true;
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
if(modem1->save()) {
modem2->save();
} else {
@@ -249,15 +249,15 @@ int ModemsWidget::doTab(){
return result;
}
-void ModemsWidget::modemNameChanged(const QString & text)
+void ModemsWidget::modemNameChanged(const TQString & text)
{
tabWindow->enableButtonOK( !text.isEmpty() );
}
-QString ModemsWidget::prettyPrintVolume(unsigned int n) {
+TQString ModemsWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -269,7 +269,7 @@ QString ModemsWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
diff --git a/kppp/modems.h b/kppp/modems.h
index 6676b7be..b197980e 100644
--- a/kppp/modems.h
+++ b/kppp/modems.h
@@ -28,9 +28,9 @@
#ifndef _MODEMS_H_
#define _MODEMS_H_
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include "acctselect.h"
class KDialogBase;
@@ -43,10 +43,10 @@ class IPWidget;
class DNSWidget;
class GatewayWidget;
-class ModemsWidget : public QWidget {
+class ModemsWidget : public TQWidget {
Q_OBJECT
public:
- ModemsWidget( QWidget *parent=0, const char *name=0 );
+ ModemsWidget( TQWidget *parent=0, const char *name=0 );
~ModemsWidget() {}
private slots:
@@ -55,7 +55,7 @@ private slots:
void newmodem();
void deletemodem();
void slotListBoxSelect(int);
- void modemNameChanged(const QString &);
+ void modemNameChanged(const TQString &);
private:
int doTab();
@@ -64,7 +64,7 @@ signals:
void resetmodems();
private:
- QString prettyPrintVolume(unsigned int);
+ TQString prettyPrintVolume(unsigned int);
KDialogBase *tabWindow;
ModemWidget *modem1;
@@ -76,16 +76,16 @@ private:
GatewayWidget *gateway_w;
ScriptWidget *script_w;*/
- QLabel *costlabel;
- QLineEdit *costedit;
- QLabel *vollabel;
- QLineEdit *voledit;
+ TQLabel *costlabel;
+ TQLineEdit *costedit;
+ TQLabel *vollabel;
+ TQLineEdit *voledit;
- QListBox *modemlist_l;
- QPushButton *edit_b;
- QPushButton *copy_b;
- QPushButton *new_b;
- QPushButton *delete_b;
+ TQListBox *modemlist_l;
+ TQPushButton *edit_b;
+ TQPushButton *copy_b;
+ TQPushButton *new_b;
+ TQPushButton *delete_b;
};
#endif
diff --git a/kppp/newwidget.cpp b/kppp/newwidget.cpp
index d2182fba..ba8508e5 100644
--- a/kppp/newwidget.cpp
+++ b/kppp/newwidget.cpp
@@ -6,8 +6,8 @@
#include "newwidget.h"
-QLineEdit *newLineEdit(int visiblewidth, QWidget *parent) {
- QLineEdit *l = new QLineEdit(parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent) {
+ TQLineEdit *l = new TQLineEdit(parent);
if(visiblewidth == 0)
l->setMinimumWidth(l->sizeHint().width());
else
diff --git a/kppp/newwidget.h b/kppp/newwidget.h
index 52f2ec76..2cb2e717 100644
--- a/kppp/newwidget.h
+++ b/kppp/newwidget.h
@@ -7,13 +7,13 @@
#ifndef __NEWWIDGET__H__
#define __NEWWIDGET__H__
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#define L_FIXEDW 1
#define L_FIXEDH 2
#define L_FIXED (L_FIXEDW | L_FIXEDH)
-QLineEdit *newLineEdit(int visiblewidth, QWidget *parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent);
#endif
diff --git a/kppp/pppdargs.cpp b/kppp/pppdargs.cpp
index ca235c6e..f03103bb 100644
--- a/kppp/pppdargs.cpp
+++ b/kppp/pppdargs.cpp
@@ -25,65 +25,65 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kwin.h>
#include <kapplication.h>
#include "pppdargs.h"
#include "pppdata.h"
#include <klocale.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
#include <kstdguiitem.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
-PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
- : QDialog(parent, name, TRUE)
+PPPdArguments::PPPdArguments(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, TRUE)
{
setCaption(i18n("Customize pppd Arguments"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *l = new QVBoxLayout(this, 10, 10);
- QHBoxLayout *tl = new QHBoxLayout(10);
+ TQVBoxLayout *l = new TQVBoxLayout(this, 10, 10);
+ TQHBoxLayout *tl = new TQHBoxLayout(10);
l->addLayout(tl);
- QVBoxLayout *l1 = new QVBoxLayout();
- QVBoxLayout *l2 = new QVBoxLayout();
+ TQVBoxLayout *l1 = new TQVBoxLayout();
+ TQVBoxLayout *l2 = new TQVBoxLayout();
tl->addLayout(l1, 1);
tl->addLayout(l2, 0);
- QHBoxLayout *l11 = new QHBoxLayout(10);
+ TQHBoxLayout *l11 = new TQHBoxLayout(10);
l1->addLayout(l11);
- argument_label = new QLabel(i18n("Arg&ument:"), this);
+ argument_label = new TQLabel(i18n("Arg&ument:"), this);
l11->addWidget(argument_label);
- argument = new QLineEdit(this);
+ argument = new TQLineEdit(this);
argument_label->setBuddy(argument);
- connect(argument, SIGNAL(returnPressed()),
- SLOT(addbutton()));
+ connect(argument, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(addbutton()));
l11->addWidget(argument);
- connect(argument, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(argument, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
- arguments = new QListBox(this);
+ arguments = new TQListBox(this);
arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10);
- connect(arguments, SIGNAL(highlighted(int)),
- this, SLOT(itemSelected(int)));
+ connect(arguments, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(itemSelected(int)));
l1->addWidget(arguments, 1);
- add = new QPushButton(i18n("&Add"), this);
- connect(add, SIGNAL(clicked()), SLOT(addbutton()));
+ add = new TQPushButton(i18n("&Add"), this);
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addbutton()));
l2->addWidget(add);
l2->addStretch(1);
- remove = new QPushButton(i18n("&Remove"), this);
- connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
+ remove = new TQPushButton(i18n("&Remove"), this);
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removebutton()));
l2->addWidget(remove);
defaults = new KPushButton(KStdGuiItem::defaults(), this);
- connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
+ connect(defaults, TQT_SIGNAL(clicked()), TQT_SLOT(defaultsbutton()));
l2->addWidget(defaults);
l->addSpacing(5);
@@ -91,10 +91,10 @@ PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
KButtonBox *bbox = new KButtonBox(this);
bbox->addStretch(1);
closebtn = bbox->addButton(KStdGuiItem::ok());
- connect(closebtn, SIGNAL(clicked()), SLOT(closebutton()));
- QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
+ connect(closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(closebutton()));
+ TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
bbox->layout();
l->addWidget(bbox);
@@ -126,7 +126,7 @@ void PPPdArguments::removebutton() {
void PPPdArguments::defaultsbutton() {
// all of this is a hack
// save current list
- QStringList arglist(gpppdata.pppdArgument());
+ TQStringList arglist(gpppdata.pppdArgument());
// get defaults
gpppdata.setpppdArgumentDefaults();
@@ -138,7 +138,7 @@ void PPPdArguments::defaultsbutton() {
void PPPdArguments::closebutton() {
- QStringList arglist;
+ TQStringList arglist;
for(uint i=0; i < arguments->count(); i++)
arglist.append(arguments->text(i));
gpppdata.setpppdArgument(arglist);
@@ -151,15 +151,15 @@ void PPPdArguments::init() {
while(arguments->count())
arguments->removeItem(0);
- QStringList &arglist = gpppdata.pppdArgument();
- for ( QStringList::Iterator it = arglist.begin();
+ TQStringList &arglist = gpppdata.pppdArgument();
+ for ( TQStringList::Iterator it = arglist.begin();
it != arglist.end();
++it )
arguments->insertItem(*it);
}
-void PPPdArguments::textChanged(const QString &s) {
+void PPPdArguments::textChanged(const TQString &s) {
add->setEnabled(s.length() > 0);
}
diff --git a/kppp/pppdargs.h b/kppp/pppdargs.h
index 4c98b487..9e60764e 100644
--- a/kppp/pppdargs.h
+++ b/kppp/pppdargs.h
@@ -28,7 +28,7 @@
#ifndef _PPPDARGS_H_
#define _PPPDARGS_H_
-#include <qdialog.h>
+#include <tqdialog.h>
class QListBox;
class QLabel;
@@ -37,10 +37,10 @@ class QLineEdit;
class KPushButton;
-class PPPdArguments : public QDialog {
+class PPPdArguments : public TQDialog {
Q_OBJECT
public:
- PPPdArguments(QWidget *parent=0, const char *name=0);
+ PPPdArguments(TQWidget *parent=0, const char *name=0);
~PPPdArguments() {}
private slots:
@@ -48,23 +48,23 @@ private slots:
void removebutton();
void defaultsbutton();
void closebutton();
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void itemSelected(int);
private:
void init();
- QLabel *argument_label;
+ TQLabel *argument_label;
- QLineEdit *argument;
+ TQLineEdit *argument;
- QPushButton *add;
- QPushButton *remove;
+ TQPushButton *add;
+ TQPushButton *remove;
KPushButton *defaults;
- QListBox *arguments;
+ TQListBox *arguments;
- QPushButton *closebtn;
+ TQPushButton *closebtn;
};
#endif
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
index 56b2c580..2c43d7f7 100644
--- a/kppp/pppdata.cpp
+++ b/kppp/pppdata.cpp
@@ -96,8 +96,8 @@ bool PPPData::open() {
{
config->setGroup("Modem");
- QMap <QString, QString> map = config->entryMap("Modem");
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap("Modem");
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
newmodem();
@@ -107,7 +107,7 @@ bool PPPData::open() {
it++;
}
- QString newname("Modem0");
+ TQString newname("Modem0");
setModname(newname);
}
@@ -163,8 +163,8 @@ int PPPData::access() const {
// functions to read/write date to configuration file
-QString PPPData::readConfig(const QString &group, const QString &key,
- const QString &defvalue = "")
+TQString PPPData::readConfig(const TQString &group, const TQString &key,
+ const TQString &defvalue = "")
{
if (config) {
config->setGroup(group);
@@ -174,7 +174,7 @@ QString PPPData::readConfig(const QString &group, const QString &key,
}
-int PPPData::readNumConfig(const QString &group, const QString &key,
+int PPPData::readNumConfig(const TQString &group, const TQString &key,
int defvalue) {
if (config) {
config->setGroup(group);
@@ -185,8 +185,8 @@ int PPPData::readNumConfig(const QString &group, const QString &key,
}
-bool PPPData::readListConfig(const QString &group, const QString &key,
- QStringList &list, char sep) {
+bool PPPData::readListConfig(const TQString &group, const TQString &key,
+ TQStringList &list, char sep) {
list.clear();
if (config) {
config->setGroup(group);
@@ -197,8 +197,8 @@ bool PPPData::readListConfig(const QString &group, const QString &key,
}
-void PPPData::writeConfig(const QString &group, const QString &key,
- const QString &value) {
+void PPPData::writeConfig(const TQString &group, const TQString &key,
+ const TQString &value) {
if (config) {
config->setGroup(group);
config->writeEntry(key, value);
@@ -206,7 +206,7 @@ void PPPData::writeConfig(const QString &group, const QString &key,
}
-void PPPData::writeConfig(const QString &group, const QString &key, int value) {
+void PPPData::writeConfig(const TQString &group, const TQString &key, int value) {
if (config) {
config->setGroup(group);
config->writeEntry(key, value);
@@ -214,8 +214,8 @@ void PPPData::writeConfig(const QString &group, const QString &key, int value) {
}
-void PPPData::writeListConfig(const QString &group, const QString &key,
- QStringList &list, char sep) {
+void PPPData::writeListConfig(const TQString &group, const TQString &key,
+ TQStringList &list, char sep) {
if (config) {
config->setGroup(group);
config->writeEntry(key, list, sep);
@@ -226,22 +226,22 @@ void PPPData::writeListConfig(const QString &group, const QString &key,
//
// functions to set/return general information
//
-QString PPPData::password() const {
+TQString PPPData::password() const {
return passwd;
}
-void PPPData::setPassword(const QString &pw) {
+void PPPData::setPassword(const TQString &pw) {
passwd = pw;
}
-const QString PPPData::defaultAccount() {
+const TQString PPPData::defaultAccount() {
return readConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY);
}
-void PPPData::setDefaultAccount(const QString &n) {
+void PPPData::setDefaultAccount(const TQString &n) {
writeConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY, n);
//now set the current account index to the default account
@@ -249,12 +249,12 @@ void PPPData::setDefaultAccount(const QString &n) {
}
-const QString PPPData::defaultModem() {
+const TQString PPPData::defaultModem() {
return readConfig(GENERAL_GRP, DEFAULTMODEM_KEY);
}
-void PPPData::setDefaultModem(const QString &n) {
+void PPPData::setDefaultModem(const TQString &n) {
writeConfig(GENERAL_GRP, DEFAULTMODEM_KEY, n);
//now set the current modem index to the default modem
@@ -349,8 +349,8 @@ void PPPData::set_dock_into_panel(bool set) {
}
-QString PPPData::pppdVersion() {
- return QString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
+TQString PPPData::pppdVersion() {
+ return TQString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
}
bool PPPData::pppdVersionMin(int ver, int mod, int patch) {
@@ -380,7 +380,7 @@ int PPPData::modemCount() const {
}
-bool PPPData::setModem(const QString &mname) {
+bool PPPData::setModem(const TQString &mname) {
for(int i = 0; i <= modemhighcount; i++) {
setModemByIndex(i);
if(modname() == mname) {
@@ -402,7 +402,7 @@ bool PPPData::setModemByIndex(int i) {
}
-bool PPPData::isUniqueModname(const QString &n) {
+bool PPPData::isUniqueModname(const TQString &n) {
int current = cmodem;
for(int i=0; i <= modemhighcount; i++) {
setModemByIndex(i);
@@ -420,8 +420,8 @@ bool PPPData::deleteModem() {
if(cmodem < 0)
return false;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// set all entries of the current modem to ""
map = config->entryMap(cmodemgroup);
@@ -463,7 +463,7 @@ bool PPPData::deleteModem() {
return true;
}
-bool PPPData::deleteModem(const QString &mname) {
+bool PPPData::deleteModem(const TQString &mname) {
if(!setModem(mname))
return false;
@@ -495,10 +495,10 @@ int PPPData::copymodem(int i) {
setModemByIndex(i);
- QMap <QString, QString> map = config->entryMap(cmodemgroup);
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap(cmodemgroup);
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
- QString newname = i18n("%1_copy").arg(modname());
+ TQString newname = i18n("%1_copy").arg(modname());
newmodem();
@@ -514,11 +514,11 @@ int PPPData::copymodem(int i) {
}
-const QString PPPData::modname() {
+const TQString PPPData::modname() {
return readConfig(cmodemgroup, MOD_NAME_KEY);
}
-void PPPData::setModname(const QString &n) {
+void PPPData::setModname(const TQString &n) {
if(!cmodemgroup.isNull()) {
// are we manipulating the default modem's name ? then change it, too.
bool def = modname() == defaultModem();
@@ -531,29 +531,29 @@ void PPPData::setModname(const QString &n) {
-const QString PPPData::modemDevice() {
+const TQString PPPData::modemDevice() {
return readConfig (cmodemgroup, MODEMDEV_KEY, devices[DEV_DEFAULT]);
}
-void PPPData::setModemDevice(const QString &n) {
+void PPPData::setModemDevice(const TQString &n) {
writeConfig(cmodemgroup, MODEMDEV_KEY, n);
}
-QString PPPData::flowcontrol() {
+TQString PPPData::flowcontrol() {
// keep default value in sync with general.cpp
return readConfig(cmodemgroup, FLOWCONTROL_KEY, i18n("Hardware [CRTSCTS]"));
}
-void PPPData::setFlowcontrol(const QString &n) {
+void PPPData::setFlowcontrol(const TQString &n) {
writeConfig(cmodemgroup, FLOWCONTROL_KEY, n);
}
-const QString PPPData::speed() {
- QString s = readConfig(cmodemgroup, SPEED_KEY, "57600");
+const TQString PPPData::speed() {
+ TQString s = readConfig(cmodemgroup, SPEED_KEY, "57600");
// undo the damage of a bug in former versions. It left an empty Speed=
// entry in kppprc. kppp did set the serial port to 57600 as default but
// pppd wouldn't receive the speed via the command line.
@@ -563,7 +563,7 @@ const QString PPPData::speed() {
}
-void PPPData::setSpeed(const QString &n) {
+void PPPData::setSpeed(const TQString &n) {
writeConfig(cmodemgroup, SPEED_KEY, n);
}
@@ -579,22 +579,22 @@ int PPPData::UseCDLine() {
}
#endif
-const QString PPPData::modemEscapeStr() {
+const TQString PPPData::modemEscapeStr() {
return readConfig(cmodemgroup,ESCAPESTR_KEY,"+++");
}
-void PPPData::setModemEscapeStr(const QString &n) {
+void PPPData::setModemEscapeStr(const TQString &n) {
writeConfig(cmodemgroup,ESCAPESTR_KEY,n);
}
-const QString PPPData::modemEscapeResp() {
+const TQString PPPData::modemEscapeResp() {
return readConfig(cmodemgroup,ESCAPERESP_KEY,"OK");
}
-void PPPData::setModemEscapeResp(const QString &n) {
+void PPPData::setModemEscapeResp(const TQString &n) {
writeConfig(cmodemgroup,ESCAPERESP_KEY,n);
}
@@ -653,28 +653,28 @@ void PPPData::setbusyWait(int n) {
//Advanced "Modem" dialog
//
// defaults: InitString=ATZ, InitString1="" etc.
-const QString PPPData::modemInitStr(int i) {
+const TQString PPPData::modemInitStr(int i) {
assert(i >= 0 && i < NumInitStrings);
if(i == 0)
return readConfig(cmodemgroup, INITSTR_KEY, "ATZ");
else
- return readConfig(cmodemgroup, INITSTR_KEY + QString::number(i), "");
+ return readConfig(cmodemgroup, INITSTR_KEY + TQString::number(i), "");
}
-void PPPData::setModemInitStr(int i, const QString &n) {
+void PPPData::setModemInitStr(int i, const TQString &n) {
assert(i >= 0 && i < NumInitStrings);
- QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : "");
+ TQString k = INITSTR_KEY + (i > 0 ? TQString::number(i) : "");
writeConfig(cmodemgroup, k, n);
}
-const QString PPPData::modemInitResp() {
+const TQString PPPData::modemInitResp() {
return readConfig(cmodemgroup, INITRESP_KEY, "OK");
}
-void PPPData::setModemInitResp(const QString &n) {
+void PPPData::setModemInitResp(const TQString &n) {
writeConfig(cmodemgroup, INITRESP_KEY, n);
}
@@ -698,133 +698,133 @@ void PPPData::setModemInitDelay(int n) {
writeConfig(cmodemgroup, INITDELAY_KEY, n);
}
-QString PPPData::modemNoDialToneDetectionStr() {
+TQString PPPData::modemNoDialToneDetectionStr() {
return readConfig(cmodemgroup, NODTDETECT_KEY, "ATX3");
}
-void PPPData::setModemNoDialToneDetectionStr(const QString &n) {
+void PPPData::setModemNoDialToneDetectionStr(const TQString &n) {
writeConfig(cmodemgroup, NODTDETECT_KEY, n);
}
-const QString PPPData::modemDialStr() {
+const TQString PPPData::modemDialStr() {
return readConfig(cmodemgroup, DIALSTR_KEY, "ATDT");
}
-void PPPData::setModemDialStr(const QString &n) {
+void PPPData::setModemDialStr(const TQString &n) {
writeConfig(cmodemgroup, DIALSTR_KEY, n);
}
-const QString PPPData::modemConnectResp() {
+const TQString PPPData::modemConnectResp() {
return readConfig(cmodemgroup, CONNECTRESP_KEY, "CONNECT");
}
-void PPPData::setModemConnectResp(const QString &n) {
+void PPPData::setModemConnectResp(const TQString &n) {
writeConfig(cmodemgroup, CONNECTRESP_KEY, n);
}
-const QString PPPData::modemBusyResp() {
+const TQString PPPData::modemBusyResp() {
return readConfig(cmodemgroup, BUSYRESP_KEY, "BUSY");
}
-void PPPData::setModemBusyResp(const QString &n) {
+void PPPData::setModemBusyResp(const TQString &n) {
writeConfig(cmodemgroup, BUSYRESP_KEY, n);
}
-const QString PPPData::modemNoCarrierResp() {
+const TQString PPPData::modemNoCarrierResp() {
return readConfig(cmodemgroup, NOCARRIERRESP_KEY, "NO CARRIER");
}
-void PPPData::setModemNoCarrierResp(const QString &n) {
+void PPPData::setModemNoCarrierResp(const TQString &n) {
writeConfig(cmodemgroup, NOCARRIERRESP_KEY, n);
}
-const QString PPPData::modemNoDialtoneResp() {
+const TQString PPPData::modemNoDialtoneResp() {
return readConfig(cmodemgroup, NODIALTONERESP_KEY, "NO DIALTONE");
}
-void PPPData::setModemNoDialtoneResp(const QString &n) {
+void PPPData::setModemNoDialtoneResp(const TQString &n) {
writeConfig(cmodemgroup, NODIALTONERESP_KEY, n);
}
-const QString PPPData::modemHangupStr() {
+const TQString PPPData::modemHangupStr() {
return readConfig(cmodemgroup, HANGUPSTR_KEY, "+++ATH");
}
-void PPPData::setModemHangupStr(const QString &n) {
+void PPPData::setModemHangupStr(const TQString &n) {
writeConfig(cmodemgroup, HANGUPSTR_KEY, n);
}
-const QString PPPData::modemHangupResp() {
+const TQString PPPData::modemHangupResp() {
return readConfig(cmodemgroup, HANGUPRESP_KEY, "OK");
}
-void PPPData::setModemHangupResp(const QString &n) {
+void PPPData::setModemHangupResp(const TQString &n) {
writeConfig(cmodemgroup, HANGUPRESP_KEY, n);
}
-QString PPPData::modemDLPResp() {
+TQString PPPData::modemDLPResp() {
return readConfig(cmodemgroup, DLPRESP_KEY, "DIGITAL LINE DETECTED");
}
-void PPPData::setModemDLPResp(const QString &n) {
+void PPPData::setModemDLPResp(const TQString &n) {
writeConfig(cmodemgroup, DLPRESP_KEY, n);
}
-const QString PPPData::modemAnswerStr() {
+const TQString PPPData::modemAnswerStr() {
return readConfig(cmodemgroup, ANSWERSTR_KEY, "ATA");
}
-QString PPPData::volumeOff() {
+TQString PPPData::volumeOff() {
return readConfig(cmodemgroup, VOLUME_OFF, "M0L0");
}
-void PPPData::setVolumeOff(const QString &s) {
+void PPPData::setVolumeOff(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_OFF, s);
}
-QString PPPData::volumeMedium() {
+TQString PPPData::volumeMedium() {
return readConfig(cmodemgroup, VOLUME_MEDIUM, "M1L1");
}
-void PPPData::setVolumeMedium(const QString &s) {
+void PPPData::setVolumeMedium(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_MEDIUM, s);
}
-QString PPPData::volumeHigh() {
- QString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3");
+TQString PPPData::volumeHigh() {
+ TQString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3");
if(tmp == "M1L4")
tmp = "M1L3";
return tmp;
}
-void PPPData::setVolumeHigh(const QString &s) {
+void PPPData::setVolumeHigh(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_HIGH, s);
}
-QString PPPData::volumeInitString() {
- QString s;
+TQString PPPData::volumeInitString() {
+ TQString s;
switch(volume()) {
case 0:
@@ -861,37 +861,37 @@ void PPPData::setWaitForDialTone(int i) {
writeConfig(cmodemgroup, DIALTONEWAIT_KEY, i);
}
-void PPPData::setModemAnswerStr(const QString &n) {
+void PPPData::setModemAnswerStr(const TQString &n) {
writeConfig(cmodemgroup, ANSWERSTR_KEY, n);
}
-const QString PPPData::modemRingResp() {
+const TQString PPPData::modemRingResp() {
return readConfig(cmodemgroup, RINGRESP_KEY, "RING");
}
-void PPPData::setModemRingResp(const QString &n) {
+void PPPData::setModemRingResp(const TQString &n) {
writeConfig(cmodemgroup, RINGRESP_KEY, n);
}
-const QString PPPData::modemAnswerResp() {
+const TQString PPPData::modemAnswerResp() {
return readConfig(cmodemgroup, ANSWERRESP_KEY, "CONNECT");
}
-void PPPData::setModemAnswerResp(const QString &n) {
+void PPPData::setModemAnswerResp(const TQString &n) {
writeConfig(cmodemgroup, ANSWERRESP_KEY, n);
}
-const QString PPPData::enter() {
+const TQString PPPData::enter() {
return readConfig(cmodemgroup, ENTER_KEY, "CR");
}
-void PPPData::setEnter(const QString &n) {
+void PPPData::setEnter(const TQString &n) {
writeConfig(cmodemgroup, ENTER_KEY, n);
}
@@ -906,7 +906,7 @@ int PPPData::accountCount() const {
}
-bool PPPData::setAccount(const QString &aname) {
+bool PPPData::setAccount(const TQString &aname) {
for(int i = 0; i <= accounthighcount; i++) {
setAccountByIndex(i);
if(accname() == aname) {
@@ -928,7 +928,7 @@ bool PPPData::setAccountByIndex(int i) {
}
-bool PPPData::isUniqueAccname(const QString &n) {
+bool PPPData::isUniqueAccname(const TQString &n) {
if(n.contains(':'))
return false;
int current = caccount;
@@ -948,8 +948,8 @@ bool PPPData::deleteAccount() {
if(caccount < 0)
return false;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// set all entries of the current account to ""
map = config->entryMap(caccountgroup);
@@ -991,7 +991,7 @@ bool PPPData::deleteAccount() {
return true;
}
-bool PPPData::deleteAccount(const QString &aname) {
+bool PPPData::deleteAccount(const TQString &aname) {
if(!setAccount(aname))
return false;
@@ -1023,10 +1023,10 @@ int PPPData::copyaccount(int i) {
setAccountByIndex(i);
- QMap <QString, QString> map = config->entryMap(caccountgroup);
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap(caccountgroup);
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
- QString newname = i18n("%1_copy").arg(accname());
+ TQString newname = i18n("%1_copy").arg(accname());
newaccount();
@@ -1042,11 +1042,11 @@ int PPPData::copyaccount(int i) {
}
-const QString PPPData::accname() {
+const TQString PPPData::accname() {
return readConfig(caccountgroup, ACC_NAME_KEY);
}
-void PPPData::setAccname(const QString &n) {
+void PPPData::setAccname(const TQString &n) {
if(!caccountgroup.isNull()) {
// are we manipulating the default account's name ? then change it, too.
bool def = accname() == defaultAccount();
@@ -1058,7 +1058,7 @@ void PPPData::setAccname(const QString &n) {
#define SEPARATOR_CHAR ':'
-QStringList &PPPData::phonenumbers() {
+TQStringList &PPPData::phonenumbers() {
readListConfig(caccountgroup, PHONENUMBER_KEY, phonelist, SEPARATOR_CHAR);
return phonelist;
@@ -1066,22 +1066,22 @@ QStringList &PPPData::phonenumbers() {
}
-const QString PPPData::phonenumber() {
+const TQString PPPData::phonenumber() {
return readConfig(caccountgroup, PHONENUMBER_KEY);
}
-void PPPData::setPhonenumber(const QString &n) {
+void PPPData::setPhonenumber(const TQString &n) {
writeConfig(caccountgroup, PHONENUMBER_KEY, n);
}
-const QString PPPData::dialPrefix() {
+const TQString PPPData::dialPrefix() {
return readConfig(caccountgroup, DIAL_PREFIX_KEY, "");
}
-void PPPData::setDialPrefix(const QString &s) {
+void PPPData::setDialPrefix(const TQString &s) {
writeConfig(caccountgroup, DIAL_PREFIX_KEY, s);
}
@@ -1096,22 +1096,22 @@ void PPPData::setAuthMethod(int value) {
}
-const QString PPPData::storedUsername() {
+const TQString PPPData::storedUsername() {
return readConfig(caccountgroup, STORED_USERNAME_KEY, "");
}
-void PPPData::setStoredUsername(const QString &b) {
+void PPPData::setStoredUsername(const TQString &b) {
writeConfig(caccountgroup, STORED_USERNAME_KEY, b);
}
-const QString PPPData::storedPassword() {
+const TQString PPPData::storedPassword() {
return readConfig(caccountgroup, STORED_PASSWORD_KEY, "");
}
-void PPPData::setStoredPassword(const QString &b) {
+void PPPData::setStoredPassword(const TQString &b) {
writeConfig(caccountgroup, STORED_PASSWORD_KEY, b);
}
@@ -1128,11 +1128,11 @@ void PPPData::setCallbackType(int value) {
writeConfig(caccountgroup, CALLBACK_TYPE_KEY, value);
}
-QString PPPData::callbackPhone() {
+TQString PPPData::callbackPhone() {
return readConfig(caccountgroup, CALLBACK_PHONE_KEY, "");
}
-void PPPData::setCallbackPhone(const QString &b) {
+void PPPData::setCallbackPhone(const TQString &b) {
writeConfig(caccountgroup, CALLBACK_PHONE_KEY, b);
}
@@ -1144,12 +1144,12 @@ void PPPData::setWaitCallback(bool value) {
waitcallback = value;
}
-const QString PPPData::command_before_connect() {
+const TQString PPPData::command_before_connect() {
return readConfig(caccountgroup, BEFORE_CONNECT_KEY);
}
-void PPPData::setCommand_before_connect(const QString &n) {
+void PPPData::setCommand_before_connect(const TQString &n) {
writeConfig(caccountgroup, BEFORE_CONNECT_KEY, n);
}
@@ -1159,52 +1159,52 @@ void PPPData::setStorePassword(bool b) {
}
-const QString PPPData::command_on_connect() {
+const TQString PPPData::command_on_connect() {
return readConfig(caccountgroup, COMMAND_KEY);
}
-void PPPData::setCommand_on_connect(const QString &n) {
+void PPPData::setCommand_on_connect(const TQString &n) {
writeConfig(caccountgroup, COMMAND_KEY, n);
}
-const QString PPPData::command_on_disconnect() {
+const TQString PPPData::command_on_disconnect() {
return readConfig(caccountgroup, DISCONNECT_COMMAND_KEY);
}
-void PPPData::setCommand_on_disconnect(const QString &n) {
+void PPPData::setCommand_on_disconnect(const TQString &n) {
writeConfig(caccountgroup, DISCONNECT_COMMAND_KEY, n);
}
-const QString PPPData::command_before_disconnect() {
+const TQString PPPData::command_before_disconnect() {
return readConfig(caccountgroup, BEFORE_DISCONNECT_KEY);
}
-void PPPData::setCommand_before_disconnect(const QString &n) {
+void PPPData::setCommand_before_disconnect(const TQString &n) {
writeConfig(caccountgroup, BEFORE_DISCONNECT_KEY, n);
}
-const QString PPPData::ipaddr() {
+const TQString PPPData::ipaddr() {
return readConfig(caccountgroup, IPADDR_KEY);
}
-void PPPData::setIpaddr(const QString &n) {
+void PPPData::setIpaddr(const TQString &n) {
writeConfig(caccountgroup, IPADDR_KEY, n);
}
-const QString PPPData::subnetmask() {
+const TQString PPPData::subnetmask() {
return readConfig(caccountgroup, SUBNETMASK_KEY);
}
-void PPPData::setSubnetmask(const QString &n) {
+void PPPData::setSubnetmask(const TQString &n) {
writeConfig(caccountgroup, SUBNETMASK_KEY, n);
}
@@ -1239,12 +1239,12 @@ void PPPData::setVolAcctEnabled(int set) {
}
-const QString PPPData::gateway() {
+const TQString PPPData::gateway() {
return readConfig(caccountgroup, GATEWAY_KEY);
}
-void PPPData::setGateway(const QString &n ) {
+void PPPData::setGateway(const TQString &n ) {
writeConfig(caccountgroup, GATEWAY_KEY, n);
}
@@ -1281,8 +1281,8 @@ bool PPPData::exDNSDisabled() {
}
-QStringList &PPPData::dns() {
- static QStringList dnslist;
+TQStringList &PPPData::dns() {
+ static TQStringList dnslist;
readListConfig(caccountgroup, DNS_KEY, dnslist);
while(dnslist.count() > MAX_DNS_ENTRIES)
@@ -1292,23 +1292,23 @@ QStringList &PPPData::dns() {
}
-void PPPData::setDns(QStringList &list) {
+void PPPData::setDns(TQStringList &list) {
writeListConfig(caccountgroup, DNS_KEY, list);
}
-const QString PPPData::domain() {
+const TQString PPPData::domain() {
return readConfig(caccountgroup, DOMAIN_KEY);
}
-void PPPData::setDomain(const QString &n ) {
+void PPPData::setDomain(const TQString &n ) {
writeConfig(caccountgroup, DOMAIN_KEY, n);
}
-QStringList &PPPData::scriptType() {
- static QStringList typelist;
+TQStringList &PPPData::scriptType() {
+ static TQStringList typelist;
readListConfig(caccountgroup, SCRIPTCOM_KEY, typelist);
while(typelist.count() > MAX_SCRIPT_ENTRIES)
@@ -1318,13 +1318,13 @@ QStringList &PPPData::scriptType() {
}
-void PPPData::setScriptType(QStringList &list) {
+void PPPData::setScriptType(TQStringList &list) {
writeListConfig(caccountgroup, SCRIPTCOM_KEY, list);
}
-QStringList &PPPData::script() {
- static QStringList scriptlist;
+TQStringList &PPPData::script() {
+ static TQStringList scriptlist;
readListConfig(caccountgroup, SCRIPTARG_KEY, scriptlist);
while(scriptlist.count() > MAX_SCRIPT_ENTRIES)
@@ -1334,27 +1334,27 @@ QStringList &PPPData::script() {
}
-void PPPData::setScript(QStringList &list) {
+void PPPData::setScript(TQStringList &list) {
writeListConfig(caccountgroup, SCRIPTARG_KEY, list);
}
-const QString PPPData::accountingFile() {
+const TQString PPPData::accountingFile() {
return readConfig(caccountgroup, ACCTFILE_KEY);
}
-void PPPData::setAccountingFile(const QString &n) {
+void PPPData::setAccountingFile(const TQString &n) {
writeConfig(caccountgroup, ACCTFILE_KEY, n);
}
-const QString PPPData::totalCosts() {
+const TQString PPPData::totalCosts() {
return readConfig(caccountgroup, TOTALCOSTS_KEY);
}
-void PPPData::setTotalCosts(const QString &n) {
+void PPPData::setTotalCosts(const TQString &n) {
writeConfig(caccountgroup, TOTALCOSTS_KEY, n);
}
@@ -1368,8 +1368,8 @@ void PPPData::setTotalBytes(int n) {
}
-QStringList &PPPData::pppdArgument() {
- static QStringList arglist;
+TQStringList &PPPData::pppdArgument() {
+ static TQStringList arglist;
while(arglist.count() > MAX_PPPD_ARGUMENTS)
arglist.remove(arglist.last());
@@ -1379,23 +1379,23 @@ QStringList &PPPData::pppdArgument() {
}
-void PPPData::setpppdArgument(QStringList &args) {
+void PPPData::setpppdArgument(TQStringList &args) {
writeListConfig(caccountgroup, PPPDARG_KEY, args);
}
void PPPData::setpppdArgumentDefaults() {
- QStringList arg;
+ TQStringList arg;
setpppdArgument(arg);
}
// graphing widget
void PPPData::setGraphingOptions(bool enable,
- QColor bg,
- QColor text,
- QColor in,
- QColor out)
+ TQColor bg,
+ TQColor text,
+ TQColor in,
+ TQColor out)
{
if(config) {
config->setGroup(GRAPH_GRP);
@@ -1408,12 +1408,12 @@ void PPPData::setGraphingOptions(bool enable,
}
void PPPData::graphingOptions(bool &enable,
- QColor &bg,
- QColor &text,
- QColor &in,
- QColor &out)
+ TQColor &bg,
+ TQColor &text,
+ TQColor &in,
+ TQColor &out)
{
- QColor c;
+ TQColor c;
if(config) {
config->setGroup(GRAPH_GRP);
@@ -1464,7 +1464,7 @@ void PPPData::setpppdError(int err) {
// window position
//
void PPPData::winPosConWin(int& p_x, int& p_y) {
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, desk.center().y()-55);
}
@@ -1475,7 +1475,7 @@ void PPPData::setWinPosConWin(int p_x, int p_y) {
}
void PPPData::winPosStatWin(int& p_x, int& p_y) {
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_Y, desk.center().y()-55);
}
diff --git a/kppp/pppdata.h b/kppp/pppdata.h
index ac50a315..7879d1fa 100644
--- a/kppp/pppdata.h
+++ b/kppp/pppdata.h
@@ -31,9 +31,9 @@
#include <unistd.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
#include "kpppconfig.h"
@@ -179,29 +179,29 @@ public:
int access() const; // read/write access
// function to read/write date to configuration file
- QString readConfig(const QString &, const QString &, const QString &);
- int readNumConfig(const QString &, const QString &, int);
- bool readListConfig(const QString &, const QString &,
- QStringList &, char sep = ',');
- void writeConfig(const QString &, const QString &, const QString &);
- void writeConfig(const QString &, const QString &, int);
- void writeListConfig(const QString &, const QString &,
- QStringList &, char sep = ',');
+ TQString readConfig(const TQString &, const TQString &, const TQString &);
+ int readNumConfig(const TQString &, const TQString &, int);
+ bool readListConfig(const TQString &, const TQString &,
+ TQStringList &, char sep = ',');
+ void writeConfig(const TQString &, const TQString &, const TQString &);
+ void writeConfig(const TQString &, const TQString &, int);
+ void writeListConfig(const TQString &, const TQString &,
+ TQStringList &, char sep = ',');
// return the current account group
- QString currentAccountGroup() { return caccountgroup; }
+ TQString currentAccountGroup() { return caccountgroup; }
// return the current modem group
- QString currentModemGroup() { return cmodemgroup; }
+ TQString currentModemGroup() { return cmodemgroup; }
// functions to set/get general kppp info
- QString password() const;
- void setPassword(const QString &);
+ TQString password() const;
+ void setPassword(const TQString &);
- const QString defaultAccount();
- void setDefaultAccount(const QString &);
+ const TQString defaultAccount();
+ void setDefaultAccount(const TQString &);
- const QString defaultModem();
- void setDefaultModem(const QString &);
+ const TQString defaultModem();
+ void setDefaultModem(const TQString &);
void set_xserver_exit_disconnect(bool set);
bool get_xserver_exit_disconnect();
@@ -230,10 +230,10 @@ public:
void set_dock_into_panel(bool set);
bool get_dock_into_panel();
- const QString enter();
- void setEnter(const QString &);
+ const TQString enter();
+ void setEnter(const TQString &);
- QString pppdVersion();
+ TQString pppdVersion();
bool pppdVersionMin(int ver, int mod, int patch);
int pppdTimeout();
@@ -241,18 +241,18 @@ public:
// functions to set/get account information
int modemCount() const;
- bool setModem(const QString &);
+ bool setModem(const TQString &);
bool setModemByIndex(int);
- bool isUniqueModname(const QString &);
+ bool isUniqueModname(const TQString &);
bool deleteModem();
- bool deleteModem(const QString &);
+ bool deleteModem(const TQString &);
int newmodem();
int copymodem(int i);
- const QString modname();
- void setModname(const QString &);
+ const TQString modname();
+ void setModname(const TQString &);
int busyWait();
@@ -264,17 +264,17 @@ public:
int modemEscapeGuardTime();
void setModemEscapeGuardTime(int i);
- void setModemEscapeStr(const QString &);
- const QString modemEscapeStr();
+ void setModemEscapeStr(const TQString &);
+ const TQString modemEscapeStr();
- void setModemEscapeResp(const QString &);
- const QString modemEscapeResp();
+ void setModemEscapeResp(const TQString &);
+ const TQString modemEscapeResp();
- const QString modemDevice();
- void setModemDevice(const QString &);
+ const TQString modemDevice();
+ void setModemDevice(const TQString &);
- QString flowcontrol();
- void setFlowcontrol(const QString &);
+ TQString flowcontrol();
+ void setFlowcontrol(const TQString &);
int modemTimeout();
void setModemTimeout(int);
@@ -282,7 +282,7 @@ public:
int modemToneDuration();
void setModemToneDuration(int);
- QString volumeInitString();
+ TQString volumeInitString();
int volume();
void setVolume(int);
@@ -290,11 +290,11 @@ public:
void setWaitForDialTone(int i);
// modem command strings/responses
- const QString modemInitStr(int i);
- void setModemInitStr(int i, const QString &);
+ const TQString modemInitStr(int i);
+ void setModemInitStr(int i, const TQString &);
- const QString modemInitResp();
- void setModemInitResp(const QString &);
+ const TQString modemInitResp();
+ void setModemInitResp(const TQString &);
int modemPreInitDelay();
void setModemPreInitDelay(int);
@@ -302,50 +302,50 @@ public:
int modemInitDelay();
void setModemInitDelay(int);
- QString modemNoDialToneDetectionStr();
- void setModemNoDialToneDetectionStr(const QString &);
+ TQString modemNoDialToneDetectionStr();
+ void setModemNoDialToneDetectionStr(const TQString &);
- const QString modemDialStr();
- void setModemDialStr(const QString &);
+ const TQString modemDialStr();
+ void setModemDialStr(const TQString &);
- const QString modemConnectResp();
- void setModemConnectResp(const QString &);
+ const TQString modemConnectResp();
+ void setModemConnectResp(const TQString &);
- const QString modemBusyResp();
- void setModemBusyResp(const QString &);
+ const TQString modemBusyResp();
+ void setModemBusyResp(const TQString &);
- const QString modemNoCarrierResp();
- void setModemNoCarrierResp(const QString &);
+ const TQString modemNoCarrierResp();
+ void setModemNoCarrierResp(const TQString &);
- const QString modemNoDialtoneResp();
- void setModemNoDialtoneResp(const QString &);
+ const TQString modemNoDialtoneResp();
+ void setModemNoDialtoneResp(const TQString &);
- const QString modemHangupStr();
- void setModemHangupStr(const QString &);
+ const TQString modemHangupStr();
+ void setModemHangupStr(const TQString &);
- const QString modemHangupResp();
- void setModemHangupResp(const QString &);
+ const TQString modemHangupResp();
+ void setModemHangupResp(const TQString &);
- QString modemDLPResp();
- void setModemDLPResp(const QString &);
+ TQString modemDLPResp();
+ void setModemDLPResp(const TQString &);
- const QString modemAnswerStr();
- void setModemAnswerStr(const QString &);
+ const TQString modemAnswerStr();
+ void setModemAnswerStr(const TQString &);
- const QString modemRingResp();
- void setModemRingResp(const QString &);
+ const TQString modemRingResp();
+ void setModemRingResp(const TQString &);
- const QString modemAnswerResp();
- void setModemAnswerResp(const QString &);
+ const TQString modemAnswerResp();
+ void setModemAnswerResp(const TQString &);
- QString volumeOff();
- void setVolumeOff(const QString &);
+ TQString volumeOff();
+ void setVolumeOff(const TQString &);
- QString volumeMedium();
- void setVolumeMedium(const QString &);
+ TQString volumeMedium();
+ void setVolumeMedium(const TQString &);
- QString volumeHigh();
- void setVolumeHigh(const QString &);
+ TQString volumeHigh();
+ void setVolumeHigh(const TQString &);
#if 0
void setUseCDLine(const int n);
@@ -354,34 +354,34 @@ public:
// functions to set/get account information
int accountCount() const;
- bool setAccount(const QString &);
+ bool setAccount(const TQString &);
bool setAccountByIndex(int);
- bool isUniqueAccname(const QString &);
+ bool isUniqueAccname(const TQString &);
bool deleteAccount();
- bool deleteAccount(const QString &);
+ bool deleteAccount(const TQString &);
int newaccount();
int copyaccount(int i);
- const QString accname();
- void setAccname(const QString &);
+ const TQString accname();
+ void setAccname(const TQString &);
- QStringList &phonenumbers();
- const QString phonenumber();
- void setPhonenumber(const QString &);
+ TQStringList &phonenumbers();
+ const TQString phonenumber();
+ void setPhonenumber(const TQString &);
- const QString dialPrefix();
- void setDialPrefix(const QString &);
+ const TQString dialPrefix();
+ void setDialPrefix(const TQString &);
int authMethod();
void setAuthMethod(int);
- const QString storedUsername();
- void setStoredUsername(const QString &);
+ const TQString storedUsername();
+ void setStoredUsername(const TQString &);
- const QString storedPassword();
- void setStoredPassword(const QString &);
+ const TQString storedPassword();
+ void setStoredPassword(const TQString &);
bool storePassword();
void setStorePassword(bool);
@@ -389,32 +389,32 @@ public:
int callbackType();
void setCallbackType(int);
- QString callbackPhone();
- void setCallbackPhone(const QString &);
+ TQString callbackPhone();
+ void setCallbackPhone(const TQString &);
bool waitCallback();
void setWaitCallback(bool);
- const QString speed();
- void setSpeed(const QString &);
+ const TQString speed();
+ void setSpeed(const TQString &);
- const QString command_before_connect();
- void setCommand_before_connect(const QString &);
+ const TQString command_before_connect();
+ void setCommand_before_connect(const TQString &);
- const QString command_on_connect();
- void setCommand_on_connect(const QString &);
+ const TQString command_on_connect();
+ void setCommand_on_connect(const TQString &);
- const QString command_on_disconnect();
- void setCommand_on_disconnect(const QString &);
+ const TQString command_on_disconnect();
+ void setCommand_on_disconnect(const TQString &);
- const QString command_before_disconnect();
- void setCommand_before_disconnect(const QString &);
+ const TQString command_before_disconnect();
+ void setCommand_before_disconnect(const TQString &);
- const QString ipaddr();
- void setIpaddr(const QString &);
+ const TQString ipaddr();
+ void setIpaddr(const TQString &);
- const QString subnetmask();
- void setSubnetmask(const QString &);
+ const TQString subnetmask();
+ void setSubnetmask(const TQString &);
bool AcctEnabled();
void setAcctEnabled(bool set);
@@ -431,27 +431,27 @@ public:
bool autoname();
void setAutoname(bool set);
- const QString gateway();
- void setGateway(const QString &);
+ const TQString gateway();
+ void setGateway(const TQString &);
bool defaultroute();
void setDefaultroute(bool set);
- QStringList &dns();
- void setDns(QStringList &);
+ TQStringList &dns();
+ void setDns(TQStringList &);
- const QString domain();
- void setDomain(const QString &);
+ const TQString domain();
+ void setDomain(const TQString &);
- QStringList &scriptType();
- void setScriptType(QStringList &);
+ TQStringList &scriptType();
+ void setScriptType(TQStringList &);
- QStringList &script();
- void setScript(QStringList &);
+ TQStringList &script();
+ void setScript(TQStringList &);
- QStringList &pppdArgument();
+ TQStringList &pppdArgument();
void setpppdArgumentDefaults();
- void setpppdArgument(QStringList &);
+ void setpppdArgument(TQStringList &);
//functions to change/set the child pppd process info
bool pppdRunning() const;
@@ -461,26 +461,26 @@ public:
void setpppdError(int err);
// functions to set/query the accounting info
- const QString accountingFile();
- void setAccountingFile(const QString &);
+ const TQString accountingFile();
+ void setAccountingFile(const TQString &);
- const QString totalCosts();
- void setTotalCosts(const QString &);
+ const TQString totalCosts();
+ void setTotalCosts(const TQString &);
int totalBytes();
void setTotalBytes(int);
// graphing widget
void setGraphingOptions(bool enabled,
- QColor bg,
- QColor text,
- QColor in,
- QColor out);
+ TQColor bg,
+ TQColor text,
+ TQColor in,
+ TQColor out);
void graphingOptions(bool &enabled,
- QColor &bg,
- QColor &text,
- QColor &in,
- QColor &out);
+ TQColor &bg,
+ TQColor &text,
+ TQColor &in,
+ TQColor &out);
bool graphingEnabled();
// window positions
@@ -490,14 +490,14 @@ public:
void setWinPosStatWin(int, int);
private:
- QString passwd;
+ TQString passwd;
KConfig* config; // configuration object
int accounthighcount; // index of highest account
int caccount; // index of the current account
int modemhighcount; // index of highest modem
int cmodem; // index of the current modem
- QString cmodemgroup; // name of current modem group
- QString caccountgroup; // name of current account group
+ TQString cmodemgroup; // name of current modem group
+ TQString caccountgroup; // name of current account group
pid_t suidprocessid; // process ID of setuid child
bool pppdisrunning; // pppd process
// daemon
@@ -505,7 +505,7 @@ private:
int pppdVer, pppdMod, pppdPatch; // pppd version
bool waitcallback; // callback waiting flag
- QStringList phonelist;
+ TQStringList phonelist;
};
extern PPPData gpppdata;
diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp
index f759377a..96ccaa34 100644
--- a/kppp/ppplog.cpp
+++ b/kppp/ppplog.cpp
@@ -27,9 +27,9 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -37,10 +37,10 @@
#include <unistd.h>
#include <sys/stat.h>
-#include <qdialog.h>
-#include <qregexp.h>
-#include <qmultilineedit.h>
-#include <qlayout.h>
+#include <tqdialog.h>
+#include <tqregexp.h>
+#include <tqmultilineedit.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kmessagebox.h>
@@ -50,7 +50,7 @@
#include <klocale.h>
-int PPPL_MakeLog(QStringList &list) {
+int PPPL_MakeLog(TQStringList &list) {
int pid = -1, newpid;
char buffer[1024], *p;
const char *pidp;
@@ -101,9 +101,9 @@ int PPPL_MakeLog(QStringList &list) {
"password=\"",
0};
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QCString tmp = (*it).local8Bit();
+ TQCString tmp = (*it).local8Bit();
for(int j = 0; keyword[j] != 0; j++) {
char *p;
@@ -120,8 +120,8 @@ int PPPL_MakeLog(QStringList &list) {
}
-void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
- QString msg;
+void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
+ TQString msg;
const char *rmsg = "Remote message: ";
result.clear();
@@ -160,13 +160,13 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
// scan the log for keywords and try to offer any help
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// look for remote message
int pos = (*it).find(rmsg);
if (pos != -1)
{
- QString str = (*it);
+ TQString str = (*it);
str.remove(0, pos + strlen(rmsg));
if(!str.isEmpty()) {
msg = i18n("Notice that the remote system has sent the following"
@@ -178,8 +178,8 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
// check in the hint database
for(uint k = 0; hints[k].regexp != 0; k++) {
- QRegExp rx(hints[k].regexp);
- QString l(*it);
+ TQRegExp rx(hints[k].regexp);
+ TQString l(*it);
if(l.contains(rx)) {
result.append(i18n(hints[k].answer));
break;
@@ -196,15 +196,15 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
void PPPL_ShowLog() {
- QStringList sl, result;
+ TQStringList sl, result;
PPPL_MakeLog(sl);
bool foundConnect = false;
bool foundLCP = gpppdata.getPPPDebug();
- QString lcp = QString::fromLatin1("[LCP");
- QString conn = QString::fromLatin1("Connect:");
- QStringList::ConstIterator it = sl.begin();
+ TQString lcp = TQString::fromLatin1("[LCP");
+ TQString conn = TQString::fromLatin1("Connect:");
+ TQStringList::ConstIterator it = sl.begin();
for( ; it != sl.end(); it++) {
if((*it).find(lcp) >= 0) {
foundLCP = true;
@@ -219,7 +219,7 @@ void PPPL_ShowLog() {
"that pppd was started without the \"debug\" option.\n"
"Without this option it's difficult to find out PPP "
"problems, so you should turn on the debug option.\n"
- "Shall I turn it on now?"), QString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
+ "Shall I turn it on now?"), TQString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
if(result == KMessageBox::Yes) {
gpppdata.setPPPDebug(TRUE);
@@ -236,19 +236,19 @@ void PPPL_ShowLog() {
PPPL_AnalyseLog(sl, result);
- QDialog *dlg = new QDialog(0, "", TRUE);
+ TQDialog *dlg = new TQDialog(0, "", TRUE);
dlg->setCaption(i18n("PPP Log"));
- QVBoxLayout *tl = new QVBoxLayout(dlg, 10, 10);
- QMultiLineEdit *edit = new QMultiLineEdit(dlg);
+ TQVBoxLayout *tl = new TQVBoxLayout(dlg, 10, 10);
+ TQMultiLineEdit *edit = new TQMultiLineEdit(dlg);
edit->setReadOnly(TRUE);
- QLabel *label = new QLabel(i18n("kppp's diagnosis (just guessing):"), dlg);
- QMultiLineEdit *diagnosis = new QMultiLineEdit(dlg);
+ TQLabel *label = new TQLabel(i18n("kppp's diagnosis (just guessing):"), dlg);
+ TQMultiLineEdit *diagnosis = new TQMultiLineEdit(dlg);
diagnosis->setReadOnly(TRUE);
KButtonBox *bbox = new KButtonBox(dlg);
bbox->addStretch(1);
- QPushButton *write = bbox->addButton(i18n("Write to File"));
- QPushButton *close = bbox->addButton(KStdGuiItem::close());
+ TQPushButton *write = bbox->addButton(i18n("Write to File"));
+ TQPushButton *close = bbox->addButton(KStdGuiItem::close());
bbox->layout();
edit->setMinimumSize(600, 250);
label->setMinimumSize(600, 15);
@@ -265,23 +265,23 @@ void PPPL_ShowLog() {
for(uint i = 0; i < result.count(); i++)
diagnosis->append(*result.at(i));
- dlg->connect(close, SIGNAL(clicked()),
- dlg, SLOT(reject()));
- dlg->connect(write, SIGNAL(clicked()),
- dlg, SLOT(accept()));
+ dlg->connect(close, TQT_SIGNAL(clicked()),
+ dlg, TQT_SLOT(reject()));
+ dlg->connect(write, TQT_SIGNAL(clicked()),
+ dlg, TQT_SLOT(accept()));
if(dlg->exec()) {
- QDir d = QDir::home();
- QString s = d.absPath() + "/PPP-logfile";
+ TQDir d = TQDir::home();
+ TQString s = d.absPath() + "/PPP-logfile";
int old_umask = umask(0077);
- FILE *f = fopen(QFile::encodeName(s), "w");
+ FILE *f = fopen(TQFile::encodeName(s), "w");
for(uint i = 0; i < sl.count(); i++)
fprintf(f, "%s\n", (*sl.at(i)).local8Bit().data());
fclose(f);
umask(old_umask);
- QString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s);
+ TQString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s);
KMessageBox::information(0, msg);
}
delete dlg;
diff --git a/kppp/ppplog.h b/kppp/ppplog.h
index 04d09b9f..bb752caf 100644
--- a/kppp/ppplog.h
+++ b/kppp/ppplog.h
@@ -32,8 +32,8 @@
class QStringList;
-int PPPL_MakeLog(QStringList &list);
-void PPPL_AnalyseLog(QStringList &list, QStringList &result);
+int PPPL_MakeLog(TQStringList &list);
+void PPPL_AnalyseLog(TQStringList &list, TQStringList &result);
void PPPL_ShowLog();
#endif
diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp
index 8f3910a1..b991da27 100644
--- a/kppp/pppstatdlg.cpp
+++ b/kppp/pppstatdlg.cpp
@@ -23,17 +23,17 @@
*/
-#include <qlayout.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include <kwin.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqtimer.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -44,9 +44,9 @@
extern PPPData gpppdata;
-PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
+PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
PPPStats *st)
- : QWidget(parent, name, 0),
+ : TQWidget(parent, name, 0),
stats(st)
{
int i;
@@ -55,21 +55,21 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
setCaption(i18n("kppp Statistics"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10);
- QGridLayout *l1 = new QGridLayout(4, 4);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10);
+ TQGridLayout *l1 = new TQGridLayout(4, 4);
tl->addLayout(l1, 1);
- box = new QGroupBox(i18n("Statistics"), this);
+ box = new TQGroupBox(i18n("Statistics"), this);
l1->addMultiCellWidget(box, 0, 3, 0, 3);
l1->addRowSpacing(0, fontMetrics().lineSpacing() - 10);
l1->setRowStretch(1, 1);
l1->setColStretch(1, 1);
// inner part of the grid
- QVBoxLayout *l11 = new QVBoxLayout;
+ TQVBoxLayout *l11 = new QVBoxLayout;
l1->addLayout(l11, 1, 1);
// modem pixmap and IP labels
- QHBoxLayout *l111 = new QHBoxLayout;
+ TQHBoxLayout *l111 = new QHBoxLayout;
l11->addLayout(l111);
big_modem_both_pixmap = UserIcon("modemboth");
@@ -77,25 +77,25 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
big_modem_right_pixmap = UserIcon("modemright");
big_modem_none_pixmap = UserIcon("modemnone");
- pixmap_l = new QLabel(this);
+ pixmap_l = new TQLabel(this);
pixmap_l->setMinimumSize(big_modem_both_pixmap.size());
l111->addWidget(pixmap_l, 1);
pixmap_l->setAlignment(AlignVCenter|AlignLeft);
- QGridLayout *l1112 = new QGridLayout(3, 2);
+ TQGridLayout *l1112 = new TQGridLayout(3, 2);
l111->addLayout(l1112);
- ip_address_label1 = new QLabel(this);
+ ip_address_label1 = new TQLabel(this);
ip_address_label1->setText(i18n("Local Addr:"));
ip_address_label2 = new IPLineEdit(this);
- ip_address_label2->setFocusPolicy(QWidget::NoFocus);
+ ip_address_label2->setFocusPolicy(TQWidget::NoFocus);
- ip_address_label3 = new QLabel(this);
+ ip_address_label3 = new TQLabel(this);
ip_address_label3->setText(i18n("Remote Addr:"));
ip_address_label4 = new IPLineEdit(this);
- ip_address_label4->setFocusPolicy(QWidget::NoFocus);
+ ip_address_label4->setFocusPolicy(TQWidget::NoFocus);
l1112->addWidget(ip_address_label1, 0, 0);
l1112->addWidget(ip_address_label2, 0, 1);
@@ -105,18 +105,18 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
// consumes space on bottom
l1112->setRowStretch(2, 1);
- QGridLayout *l112 = new QGridLayout(5, 4);
+ TQGridLayout *l112 = new TQGridLayout(5, 4);
l11->addLayout(l112);
for(i =0 ; i < 5; i++) {
- labela1[i] = new QLabel(this);
+ labela1[i] = new TQLabel(this);
- labela2[i] = new QLabel(this);
- labela2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ labela2[i] = new TQLabel(this);
+ labela2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- labelb1[i] = new QLabel(this);
+ labelb1[i] = new TQLabel(this);
- labelb2[i] = new QLabel(this);
- labelb2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ labelb2[i] = new TQLabel(this);
+ labelb2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
}
labela1[0]->setText(i18n("bytes in"));
@@ -155,7 +155,7 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
l112->setColStretch(3, 1);
tl->addSpacing(5);
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
tl->addLayout(l12);
l12->addStretch(1);
@@ -164,8 +164,8 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
gpppdata.graphingOptions(dummy, bg, text, in, out);
- graph = new QFrame(this);
- graph->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ graph = new TQFrame(this);
+ graph->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
l1->addMultiCellWidget(graph, 2, 2, 1, 2);
graph->setMinimumWidth(300);
graph->setFixedHeight(76+4);
@@ -174,19 +174,19 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
cancelbutton = new KPushButton(KStdGuiItem::close(),this, "cancelbutton");
cancelbutton->setFocus();
- connect(cancelbutton, SIGNAL(clicked()), this,SLOT(cancel()));
+ connect(cancelbutton, TQT_SIGNAL(clicked()), this,TQT_SLOT(cancel()));
cancelbutton->setFixedHeight(cancelbutton->sizeHint().height());
cancelbutton->setMinimumWidth(QMAX(cancelbutton->sizeHint().width(), 70));
l12->addWidget(cancelbutton);
if(gpppdata.graphingEnabled()) {
- graphTimer = new QTimer(this);
- connect(graphTimer, SIGNAL(timeout()), SLOT(updateGraph()));
+ graphTimer = new TQTimer(this);
+ connect(graphTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateGraph()));
}
setFixedSize(sizeHint());
- connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+ connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int)));
// read window position from config file
int p_x, p_y;
@@ -200,14 +200,14 @@ PPPStatsDlg::~PPPStatsDlg() {
// save window position when window was closed
-bool PPPStatsDlg::event(QEvent *e) {
- if (e->type() == QEvent::Hide)
+bool PPPStatsDlg::event(TQEvent *e) {
+ if (e->type() == TQEvent::Hide)
{
gpppdata.setWinPosStatWin(x(), y());
return true;
}
else
- return QWidget::event(e);
+ return TQWidget::event(e);
}
void PPPStatsDlg::cancel() {
@@ -244,8 +244,8 @@ void PPPStatsDlg::paintGraph() {
if(!isVisible())
return;
- QPixmap pm(graph->width() - 4, graph->height() - 4);
- QPainter p;
+ TQPixmap pm(graph->width() - 4, graph->height() - 4);
+ TQPainter p;
pm.fill(graph->backgroundColor());
p.begin(&pm);
@@ -286,10 +286,10 @@ void PPPStatsDlg::paintGraph() {
// plot scale line
p.setPen(text);
- p.setFont(QFont(KGlobalSettings::fixedFont().family(), 8));
+ p.setFont(TQFont(KGlobalSettings::fixedFont().family(), 8));
- QRect r;
- QString s = i18n("%1 (max. %2) kb/sec")
+ TQRect r;
+ TQString s = i18n("%1 (max. %2) kb/sec")
.arg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
.arg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1));
p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r);
@@ -315,7 +315,7 @@ void PPPStatsDlg::updateGraph() {
}
-void PPPStatsDlg::paintEvent (QPaintEvent *) {
+void PPPStatsDlg::paintEvent (TQPaintEvent *) {
paintIcon(PPPStats::BytesNone); // correct ?
if(gpppdata.graphingEnabled())
paintGraph();
@@ -324,7 +324,7 @@ void PPPStatsDlg::paintEvent (QPaintEvent *) {
void PPPStatsDlg::paintIcon(int status) {
- const QPixmap *pixmap;
+ const TQPixmap *pixmap;
switch(status)
{
@@ -370,7 +370,7 @@ void PPPStatsDlg::timeclick() {
}
-void PPPStatsDlg::closeEvent(QCloseEvent *) {
+void PPPStatsDlg::closeEvent(TQCloseEvent *) {
emit cancel();
}
@@ -404,14 +404,14 @@ void PPPStatsDlg::update_data() {
// if I don't resort to this trick it is imposible to
// copy/paste the ip out of the lineedits due to
// reset of cursor position on setText()
- QString local_addr = ( stats->local_ip_address.isEmpty() ?
+ TQString local_addr = ( stats->local_ip_address.isEmpty() ?
i18n("unavailable") :
stats->local_ip_address );
if( ip_address_label2->text() != local_addr )
ip_address_label2->setText(local_addr);
- QString remote_addr = ( stats->remote_ip_address.isEmpty() ?
+ TQString remote_addr = ( stats->remote_ip_address.isEmpty() ?
i18n("unavailable") :
stats->remote_ip_address );
diff --git a/kppp/pppstatdlg.h b/kppp/pppstatdlg.h
index 32808962..800438ee 100644
--- a/kppp/pppstatdlg.h
+++ b/kppp/pppstatdlg.h
@@ -26,9 +26,9 @@
#define _PPPSTATSDLG_H_
-#include <qdialog.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqdialog.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
class QLabel;
class QFrame;
@@ -42,21 +42,21 @@ const int GRAPH_UPDATE_TIME = 1000;
class PPPStats;
-class PPPStatsDlg : public QWidget {
+class PPPStatsDlg : public TQWidget {
Q_OBJECT
public:
- PPPStatsDlg(QWidget *parent, const char *name,QWidget *main,
+ PPPStatsDlg(TQWidget *parent, const char *name,TQWidget *main,
PPPStats *st);
~PPPStatsDlg();
protected:
- void closeEvent( QCloseEvent *e );
- void paintEvent (QPaintEvent *e) ;
- bool event( QEvent *e );
+ void closeEvent( TQCloseEvent *e );
+ void paintEvent (TQPaintEvent *e) ;
+ bool event( TQEvent *e );
public slots:
@@ -76,56 +76,56 @@ private:
void paintGraph();
PPPStats *stats;
- QLabel *pixmap_l;
- QWidget *main;
- QPushButton *cancelbutton;
-
- QLabel *labela1[5];
- QLabel *labela2[5];
- QLabel *labelb1[5];
- QLabel *labelb2[5];
-
- QLabel *ip_address_label1;
- QLineEdit *ip_address_label2;
- QLabel *ip_address_label3;
- QLineEdit *ip_address_label4;
-
- QLabel *modem_pic_label;
- QPixmap modem_pixmap;
- QPixmap modem_left_pixmap;
- QPixmap modem_right_pixmap;
- QPixmap modem_both_pixmap;
- QPixmap big_modem_both_pixmap;
- QPixmap big_modem_left_pixmap;
- QPixmap big_modem_right_pixmap;
- QPixmap big_modem_none_pixmap;
+ TQLabel *pixmap_l;
+ TQWidget *main;
+ TQPushButton *cancelbutton;
+
+ TQLabel *labela1[5];
+ TQLabel *labela2[5];
+ TQLabel *labelb1[5];
+ TQLabel *labelb2[5];
+
+ TQLabel *ip_address_label1;
+ TQLineEdit *ip_address_label2;
+ TQLabel *ip_address_label3;
+ TQLineEdit *ip_address_label4;
+
+ TQLabel *modem_pic_label;
+ TQPixmap modem_pixmap;
+ TQPixmap modem_left_pixmap;
+ TQPixmap modem_right_pixmap;
+ TQPixmap modem_both_pixmap;
+ TQPixmap big_modem_both_pixmap;
+ TQPixmap big_modem_left_pixmap;
+ TQPixmap big_modem_right_pixmap;
+ TQPixmap big_modem_none_pixmap;
int ibytes_last;
int obytes_last;
bool need_to_paint;
- QString ibytes_string;
- QString ipackets_string;
- QString compressedin_string;
- QString uncompressedin_string;
- QString errorin_string;
- QString obytes_string;
+ TQString ibytes_string;
+ TQString ipackets_string;
+ TQString compressedin_string;
+ TQString uncompressedin_string;
+ TQString errorin_string;
+ TQString obytes_string;
QString opackets_string;
QString compressed_string;
- QString packetsunc_string;
- QString packetsoutunc_string;
- QGroupBox *box;
+ TQString packetsunc_string;
+ TQString packetsoutunc_string;
+ TQGroupBox *box;
// graph widget
- QFrame *graph;
+ TQFrame *graph;
int bin[MAX_GRAPH_WIDTH];
int bout[MAX_GRAPH_WIDTH];
int bin_last;
int bout_last;
int ringIdx;
int max;
- QTimer *graphTimer;
- QColor bg, text, in, out;
+ TQTimer *graphTimer;
+ TQColor bg, text, in, out;
};
#endif
diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp
index 8063d618..c9f153d8 100644
--- a/kppp/pppstats.cpp
+++ b/kppp/pppstats.cpp
@@ -90,14 +90,14 @@
#endif /* STREAMS */
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
PPPStats::PPPStats()
{
clear();
timer = new QTimer;
- connect(timer, SIGNAL(timeout()), SLOT(timerClick()));
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerClick()));
}
diff --git a/kppp/pppstats.h b/kppp/pppstats.h
index a1a0eaef..7e19f8e9 100644
--- a/kppp/pppstats.h
+++ b/kppp/pppstats.h
@@ -28,11 +28,11 @@
#include "kpppconfig.h"
-#include <qobject.h>
+#include <tqobject.h>
class QTimer;
-class PPPStats : public QObject {
+class PPPStats : public TQObject {
Q_OBJECT
public:
PPPStats();
@@ -61,8 +61,8 @@ public:
int errorin;
int packetsunc, packetsoutunc;
- QString local_ip_address;
- QString remote_ip_address;
+ TQString local_ip_address;
+ TQString remote_ip_address;
enum IOStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth };
@@ -78,7 +78,7 @@ private:
int unit;
char unitName[5];
enum IOStatus ioStatus;
- QTimer *timer;
+ TQTimer *timer;
};
#endif
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
index 614816d0..867ffd8c 100644
--- a/kppp/providerdb.cpp
+++ b/kppp/providerdb.cpp
@@ -29,26 +29,26 @@
//---------------------------------------------------------------------------
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include "providerdb.h"
#include "newwidget.h"
#include "pppdata.h"
-#include <qlistbox.h>
-#include <qlineedit.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
#include <ksimpleconfig.h>
#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
-QWizard* ProviderDB::wiz = 0L;
+TQWizard* ProviderDB::wiz = 0L;
-ProviderDB::ProviderDB(QWidget *parent) :
+ProviderDB::ProviderDB(TQWidget *parent) :
KWizard(parent, "", true),
cfg(0)
{
@@ -83,10 +83,10 @@ ProviderDB::ProviderDB(QWidget *parent) :
setFinish(page9, true);
setFinishEnabled(page9, true);
- connect((const QObject *)nextButton(), SIGNAL(clicked()),
- this, SLOT(pageSelected()));
- connect((const QObject *)backButton(), SIGNAL(clicked()),
- this, SLOT(pageSelected()));
+ connect((const TQObject *)nextButton(), TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(pageSelected()));
+ connect((const TQObject *)backButton(), TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(pageSelected()));
// resize(minimumSize());
adjustSize();
@@ -102,7 +102,7 @@ void ProviderDB::pageSelected() {
bool prev = true;
bool next = true;
- QWidget *page = currentPage();
+ TQWidget *page = currentPage();
if(page == page2) {
next = page2->lb->currentItem() != -1;
} else if(page == page3) {
@@ -122,12 +122,12 @@ void ProviderDB::pageSelected() {
void ProviderDB::loadProviderInfo() {
delete cfg;
- QString loc = *page2->list->at(page2->lb->currentItem());
- QString provider = page3->lb->text(page3->lb->currentItem());
+ TQString loc = *page2->list->at(page2->lb->currentItem());
+ TQString provider = page3->lb->text(page3->lb->currentItem());
urlEncode(provider);
- QString prov = "Provider/" + loc;
+ TQString prov = "Provider/" + loc;
prov += "/" + provider;
- QString fname = locate("appdata", prov);
+ TQString fname = locate("appdata", prov);
kdDebug(5002) << "Providerfile=" << fname << endl;
cfg = new KSimpleConfig(fname, true);
@@ -135,14 +135,14 @@ void ProviderDB::loadProviderInfo() {
void ProviderDB::accept() {
- QRegExp re_username("%USERNAME%");
- QRegExp re_password("%PASSWORD%");
+ TQRegExp re_username("%USERNAME%");
+ TQRegExp re_password("%PASSWORD%");
- QMap <QString, QString> map(cfg->entryMap("<default>"));
- QMap <QString, QString>::Iterator it(map.begin());
+ TQMap <TQString, TQString> map(cfg->entryMap("<default>"));
+ TQMap <TQString, TQString>::Iterator it(map.begin());
while(it != map.end()) {
- QString key = it.key();
- QString value = *it;
+ TQString key = it.key();
+ TQString value = *it;
if(value.contains(re_username))
value.replace(re_username, page4->username());
@@ -164,8 +164,8 @@ void ProviderDB::accept() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
- QLabel *l = new QLabel(i18n("You will be asked a few questions on information\n"
+PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) {
+ TQLabel *l = new TQLabel(i18n("You will be asked a few questions on information\n"
"which is needed to establish an Internet connection\n"
"with your Internet Service Provider (ISP).\n\n"
"Make sure you have the registration form from your\n"
@@ -173,7 +173,7 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
"help first. If any information is missing, contact\n"
"your ISP."),
this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
tl->addWidget(l);
tl->activate();
}
@@ -182,24 +182,24 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
- QLabel *l = new QLabel(i18n("Select the location where you plan to use this\n"
+PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) {
+ TQLabel *l = new TQLabel(i18n("Select the location where you plan to use this\n"
"account from the list below. If your country or\n"
"location is not listed, you have to create the\n"
"account with the normal, dialog based setup.\n\n"
"If you click \"Cancel\", the dialog based setup\n"
"will start."),
this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
tl->addWidget(l);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
- lb = new QListBox(this);
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ lb = new TQListBox(this);
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
lb->setMinimumSize(220, 100);
l1->addWidget(lb, 2);
l1->addStretch(1);
@@ -208,22 +208,22 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
// fill the listbox
// set up filter
- QDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
- d.setFilter(QDir::Dirs);
- d.setSorting(QDir::Name);
+ TQDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
+ d.setFilter(TQDir::Dirs);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *flist = d.entryInfoList();
if(flist) {
QFileInfoListIterator it( *flist );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the flist and insert into a map for sorting
- QMap<QString, QString> countries;
+ TQMap<TQString, TQString> countries;
for(; (fi = it.current()) != 0; ++it) {
if(fi->fileName() != "." && fi->fileName() != "..") {
- QString dirFile(fi->absFilePath()+"/.directory");
- QString entryName;
- if(QFile::exists(dirFile)){
+ TQString dirFile(fi->absFilePath()+"/.directory");
+ TQString entryName;
+ if(TQFile::exists(dirFile)){
KSimpleConfig config(dirFile);
config.setDesktopGroup();
entryName = config.readEntry("Name");
@@ -233,8 +233,8 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
}
}
// insert sorted entries into list box and string list
- QMap<QString, QString>::const_iterator mit = countries.begin();
- QMap<QString, QString>::const_iterator mend = countries.end();
+ TQMap<TQString, TQString>::const_iterator mit = countries.begin();
+ TQMap<TQString, TQString>::const_iterator mend = countries.end();
while(mit != mend) {
lb->insertItem(mit.key());
list->append(*mit);
@@ -251,7 +251,7 @@ PDB_Country::~PDB_Country()
}
void PDB_Country::selectionChanged(int idx) {
- // QWizard *wizard = (QWizard *)parent(); Why doesn't this work ?
+ // TQWizard *wizard = (TQWizard *)parent(); Why doesn't this work ?
ProviderDB::wiz->setNextEnabled(this, (idx != -1));
}
@@ -259,9 +259,9 @@ void PDB_Country::selectionChanged(int idx) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("Select your Internet Service Provider (ISP) from\n"
+PDB_Provider::PDB_Provider(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("Select your Internet Service Provider (ISP) from\n"
"the list below. If the ISP is not in this list,\n"
"you have to click on \"Cancel\" and create this\n"
"account using the normal, dialog-based setup.\n\n"
@@ -269,13 +269,13 @@ PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) {
"selection."), this);
tl->addWidget(l);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
- lb = new QListBox(this);
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ lb = new TQListBox(this);
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
lb->setMinimumSize(220, 100);
l1->addWidget(lb, 2);
l1->addStretch(1);
@@ -286,7 +286,7 @@ void PDB_Provider::selectionChanged(int idx) {
}
-void PDB_Provider::setDir(const QString &_dir) {
+void PDB_Provider::setDir(const TQString &_dir) {
if(dir != _dir) {
lb->clear();
@@ -294,24 +294,24 @@ void PDB_Provider::setDir(const QString &_dir) {
// set up filter
dir = _dir;
- QString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
- QRegExp re1(" ");
+ TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
+ TQRegExp re1(" ");
dir = dir.replace(re1, "_");
dir1 += dir;
- QDir d(dir1);
- d.setFilter(QDir::Files);
- d.setSorting(QDir::Name);
+ TQDir d(dir1);
+ d.setFilter(TQDir::Files);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the list and insert into the widget
- QRegExp re("_");
+ TQRegExp re("_");
while((fi = it.current()) != NULL) {
- QString fname = fi->fileName();
+ TQString fname = fi->fileName();
if(fname.length() && fname[0] != '.') {
urlDecode(fname);
lb->insertItem(fname);
@@ -325,7 +325,7 @@ void PDB_Provider::setDir(const QString &_dir) {
}
-QString PDB_Provider::getDir() {
+TQString PDB_Provider::getDir() {
return dir;
}
@@ -334,48 +334,48 @@ QString PDB_Provider::getDir() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_UserInfo::PDB_UserInfo(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("To log on to your ISP, kppp needs the username\n"
+PDB_UserInfo::PDB_UserInfo(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("To log on to your ISP, kppp needs the username\n"
"and the password you got from your ISP. Type\n"
"in this information in the fields below.\n\n"
"Word case is important here."),
this);
tl->addWidget(l);
- QGridLayout *l1 = new QGridLayout(2, 2);
+ TQGridLayout *l1 = new TQGridLayout(2, 2);
tl->addLayout(l1);
- l = new QLabel(i18n("Username:"), this);
+ l = new TQLabel(i18n("Username:"), this);
l1->addWidget(l, 0, 0);
- l = new QLabel(i18n("Password:"), this);
+ l = new TQLabel(i18n("Password:"), this);
l1->addWidget(l, 1, 0);
_username = newLineEdit(24, this);
- connect(_username, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(_username, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
l1->addWidget(_username, 0, 1);
_password = newLineEdit(24, this);
- _password->setEchoMode(QLineEdit::Password);
- connect(_password, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ _password->setEchoMode(TQLineEdit::Password);
+ connect(_password, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
l1->addWidget(_password, 1, 1);
tl->activate();
}
-void PDB_UserInfo::textChanged(const QString &) {
+void PDB_UserInfo::textChanged(const TQString &) {
ProviderDB::wiz->setNextEnabled(this, !_password->text().isEmpty() &&
!_username->text().isEmpty());
}
-QString PDB_UserInfo::username() {
- QString s = _username->text();
+TQString PDB_UserInfo::username() {
+ TQString s = _username->text();
return s;
}
-QString PDB_UserInfo::password() {
- QString s = _password->text();
+TQString PDB_UserInfo::password() {
+ TQString s = _password->text();
return s;
}
@@ -388,9 +388,9 @@ void PDB_UserInfo::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("If you need a special dial prefix (e.g. if you\n"
+PDB_DialPrefix::PDB_DialPrefix(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("If you need a special dial prefix (e.g. if you\n"
"are using a telephone switch) you can specify\n"
"it here. This prefix is dialed just before the\n"
"phone number.\n\n"
@@ -399,9 +399,9 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
this);
tl->addWidget(l);
- QGridLayout *l1 = new QGridLayout(1, 2);
+ TQGridLayout *l1 = new TQGridLayout(1, 2);
tl->addLayout(l1);
- l = new QLabel(i18n("Dial prefix:"), this);
+ l = new TQLabel(i18n("Dial prefix:"), this);
l1->addWidget(l, 0, 0);
_prefix = newLineEdit(24, this);
l1->addWidget(_prefix, 0, 1);
@@ -409,8 +409,8 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
}
-QString PDB_DialPrefix::prefix() {
- QString s = _prefix->text();
+TQString PDB_DialPrefix::prefix() {
+ TQString s = _prefix->text();
return s;
}
@@ -424,9 +424,9 @@ void PDB_DialPrefix::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("Finished!\n\n"
+PDB_Finished::PDB_Finished(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("Finished!\n\n"
"A new account has been created. Click \"Finish\" to\n"
"go back to the setup dialog. If you want to\n"
"check the settings of the newly created account,\n"
@@ -437,8 +437,8 @@ PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) {
}
-void urlDecode(QString &s) {
- QString s1;
+void urlDecode(TQString &s) {
+ TQString s1;
for(uint i = 0; i < s.length(); i++) {
if(s[i] == '%') {
@@ -454,11 +454,11 @@ void urlDecode(QString &s) {
}
-void urlEncode(QString &s) {
- QString s1, tmp;
+void urlEncode(TQString &s) {
+ TQString s1, tmp;
for(uint i = 0; i < s.length(); i++) {
- if(QString(UNENCODED_CHARS).find(s[i]) >= 0)
+ if(TQString(UNENCODED_CHARS).find(s[i]) >= 0)
s1 += s[i];
else {
tmp.sprintf("%%%03i", s[i].unicode());
diff --git a/kppp/providerdb.h b/kppp/providerdb.h
index 37a737fc..cfeb785f 100644
--- a/kppp/providerdb.h
+++ b/kppp/providerdb.h
@@ -36,92 +36,92 @@
#define PROVIDER_DB
#include <kwizard.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QListBox;
class KSimpleConfig;
-class PDB_Intro : public QWidget {
+class PDB_Intro : public TQWidget {
Q_OBJECT
public:
- PDB_Intro(QWidget *parent);
+ PDB_Intro(TQWidget *parent);
};
-class PDB_Country : public QWidget {
+class PDB_Country : public TQWidget {
Q_OBJECT
public:
- PDB_Country(QWidget *parent);
+ PDB_Country(TQWidget *parent);
~PDB_Country();
- QListBox *lb;
- QStringList *list;
+ TQListBox *lb;
+ TQStringList *list;
public slots:
void selectionChanged(int);
};
-class PDB_Provider : public QWidget {
+class PDB_Provider : public TQWidget {
Q_OBJECT
public:
- PDB_Provider(QWidget *parent);
+ PDB_Provider(TQWidget *parent);
- void setDir(const QString &d);
- QString getDir();
+ void setDir(const TQString &d);
+ TQString getDir();
- QListBox *lb;
+ TQListBox *lb;
public slots:
void selectionChanged(int);
private:
- QString dir;
+ TQString dir;
};
-class PDB_UserInfo : public QWidget {
+class PDB_UserInfo : public TQWidget {
Q_OBJECT
public:
- PDB_UserInfo(QWidget *parent);
- QString username();
- QString password();
+ PDB_UserInfo(TQWidget *parent);
+ TQString username();
+ TQString password();
void activate();
public slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
private:
- QLineEdit *_username;
- QLineEdit *_password;
+ TQLineEdit *_username;
+ TQLineEdit *_password;
};
-class PDB_DialPrefix : public QWidget {
+class PDB_DialPrefix : public TQWidget {
Q_OBJECT
public:
- PDB_DialPrefix(QWidget *parent);
- QString prefix();
+ PDB_DialPrefix(TQWidget *parent);
+ TQString prefix();
void activate();
private:
- QLineEdit *_prefix;
+ TQLineEdit *_prefix;
};
-class PDB_Finished : public QWidget {
+class PDB_Finished : public TQWidget {
Q_OBJECT
public:
- PDB_Finished(QWidget *parent);
+ PDB_Finished(TQWidget *parent);
};
class ProviderDB : public KWizard {
Q_OBJECT
public:
- ProviderDB(QWidget *parent);
+ ProviderDB(TQWidget *parent);
~ProviderDB();
- static QWizard *wiz;
+ static TQWizard *wiz;
public slots:
void pageSelected();
@@ -142,11 +142,11 @@ private:
// Decodes a (some sort of)URL-encoded filename to a human-readable name.
// This is used for the provider database
-void urlDecode(QString &);
+void urlDecode(TQString &);
// Encodes a (some sort of)URL-encoded filename from a human-readable name.
// This is used for the provider database
-void urlEncode(QString &);
+void urlEncode(TQString &);
#endif
diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp
index aef02aa7..5e6397a5 100644
--- a/kppp/pwentry.cpp
+++ b/kppp/pwentry.cpp
@@ -26,41 +26,41 @@
#include <stdio.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kglobalsettings.h>
#include "pwentry.h"
-PWEntry::PWEntry( QWidget *parent, const char *name )
- : QWidget(NULL, name) {
+PWEntry::PWEntry( TQWidget *parent, const char *name )
+ : TQWidget(NULL, name) {
if(parent){
- QPoint point = mapToGlobal (QPoint (0,0));
- QRect pos = geometry();
+ TQPoint point = mapToGlobal (TQPoint (0,0));
+ TQRect pos = geometry();
setGeometry(point.x() + pos.width()/2 - 300/2,
point.y() + pos.height()/2 - 90/2,
300,
90);
} else {
- QRect desk = KGlobalSettings::desktopGeometry(parent);
+ TQRect desk = KGlobalSettings::desktopGeometry(parent);
setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 );
}
- frame = new QGroupBox(name, this );
+ frame = new TQGroupBox(name, this );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
- pw = new QLineEdit( this, "le" );
- pw->setEchoMode( QLineEdit::Password );
- connect( pw, SIGNAL(returnPressed()), this, SLOT(hide()) );
+ pw = new TQLineEdit( this, "le" );
+ pw->setEchoMode( TQLineEdit::Password );
+ connect( pw, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(hide()) );
isconsumed = TRUE;
}
-QString PWEntry::text() { return (pw->text()); }
+TQString PWEntry::text() { return (pw->text()); }
-void PWEntry::focusInEvent( QFocusEvent *){
+void PWEntry::focusInEvent( TQFocusEvent *){
pw->setFocus();
@@ -68,23 +68,23 @@ void PWEntry::focusInEvent( QFocusEvent *){
void PWEntry::setEchoModeNormal() {
- pw->setEchoMode(QLineEdit::Normal);
+ pw->setEchoMode(TQLineEdit::Normal);
}
void PWEntry::setEchoModePassword() {
- pw->setEchoMode(QLineEdit::Password);
+ pw->setEchoMode(TQLineEdit::Password);
}
-void PWEntry::setPrompt(const QString &p) {
+void PWEntry::setPrompt(const TQString &p) {
frame->setTitle(p);
}
-void PWEntry::resizeEvent(QResizeEvent* ){
+void PWEntry::resizeEvent(TQResizeEvent* ){
pw->setGeometry( 15,35, width() - 30, 25 );
frame->setGeometry(5,5, width() - 10, height() - 10 );
@@ -96,7 +96,7 @@ void PWEntry::show() {
pw->setText("");
isconsumed = FALSE;
- QWidget::show();
+ TQWidget::show();
}
bool PWEntry::Consumed() {
@@ -108,7 +108,7 @@ void PWEntry::setConsumed() {
}
void PWEntry::hide() {
- QWidget::hide();
+ TQWidget::hide();
return;
}
diff --git a/kppp/pwentry.h b/kppp/pwentry.h
index 7906dbaf..b812bb16 100644
--- a/kppp/pwentry.h
+++ b/kppp/pwentry.h
@@ -27,22 +27,22 @@
#ifndef PWENTRY_H
#define PWENTRY_H
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
-class PWEntry : public QWidget {
+class PWEntry : public TQWidget {
Q_OBJECT
public:
- PWEntry( QWidget *parent=0, const char *name=0 );
+ PWEntry( TQWidget *parent=0, const char *name=0 );
bool Consumed();
void setConsumed();
- QString text();
- void setPrompt(const QString &);
+ TQString text();
+ void setPrompt(const TQString &);
public slots:
@@ -57,14 +57,14 @@ signals:
protected:
- void resizeEvent(QResizeEvent* qre);
- void focusInEvent( QFocusEvent *);
+ void resizeEvent(TQResizeEvent* qre);
+ void focusInEvent( TQFocusEvent *);
private:
- QGroupBox *frame;
- QLineEdit *pw;
- QLabel *pl;
+ TQGroupBox *frame;
+ TQLineEdit *pw;
+ TQLabel *pl;
bool isconsumed;
};
diff --git a/kppp/requester.cpp b/kppp/requester.cpp
index b3b1df82..b5450929 100644
--- a/kppp/requester.cpp
+++ b/kppp/requester.cpp
@@ -57,7 +57,7 @@ extern "C" {
#endif
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "auth.h"
#include "pppdata.h"
@@ -171,7 +171,7 @@ bool Requester::recvResponse() {
return (response.status == 0);
}
-int Requester::openModem(const QString & dev) {
+int Requester::openModem(const TQString & dev) {
struct OpenModemRequest req;
req.header.type = Opener::OpenDevice;
@@ -183,7 +183,7 @@ int Requester::openModem(const QString & dev) {
}
-int Requester::openLockfile(const QString &dev, int flags) {
+int Requester::openLockfile(const TQString &dev, int flags) {
struct OpenLockRequest req;
@@ -229,7 +229,7 @@ int Requester::openSysLog() {
}
-bool Requester::setSecret(int method, const QString &name, const QString &password) {
+bool Requester::setSecret(int method, const TQString &name, const TQString &password) {
assert(name!=0);
assert(password!=0);
@@ -249,9 +249,9 @@ bool Requester::setSecret(int method, const QString &name, const QString &passwo
default:
return false;
}
- strncpy(req.username, QFile::encodeName(name), Opener::MaxStrLen);
+ strncpy(req.username, TQFile::encodeName(name), Opener::MaxStrLen);
req.username[Opener::MaxStrLen] = '\0';
- strncpy(req.password, QFile::encodeName(password), Opener::MaxStrLen);
+ strncpy(req.password, TQFile::encodeName(password), Opener::MaxStrLen);
req.password[Opener::MaxStrLen] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
return recvResponse();
@@ -272,22 +272,22 @@ bool Requester::removeSecret(int authMethod) {
return recvResponse();
}
-bool Requester::setHostname(const QString &name) {
+bool Requester::setHostname(const TQString &name) {
if (name.isEmpty())
return false;
struct SetHostnameRequest req;
req.header.type = Opener::SetHostname;
- strncpy(req.name, QFile::encodeName(name), Opener::MaxStrLen);
+ strncpy(req.name, TQFile::encodeName(name), Opener::MaxStrLen);
req.name[Opener::MaxStrLen] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
return recvResponse();
}
-bool Requester::execPPPDaemon(const QString &arguments) {
+bool Requester::execPPPDaemon(const TQString &arguments) {
struct ExecDaemonRequest req;
req.header.type = Opener::ExecPPPDaemon;
- strncpy(req.arguments, QFile::encodeName(arguments), MAX_CMDLEN);
+ strncpy(req.arguments, TQFile::encodeName(arguments), MAX_CMDLEN);
req.arguments[MAX_CMDLEN] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
if(recvResponse()==0) {
@@ -349,7 +349,7 @@ bool Requester::sendRequest(struct RequestHeader *request, int len) {
}
-int Requester::indexDevice(const QString &dev) {
+int Requester::indexDevice(const TQString &dev) {
int index = -1;
diff --git a/kppp/requester.h b/kppp/requester.h
index cb2d0e04..ea415df0 100644
--- a/kppp/requester.h
+++ b/kppp/requester.h
@@ -7,15 +7,15 @@ public:
Requester(int);
~Requester();
- int openModem(const QString & dev);
- int openLockfile(const QString & dev, int flags = 0);
+ int openModem(const TQString & dev);
+ int openLockfile(const TQString & dev, int flags = 0);
bool removeLockfile();
int openResolv(int flags);
int openSysLog();
- bool setSecret(int method, const QString & name, const QString & password);
+ bool setSecret(int method, const TQString & name, const TQString & password);
bool removeSecret(int authMethode);
- bool setHostname(const QString & name);
- bool execPPPDaemon(const QString & arguments);
+ bool setHostname(const TQString & name);
+ bool execPPPDaemon(const TQString & arguments);
bool killPPPDaemon();
int pppdExitStatus();
bool stop();
@@ -28,7 +28,7 @@ private:
bool sendRequest(struct RequestHeader *request, int len);
bool recvResponse();
int recvFD();
- int indexDevice(const QString & dev);
+ int indexDevice(const TQString & dev);
int socket;
bool expect_alarm;
};
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
index 8366131b..723d5f2b 100644
--- a/kppp/ruleset.cpp
+++ b/kppp/ruleset.cpp
@@ -29,8 +29,8 @@
#include <math.h>
#include "ruleset.h"
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
@@ -51,7 +51,7 @@ RuleSet::RuleSet() {
// this function is shamelessly stolen from pppcosts 0.5 :-)
/* calculates the easter sunday in day_of_year style */
-QDate RuleSet::get_easter(int year) {
+TQDate RuleSet::get_easter(int year) {
/* not optimized, I took the original names */
signed int a,b,m,q,w,p,n,tt,mm;
@@ -71,7 +71,7 @@ QDate RuleSet::get_easter(int year) {
{tt=p+31;
mm=3;}
- return QDate(year, mm, tt);
+ return TQDate(year, mm, tt);
}
int RuleSet::dayNameToInt(const char *s) {
@@ -86,13 +86,13 @@ int RuleSet::dayNameToInt(const char *s) {
return -1;
}
-int RuleSet::load(const QString &filename) {
+int RuleSet::load(const TQString &filename) {
flat_init_costs = 0.0;
flat_init_duration = 0;
have_flat_init_costs = false;
- QFile f(filename);
+ TQFile f(filename);
// delete old rules
rules.resize(0);
@@ -113,7 +113,7 @@ int RuleSet::load(const QString &filename) {
while(!f.atEnd()) {
// read continued lines
- QString line;
+ TQString line;
bool backslashed;
do {
int br = f.readLine(buffer, sizeof(buffer));
@@ -122,12 +122,12 @@ int RuleSet::load(const QString &filename) {
else
buffer[br] = 0;
lineno++;
- line.append(QString::fromUtf8(buffer));
+ line.append(TQString::fromUtf8(buffer));
backslashed = (line.right(1) == "\\");
} while(!f.atEnd() && backslashed);
// strip whitespace
- line = line.replace(QRegExp("[ \t\r]"), "");
+ line = line.replace(TQRegExp("[ \t\r]"), "");
// skip comment lines
if((line.left(1) == "#") || line.isEmpty())
continue;
@@ -182,22 +182,22 @@ void RuleSet::addRule(RULE r) {
}
}
-bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
- if(s.contains(QRegExp("^[0-9]+/[0-9]+$"))) {
+bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
+ if(s.contains(TQRegExp("^[0-9]+/[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d/%d", &m, &d);
ret.type = 1;
- ret.date.from = QDate(year, m, d);
- ret.date.until = QDate(year, m, d);
+ ret.date.from = TQDate(year, m, d);
+ ret.date.until = TQDate(year, m, d);
return TRUE;
}
- if(s.contains(QRegExp("^[0-9]+\\.[0-9]+$"))) {
+ if(s.contains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d.%d", &d, &m);
ret.type = 1;
- ret.date.from = QDate(year, m, d);
- ret.date.until = QDate(year, m, d);
+ ret.date.from = TQDate(year, m, d);
+ ret.date.until = TQDate(year, m, d);
return TRUE;
}
@@ -212,10 +212,10 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
}
if(s.left(6) == "easter") {
- QDate d = get_easter(year);
+ TQDate d = get_easter(year);
int off;
bool ok = TRUE;
- QString val = s.mid(6, 1000);
+ TQString val = s.mid(6, 1000);
if(val.isEmpty())
off = 0;
else
@@ -236,8 +236,8 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
-bool RuleSet::parseEntries(QString s, int year,
- QTime t1, QTime t2,
+bool RuleSet::parseEntries(TQString s, int year,
+ TQTime t1, TQTime t2,
double costs, double len, double after)
{
// special rule: on() is the same as on(monday..sunday)
@@ -246,7 +246,7 @@ bool RuleSet::parseEntries(QString s, int year,
while(s.length()) {
int pos = s.find(',');
- QString token;
+ TQString token;
if(pos == -1) {
token = s;
s = "";
@@ -259,7 +259,7 @@ bool RuleSet::parseEntries(QString s, int year,
// range
RULE r;
if(token.contains("..")) {
- QString left, right;
+ TQString left, right;
left = token.left(token.find(".."));
right = token.right(token.length()-2-left.length());
RULE lr, rr;
@@ -293,7 +293,7 @@ bool RuleSet::parseEntries(QString s, int year,
return TRUE;
}
-bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) {
+bool RuleSet::parseTime(TQTime &t1, TQTime &t2, TQString s) {
if(s.isEmpty()) {
t1 = midnight();
t2 = beforeMidnight();
@@ -309,20 +309,20 @@ bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) {
}
}
-bool RuleSet::parseRate(double &costs, double &len, double &after, QString s) {
+bool RuleSet::parseRate(double &costs, double &len, double &after, TQString s) {
after = 0;
int fields = sscanf(s.ascii(), "%lf,%lf,%lf", &costs, &len, &after);
return (fields == 2) || (fields == 3);
}
-bool RuleSet::parseLine(const QString &s) {
+bool RuleSet::parseLine(const TQString &s) {
- // ### use QRegExp::cap() instead of mid() and find()
+ // ### use TQRegExp::cap() instead of mid() and find()
// for our french friends -- Bernd
- if(s.contains(QRegExp("flat_init_costs=\\(.*"))) {
+ if(s.contains(TQRegExp("flat_init_costs=\\(.*"))) {
// parse the time fields
- QString token = s.mid(s.find("flat_init_costs=(") + 17,
+ TQString token = s.mid(s.find("flat_init_costs=(") + 17,
s.find(")")-s.find("flat_init_costs=(") - 17);
// printf("TOKEN=%s\n",token.ascii());
@@ -342,11 +342,11 @@ bool RuleSet::parseLine(const QString &s) {
}
- if(s.contains(QRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
+ if(s.contains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
// parse the time fields
- QString token = s.mid(s.find("between(") + 8,
+ TQString token = s.mid(s.find("between(") + 8,
s.find(")use")-s.find("between(") - 8);
- QTime t1, t2;
+ TQTime t1, t2;
if(!parseTime(t1, t2, token))
return FALSE;
@@ -362,7 +362,7 @@ bool RuleSet::parseLine(const QString &s) {
// parse the days
token = s.mid(s.find("on(") + 3,
s.find(")betw")-s.find("on(") - 3);
- if(!parseEntries(token, QDate::currentDate().year(),
+ if(!parseEntries(token, TQDate::currentDate().year(),
t1, t2, costs, len, after))
return FALSE;
@@ -370,23 +370,23 @@ bool RuleSet::parseLine(const QString &s) {
}
// check for the name
- if(s.contains(QRegExp("name=.*"))) {
+ if(s.contains(TQRegExp("name=.*"))) {
_name = s.right(s.length()-5);
return !_name.isEmpty();
}
// check default entry
- if(s.contains(QRegExp("default=\\(.*\\)"))) {
- QString token = s.mid(9, s.length() - 10);
+ if(s.contains(TQRegExp("default=\\(.*\\)"))) {
+ TQString token = s.mid(9, s.length() - 10);
double after;
if(parseRate(default_costs, default_len, after, token))
return TRUE;
}
// check for "minimum costs"
- if(s.contains(QRegExp("minimum_costs=.*"))) {
- QString token = s.right(s.length() - strlen("minimum_costs="));
+ if(s.contains(TQRegExp("minimum_costs=.*"))) {
+ TQString token = s.right(s.length() - strlen("minimum_costs="));
bool ok;
_minimum_costs = token.toDouble(&ok);
return ok;
@@ -398,20 +398,20 @@ bool RuleSet::parseLine(const QString &s) {
return TRUE;
}
- if(s.contains(QRegExp("currency_digits=.*"))) {
- QString token = s.mid(16, s.length() - 16);
+ if(s.contains(TQRegExp("currency_digits=.*"))) {
+ TQString token = s.mid(16, s.length() - 16);
bool ok;
_currency_digits = token.toInt(&ok);
return ok && (_currency_digits >= 0);
}
// "currency_position" is deprecated so we'll simply ignore it
- if(s.contains(QRegExp("currency_position=.*")))
+ if(s.contains(TQRegExp("currency_position=.*")))
return TRUE;
// check per connection fee
- if(s.contains(QRegExp("per_connection="))) {
- QString token = s.mid(15, s.length()-15);
+ if(s.contains(TQRegExp("per_connection="))) {
+ TQString token = s.mid(15, s.length()-15);
bool ok;
pcf = token.toDouble(&ok);
return ok;
@@ -420,13 +420,13 @@ bool RuleSet::parseLine(const QString &s) {
return FALSE;
}
-void RuleSet::setStartTime(QDateTime dt){
+void RuleSet::setStartTime(TQDateTime dt){
starttime = dt;
}
-void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, double &len) {
+void RuleSet::getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len) {
// use default costs first
costs = default_costs;
len = default_len;
@@ -450,8 +450,8 @@ void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, do
{
// since rules do not have a year's entry, use the one
// from dt
- QDate from = r.date.from;
- QDate until = r.date.until;
+ TQDate from = r.date.from;
+ TQDate until = r.date.until;
from.setYMD(dt.date().year(), from.month(), from.day());
until.setYMD(dt.date().year(), until.month(), until.day());
if((from <= dt.date()) && (dt.date() <= until)) {
@@ -502,11 +502,11 @@ static double round(double d, int digits) {
}
#endif
-QString RuleSet::currencySymbol() const {
+TQString RuleSet::currencySymbol() const {
return _currency_symbol.copy();
}
-QString RuleSet::currencyString(double f) const {
+TQString RuleSet::currencyString(double f) const {
return KGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits);
}
@@ -516,7 +516,7 @@ double RuleSet::perConnectionCosts() const {
}
-QString RuleSet::name() const {
+TQString RuleSet::name() const {
return _name;
}
@@ -525,21 +525,21 @@ double RuleSet::minimumCosts() const {
return _minimum_costs;
}
-QTime RuleSet::midnight() const {
- return QTime(0, 0, 0, 0);
+TQTime RuleSet::midnight() const {
+ return TQTime(0, 0, 0, 0);
}
-QTime RuleSet::beforeMidnight() const {
- return QTime(23,59,59,999);
+TQTime RuleSet::beforeMidnight() const {
+ return TQTime(23,59,59,999);
}
-int RuleSet::checkRuleFile(const QString &rulefile) {
+int RuleSet::checkRuleFile(const TQString &rulefile) {
if(rulefile == NULL) {
fputs(i18n("kppp: no rulefile specified\n").local8Bit(), stderr);
return 1;
}
- QFile fl(rulefile);
+ TQFile fl(rulefile);
if(!fl.exists()) {
fprintf(stderr, i18n("kppp: rulefile \"%s\" not found\n").local8Bit(), rulefile.local8Bit().data());
return 1;
diff --git a/kppp/ruleset.h b/kppp/ruleset.h
index b66bb50c..8d3fbbe8 100644
--- a/kppp/ruleset.h
+++ b/kppp/ruleset.h
@@ -27,9 +27,9 @@
#ifndef __RULESET__H__
#define __RULESET__H__
-#include <qmemarray.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
// this structure is used to save
// accounting rules
@@ -38,9 +38,9 @@ typedef struct RULE {
double costs;
double len;
double after;
- QTime from, until;
+ TQTime from, until;
struct {
- QDate from, until;
+ TQDate from, until;
} date;
struct {
int from, until;
@@ -57,26 +57,26 @@ public:
~RuleSet() {};
/// returns the name of the ruleset
- QString name() const;
+ TQString name() const;
/** Load a ruleset from a file. If an error occurs,
* returns the linenumber the error was in,
* otherwise 0. If the file could not be opened,
* returns -1
*/
- int load(const QString &filename);
+ int load(const TQString &filename);
/// returns the currency symbol
- QString currencySymbol() const;
+ TQString currencySymbol() const;
/** returns a string representation of the
* of a doubleingpoint number using the
* currency-settings
*/
- QString currencyString(double val) const;
+ TQString currencyString(double val) const;
/// sets the start time -- must be called when the connection has bee established
- void setStartTime(QDateTime dt);
+ void setStartTime(TQDateTime dt);
/// returns the "per-connection" costs
double perConnectionCosts() const;
@@ -87,10 +87,10 @@ public:
double minimumCosts() const;
/// returns the currently valid rule settings
- void getActiveRule(QDateTime dt, double connect_time, double &costs, double &len);
+ void getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len);
/// checks if a rulefile is ok (no parse errors...)
- static int checkRuleFile(const QString &);
+ static int checkRuleFile(const TQString &);
protected:
/** converts an english name of a day to integer,
@@ -99,38 +99,38 @@ protected:
int dayNameToInt(const char *s);
/// returns the date of easter-sunday for a year
- static QDate get_easter(int year);
+ static TQDate get_easter(int year);
/// add a rule to this ruleset
void addRule(RULE r);
/// parses on entry of the "on(...)" fields
- bool parseEntry(RULE &ret, QString s, int year);
+ bool parseEntry(RULE &ret, TQString s, int year);
/// parses the "on(...)" fields
- bool parseEntries(QString s, int year,
- QTime t1, QTime t2,
+ bool parseEntries(TQString s, int year,
+ TQTime t1, TQTime t2,
double costs, double len, double after);
/// parses the "between(...)" time fields
- bool parseTime(QTime &t1, QTime &t2, QString s);
+ bool parseTime(TQTime &t1, TQTime &t2, TQString s);
/// parses the "use(...)" fields
- bool parseRate(double &costs, double &len, double &after, QString s);
+ bool parseRate(double &costs, double &len, double &after, TQString s);
/// parses a whole line
- bool parseLine(const QString &line);
+ bool parseLine(const TQString &line);
/// returns midnight time (00:00:00.000)
- QTime midnight() const;
+ TQTime midnight() const;
/// returns the last valid time BEFORE midnight
- QTime beforeMidnight() const;
+ TQTime beforeMidnight() const;
protected:
- QString _name;
- QString _currency_symbol;
- QDateTime starttime;
+ TQString _name;
+ TQString _currency_symbol;
+ TQDateTime starttime;
int _currency_digits;
double default_costs;
double _minimum_costs;
@@ -140,7 +140,7 @@ protected:
double flat_init_duration;
double flat_init_costs;
- QMemArray<RULE> rules;
+ TQMemArray<RULE> rules;
};
#endif
diff --git a/kppp/runtests.cpp b/kppp/runtests.cpp
index 59f32e93..a520d116 100644
--- a/kppp/runtests.cpp
+++ b/kppp/runtests.cpp
@@ -24,7 +24,7 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include "runtests.h"
#include <ctype.h>
#include <unistd.h>
@@ -197,13 +197,13 @@ int runTests() {
char buf[2048]; // safe
while(f != NULL && !feof(f)) {
if(fgets(buf, sizeof(buf), f) != NULL) {
- QString s(buf);
+ TQString s(buf);
s = s.stripWhiteSpace();
if(s[0] == '#' || s.length() == 0)
continue;
- if((uid_t)uidFromName(QFile::encodeName(s)) == getuid()) {
+ if((uid_t)uidFromName(TQFile::encodeName(s)) == getuid()) {
access = TRUE;
fclose(f);
f = NULL;
@@ -261,8 +261,8 @@ int runTests() {
// Test 5: check for existence of /etc/resolv.conf
if (access(_PATH_RESCONF, R_OK) != 0) {
- QString file = _PATH_RESCONF" ";
- QString msgstr = i18n("%1 is missing or can't be read!\n"
+ TQString file = _PATH_RESCONF" ";
+ TQString msgstr = i18n("%1 is missing or can't be read!\n"
"Ask your system administrator to create "
"this file (can be empty) with appropriate "
"read and write permissions.").arg(file);
diff --git a/kppp/scriptedit.cpp b/kppp/scriptedit.cpp
index 0cb676f5..afa88821 100644
--- a/kppp/scriptedit.cpp
+++ b/kppp/scriptedit.cpp
@@ -26,16 +26,16 @@
*/
#include "scriptedit.h"
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
-ScriptEdit::ScriptEdit( QWidget *parent, const char *name )
- : QWidget(parent, name)
+ScriptEdit::ScriptEdit( TQWidget *parent, const char *name )
+ : TQWidget(parent, name)
{
- QHBoxLayout *tl = new QHBoxLayout(this, 0, 10);
+ TQHBoxLayout *tl = new TQHBoxLayout(this, 0, 10);
- st = new QComboBox(this, "st");
+ st = new TQComboBox(this, "st");
st->insertItem("Expect");
st->insertItem("Send");
st->insertItem("Pause (sec)");
@@ -51,12 +51,12 @@ ScriptEdit::ScriptEdit( QWidget *parent, const char *name )
st->insertItem("Scan");
st->insertItem("Save");
st->insertItem("SendNoEcho");
- connect(st, SIGNAL(activated(int)), SLOT(setType(int)));
+ connect(st, TQT_SIGNAL(activated(int)), TQT_SLOT(setType(int)));
- se = new QLineEdit(this, "se");
+ se = new TQLineEdit(this, "se");
se->setGeometry(120, 5, 140, 25);
se->setMaxLength(50);
- connect(se, SIGNAL(returnPressed()), SLOT(seReturnPressed()));
+ connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(seReturnPressed()));
tl->addWidget(st, 3);
tl->addWidget(se, 7);
@@ -77,11 +77,11 @@ void ScriptEdit::seReturnPressed() {
}
-QString ScriptEdit::text()const {
+TQString ScriptEdit::text()const {
return se->text();
}
-void ScriptEdit::setText(const QString &t) {
+void ScriptEdit::setText(const TQString &t) {
se->setText(t);
}
diff --git a/kppp/scriptedit.h b/kppp/scriptedit.h
index d04416e0..7c914268 100644
--- a/kppp/scriptedit.h
+++ b/kppp/scriptedit.h
@@ -28,19 +28,19 @@
#ifndef _SCRIPTEDIT_H_
#define _SCRIPTEDIT_H_
-#include <qwidget.h>
+#include <tqwidget.h>
class QComboBox;
class QLineEdit;
-class ScriptEdit : public QWidget {
+class ScriptEdit : public TQWidget {
Q_OBJECT
public:
- ScriptEdit( QWidget *parent=0, const char *name=0 );
+ ScriptEdit( TQWidget *parent=0, const char *name=0 );
~ScriptEdit() {}
- QString text()const;
- void setText(const QString &);
+ TQString text()const;
+ void setText(const TQString &);
int type()const;
virtual void setEnabled(bool);
@@ -53,8 +53,8 @@ private slots:
void seReturnPressed();
private:
- QComboBox *st;
- QLineEdit *se;
+ TQComboBox *st;
+ TQLineEdit *se;
public:
enum setypes { Expect = 0,
diff --git a/krdc/events.h b/krdc/events.h
index 7ac262a7..7c211183 100644
--- a/krdc/events.h
+++ b/krdc/events.h
@@ -20,7 +20,7 @@
#ifndef EVENTS_H
#define EVENTS_H
-#include <qevent.h>
+#include <tqevent.h>
/**
* State of the connection. The state of the connection is returned
@@ -65,7 +65,7 @@ private:
int m_width, m_height;
public:
ScreenResizeEvent(int w, int h) :
- QCustomEvent(ScreenResizeEventType),
+ TQCustomEvent(ScreenResizeEventType),
m_width(w),
m_height(h)
{};
@@ -81,7 +81,7 @@ private:
RemoteViewStatus m_status;
public:
StatusChangeEvent(RemoteViewStatus s) :
- QCustomEvent(StatusChangeEventType),
+ TQCustomEvent(StatusChangeEventType),
m_status(s)
{};
RemoteViewStatus status() const { return m_status; };
@@ -93,7 +93,7 @@ class PasswordRequiredEvent : public QCustomEvent
{
public:
PasswordRequiredEvent() :
- QCustomEvent(PasswordRequiredEventType)
+ TQCustomEvent(PasswordRequiredEventType)
{};
};
@@ -104,7 +104,7 @@ class FatalErrorEvent : public QCustomEvent
ErrorCode m_error;
public:
FatalErrorEvent(ErrorCode e) :
- QCustomEvent(FatalErrorEventType),
+ TQCustomEvent(FatalErrorEventType),
m_error(e)
{};
@@ -117,7 +117,7 @@ class DesktopInitEvent : public QCustomEvent
{
public:
DesktopInitEvent() :
- QCustomEvent(DesktopInitEventType)
+ TQCustomEvent(DesktopInitEventType)
{};
};
@@ -129,7 +129,7 @@ private:
int m_x, m_y, m_width, m_height;
public:
ScreenRepaintEvent(int x, int y, int w, int h) :
- QCustomEvent(ScreenRepaintEventType),
+ TQCustomEvent(ScreenRepaintEventType),
m_x(x),
m_y(y),
m_width(w),
@@ -147,7 +147,7 @@ class BeepEvent : public QCustomEvent
{
public:
BeepEvent() :
- QCustomEvent(BeepEventType)
+ TQCustomEvent(BeepEventType)
{};
};
@@ -160,7 +160,7 @@ private:
int m_length;
public:
ServerCutEvent(char *bytes, int length) :
- QCustomEvent(ServerCutEventType),
+ TQCustomEvent(ServerCutEventType),
m_bytes(bytes),
m_length(length)
{};
@@ -179,7 +179,7 @@ private:
int m_x, m_y, m_buttonMask;
public:
MouseStateEvent(int x, int y, int buttonMask) :
- QCustomEvent(MouseStateEventType),
+ TQCustomEvent(MouseStateEventType),
m_x(x),
m_y(y),
m_buttonMask(buttonMask)
@@ -197,7 +197,7 @@ class WalletOpenEvent : public QCustomEvent
{
public:
WalletOpenEvent() :
- QCustomEvent(WalletOpenEventType)
+ TQCustomEvent(WalletOpenEventType)
{};
};
diff --git a/krdc/hostpreferences.cpp b/krdc/hostpreferences.cpp
index 4b02191b..dae9a09a 100644
--- a/krdc/hostpreferences.cpp
+++ b/krdc/hostpreferences.cpp
@@ -24,8 +24,8 @@
#include <kconfig.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqregexp.h>
+#include <tqmap.h>
HostPreferences *HostPreferences::m_instance = 0;
static KStaticDeleter<HostPreferences> sd;
@@ -38,7 +38,7 @@ HostPreferences *HostPreferences::instance()
return m_instance;
}
-HostPref::HostPref(KConfig *conf, const QString &host, const QString &type) :
+HostPref::HostPref(KConfig *conf, const TQString &host, const TQString &type) :
m_host(host),
m_type(type),
m_config(conf) {
@@ -48,20 +48,20 @@ HostPref::~HostPref() {
m_config->sync();
}
-QString HostPref::host() const {
+TQString HostPref::host() const {
return m_host;
}
-QString HostPref::type() const {
+TQString HostPref::type() const {
return m_type;
}
-QString HostPref::prefix() const {
+TQString HostPref::prefix() const {
return prefix(m_host, m_type);
}
-QString HostPref::prefix(const QString &host, const QString &type) {
- return QString("PerHost-%1-%2-").arg(type).arg(host);
+TQString HostPref::prefix(const TQString &host, const TQString &type) {
+ return TQString("PerHost-%1-%2-").arg(type).arg(host);
}
@@ -74,7 +74,7 @@ HostPreferences::~HostPreferences() {
sd.setObject( m_instance, 0, false );
}
-HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &type) {
+HostPrefPtr HostPreferences::getHostPref(const TQString &host, const TQString &type) {
m_config->setGroup("PerHostSettings");
if (!m_config->readBoolEntry(HostPref::prefix(host, type)+"exists"))
return 0;
@@ -93,7 +93,7 @@ HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &typ
return 0;
}
-HostPrefPtr HostPreferences::createHostPref(const QString &host, const QString &type) {
+HostPrefPtr HostPreferences::createHostPref(const TQString &host, const TQString &type) {
HostPrefPtr hp = getHostPref(host, type);
if (hp)
return hp;
@@ -128,13 +128,13 @@ HostPrefPtr HostPreferences::rdpDefaults()
HostPrefPtrList HostPreferences::getAllHostPrefs() {
HostPrefPtrList r;
- QMap<QString, QString> map = m_config->entryMap("PerHostSettings");
- QStringList keys = map.keys();
- QStringList::iterator it = keys.begin();
+ TQMap<TQString, TQString> map = m_config->entryMap("PerHostSettings");
+ TQStringList keys = map.keys();
+ TQStringList::iterator it = keys.begin();
while (it != keys.end()) {
- QString key = *it;
+ TQString key = *it;
if (key.endsWith("-exists")) {
- QRegExp re("PerHost-([^-]+)-(.*)-exists");
+ TQRegExp re("PerHost-([^-]+)-(.*)-exists");
if (re.exactMatch(key)) {
HostPrefPtr hp = getHostPref(re.cap(2), re.cap(1));
if (hp)
@@ -153,37 +153,37 @@ void HostPreferences::removeHostPref(HostPref *hostPref) {
void HostPreferences::setShowBrowsingPanel( bool b )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "browsingPanel", b );
}
-void HostPreferences::setServerCompletions( const QStringList &list )
+void HostPreferences::setServerCompletions( const TQStringList &list )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "serverCompletions", list );
}
-void HostPreferences::setServerHistory( const QStringList &list )
+void HostPreferences::setServerHistory( const TQStringList &list )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "serverHistory", list );
}
bool HostPreferences::showBrowsingPanel()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readBoolEntry( "browsingPanel" );
}
-QStringList HostPreferences::serverCompletions()
+TQStringList HostPreferences::serverCompletions()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readListEntry( "serverCompletions" );
}
-QStringList HostPreferences::serverHistory()
+TQStringList HostPreferences::serverHistory()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readListEntry( "serverHistory" );
}
diff --git a/krdc/hostpreferences.h b/krdc/hostpreferences.h
index 09b4abe6..9b74b235 100644
--- a/krdc/hostpreferences.h
+++ b/krdc/hostpreferences.h
@@ -19,8 +19,8 @@
#ifndef HOSTPREFERENCES_H
#define HOSTPREFERENCES_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "smartptr.h"
class HostPreferences;
@@ -29,11 +29,11 @@ class KConfig;
class HostPref {
protected:
friend class HostPreferences;
- QString m_host;
- QString m_type;
+ TQString m_host;
+ TQString m_type;
KConfig *m_config;
- HostPref(KConfig *conf, const QString &host, const QString &type);
+ HostPref(KConfig *conf, const TQString &host, const TQString &type);
virtual void load() = 0;
virtual void setDefaults() = 0;
@@ -42,35 +42,35 @@ protected:
public:
virtual ~HostPref();
- virtual QString prefDescription() const = 0;
- QString host() const;
- QString type() const;
- QString prefix() const;
- static QString prefix(const QString &host, const QString &type);
+ virtual TQString prefDescription() const = 0;
+ TQString host() const;
+ TQString type() const;
+ TQString prefix() const;
+ static TQString prefix(const TQString &host, const TQString &type);
};
typedef SmartPtr<HostPref> HostPrefPtr;
-typedef QValueList<HostPrefPtr> HostPrefPtrList;
+typedef TQValueList<HostPrefPtr> HostPrefPtrList;
class HostPreferences {
public:
static HostPreferences *instance();
~HostPreferences();
- HostPrefPtr getHostPref(const QString &host, const QString &type);
- HostPrefPtr createHostPref(const QString &host, const QString &type);
+ HostPrefPtr getHostPref(const TQString &host, const TQString &type);
+ HostPrefPtr createHostPref(const TQString &host, const TQString &type);
HostPrefPtrList getAllHostPrefs();
HostPrefPtr vncDefaults();
HostPrefPtr rdpDefaults();
void removeHostPref(HostPref *hostPref);
void setShowBrowsingPanel( bool b );
- void setServerCompletions( const QStringList &list );
- void setServerHistory( const QStringList &list );
+ void setServerCompletions( const TQStringList &list );
+ void setServerHistory( const TQStringList &list );
bool showBrowsingPanel();
- QStringList serverCompletions();
- QStringList serverHistory();
+ TQStringList serverCompletions();
+ TQStringList serverHistory();
void sync();
diff --git a/krdc/hostprofiles.ui.h b/krdc/hostprofiles.ui.h
index 56c63f23..2626bb78 100644
--- a/krdc/hostprofiles.ui.h
+++ b/krdc/hostprofiles.ui.h
@@ -11,10 +11,10 @@ void HostProfiles::removeHost()
{
HostPreferences *hps = HostPreferences::instance();
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
- QListViewItem *vi = it.current();
+ TQListViewItem *vi = it.current();
if (vi->isSelected())
{
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
@@ -32,10 +32,10 @@ void HostProfiles::removeAllHosts()
{
HostPreferences *hps = HostPreferences::instance();
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
- QListViewItem *vi = it.current();
+ TQListViewItem *vi = it.current();
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
if (hp)
deletedHosts += hp;
@@ -48,7 +48,7 @@ void HostProfiles::removeAllHosts()
void HostProfiles::selectionChanged()
{
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
if (it.current()->isSelected())
@@ -92,7 +92,7 @@ void HostProfiles::save()
hps->sync();
}
-void HostProfiles::slotHostDoubleClicked( QListViewItem *vi )
+void HostProfiles::slotHostDoubleClicked( TQListViewItem *vi )
{
HostPreferences *hps = HostPreferences::instance();
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
diff --git a/krdc/keycapturedialog.cpp b/krdc/keycapturedialog.cpp
index 39a68304..47f93455 100644
--- a/krdc/keycapturedialog.cpp
+++ b/krdc/keycapturedialog.cpp
@@ -24,8 +24,8 @@
#include "keycapturedialog.h"
#include "keycapturewidget.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -46,11 +46,11 @@ const int XKeyRelease = KeyRelease;
#endif
-KeyCaptureDialog::KeyCaptureDialog(QWidget *parent, const char *name)
+KeyCaptureDialog::KeyCaptureDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n( "Enter Key Combination" ),
Cancel, Cancel, true), m_grabbed(false) {
- QFrame *main = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( main, 0, KDialog::spacingHint() );
+ TQFrame *main = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( main, 0, KDialog::spacingHint() );
m_captureWidget = new KeyCaptureWidget( main, "m_captureWidget" );
layout->addWidget( m_captureWidget );
layout->addStretch();
@@ -86,7 +86,7 @@ bool KeyCaptureDialog::x11Event(XEvent *pEvent)
default:
break;
}
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent )
@@ -129,7 +129,7 @@ void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent )
else
keyModX = pEvent->xkey.state & ~keyModX;
- QString keyModStr;
+ TQString keyModStr;
if( keyModX & KKeyNative::modX(KKey::WIN) ) keyModStr += KKey::modFlagLabel(KKey::WIN) + "+";
if( keyModX & KKeyNative::modX(KKey::ALT) ) keyModStr += KKey::modFlagLabel(KKey::ALT) + "+";
if( keyModX & KKeyNative::modX(KKey::CTRL) ) keyModStr += KKey::modFlagLabel(KKey::CTRL) + "+";
diff --git a/krdc/keycapturedialog.h b/krdc/keycapturedialog.h
index 6f3aa312..1b45b234 100644
--- a/krdc/keycapturedialog.h
+++ b/krdc/keycapturedialog.h
@@ -32,7 +32,7 @@ class KeyCaptureDialog : public KDialogBase {
bool m_grabbed;
public:
- KeyCaptureDialog(QWidget * parent= 0, const char *name = 0);
+ KeyCaptureDialog(TQWidget * parent= 0, const char *name = 0);
~KeyCaptureDialog();
public slots:
diff --git a/krdc/kfullscreenpanel.cpp b/krdc/kfullscreenpanel.cpp
index 84067359..0c85cfdd 100644
--- a/krdc/kfullscreenpanel.cpp
+++ b/krdc/kfullscreenpanel.cpp
@@ -20,7 +20,7 @@
Counter::Counter(float start) :
m_currentValue(start) {
- connect(&m_timer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
}
void Counter::count(float stop, float stepSize, float frequency) {
@@ -54,17 +54,17 @@ void Counter::timeout() {
}
-KFullscreenPanel::KFullscreenPanel(QWidget* parent,
+KFullscreenPanel::KFullscreenPanel(TQWidget* parent,
const char *name,
- const QSize &resolution) :
- QWidget(parent, name),
+ const TQSize &resolution) :
+ TQWidget(parent, name),
m_child(0),
m_layout(0),
m_fsResolution(resolution),
m_counter(0)
{
- connect(&m_counter, SIGNAL(countingDownFinished()), SLOT(hide()));
- connect(&m_counter, SIGNAL(counted(float)), SLOT(movePanel(float)));
+ connect(&m_counter, TQT_SIGNAL(countingDownFinished()), TQT_SLOT(hide()));
+ connect(&m_counter, TQT_SIGNAL(counted(float)), TQT_SLOT(movePanel(float)));
}
KFullscreenPanel::~KFullscreenPanel() {
@@ -76,19 +76,19 @@ void KFullscreenPanel::movePanel(float posY) {
show();
}
-void KFullscreenPanel::setChild(QWidget *child) {
+void KFullscreenPanel::setChild(TQWidget *child) {
if (m_layout)
delete m_layout;
m_child = child;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(child);
doLayout();
}
void KFullscreenPanel::doLayout() {
- QSize s = sizeHint();
+ TQSize s = sizeHint();
setFixedSize(s);
setGeometry((m_fsResolution.width() - s.width())/2, 0,
s.width(), s.height());
@@ -102,11 +102,11 @@ void KFullscreenPanel::startHide() {
m_counter.count(-height(), -height()/12.0, 24);
}
-void KFullscreenPanel::enterEvent(QEvent*) {
+void KFullscreenPanel::enterEvent(TQEvent*) {
emit mouseEnter();
}
-void KFullscreenPanel::leaveEvent(QEvent*) {
+void KFullscreenPanel::leaveEvent(TQEvent*) {
emit mouseLeave();
}
diff --git a/krdc/kfullscreenpanel.h b/krdc/kfullscreenpanel.h
index 43b4944d..359a4d5c 100644
--- a/krdc/kfullscreenpanel.h
+++ b/krdc/kfullscreenpanel.h
@@ -18,15 +18,15 @@
#ifndef KFULLSCREENPANEL_H
#define KFULLSCREENPANEL_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqtimer.h>
-class Counter : public QObject {
+class Counter : public TQObject {
Q_OBJECT
private:
- QTimer m_timer;
+ TQTimer m_timer;
float m_stopValue, m_currentValue, m_stepSize;
int m_timeoutMs;
@@ -44,28 +44,28 @@ signals:
};
-class KFullscreenPanel : public QWidget {
+class KFullscreenPanel : public TQWidget {
Q_OBJECT
private:
- QWidget *m_child;
- QVBoxLayout *m_layout;
- QSize m_fsResolution;
+ TQWidget *m_child;
+ TQVBoxLayout *m_layout;
+ TQSize m_fsResolution;
Counter m_counter;
void doLayout();
public:
- KFullscreenPanel(QWidget* parent, const char *name,
- const QSize &resolution);
+ KFullscreenPanel(TQWidget* parent, const char *name,
+ const TQSize &resolution);
~KFullscreenPanel();
- void setChild(QWidget *child);
+ void setChild(TQWidget *child);
void startShow();
void startHide();
protected:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
private slots:
void movePanel(float posY);
diff --git a/krdc/krdc.cpp b/krdc/krdc.cpp
index 36939c91..6c08de5d 100644
--- a/krdc/krdc.cpp
+++ b/krdc/krdc.cpp
@@ -34,10 +34,10 @@
#include <kwin.h>
#include <kstartupinfo.h>
-#include <qdockarea.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqdockarea.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#define BUMP_SCROLL_CONSTANT (200)
@@ -57,29 +57,29 @@ const int KRDC::TOOLBAR_FPS_1000 = 10000;
const int KRDC::TOOLBAR_SPEED_DOWN = 34;
const int KRDC::TOOLBAR_SPEED_UP = 20;
-QScrollView2::QScrollView2(QWidget *w, const char *name) :
- QScrollView(w, name) {
+QScrollView2::QScrollView2(TQWidget *w, const char *name) :
+ TQScrollView(w, name) {
setMouseTracking(true);
viewport()->setMouseTracking(true);
horizontalScrollBar()->setMouseTracking(true);
verticalScrollBar()->setMouseTracking(true);
}
-void QScrollView2::mouseMoveEvent( QMouseEvent *e )
+void QScrollView2::mouseMoveEvent( TQMouseEvent *e )
{
e->ignore();
}
-QString KRDC::m_lastHost = "";
+TQString KRDC::m_lastHost = "";
-KRDC::KRDC(WindowMode wm, const QString &host,
- Quality q, const QString &encodings,
- const QString &password,
+KRDC::KRDC(WindowMode wm, const TQString &host,
+ Quality q, const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize) :
- QWidget(0, 0, Qt::WStyle_ContextHelp),
+ TQSize initialWindowSize) :
+ TQWidget(0, 0, Qt::WStyle_ContextHelp),
m_layout(0),
m_scrollView(0),
m_view(0),
@@ -101,8 +101,8 @@ KRDC::KRDC(WindowMode wm, const QString &host,
m_localCursor(localCursor),
m_initialWindowSize(initialWindowSize)
{
- connect(&m_autoHideTimer, SIGNAL(timeout()), SLOT(hideFullscreenToolbarNow()));
- connect(&m_bumpScrollTimer, SIGNAL(timeout()), SLOT(bumpScroll()));
+ connect(&m_autoHideTimer, TQT_SIGNAL(timeout()), TQT_SLOT(hideFullscreenToolbarNow()));
+ connect(&m_bumpScrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(bumpScroll()));
m_pindown = UserIcon("pindown");
m_pinup = UserIcon("pinup");
@@ -116,8 +116,8 @@ KRDC::KRDC(WindowMode wm, const QString &host,
bool KRDC::start()
{
- QString userName, password;
- QString serverHost;
+ TQString userName, password;
+ TQString serverHost;
int serverPort = 5900;
int ret_status;
@@ -141,11 +141,11 @@ bool KRDC::start()
MainDialog mainDlg(this, "MainDialog");
mainDlg.setRemoteHost(m_lastHost);
- if (mainDlg.exec() == QDialog::Rejected) {
+ if (mainDlg.exec() == TQDialog::Rejected) {
return false;
}
- QString m_host = mainDlg.remoteHost();
+ TQString m_host = mainDlg.remoteHost();
m_lastHost = m_host;
if (m_host.startsWith("vnc:/"))
m_protocol = PROTOCOL_VNC;
@@ -164,9 +164,9 @@ bool KRDC::start()
setCaption(i18n("%1 - Remote Desktop Connection").arg(serverHost));
m_scrollView = new QScrollView2(this, "remote scrollview");
- m_scrollView->setFrameStyle(QFrame::NoFrame);
- m_scrollView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Expanding));
+ m_scrollView->setFrameStyle(TQFrame::NoFrame);
+ m_scrollView->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding));
switch(m_protocol)
{
@@ -190,20 +190,20 @@ bool KRDC::start()
m_view->setViewOnly(kapp->config()->readBoolEntry("viewOnly", false));
m_scrollView->addChild(m_view);
- QWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window."));
+ TQWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window."));
- connect(m_view, SIGNAL(changeSize(int,int)), SLOT(setSize(int,int)));
- connect(m_view, SIGNAL(connected()), SLOT(show()));
- connect(m_view, SIGNAL(disconnected()), SIGNAL(disconnected()));
+ connect(m_view, TQT_SIGNAL(changeSize(int,int)), TQT_SLOT(setSize(int,int)));
+ connect(m_view, TQT_SIGNAL(connected()), TQT_SLOT(show()));
+ connect(m_view, TQT_SIGNAL(disconnected()), TQT_SIGNAL(disconnected()));
// note that the disconnectedError() will be disconnected when kremoteview
// is completely initialized
- connect(m_view, SIGNAL(disconnectedError()), SIGNAL(disconnectedError()));
- connect(m_view, SIGNAL(statusChanged(RemoteViewStatus)),
- SLOT(changeProgress(RemoteViewStatus)));
- connect(m_view, SIGNAL(showingPasswordDialog(bool)),
- SLOT(showingPasswordDialog(bool)));
- connect(m_keyCaptureDialog, SIGNAL(keyPressed(XEvent*)),
- m_view, SLOT(pressKey(XEvent*)));
+ connect(m_view, TQT_SIGNAL(disconnectedError()), TQT_SIGNAL(disconnectedError()));
+ connect(m_view, TQT_SIGNAL(statusChanged(RemoteViewStatus)),
+ TQT_SLOT(changeProgress(RemoteViewStatus)));
+ connect(m_view, TQT_SIGNAL(showingPasswordDialog(bool)),
+ TQT_SLOT(showingPasswordDialog(bool)));
+ connect(m_keyCaptureDialog, TQT_SIGNAL(keyPressed(XEvent*)),
+ m_view, TQT_SLOT(pressKey(XEvent*)));
ret_status = m_view->start();
@@ -212,15 +212,15 @@ bool KRDC::start()
void KRDC::changeProgress(RemoteViewStatus s) {
if (!m_progressDialog) {
- m_progressDialog = new KProgressDialog(0, 0, QString::null,
+ m_progressDialog = new KProgressDialog(0, 0, TQString::null,
"1234567890", false);
m_progressDialog->showCancelButton(true);
m_progressDialog->setMinimumDuration(0x7fffffff);//disable effectively
m_progress = m_progressDialog->progressBar();
m_progress->setTextEnabled(false);
m_progress->setTotalSteps(3);
- connect(m_progressDialog, SIGNAL(cancelClicked()),
- SIGNAL(disconnectedError()));
+ connect(m_progressDialog, TQT_SIGNAL(cancelClicked()),
+ TQT_SIGNAL(disconnectedError()));
}
if (s == REMOTE_VIEW_CONNECTING) {
@@ -243,10 +243,10 @@ void KRDC::changeProgress(RemoteViewStatus s) {
m_progress->setValue(3);
hideProgressDialog();
if (s == REMOTE_VIEW_CONNECTED) {
- QObject::disconnect(m_view, SIGNAL(disconnectedError()),
- this, SIGNAL(disconnectedError()));
- connect(m_view, SIGNAL(disconnectedError()),
- SIGNAL(disconnected()));
+ TQObject::disconnect(m_view, TQT_SIGNAL(disconnectedError()),
+ this, TQT_SIGNAL(disconnectedError()));
+ connect(m_view, TQT_SIGNAL(disconnectedError()),
+ TQT_SIGNAL(disconnected()));
if (m_view->startFullscreen()) {
// m_view instance is asking to start in fullscreen mode
enableFullscreen(true);
@@ -268,7 +268,7 @@ void KRDC::showingPasswordDialog(bool b) {
void KRDC::showProgressDialog() {
m_showProgress = true;
- QTimer::singleShot(400, this, SLOT(showProgressTimeout()));
+ TQTimer::singleShot(400, this, TQT_SLOT(showProgressTimeout()));
}
void KRDC::hideProgressDialog() {
@@ -293,11 +293,11 @@ void KRDC::quit() {
emit disconnected();
}
-bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &serverPort,
- QString &userName, QString &password) {
- QString s = str;
- userName = QString::null;
- password = QString::null;
+bool KRDC::parseHost(TQString &str, Protocol &prot, TQString &serverHost, int &serverPort,
+ TQString &userName, TQString &password) {
+ TQString s = str;
+ userName = TQString::null;
+ password = TQString::null;
if (prot == PROTOCOL_AUTO) {
if(s.startsWith("smb:/")>0) { //we know it's more likely to be windows..
@@ -340,15 +340,15 @@ bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &ser
if (url.port()) {
if (url.hasUser())
- str = QString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port());
+ str = TQString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port());
else
- str = QString("%1:%2").arg(serverHost).arg(url.port());
+ str = TQString("%1:%2").arg(serverHost).arg(url.port());
}
else {
if (url.hasUser())
- str = QString("%1@%2").arg(userName).arg(serverHost);
+ str = TQString("%1@%2").arg(userName).arg(serverHost);
else
- str = QString("%1").arg(serverHost);
+ str = TQString("%1").arg(serverHost);
}
return true;
}
@@ -373,26 +373,26 @@ void KRDC::enableFullscreen(bool on)
m_view->switchFullscreen(on);
}
-QSize KRDC::sizeHint()
+TQSize KRDC::sizeHint()
{
if ((m_isFullscreen != WINDOW_MODE_FULLSCREEN) && m_toolbar) {
int dockHint = m_dockArea->sizeHint().height();
dockHint = dockHint < 1 ? 1 : dockHint; // fix wrong size hint
- return QSize(m_view->framebufferSize().width(),
+ return TQSize(m_view->framebufferSize().width(),
dockHint + m_view->framebufferSize().height());
}
else
return m_view->framebufferSize();
}
-QPopupMenu *KRDC::createPopupMenu(QWidget *parent) const {
+TQPopupMenu *KRDC::createPopupMenu(TQWidget *parent) const {
KPopupMenu *pu = new KPopupMenu(parent);
- pu->insertItem(i18n("View Only"), this, SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID);
+ pu->insertItem(i18n("View Only"), this, TQT_SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID);
pu->setCheckable(true);
pu->setItemChecked(VIEW_ONLY_ID, m_view->viewOnly());
if (m_view->supportsLocalCursor()) {
pu->insertItem(i18n("Always Show Local Cursor"), this,
- SLOT(showLocalCursorToggled()), 0,
+ TQT_SLOT(showLocalCursorToggled()), 0,
SHOW_LOCAL_CURSOR_ID);
pu->setCheckable(true);
pu->setItemChecked(SHOW_LOCAL_CURSOR_ID,
@@ -407,9 +407,9 @@ void KRDC::switchToFullscreen(bool scaling)
bool fromFullscreen = (m_isFullscreen == WINDOW_MODE_FULLSCREEN);
- QWidget *desktop = QApplication::desktop();
- QSize ds = desktop->size();
- QSize fbs = m_view->framebufferSize();
+ TQWidget *desktop = TQApplication::desktop();
+ TQSize ds = desktop->size();
+ TQSize fbs = m_view->framebufferSize();
bool scalingPossible = m_view->supportsScaling() &&
((fbs.width() >= ds.width()) || (fbs.height() >= ds.height()));
@@ -421,9 +421,9 @@ void KRDC::switchToFullscreen(bool scaling)
fbs.height(),
x, y);
if (m_oldResolution.valid)
- m_fullscreenResolution = QSize(x, y);
+ m_fullscreenResolution = TQSize(x, y);
else
- m_fullscreenResolution = QApplication::desktop()->size();
+ m_fullscreenResolution = TQApplication::desktop()->size();
m_isFullscreen = WINDOW_MODE_FULLSCREEN;
if (!scalingPossible)
m_windowScaling = m_view->scaling();
@@ -449,7 +449,7 @@ void KRDC::switchToFullscreen(bool scaling)
if (m_layout)
delete m_layout;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(m_scrollView);
if (scalingPossible) {
@@ -464,36 +464,36 @@ void KRDC::switchToFullscreen(bool scaling)
m_view->enableScaling(false);
m_fsToolbar = new KFullscreenPanel(this, "fstoolbar", m_fullscreenResolution);
- connect(m_fsToolbar, SIGNAL(mouseEnter()), SLOT(showFullscreenToolbar()));
- connect(m_fsToolbar, SIGNAL(mouseLeave()), SLOT(hideFullscreenToolbarDelayed()));
+ connect(m_fsToolbar, TQT_SIGNAL(mouseEnter()), TQT_SLOT(showFullscreenToolbar()));
+ connect(m_fsToolbar, TQT_SIGNAL(mouseLeave()), TQT_SLOT(hideFullscreenToolbarDelayed()));
KToolBar *t = new KToolBar(m_fsToolbar);
m_fsToolbarWidget = t;
t->setIconSize(KIcon::Panel);
- QIconSet pinIconSet;
- pinIconSet.setPixmap(m_pinup, QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
- pinIconSet.setPixmap(m_pindown, QIconSet::Automatic, QIconSet::Normal, QIconSet::Off);
+ TQIconSet pinIconSet;
+ pinIconSet.setPixmap(m_pinup, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On);
+ pinIconSet.setPixmap(m_pindown, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::Off);
t->insertButton("pinup", FS_AUTOHIDE_ID);
KToolBarButton *pinButton = t->getButton(FS_AUTOHIDE_ID);
pinButton->setIconSet(pinIconSet);
- QToolTip::add(pinButton, i18n("Autohide on/off"));
+ TQToolTip::add(pinButton, i18n("Autohide on/off"));
t->setToggle(FS_AUTOHIDE_ID);
- t->addConnection(FS_AUTOHIDE_ID, SIGNAL(toggled(bool)), this, SLOT(setFsToolbarAutoHide(bool)));
+ t->addConnection(FS_AUTOHIDE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFsToolbarAutoHide(bool)));
t->insertButton("window_nofullscreen", FS_FULLSCREEN_ID);
KToolBarButton *fullscreenButton = t->getButton(FS_FULLSCREEN_ID);
- QToolTip::add(fullscreenButton, i18n("Fullscreen"));
+ TQToolTip::add(fullscreenButton, i18n("Fullscreen"));
t->setToggle(FS_FULLSCREEN_ID);
t->setButton(FS_FULLSCREEN_ID, true);
- t->addConnection(FS_FULLSCREEN_ID, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool)));
+ t->addConnection(FS_FULLSCREEN_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool)));
m_popup = createPopupMenu(t);
t->insertButton("configure", FS_ADVANCED_ID, m_popup, true, i18n("Advanced options"));
KToolBarButton *advancedButton = t->getButton(FS_ADVANCED_ID);
- QToolTip::add(advancedButton, i18n("Advanced options"));
+ TQToolTip::add(advancedButton, i18n("Advanced options"));
- QLabel *hostLabel = new QLabel(t);
+ TQLabel *hostLabel = new TQLabel(t);
hostLabel->setName("kde toolbar widget");
hostLabel->setAlignment(Qt::AlignCenter);
hostLabel->setText(" "+m_host+" ");
@@ -503,21 +503,21 @@ void KRDC::switchToFullscreen(bool scaling)
if (scalingPossible) {
t->insertButton("viewmagfit", FS_SCALE_ID);
KToolBarButton *scaleButton = t->getButton(FS_SCALE_ID);
- QToolTip::add(scaleButton, i18n("Scale view"));
+ TQToolTip::add(scaleButton, i18n("Scale view"));
t->setToggle(FS_SCALE_ID);
t->setButton(FS_SCALE_ID, scaling);
- t->addConnection(FS_SCALE_ID, SIGNAL(toggled(bool)), this, SLOT(switchToFullscreen(bool)));
+ t->addConnection(FS_SCALE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToFullscreen(bool)));
}
t->insertButton("iconify", FS_ICONIFY_ID);
KToolBarButton *iconifyButton = t->getButton(FS_ICONIFY_ID);
- QToolTip::add(iconifyButton, i18n("Minimize"));
- t->addConnection(FS_ICONIFY_ID, SIGNAL(clicked()), this, SLOT(iconify()));
+ TQToolTip::add(iconifyButton, i18n("Minimize"));
+ t->addConnection(FS_ICONIFY_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(iconify()));
t->insertButton("close", FS_CLOSE_ID);
KToolBarButton *closeButton = t->getButton(FS_CLOSE_ID);
- QToolTip::add(closeButton, i18n("Close"));
- t->addConnection(FS_CLOSE_ID, SIGNAL(clicked()), this, SLOT(quit()));
+ TQToolTip::add(closeButton, i18n("Close"));
+ t->addConnection(FS_CLOSE_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(quit()));
m_fsToolbar->setChild(t);
@@ -574,36 +574,36 @@ void KRDC::switchToNormal(bool scaling)
}
if (!m_toolbar) {
- m_dockArea = new QDockArea(Qt::Horizontal, QDockArea::Normal, this);
- m_dockArea->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed));
+ m_dockArea = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this);
+ m_dockArea->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed));
KToolBar *t = new KToolBar(m_dockArea);
m_toolbar = t;
t->setIconText(KToolBar::IconTextRight);
- connect(t, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(toolbarChanged()));
+ connect(t, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(toolbarChanged()));
t->insertButton("window_fullscreen", 0, true, i18n("Fullscreen"));
KToolBarButton *fullscreenButton = t->getButton(0);
- QToolTip::add(fullscreenButton, i18n("Fullscreen"));
- QWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution."));
+ TQToolTip::add(fullscreenButton, i18n("Fullscreen"));
+ TQWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution."));
t->setToggle(0);
t->setButton(0, false);
- t->addConnection(0, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool)));
+ t->addConnection(0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool)));
if (m_view->supportsScaling()) {
t->insertButton("viewmagfit", 1, true, i18n("Scale"));
KToolBarButton *scaleButton = t->getButton(1);
- QToolTip::add(scaleButton, i18n("Scale view"));
- QWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size."));
+ TQToolTip::add(scaleButton, i18n("Scale view"));
+ TQWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size."));
t->setToggle(1);
t->setButton(1, scaling);
- t->addConnection(1, SIGNAL(toggled(bool)), this, SLOT(switchToNormal(bool)));
+ t->addConnection(1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToNormal(bool)));
}
t->insertButton("key_enter", 2, true, i18n("Special Keys"));
KToolBarButton *skButton = t->getButton(2);
- QToolTip::add(skButton, i18n("Enter special keys."));
- QWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host."));
- t->addConnection(2, SIGNAL(clicked()), m_keyCaptureDialog, SLOT(execute()));
+ TQToolTip::add(skButton, i18n("Enter special keys."));
+ TQWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host."));
+ t->addConnection(2, TQT_SIGNAL(clicked()), m_keyCaptureDialog, TQT_SLOT(execute()));
if (m_popup) {
m_popup->deleteLater();
@@ -613,14 +613,14 @@ void KRDC::switchToNormal(bool scaling)
m_popup = createPopupMenu(t);
t->insertButton("configure", 3, m_popup, true, i18n("Advanced"));
KToolBarButton *advancedButton = t->getButton(3);
- QToolTip::add(advancedButton, i18n("Advanced options"));
+ TQToolTip::add(advancedButton, i18n("Advanced options"));
if (m_layout)
delete m_layout;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(m_dockArea);
m_layout->addWidget(m_scrollView);
- m_layout->setGeometry(QRect(0, 0, m_scrollView->width(),
+ m_layout->setGeometry(TQRect(0, 0, m_scrollView->width(),
m_dockArea->height() + m_scrollView->height()));
}
@@ -641,7 +641,7 @@ void KRDC::switchToNormal(bool scaling)
if (!fromFullscreen) {
if (m_initialWindowSize.isValid()) {
resize(m_initialWindowSize);
- m_initialWindowSize = QSize();
+ m_initialWindowSize = TQSize();
}
else if (!scalingChanged)
resize(sizeHint());
@@ -684,18 +684,18 @@ void KRDC::toolbarChanged() {
setMaximumSize(sizeHint());
// resize window when toolbar is docked and it was maximized
- QSize fs = m_view->framebufferSize();
- QSize cs = size();
- QSize cs1(cs.width(), cs.height()-1); // adjusted for QDockArea.height()==1
+ TQSize fs = m_view->framebufferSize();
+ TQSize cs = size();
+ TQSize cs1(cs.width(), cs.height()-1); // adjusted for TQDockArea.height()==1
if ((fs == cs) || (fs == cs1))
resize(sizeHint());
}
-bool KRDC::event(QEvent *e) {
+bool KRDC::event(TQEvent *e) {
/* used to change resolution when fullscreen was minimized */
- if ((!m_fullscreenMinimized) || (e->type() != QEvent::WindowActivate))
- return QWidget::event(e);
+ if ((!m_fullscreenMinimized) || (e->type() != TQEvent::WindowActivate))
+ return TQWidget::event(e);
m_fullscreenMinimized = false;
int x, y;
@@ -705,9 +705,9 @@ bool KRDC::event(QEvent *e) {
m_view->height(),
x, y);
if (m_oldResolution.valid)
- m_fullscreenResolution = QSize(x, y);
+ m_fullscreenResolution = TQSize(x, y);
else
- m_fullscreenResolution = QApplication::desktop()->size();
+ m_fullscreenResolution = TQApplication::desktop()->size();
showFullScreen();
setGeometry(0, 0, m_fullscreenResolution.width(),
@@ -717,17 +717,17 @@ bool KRDC::event(QEvent *e) {
m_view->switchFullscreen( true );
KWin::setState(winId(), NET::StaysOnTop);
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-bool KRDC::eventFilter(QObject *watched, QEvent *e) {
-/* used to get events from QScrollView on resize for scale mode*/
+bool KRDC::eventFilter(TQObject *watched, TQEvent *e) {
+/* used to get events from TQScrollView on resize for scale mode*/
if (watched != m_scrollView)
return false;
- if (e->type() != QEvent::Resize)
+ if (e->type() != TQEvent::Resize)
return false;
- QResizeEvent *re = (QResizeEvent*) e;
+ TQResizeEvent *re = (TQResizeEvent*) e;
m_view->resize(re->size());
return false;
}
@@ -736,7 +736,7 @@ void KRDC::setSize(int w, int h)
{
int dw, dh;
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
dw = desktop->width();
dh = desktop->height();
@@ -763,10 +763,10 @@ void KRDC::repositionView(bool fullscreen) {
if (!m_scrollView)
return;
- QSize s = m_view->size();
+ TQSize s = m_view->size();
if (fullscreen) {
- QSize d = m_fullscreenResolution;
+ TQSize d = m_fullscreenResolution;
bool margin = false;
if (d.width() > s.width())
ox = (d.width() - s.width()) / 2;
@@ -807,10 +807,10 @@ void KRDC::hideFullscreenToolbarNow() {
}
void KRDC::bumpScroll() {
- int x = QCursor::pos().x();
- int y = QCursor::pos().y();
- QSize s = m_view->size();
- QSize d = m_fullscreenResolution;
+ int x = TQCursor::pos().x();
+ int y = TQCursor::pos().y();
+ TQSize s = m_view->size();
+ TQSize d = m_fullscreenResolution;
if (d.width() < s.width()) {
if (x == 0)
@@ -838,7 +838,7 @@ void KRDC::hideFullscreenToolbarDelayed() {
m_autoHideTimer.start(TOOLBAR_AUTOHIDE_TIMEOUT, true);
}
-void KRDC::mouseMoveEvent(QMouseEvent *e) {
+void KRDC::mouseMoveEvent(TQMouseEvent *e) {
if (m_isFullscreen != WINDOW_MODE_FULLSCREEN)
return;
@@ -847,8 +847,8 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) {
/* Bump Scrolling */
- QSize s = m_view->size();
- QSize d = m_fullscreenResolution;
+ TQSize s = m_view->size();
+ TQSize d = m_fullscreenResolution;
if ((d.width() < s.width()) || d.height() < s.height()) {
if ((x == 0) || (x >= d.width()-1) ||
(y == 0) || (y >= d.height()-1))
@@ -874,7 +874,7 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) {
e->accept();
}
-void KRDC::setLastHost(const QString &lastHost) {
+void KRDC::setLastHost(const TQString &lastHost) {
m_lastHost = lastHost;
}
diff --git a/krdc/krdc.h b/krdc/krdc.h
index 5bf9a4bd..a5925540 100644
--- a/krdc/krdc.h
+++ b/krdc/krdc.h
@@ -19,12 +19,12 @@
#define KRDC_H
#include <kprogress.h>
-#include <qscrollview.h>
-#include <qlayout.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qdesktopwidget.h>
+#include <tqscrollview.h>
+#include <tqlayout.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqdesktopwidget.h>
#include "vnc/kvncview.h"
#include "rdp/krdpview.h"
@@ -51,12 +51,12 @@ enum Protocol {
PROTOCOL_RDP
};
-// Overloaded QScrollView, to let mouse move events through to remote widget
-class QScrollView2 : public QScrollView {
+// Overloaded TQScrollView, to let mouse move events through to remote widget
+class QScrollView2 : public TQScrollView {
public:
- QScrollView2(QWidget *w, const char *name);
+ QScrollView2(TQWidget *w, const char *name);
protected:
- virtual void mouseMoveEvent(QMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
};
@@ -65,51 +65,51 @@ class KRDC : public QWidget
Q_OBJECT
private:
SmartPtr<KProgressDialog> m_progressDialog; // dialog, displayed while connecting
- QVBoxLayout *m_layout; // the layout for autosizing the scrollview
- QScrollView *m_scrollView; // scrollview that contains the remote widget
+ TQVBoxLayout *m_layout; // the layout for autosizing the scrollview
+ TQScrollView *m_scrollView; // scrollview that contains the remote widget
KProgress *m_progress; // progress bar for the dialog
KRemoteView *m_view; // the remote widget (e.g. KVncView)
SmartPtr<KeyCaptureDialog> m_keyCaptureDialog; // dialog for key capturing
KFullscreenPanel *m_fsToolbar; // toolbar for fullscreen (0 in normal mode)
- QWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar
+ TQWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar
// (invalid in normal mode)
- QPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button
+ TQPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button
KToolBar *m_toolbar; // toolbar in normal mode (0 in fs mode)
- QDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode)
- QPopupMenu *m_popup; // advanced options popup (0 in fs mode)
- QDesktopWidget m_desktopWidget;
+ TQDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode)
+ TQPopupMenu *m_popup; // advanced options popup (0 in fs mode)
+ TQDesktopWidget m_desktopWidget;
static const int TOOLBAR_AUTOHIDE_TIMEOUT;
bool m_ftAutoHide; // if true auto hide in fs is activated
- QTimer m_autoHideTimer; // timer for autohide
+ TQTimer m_autoHideTimer; // timer for autohide
- QTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large)
+ TQTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large)
bool m_showProgress; // can disable showing the progress dialog temporary
- QString m_host; // host string as given from user
+ TQString m_host; // host string as given from user
Protocol m_protocol; // the used protocol
Quality m_quality; // current quality setting
- QString m_encodings; // string containing the encodings, space separated,
+ TQString m_encodings; // string containing the encodings, space separated,
// used for config before connection
- QString m_password; // if not null, contains the password to use
- QString m_resolution;// contains an alternative resolution
- QString m_keymap; // keymap on the terminal server
+ TQString m_password; // if not null, contains the password to use
+ TQString m_resolution;// contains an alternative resolution
+ TQString m_keymap; // keymap on the terminal server
WindowMode m_isFullscreen; // fs/normal state
Resolution m_oldResolution; // conatins encoded res before fs
bool m_fullscreenMinimized; // true if window is currently minimized from fs
- QSize m_fullscreenResolution; // xvidmode size (valid only in fs)
+ TQSize m_fullscreenResolution; // xvidmode size (valid only in fs)
bool m_windowScaling; // used in startup and fullscreen to determine
// whether scaling should be enabled in norm mode.
// The current state is m_view->scaled().
bool m_localCursor; // show local cursor no matter what
- QSize m_initialWindowSize; // initial window size (windowed mode only),
+ TQSize m_initialWindowSize; // initial window size (windowed mode only),
// invalid after first use
- static QString m_lastHost; // remembers last value of host input
+ static TQString m_lastHost; // remembers last value of host input
- bool parseHost(QString &s, Protocol &prot, QString &serverHost, int &serverPort,
- QString &userName, QString &password);
+ bool parseHost(TQString &s, Protocol &prot, TQString &serverHost, int &serverPort,
+ TQString &userName, TQString &password);
void repositionView(bool fullscreen);
@@ -120,28 +120,28 @@ private:
static const int TOOLBAR_SPEED_DOWN;
static const int TOOLBAR_SPEED_UP;
void fsToolbarScheduleHidden();
- QPopupMenu *createPopupMenu(QWidget *parent) const;
+ TQPopupMenu *createPopupMenu(TQWidget *parent) const;
protected:
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual bool event(QEvent *e);
- virtual bool eventFilter(QObject *watched, QEvent *e);
- virtual QSize sizeHint();
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual bool event(TQEvent *e);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
+ virtual TQSize sizeHint();
public:
KRDC(WindowMode wm = WINDOW_MODE_AUTO,
- const QString &host = QString::null,
+ const TQString &host = TQString::null,
Quality q = QUALITY_UNKNOWN,
- const QString &encodings = QString::null,
- const QString &password = QString::null,
+ const TQString &encodings = TQString::null,
+ const TQString &password = TQString::null,
bool scale = false,
bool localCursor = false,
- QSize initialWindowSize = QSize());
+ TQSize initialWindowSize = TQSize());
~KRDC();
bool start();
- static void setLastHost(const QString &host);
+ static void setLastHost(const TQString &host);
private slots:
void changeProgress(RemoteViewStatus s);
diff --git a/krdc/kremoteview.cpp b/krdc/kremoteview.cpp
index fab9ed29..76ae6267 100644
--- a/krdc/kremoteview.cpp
+++ b/krdc/kremoteview.cpp
@@ -17,10 +17,10 @@
#include "kremoteview.h"
-KRemoteView::KRemoteView(QWidget *parent,
+KRemoteView::KRemoteView(TQWidget *parent,
const char *name,
WFlags f) :
- QWidget(parent, name, f),
+ TQWidget(parent, name, f),
m_status(REMOTE_VIEW_DISCONNECTED) {
}
diff --git a/krdc/kremoteview.h b/krdc/kremoteview.h
index a3dbe438..09b312c0 100644
--- a/krdc/kremoteview.h
+++ b/krdc/kremoteview.h
@@ -19,7 +19,7 @@
#define KREMOTEVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kkeynative.h>
#include "events.h"
@@ -55,7 +55,7 @@ enum DotCursorState {
* maximum size to the remote size and minimum size to the
* smallest resolution that your scaler can handle.
* @li if you override mouseMoveEvent()
- * you must ignore the QEvent, because the KRDC widget will
+ * you must ignore the TQEvent, because the KRDC widget will
* need it for stuff like toolbar auto-hide and bump
* scrolling. If you use x11Event(), make sure that
* MotionNotify events will be forwarded.
@@ -65,7 +65,7 @@ class KRemoteView : public QWidget
{
Q_OBJECT
public:
- KRemoteView(QWidget *parent = 0,
+ KRemoteView(TQWidget *parent = 0,
const char *name = 0,
WFlags f = 0);
@@ -130,7 +130,7 @@ public:
/**
* Returns the resolution of the remote framebuffer.
- * It should return a null @ref QSize when the size
+ * It should return a null @ref TQSize when the size
* is not known.
* The backend must also emit a @ref changeSize()
* when the size of the framebuffer becomes available
@@ -138,7 +138,7 @@ public:
* @return the remote framebuffer size, a null QSize
* if unknown
*/
- virtual QSize framebufferSize() = 0;
+ virtual TQSize framebufferSize() = 0;
/**
* Initiate the disconnection. This doesn't need to happen
@@ -159,7 +159,7 @@ public:
* Returns the host the view is connected to.
* @return the host the view is connected to
*/
- virtual QString host() = 0;
+ virtual TQString host() = 0;
/**
* Returns the port the view is connected to.
diff --git a/krdc/kservicelocator.cpp b/krdc/kservicelocator.cpp
index df97016d..3b38ed9a 100644
--- a/krdc/kservicelocator.cpp
+++ b/krdc/kservicelocator.cpp
@@ -24,17 +24,17 @@
#include "kservicelocator.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqapplication.h>
#ifdef HAVE_SLP
#include <slp.h>
-#include <qevent.h>
-#include <qthread.h>
+#include <tqevent.h>
+#include <tqthread.h>
#endif
-const QString KServiceLocator::DEFAULT_AUTHORITY = "";
-const QString KServiceLocator::ALL_AUTHORITIES = QString::null;
+const TQString KServiceLocator::DEFAULT_AUTHORITY = "";
+const TQString KServiceLocator::ALL_AUTHORITIES = TQString::null;
class AsyncThread;
@@ -43,20 +43,20 @@ public:
KServiceLocator *m_ksl;
bool m_opened;
volatile bool m_abort;
- QString m_lang;
+ TQString m_lang;
bool m_async;
bool ensureOpen();
KServiceLocatorPrivate(KServiceLocator *ksl,
- const QString &lang,
+ const TQString &lang,
bool async);
~KServiceLocatorPrivate();
#ifdef HAVE_SLP
SLPHandle m_handle;
AsyncThread *m_thread;
- QString m_operationServiceUrl; // for findAttributes()/foundAttributes()
+ TQString m_operationServiceUrl; // for findAttributes()/foundAttributes()
friend class FindSrvTypesThread;
friend class FindSrvsThread;
@@ -107,14 +107,14 @@ public:
#endif
};
-KServiceLocator::KServiceLocator(const QString &lang, bool async) :
- QObject(0, "KServiceLocator") {
+KServiceLocator::KServiceLocator(const TQString &lang, bool async) :
+ TQObject(0, "KServiceLocator") {
d = new KServiceLocatorPrivate(this, lang, async);
}
KServiceLocatorPrivate::KServiceLocatorPrivate(KServiceLocator *ksl,
- const QString &lang,
+ const TQString &lang,
bool async) :
m_ksl(ksl),
m_opened(false),
@@ -146,7 +146,7 @@ private:
bool m_success;
public:
LastSignalEvent(int type, bool s) :
- QCustomEvent(type),
+ TQCustomEvent(type),
m_success(s)
{};
int success() const { return m_success; };
@@ -156,28 +156,28 @@ const int FoundServiceTypesEventType = 45012;
class FoundServiceTypesEvent : public QCustomEvent
{
private:
- QString m_srvtypes;
+ TQString m_srvtypes;
public:
FoundServiceTypesEvent(const char *srvtypes) :
- QCustomEvent(FoundServiceTypesEventType),
+ TQCustomEvent(FoundServiceTypesEventType),
m_srvtypes(srvtypes)
{};
- QString srvtypes() const { return m_srvtypes; };
+ TQString srvtypes() const { return m_srvtypes; };
};
const int FoundServiceEventType = 45013;
class FoundServiceEvent : public QCustomEvent
{
private:
- QString m_srvUrl;
+ TQString m_srvUrl;
unsigned short m_lifetime;
public:
FoundServiceEvent(const char *srvUrl, unsigned short lifetime) :
- QCustomEvent(FoundServiceEventType),
+ TQCustomEvent(FoundServiceEventType),
m_srvUrl(srvUrl),
m_lifetime(lifetime)
{};
- QString srvUrl() const { return m_srvUrl; };
+ TQString srvUrl() const { return m_srvUrl; };
unsigned short lifetime() const { return m_lifetime; };
};
@@ -185,26 +185,26 @@ const int FoundAttributesEventType = 45014;
class FoundAttributesEvent : public QCustomEvent
{
private:
- QString m_attributes;
+ TQString m_attributes;
public:
FoundAttributesEvent(const char *attributes) :
- QCustomEvent(FoundAttributesEventType),
+ TQCustomEvent(FoundAttributesEventType),
m_attributes(attributes)
{};
- QString attributes() const { return m_attributes; };
+ TQString attributes() const { return m_attributes; };
};
const int FoundScopesEventType = 45015;
class FoundScopesEvent : public QCustomEvent
{
private:
- QString m_scopes;
+ TQString m_scopes;
public:
FoundScopesEvent(const char *scopes) :
- QCustomEvent(FoundScopesEventType),
+ TQCustomEvent(FoundScopesEventType),
m_scopes(scopes)
{};
- QString scopes() const { return m_scopes; };
+ TQString scopes() const { return m_scopes; };
};
@@ -226,13 +226,13 @@ SLPBoolean srvTypeCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType,
+ TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes));
+ TQApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes));
return SLP_TRUE;
}
@@ -251,13 +251,13 @@ SLPBoolean srvUrlCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType,
+ TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new FoundServiceEvent(srvurl, lifetime));
return SLP_TRUE;
}
@@ -275,14 +275,14 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new LastSignalEvent(LastAttributesSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new FoundAttributesEvent(attrlist));
return SLP_TRUE;
}
@@ -293,7 +293,7 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle,
/* Threads for async events */
/* ****** *** ****** *** ****** */
-class AsyncThread : public QThread {
+class AsyncThread : public TQThread {
protected:
SLPHandle m_handle;
KServiceLocatorPrivate *m_parent;
@@ -303,7 +303,7 @@ protected:
}
};
class FindSrvTypesThread : public AsyncThread {
- QString m_namingAuthority, m_scopeList;
+ TQString m_namingAuthority, m_scopeList;
public:
FindSrvTypesThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -321,13 +321,13 @@ public:
srvTypeCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastServiceTypeSignalEventType,
false));
}
};
class FindSrvsThread : public AsyncThread {
- QString m_srvUrl, m_scopeList, m_filter;
+ TQString m_srvUrl, m_scopeList, m_filter;
public:
FindSrvsThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -349,13 +349,13 @@ public:
srvUrlCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastServiceSignalEventType,
false));
}
};
class FindAttrsThread : public AsyncThread {
- QString m_srvUrl, m_scopeList, m_attrIds;
+ TQString m_srvUrl, m_scopeList, m_attrIds;
public:
FindAttrsThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -376,7 +376,7 @@ public:
srvAttrCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastAttributesSignalEventType,
false));
}
@@ -393,14 +393,14 @@ public:
e = SLPFindScopes(m_handle, &_scopelist);
if (e != SLP_OK) {
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new FoundScopesEvent(""));
return;
}
- QString scopeList(_scopelist);
+ TQString scopeList(_scopelist);
SLPFree(_scopelist);
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new FoundScopesEvent(scopeList.latin1()));
}
};
@@ -442,8 +442,8 @@ bool KServiceLocatorPrivate::ensureOpen() {
return true;
}
-bool KServiceLocator::findServiceTypes(const QString &namingAuthority,
- const QString &scopeList) {
+bool KServiceLocator::findServiceTypes(const TQString &namingAuthority,
+ const TQString &scopeList) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -469,9 +469,9 @@ bool KServiceLocator::findServiceTypes(const QString &namingAuthority,
}
}
-bool KServiceLocator::findServices(const QString &srvtype,
- const QString &filter,
- const QString &scopeList) {
+bool KServiceLocator::findServices(const TQString &srvtype,
+ const TQString &filter,
+ const TQString &scopeList) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -499,8 +499,8 @@ bool KServiceLocator::findServices(const QString &srvtype,
}
}
-bool KServiceLocator::findAttributes(const QString &serviceUrl,
- const QString &attributeIds) {
+bool KServiceLocator::findAttributes(const TQString &serviceUrl,
+ const TQString &attributeIds) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -544,7 +544,7 @@ bool KServiceLocator::findScopes() {
else {
SLPError e;
char *_scopelist;
- QStringList scopeList;
+ TQStringList scopeList;
e = SLPFindScopes(d->m_handle, &_scopelist);
if (e != SLP_OK)
return false;
@@ -593,7 +593,7 @@ SLPBoolean KServiceLocatorPrivate::handleAttrCallback(const char* attrlist,
}
-void KServiceLocator::customEvent(QCustomEvent *e) {
+void KServiceLocator::customEvent(TQCustomEvent *e) {
if ((e->type() >= MinLastSignalEventType) &&
(e->type() <= MaxLastSignalEventType)){
bool s = true;
@@ -633,13 +633,13 @@ void KServiceLocator::customEvent(QCustomEvent *e) {
}
}
-QString KServiceLocator::decodeAttributeValue(const QString &value) {
+TQString KServiceLocator::decodeAttributeValue(const TQString &value) {
char *n;
if (value.isNull())
return value;
if (SLPUnescape(value.latin1(), &n, SLP_TRUE) != SLP_OK)
- return QString::null;
- QString r(n);
+ return TQString::null;
+ TQString r(n);
SLPFree(n);
return r;
}
@@ -654,21 +654,21 @@ bool KServiceLocator::available() {
}
void KServiceLocator::abortOperation() {
}
-bool KServiceLocator::findServiceTypes(const QString &,const QString &) {
+bool KServiceLocator::findServiceTypes(const TQString &,const TQString &) {
return false;
}
-bool KServiceLocator::findServices(const QString &,const QString &,const QString &) {
+bool KServiceLocator::findServices(const TQString &,const TQString &,const TQString &) {
return false;
}
-bool KServiceLocator::findAttributes(const QString &,const QString &) {
+bool KServiceLocator::findAttributes(const TQString &,const TQString &) {
return false;
}
bool KServiceLocator::findScopes() {
return false;
}
-void KServiceLocator::customEvent(QCustomEvent *) {
+void KServiceLocator::customEvent(TQCustomEvent *) {
}
-QString KServiceLocator::decodeAttributeValue(const QString &value) {
+TQString KServiceLocator::decodeAttributeValue(const TQString &value) {
return value;
}
@@ -677,18 +677,18 @@ QString KServiceLocator::decodeAttributeValue(const QString &value) {
/*** Private emit-helpers ***/
-void KServiceLocator::emitFoundServiceTypes(QString serviceTypes) {
+void KServiceLocator::emitFoundServiceTypes(TQString serviceTypes) {
emit foundServiceTypes(serviceTypes);
}
-void KServiceLocator::emitFoundService(QString serviceUrl,
+void KServiceLocator::emitFoundService(TQString serviceUrl,
int lifetime) {
emit foundService(serviceUrl, lifetime);
}
-void KServiceLocator::emitFoundAttributes(QString serviceUrl,
- QString attributes) {
+void KServiceLocator::emitFoundAttributes(TQString serviceUrl,
+ TQString attributes) {
emit foundAttributes(serviceUrl, attributes);
}
-void KServiceLocator::emitFoundScopes(QStringList scopeList) {
+void KServiceLocator::emitFoundScopes(TQStringList scopeList) {
emit foundScopes(scopeList);
}
void KServiceLocator::emitLastServiceTypeSignal(bool success) {
@@ -705,9 +705,9 @@ void KServiceLocator::emitLastAttributesSignal(bool success) {
/*** Static helpers ***/
-void KServiceLocator::parseAttributeList(const QString &attributes,
- QMap<QString,QString> &attributeMap) {
- QRegExp r("\\((.*)=(.*)\\)");
+void KServiceLocator::parseAttributeList(const TQString &attributes,
+ TQMap<TQString,TQString> &attributeMap) {
+ TQRegExp r("\\((.*)=(.*)\\)");
r.setMinimal(true);
int pos = 0;
while (pos >= 0) {
@@ -719,16 +719,16 @@ void KServiceLocator::parseAttributeList(const QString &attributes,
}
}
-QStringList KServiceLocator::parseCommaList(const QString &list) {
- return QStringList::split(QChar(','), list);
+TQStringList KServiceLocator::parseCommaList(const TQString &list) {
+ return TQStringList::split(TQChar(','), list);
}
-QString KServiceLocator::createCommaList(const QStringList &values) {
+TQString KServiceLocator::createCommaList(const TQStringList &values) {
return values.join(",");
}
-QString KServiceLocator::escapeFilter(const QString &str) {
- QString f;
+TQString KServiceLocator::escapeFilter(const TQString &str) {
+ TQString f;
int s = str.length();
for (int i = 0; i < s; i++) {
char c = str[i];
diff --git a/krdc/kservicelocator.h b/krdc/kservicelocator.h
index db247177..c9439279 100644
--- a/krdc/kservicelocator.h
+++ b/krdc/kservicelocator.h
@@ -21,9 +21,9 @@
#ifndef __KSERVICELOCATOR_H
#define __KSERVICELOCATOR_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
class KServiceLocatorPrivate;
@@ -39,7 +39,7 @@ class KServiceLocatorPrivate;
* @version $Id$
* @author Tim Jansen, tim@tjansen.de
*/
-class KServiceLocator : public QObject {
+class KServiceLocator : public TQObject {
Q_OBJECT
private:
friend class KServiceLocatorPrivate;
@@ -48,12 +48,12 @@ class KServiceLocator : public QObject {
public:
/**
* Creates a new KServiceLocator.
- * @param lang the language to search in, or QString::null for the
+ * @param lang the language to search in, or TQString::null for the
* default language
* @param async true to create the service locator in asynchronous
* mode, false otherwise
*/
- KServiceLocator(const QString &lang = QString::null,
+ KServiceLocator(const TQString &lang = TQString::null,
bool async = true);
virtual ~KServiceLocator();
@@ -69,8 +69,8 @@ class KServiceLocator : public QObject {
* @param attributes a list of encoded attributes
* @param attributeMap the attributes will be added to this map
*/
- static void parseAttributeList(const QString &attributes,
- QMap<QString,QString> &attributeMap);
+ static void parseAttributeList(const TQString &attributes,
+ TQMap<TQString,TQString> &attributeMap);
/**
* Decodes the value of an attribute (removes the escape codes). This
@@ -78,24 +78,24 @@ class KServiceLocator : public QObject {
* This function requires the presence of the SLP library, otherwise it
* will return the original value.
* @param value the attribute value to decode
- * @return the decoded value. If @p value was QString::null or decoding
- * failed, QString::null will be returned
+ * @return the decoded value. If @p value was TQString::null or decoding
+ * failed, TQString::null will be returned
*/
- static QString decodeAttributeValue(const QString &value);
+ static TQString decodeAttributeValue(const TQString &value);
/**
* Parses a comma-separated string of lists, as returned by many signals.
* @param list the comma-separated list
* @return the items as a QStringList
*/
- static QStringList parseCommaList(const QString &list);
+ static TQStringList parseCommaList(const TQString &list);
/**
* Creates a comma-separated string of lists, as required by many functions.
* @param map the items of this list will be converted
* @return the comma-separated list
*/
- static QString createCommaList(const QStringList &values);
+ static TQString createCommaList(const TQStringList &values);
/**
* Escapes a string for use as part of a filter, as described in
@@ -107,7 +107,7 @@ class KServiceLocator : public QObject {
* @param str the string to escape
* @return the escaped string
*/
- static QString escapeFilter(const QString &str);
+ static TQString escapeFilter(const TQString &str);
/**
* Returns true if service location is generally possible.
@@ -120,13 +120,13 @@ class KServiceLocator : public QObject {
* Use this constant for findServiceTypes()'s namingAuthority argument
* to get only services from the default (IANA) naming authority.
*/
- static const QString DEFAULT_AUTHORITY;
+ static const TQString DEFAULT_AUTHORITY;
/**
* Use this constant for findServiceTypes()'s namingAuthority argument
* to get all services,
*/
- static const QString ALL_AUTHORITIES;
+ static const TQString ALL_AUTHORITIES;
/**
* Finds all service types in the given scope with the given naming
@@ -146,12 +146,12 @@ class KServiceLocator : public QObject {
* argument has been omitted all service types
* will be returned.
* @param scopelist a comma-separated list of all scopes that will
- * be searched, or QString:null to search in all
+ * be searched, or TQString:null to search in all
* scopes
* @return true if the operation was successful
*/
- bool findServiceTypes(const QString &namingAuthority = QString::null,
- const QString &scopelist = QString::null);
+ bool findServiceTypes(const TQString &namingAuthority = TQString::null,
+ const TQString &scopelist = TQString::null);
/**
* Finds all services in the given scope with the given service type.
@@ -173,13 +173,13 @@ class KServiceLocator : public QObject {
* @param filter a filter in LDAP Search Filter syntax, as described
* in RFC 2254.
* @param scopelist a comma-separated list of all scopes that will
- * be searched, or QString:null to search in all
+ * be searched, or TQString:null to search in all
* scopes
* @return true if the operation was successful
*/
- bool findServices(const QString &srvtype,
- const QString &filter = QString::null,
- const QString &scopelist = QString::null);
+ bool findServices(const TQString &srvtype,
+ const TQString &filter = TQString::null,
+ const TQString &scopelist = TQString::null);
/**
* Finds the attributes of the service with the given URL.
@@ -193,12 +193,12 @@ class KServiceLocator : public QObject {
*
* @param serviceURL the URL of the service to search
* @param attributeIds a comma-separated list of attributes to
- * retrieve, or QString::null to retrieve all
+ * retrieve, or TQString::null to retrieve all
* attributes
* @return true if the operation was successful
*/
- bool findAttributes(const QString &serviceUrl,
- const QString &attributeIds = QString::null);
+ bool findAttributes(const TQString &serviceUrl,
+ const TQString &attributeIds = TQString::null);
/**
* Finds all scopes that can be searched. Always finds at least
@@ -229,7 +229,7 @@ class KServiceLocator : public QObject {
* types have been discovered.
* @param serviceTypes a comma-separated list of service types
*/
- void foundServiceTypes(QString serviceTypes);
+ void foundServiceTypes(TQString serviceTypes);
/**
* Called by findServices() each time a service has been
@@ -237,7 +237,7 @@ class KServiceLocator : public QObject {
* @param serviceUrl the service url
* @param lifetime the lifetime of the service in seconds
*/
- void foundService(QString serviceUrl,
+ void foundService(TQString serviceUrl,
int lifetime);
/**
@@ -247,15 +247,15 @@ class KServiceLocator : public QObject {
* @param attributes an attribute map (see parseAttributeList() and
* decodeAttributeValue())
*/
- void foundAttributes(QString serviceUrl,
- QString attributes);
+ void foundAttributes(TQString serviceUrl,
+ TQString attributes);
/**
* Called by findScopes() when the scopes have been discovered.
* @param scopeList a list of valid scopes, empty if an error
* occurred
*/
- void foundScopes(QStringList scopeList);
+ void foundScopes(TQStringList scopeList);
/**
@@ -292,15 +292,15 @@ class KServiceLocator : public QObject {
void lastAttributesSignal(bool success);
protected:
- virtual void customEvent(QCustomEvent *);
+ virtual void customEvent(TQCustomEvent *);
private:
- void emitFoundServiceTypes(QString serviceTypes);
- void emitFoundService(QString serviceUrl,
+ void emitFoundServiceTypes(TQString serviceTypes);
+ void emitFoundService(TQString serviceUrl,
int lifetime);
- void emitFoundAttributes(QString serviceUrl,
- QString attributes);
- void emitFoundScopes(QStringList scopeList);
+ void emitFoundAttributes(TQString serviceUrl,
+ TQString attributes);
+ void emitFoundScopes(TQStringList scopeList);
void emitLastServiceTypeSignal(bool success);
void emitLastServiceSignal(bool success);
void emitLastAttributesSignal(bool success);
diff --git a/krdc/main.cpp b/krdc/main.cpp
index 5c2423bd..034643b4 100644
--- a/krdc/main.cpp
+++ b/krdc/main.cpp
@@ -24,11 +24,11 @@
#include <kconfig.h>
#include <kdebug.h>
#include <kwallet.h>
-#include <qwindowdefs.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqwindowdefs.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../config.h"
#include "main.h"
@@ -97,16 +97,16 @@ int main(int argc, char *argv[])
KApplication a;
- QString host = QString::null;
+ TQString host = TQString::null;
Quality quality = QUALITY_UNKNOWN;
- QString encodings = QString::null;
- QString password = QString::null;
- QString resolution = QString::null;
- QString keymap = QString::null;
+ TQString encodings = TQString::null;
+ TQString password = TQString::null;
+ TQString resolution = TQString::null;
+ TQString keymap = TQString::null;
WindowMode wm = WINDOW_MODE_AUTO;
bool scale = false;
bool localCursor = kapp->config()->readBoolEntry("alwaysShowLocalCursor", false);
- QSize initialWindowSize;
+ TQSize initialWindowSize;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -132,25 +132,25 @@ int main(int argc, char *argv[])
encodings = args->getOption("encodings");
if (args->isSet("password-file")) {
- QString passwordFile = args->getOption("password-file");
- QFile f(passwordFile);
+ TQString passwordFile = args->getOption("password-file");
+ TQFile f(passwordFile);
if (!f.open(IO_ReadOnly)) {
KMessageBox::error(0, i18n("The password file '%1' does not exist.").arg(passwordFile));
return 1;
}
- password = QTextStream(&f).readLine();
+ password = TQTextStream(&f).readLine();
f.close();
}
if (args->count() > 0)
host = args->arg(0);
- QString is = a.geometryArgument();
+ TQString is = a.geometryArgument();
if (!is.isNull()) {
- QRegExp re("([0-9]+)[xX]([0-9]+)");
+ TQRegExp re("([0-9]+)[xX]([0-9]+)");
if (!re.exactMatch(is))
args->usage(i18n("Wrong geometry format, must be widthXheight"));
- initialWindowSize = QSize(re.cap(1).toInt(), re.cap(2).toInt());
+ initialWindowSize = TQSize(re.cap(1).toInt(), re.cap(2).toInt());
}
MainController mc(&a, wm, host, quality, encodings, password,
@@ -159,13 +159,13 @@ int main(int argc, char *argv[])
}
MainController::MainController(KApplication *app, WindowMode wm,
- const QString &host,
+ const TQString &host,
Quality quality,
- const QString &encodings,
- const QString &password,
+ const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize) :
+ TQSize initialWindowSize) :
m_windowMode(wm),
m_host(host),
m_encodings(encodings),
@@ -192,7 +192,7 @@ int MainController::main() {
}
void MainController::errorRestartRequested() {
- QTimer::singleShot(0, this, SLOT(errorRestart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(errorRestart()));
}
bool MainController::start() {
@@ -201,10 +201,10 @@ bool MainController::start() {
m_scale, m_localCursor, m_initialWindowSize);
m_app->setMainWidget(m_krdc);
- QObject::connect(m_krdc, SIGNAL(disconnected()),
- m_app, SLOT(quit()));
- connect(m_krdc, SIGNAL(disconnectedError()),
- SLOT(errorRestartRequested()));
+ TQObject::connect(m_krdc, TQT_SIGNAL(disconnected()),
+ m_app, TQT_SLOT(quit()));
+ connect(m_krdc, TQT_SIGNAL(disconnectedError()),
+ TQT_SLOT(errorRestartRequested()));
return m_krdc->start();
}
@@ -212,7 +212,7 @@ bool MainController::start() {
void MainController::errorRestart() {
if (!m_host.isEmpty())
KRDC::setLastHost(m_host);
- m_host = QString::null; // only auto-connect once
+ m_host = TQString::null; // only auto-connect once
// unset KRDC as main widget, to avoid quit on delete
m_app->setMainWidget(0);
diff --git a/krdc/main.h b/krdc/main.h
index d95f079e..6f6e68ba 100644
--- a/krdc/main.h
+++ b/krdc/main.h
@@ -18,36 +18,36 @@
#ifndef MAIN_H
#define MAIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include "krdc.h"
#include "kremoteview.h"
#include "smartptr.h"
class KApplication;
-class MainController : public QObject {
+class MainController : public TQObject {
Q_OBJECT
private:
SmartPtr<KRDC> m_krdc;
WindowMode m_windowMode;
- QString m_host, m_encodings, m_password, m_resolution;
+ TQString m_host, m_encodings, m_password, m_resolution;
bool m_scale;
bool m_localCursor;
- QSize m_initialWindowSize;
- QString m_keymap;
+ TQSize m_initialWindowSize;
+ TQString m_keymap;
Quality m_quality;
KApplication *m_app;
public:
MainController(KApplication *app, WindowMode wm,
- const QString &host,
+ const TQString &host,
Quality quality,
- const QString &encodings,
- const QString &password,
+ const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize);
+ TQSize initialWindowSize);
~MainController();
int main();
bool start();
diff --git a/krdc/maindialog.cpp b/krdc/maindialog.cpp
index c44bf235..c6d559a5 100644
--- a/krdc/maindialog.cpp
+++ b/krdc/maindialog.cpp
@@ -25,7 +25,7 @@
#include <kguiitem.h>
#include <klocale.h>
-MainDialog::MainDialog( QWidget *parent, const char *name )
+MainDialog::MainDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Remote Desktop Connection" ),
Ok|Close|Help|User1, Ok, true, KGuiItem( i18n( "&Preferences" ),
"configure" ) )
@@ -36,16 +36,16 @@ MainDialog::MainDialog( QWidget *parent, const char *name )
setButtonText( Ok, i18n( "Connect" ) );
enableButtonOK( false );
- connect( m_dialogWidget, SIGNAL( hostValid( bool ) ),
- SLOT( enableButtonOK( bool ) ) );
+ connect( m_dialogWidget, TQT_SIGNAL( hostValid( bool ) ),
+ TQT_SLOT( enableButtonOK( bool ) ) );
}
-void MainDialog::setRemoteHost( const QString &host )
+void MainDialog::setRemoteHost( const TQString &host )
{
m_dialogWidget->setRemoteHost( host );
}
-QString MainDialog::remoteHost()
+TQString MainDialog::remoteHost()
{
return m_dialogWidget->remoteHost();
}
diff --git a/krdc/maindialog.h b/krdc/maindialog.h
index a9a0dd70..79a3c932 100644
--- a/krdc/maindialog.h
+++ b/krdc/maindialog.h
@@ -28,11 +28,11 @@ class MainDialog : public KDialogBase
{
Q_OBJECT
public:
- MainDialog( QWidget *parent, const char *name=0 );
+ MainDialog( TQWidget *parent, const char *name=0 );
~MainDialog() {}
- void setRemoteHost( const QString & );
- QString remoteHost();
+ void setRemoteHost( const TQString & );
+ TQString remoteHost();
protected slots:
virtual void slotOk();
diff --git a/krdc/maindialogwidget.cpp b/krdc/maindialogwidget.cpp
index 076fc2f6..09b0de52 100644
--- a/krdc/maindialogwidget.cpp
+++ b/krdc/maindialogwidget.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -32,15 +32,15 @@
#include "hostpreferences.h"
#include "maindialogwidget.h"
-static const QString DEFAULT_SCOPE = "default";
+static const TQString DEFAULT_SCOPE = "default";
class UrlListViewItem : public KListViewItem
{
public:
- UrlListViewItem( QListView *v, const QString &url, const QString &host,
- const QString &protocol, const QString &type, const QString &userid,
- const QString &fullname, const QString &desc,
- const QString &serviceid )
+ UrlListViewItem( TQListView *v, const TQString &url, const TQString &host,
+ const TQString &protocol, const TQString &type, const TQString &userid,
+ const TQString &fullname, const TQString &desc,
+ const TQString &serviceid )
: KListViewItem( v, host, i18n( "unknown" ), host, protocol ),
m_url( url ), m_serviceid( serviceid )
{
@@ -56,33 +56,33 @@ class UrlListViewItem : public KListViewItem
if ( !desc.isNull() )
setText( 0, desc );
if ( ( !userid.isEmpty() ) && ( !fullname.isEmpty() ) )
- setText( 0, QString( "%1 (%2)" ).arg( fullname ).arg( userid ) );
+ setText( 0, TQString( "%1 (%2)" ).arg( fullname ).arg( userid ) );
else if ( !userid.isNull() )
setText( 0, userid );
else if ( !fullname.isNull() )
setText( 0, fullname );
}
- QString url()
+ TQString url()
{
return m_url;
}
- const QString& serviceid() const
+ const TQString& serviceid() const
{
return m_serviceid;
}
protected:
- QString m_url;
- QString m_serviceid;
+ TQString m_url;
+ TQString m_serviceid;
};
-MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name )
+MainDialogWidget::MainDialogWidget( TQWidget *parent, const char *name )
: MainDialogBase( parent, name ),
m_scanning( false )
{
HostPreferences *hp = HostPreferences::instance();
- QStringList list;
+ TQStringList list;
list = hp->serverCompletions();
m_serverInput->completionObject()->setItems( list );
@@ -92,26 +92,26 @@ MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name )
m_searchInput->setTrapReturnKey( true );
connect( m_browsingView,
- SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( itemSelected( QListViewItem * ) ) );
+ TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( itemSelected( TQListViewItem * ) ) );
connect( m_browsingView,
- SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( itemDoubleClicked( QListViewItem * ) ) );
+ TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) );
connect( m_scopeCombo,
- SIGNAL( activated( const QString & ) ),
- SLOT( scopeSelected( const QString & ) ) );
+ TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( scopeSelected( const TQString & ) ) );
connect( m_serverInput,
- SIGNAL( returnPressed( const QString & ) ),
- SLOT( rescan() ) );
+ TQT_SIGNAL( returnPressed( const TQString & ) ),
+ TQT_SLOT( rescan() ) );
bool showBrowse = hp->showBrowsingPanel();
enableBrowsingArea( showBrowse );
- m_locator_dnssd = new DNSSD::ServiceBrowser(QStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve);
- connect(m_locator_dnssd,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
- SLOT(addedService(DNSSD::RemoteService::Ptr)));
- connect(m_locator_dnssd,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
- SLOT(removedService(DNSSD::RemoteService::Ptr)));
+ m_locator_dnssd = new DNSSD::ServiceBrowser(TQStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve);
+ connect(m_locator_dnssd,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(addedService(DNSSD::RemoteService::Ptr)));
+ connect(m_locator_dnssd,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(removedService(DNSSD::RemoteService::Ptr)));
m_locator_dnssd->startBrowse();
adjustSize();
@@ -125,7 +125,7 @@ MainDialogWidget::~MainDialogWidget()
void MainDialogWidget::save()
{
HostPreferences *hp = HostPreferences::instance();
- QStringList list;
+ TQStringList list;
m_serverInput->addToHistory( m_serverInput->currentText() );
list = m_serverInput->completionObject()->items();
@@ -136,21 +136,21 @@ void MainDialogWidget::save()
hp->setShowBrowsingPanel( m_browsingPanel->isVisible() );
}
-void MainDialogWidget::setRemoteHost( const QString &host )
+void MainDialogWidget::setRemoteHost( const TQString &host )
{
m_serverInput->setEditText( host );
}
-QString MainDialogWidget::remoteHost()
+TQString MainDialogWidget::remoteHost()
{
return m_serverInput->currentText();
}
-void MainDialogWidget::hostChanged( const QString &text )
+void MainDialogWidget::hostChanged( const TQString &text )
{
- emit hostValid(text.contains(QRegExp(":[0-9]+$")) ||
- text.contains(QRegExp("^vnc:/.+")) ||
- text.contains(QRegExp("^rdp:/.+")));
+ emit hostValid(text.contains(TQRegExp(":[0-9]+$")) ||
+ text.contains(TQRegExp("^vnc:/.+")) ||
+ text.contains(TQRegExp("^rdp:/.+")));
}
void MainDialogWidget::toggleBrowsingArea()
@@ -179,31 +179,31 @@ void MainDialogWidget::enableBrowsingArea( bool enable )
setMinimumSize(minimumSize().width(), (h > 0) ? h : 0);
resize(width(), height()-hOffset);
- QTimer::singleShot( 0, parentWidget(), SLOT( adjustSize() ) );
+ TQTimer::singleShot( 0, parentWidget(), TQT_SLOT( adjustSize() ) );
}
if (enable)
rescan();
}
-void MainDialogWidget::itemSelected( QListViewItem *item )
+void MainDialogWidget::itemSelected( TQListViewItem *item )
{
UrlListViewItem *u = ( UrlListViewItem* ) item;
- QRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" );
+ TQRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" );
if ( rx.search( u->url() ) < 0 )
m_serverInput->setCurrentText( u->url());
else m_serverInput->setCurrentText( rx.cap( 1 ) );
}
-void MainDialogWidget::itemDoubleClicked( QListViewItem *item )
+void MainDialogWidget::itemDoubleClicked( TQListViewItem *item )
{
itemSelected( item );
emit accept();
}
-void MainDialogWidget::scopeSelected( const QString &scope )
+void MainDialogWidget::scopeSelected( const TQString &scope )
{
- QString s = scope;
+ TQString s = scope;
if ( s == i18n( "default" ) )
s = DEFAULT_SCOPE;
@@ -215,7 +215,7 @@ void MainDialogWidget::scopeSelected( const QString &scope )
void MainDialogWidget::rescan()
{
- QStringList scopeList;
+ TQStringList scopeList;
if ( m_scanning )
return;
@@ -227,9 +227,9 @@ void MainDialogWidget::rescan()
m_browsingView->clear();
- QString filter;
+ TQString filter;
if ( !m_searchInput->text().stripWhiteSpace().isEmpty() ) {
- QString ef = KServiceLocator::escapeFilter(
+ TQString ef = KServiceLocator::escapeFilter(
m_searchInput->text().stripWhiteSpace() );
filter = "(|(|(description=*"+ef+"*)(username=*"+ef+"*))(fullname=*"+ef+"*))";
}
@@ -259,12 +259,12 @@ bool MainDialogWidget::ensureLocatorOpen()
return false;
}
- connect( m_locator, SIGNAL( foundService( QString,int ) ),
- SLOT( foundService( QString,int ) ) );
- connect( m_locator, SIGNAL( lastServiceSignal( bool ) ),
- SLOT( lastSignalServices( bool ) ) );
- connect( m_locator, SIGNAL( foundScopes( QStringList ) ),
- SLOT( foundScopes( QStringList ) ) );
+ connect( m_locator, TQT_SIGNAL( foundService( TQString,int ) ),
+ TQT_SLOT( foundService( TQString,int ) ) );
+ connect( m_locator, TQT_SIGNAL( lastServiceSignal( bool ) ),
+ TQT_SLOT( lastSignalServices( bool ) ) );
+ connect( m_locator, TQT_SIGNAL( foundScopes( TQStringList ) ),
+ TQT_SLOT( foundScopes( TQStringList ) ) );
return true;
}
@@ -283,18 +283,18 @@ void MainDialogWidget::finishScanning()
m_scanning = false;
}
-void MainDialogWidget::foundService( QString url, int )
+void MainDialogWidget::foundService( TQString url, int )
{
- QRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" );
+ TQRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" );
if ( rx.search( url ) < 0 )
{
- rx = QRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" );
+ rx = TQRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" );
if ( rx.search( url ) < 0 )
return;
}
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
KServiceLocator::parseAttributeList( rx.cap( 3 ), map );
new UrlListViewItem( m_browsingView, url, rx.cap( 2 ), rx.cap( 1 ),
@@ -307,9 +307,9 @@ void MainDialogWidget::foundService( QString url, int )
void MainDialogWidget::addedService( DNSSD::RemoteService::Ptr service )
{
-QString type = service->type().mid(1,3);
+TQString type = service->type().mid(1,3);
if (type == "rfb") type = "vnc";
-QString url = type+"://"+service->hostName()+":"+QString::number(service->port());
+TQString url = type+"://"+service->hostName()+":"+TQString::number(service->port());
new UrlListViewItem( m_browsingView, url, service->serviceName(),
type.upper(),service->textData()["type"],
service->textData()["u"],service->textData()["fullname"],
@@ -318,7 +318,7 @@ new UrlListViewItem( m_browsingView, url, service->serviceName(),
void MainDialogWidget::removedService( DNSSD::RemoteService::Ptr service )
{
- QListViewItemIterator it( m_browsingView );
+ TQListViewItemIterator it( m_browsingView );
while ( it.current() ) {
if ( ((UrlListViewItem*)it.current())->serviceid() == service->serviceName()+service->domain() )
delete it.current();
@@ -342,7 +342,7 @@ void MainDialogWidget::lastSignalServices( bool success )
}
}
-void MainDialogWidget::foundScopes( QStringList scopeList )
+void MainDialogWidget::foundScopes( TQStringList scopeList )
{
int di = scopeList.findIndex( DEFAULT_SCOPE );
if ( di >= 0 )
diff --git a/krdc/maindialogwidget.h b/krdc/maindialogwidget.h
index c1fe5348..4d7918b6 100644
--- a/krdc/maindialogwidget.h
+++ b/krdc/maindialogwidget.h
@@ -32,11 +32,11 @@ class MainDialogWidget : public MainDialogBase
Q_OBJECT
public:
- MainDialogWidget( QWidget *parent, const char *name );
+ MainDialogWidget( TQWidget *parent, const char *name );
~MainDialogWidget();
- void setRemoteHost( const QString & );
- QString remoteHost();
+ void setRemoteHost( const TQString & );
+ TQString remoteHost();
void save();
protected:
@@ -50,22 +50,22 @@ class MainDialogWidget : public MainDialogBase
void accept();
protected slots:
- void hostChanged( const QString & );
+ void hostChanged( const TQString & );
void toggleBrowsingArea();
- void itemSelected( QListViewItem * );
- void itemDoubleClicked( QListViewItem * );
- void scopeSelected( const QString & );
+ void itemSelected( TQListViewItem * );
+ void itemDoubleClicked( TQListViewItem * );
+ void scopeSelected( const TQString & );
void rescan();
- void foundService( QString url, int );
+ void foundService( TQString url, int );
void lastSignalServices( bool success );
- void foundScopes( QStringList scopeList );
+ void foundScopes( TQStringList scopeList );
void addedService( DNSSD::RemoteService::Ptr );
void removedService( DNSSD::RemoteService::Ptr );
protected:
- QString m_scope;
+ TQString m_scope;
bool m_scanning;
SmartPtr<KServiceLocator> m_locator;
DNSSD::ServiceBrowser *m_locator_dnssd;
diff --git a/krdc/preferencesdialog.cpp b/krdc/preferencesdialog.cpp
index 4cdede44..b244c6ff 100644
--- a/krdc/preferencesdialog.cpp
+++ b/krdc/preferencesdialog.cpp
@@ -26,27 +26,27 @@
#include "rdp/krdpview.h"
#include "vnc/kvncview.h"
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
#include <klistview.h>
#include <klocale.h>
-PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name )
+PreferencesDialog::PreferencesDialog( TQWidget *parent, const char *name )
: KDialogBase( Tabbed, i18n( "Preferences" ), Ok|Cancel, Ok,
parent, name, true )
{
- QVBox *page;
- QWidget *spacer;
+ TQVBox *page;
+ TQWidget *spacer;
page = addVBoxPage( i18n( "&Host Profiles" ) );
m_hostProfiles = new HostProfiles( page, "m_hostProfiles" );
- connect( m_hostProfiles, SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, SLOT( slotHostDoubleClicked(HostPrefPtr) ));
+ connect( m_hostProfiles, TQT_SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, TQT_SLOT( slotHostDoubleClicked(HostPrefPtr) ));
page = addVBoxPage( i18n( "&VNC Defaults" ) );
m_vncPrefs = new VncPrefs( page, "m_vncPrefs" );
- spacer = new QWidget( page );
+ spacer = new TQWidget( page );
page->setStretchFactor( spacer, 10 );
m_vncPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences "
@@ -54,7 +54,7 @@ PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name )
page = addVBoxPage( i18n( "RD&P Defaults" ) );
m_rdpPrefs = new RdpPrefs( page, "m_rdpPrefs" );
- spacer = new QWidget( page );
+ spacer = new TQWidget( page );
page->setStretchFactor( spacer, 10 );
m_rdpPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences "
diff --git a/krdc/preferencesdialog.h b/krdc/preferencesdialog.h
index b379d0ec..46e79024 100644
--- a/krdc/preferencesdialog.h
+++ b/krdc/preferencesdialog.h
@@ -35,7 +35,7 @@ class PreferencesDialog : public KDialogBase
Q_OBJECT
public:
- PreferencesDialog( QWidget *parent, const char *name=0 );
+ PreferencesDialog( TQWidget *parent, const char *name=0 );
~PreferencesDialog() {};
protected slots:
diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp
index 3415ae14..2fdbdab8 100644
--- a/krdc/rdp/krdpview.cpp
+++ b/krdc/rdp/krdpview.cpp
@@ -27,7 +27,7 @@
#include <kwallet.h>
#include <kpassdlg.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <qxembed.h>
#include <X11/Xlib.h>
@@ -45,7 +45,7 @@ extern KWallet::Wallet *wallet;
static KRdpView *krdpview;
-RdpContainer::RdpContainer(QWidget *parent, const char *name, WFlags f) :
+RdpContainer::RdpContainer(TQWidget *parent, const char *name, WFlags f) :
QXEmbed(parent, name, f),
m_viewOnly(false)
{
@@ -82,11 +82,11 @@ bool RdpContainer::x11Event(XEvent *e)
// constructor
-KRdpView::KRdpView(QWidget *parent, const char *name,
- const QString &host, int port,
- const QString &user, const QString &password,
- int flags, const QString &domain,
- const QString &shell, const QString &directory) :
+KRdpView::KRdpView(TQWidget *parent, const char *name,
+ const TQString &host, int port,
+ const TQString &user, const TQString &password,
+ int flags, const TQString &domain,
+ const TQString &shell, const TQString &directory) :
KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
m_name(name),
m_host(host),
@@ -118,13 +118,13 @@ KRdpView::~KRdpView()
}
// returns the size of the framebuffer
-QSize KRdpView::framebufferSize()
+TQSize KRdpView::framebufferSize()
{
return m_container->sizeHint();
}
// returns the suggested size
-QSize KRdpView::sizeHint()
+TQSize KRdpView::sizeHint()
{
return maximumSize();
}
@@ -146,7 +146,7 @@ bool KRdpView::isQuitting()
}
// return the host we're connected to
-QString KRdpView::host()
+TQString KRdpView::host()
{
return m_host;
}
@@ -164,7 +164,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
int wv = hp->width();
int hv = hp->height();
int cd = hp->colorDepth();
- QString kl = hp->layout();
+ TQString kl = hp->layout();
bool kwallet = hp->useKWallet();
// show preferences dialog
@@ -172,9 +172,9 @@ bool KRdpView::editPreferences( HostPrefPtr host )
i18n( "RDP Host Preferences for %1" ).arg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
- QVBox *vbox = dlg->makeVBoxMainWidget();
+ TQVBox *vbox = dlg->makeVBoxMainWidget();
RdpPrefs *prefs = new RdpPrefs( vbox );
- QWidget *spacer = new QWidget( vbox );
+ TQWidget *spacer = new TQWidget( vbox );
vbox->setStretchFactor( spacer, 10 );
prefs->setRdpWidth( wv );
@@ -185,7 +185,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
prefs->setShowPrefs( true );
prefs->setUseKWallet(kwallet);
- if ( dlg->exec() == QDialog::Rejected )
+ if ( dlg->exec() == TQDialog::Rejected )
return false;
wv = prefs->rdpWidth();
@@ -209,7 +209,7 @@ bool KRdpView::start()
SmartPtr<RdpHostPref> hp, rdpDefaults;
bool useKWallet = false;
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
if(!rdpAppDataConfigured)
{
@@ -233,21 +233,21 @@ bool KRdpView::start()
// Check for fullscreen mode
if ((hp->width() == 0) && (hp->height() == 0)) {
launch_Fullscreen_rdp = true;
- *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2)));
+ *m_process << "-g" << (TQString::number(desktop->width()) + "x" + TQString::number((desktop->height()-2)));
}
else {
if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(desktop->height()-2));
}
else {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height()));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(hp->height()));
}
}
*m_process << "-k" << hp->layout();
if(!m_user.isEmpty()) { *m_process << "-u" << m_user; }
if(m_password.isEmpty() && useKWallet ) {
- QString krdc_folder = "KRDC-RDP";
+ TQString krdc_folder = "KRDC-RDP";
// Bugfix: Check if wallet has been closed by an outside source
if ( wallet && !wallet->isOpen() ) {
@@ -256,7 +256,7 @@ bool KRdpView::start()
// Do we need to open the wallet?
if ( !wallet ) {
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName);
}
@@ -275,7 +275,7 @@ bool KRdpView::start()
if ( m_password.isEmpty() ) {
//There must not be an existing entry. Let's make one.
- QCString newPassword;
+ TQCString newPassword;
if (KPasswordDialog::getPassword(newPassword, i18n("Please enter the password.")) == KPasswordDialog::Accepted) {
m_password = newPassword;
wallet->writePassword(m_host, m_password);
@@ -288,13 +288,13 @@ bool KRdpView::start()
*m_process << "-p" << m_password;
}
- *m_process << "-X" << ("0x" + QString::number(m_container->winId(), 16));
- *m_process << "-a" << QString::number(hp->colorDepth());
- *m_process << (m_host + ":" + QString::number(m_port));
- connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(processDied(KProcess *)));
- connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess *, char *, int)));
- connect(m_container, SIGNAL(embeddedWindowDestroyed()), SLOT(connectionClosed()));
- connect(m_container, SIGNAL(newEmbeddedWindow(WId)), SLOT(connectionOpened(WId)));
+ *m_process << "-X" << ("0x" + TQString::number(m_container->winId(), 16));
+ *m_process << "-a" << TQString::number(hp->colorDepth());
+ *m_process << (m_host + ":" + TQString::number(m_port));
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(processDied(KProcess *)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(m_container, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(connectionClosed()));
+ connect(m_container, TQT_SIGNAL(newEmbeddedWindow(WId)), TQT_SLOT(connectionOpened(WId)));
qDebug("Color depth: %d", hp->colorDepth());
if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr))
{
@@ -340,7 +340,7 @@ void KRdpView::setViewOnly(bool s)
void KRdpView::connectionOpened(WId /*window*/)
{
- QSize size = m_container->sizeHint();
+ TQSize size = m_container->sizeHint();
setStatus(REMOTE_VIEW_CONNECTED);
setFixedSize(size);
@@ -373,8 +373,8 @@ void KRdpView::processDied(KProcess */*proc*/)
void KRdpView::receivedStderr(KProcess */*proc*/, char *buffer, int /*buflen*/)
{
- QString output(buffer);
- QString line;
+ TQString output(buffer);
+ TQString line;
int i = 0;
while(!(line = output.section('\n', i, i)).isEmpty())
{
diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h
index 029336f2..b115bd18 100644
--- a/krdc/rdp/krdpview.h
+++ b/krdc/rdp/krdpview.h
@@ -38,7 +38,7 @@ class RdpContainer : public QXEmbed
friend class KRdpView;
public:
- RdpContainer(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
+ RdpContainer(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
~RdpContainer();
signals:
@@ -58,23 +58,23 @@ class KRdpView : public KRemoteView
public:
// constructor and destructor
- KRdpView(QWidget *parent = 0, const char *name = 0,
- const QString &host = QString::null, int port = TCP_PORT_RDP,
- const QString &user = QString::null, const QString &password = QString::null,
- int flags = RDP_LOGON_NORMAL, const QString &domain = QString::null,
- const QString &shell = QString::null, const QString &directory = QString::null);
+ KRdpView(TQWidget *parent = 0, const char *name = 0,
+ const TQString &host = TQString::null, int port = TCP_PORT_RDP,
+ const TQString &user = TQString::null, const TQString &password = TQString::null,
+ int flags = RDP_LOGON_NORMAL, const TQString &domain = TQString::null,
+ const TQString &shell = TQString::null, const TQString &directory = TQString::null);
virtual ~KRdpView();
// functions regarding the window
- virtual QSize framebufferSize(); // returns the size of the remote view
- QSize sizeHint(); // returns the suggested size
+ virtual TQSize framebufferSize(); // returns the size of the remote view
+ TQSize sizeHint(); // returns the suggested size
virtual bool viewOnly();
virtual bool startFullscreen();
// functions regarding the connection
virtual void startQuitting(); // start closing the connection
virtual bool isQuitting(); // are we currently closing the connection?
- virtual QString host(); // return the host we're connected to
+ virtual TQString host(); // return the host we're connected to
virtual int port(); // return the port number we're connected on
virtual bool start(); // open a connection
@@ -87,19 +87,19 @@ class KRdpView : public KRemoteView
private:
// properties used for setting up the connection
- QString m_name; // name of the connection
- QString m_host; // the host to connect to
+ TQString m_name; // name of the connection
+ TQString m_host; // the host to connect to
int m_port; // the port on the host
- QString m_user; // the user to use to log in
- QString m_password; // the password to use
+ TQString m_user; // the user to use to log in
+ TQString m_password; // the password to use
int m_flags; // flags which determine how the connection is set up
- QString m_domain; // the domain where the host is on
- QString m_shell; // the shell to use
- QString m_directory; // the working directory on the server
+ TQString m_domain; // the domain where the host is on
+ TQString m_shell; // the shell to use
+ TQString m_directory; // the working directory on the server
// other properties
bool m_quitFlag; // if set: die
- QString m_clientVersion; // version number returned by rdesktop
+ TQString m_clientVersion; // version number returned by rdesktop
RdpContainer *m_container; // container for the rdesktop window
KProcess *m_process; // rdesktop process
diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp
index d3854eb5..ba876146 100644
--- a/krdc/rdp/rdphostpref.cpp
+++ b/krdc/rdp/rdphostpref.cpp
@@ -21,9 +21,9 @@
#include <kconfig.h>
#include <klocale.h>
-const QString RdpHostPref::RdpType = "RDP";
+const TQString RdpHostPref::RdpType = "RDP";
-RdpHostPref::RdpHostPref(KConfig *conf, const QString &host, const QString &type) :
+RdpHostPref::RdpHostPref(KConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type),
m_width(0),
m_height(0),
@@ -43,7 +43,7 @@ void RdpHostPref::save()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"width", m_width);
m_config->writeEntry(p+"height", m_height);
@@ -69,7 +69,7 @@ void RdpHostPref::load()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_width = m_config->readNumEntry(p+"width", 0);
m_height = m_config->readNumEntry(p+"height", 0);
m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24);
@@ -86,7 +86,7 @@ void RdpHostPref::load()
void RdpHostPref::remove()
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->deleteEntry(p+"exists");
m_config->deleteEntry(p+"width");
m_config->deleteEntry(p+"height");
@@ -107,7 +107,7 @@ void RdpHostPref::setDefaults()
m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true);
}
-QString RdpHostPref::prefDescription() const
+TQString RdpHostPref::prefDescription() const
{
return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, KWallet: %6")
.arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height)
@@ -148,13 +148,13 @@ int RdpHostPref::colorDepth() const
}
-void RdpHostPref::setLayout(const QString &l)
+void RdpHostPref::setLayout(const TQString &l)
{
m_layout = l;
save();
}
-QString RdpHostPref::layout() const
+TQString RdpHostPref::layout() const
{
return m_layout;
}
diff --git a/krdc/rdp/rdphostpref.h b/krdc/rdp/rdphostpref.h
index bf96da02..6044f261 100644
--- a/krdc/rdp/rdphostpref.h
+++ b/krdc/rdp/rdphostpref.h
@@ -22,7 +22,7 @@
#include "hostpreferences.h"
-static const QString rdpKeymaps[] = { "ar",
+static const TQString rdpKeymaps[] = { "ar",
"cs",
"da",
"de",
@@ -58,7 +58,7 @@ static const QString rdpKeymaps[] = { "ar",
static const int rdpNumKeymaps = 33;
static const int rdpDefaultKeymap = 6; // en-us
-inline int keymap2int(const QString &keymap)
+inline int keymap2int(const TQString &keymap)
{
int layout;
for(layout = 0; layout < rdpNumKeymaps; layout++)
@@ -75,7 +75,7 @@ inline int keymap2int(const QString &keymap)
return layout;
}
-inline QString int2keymap(int layout)
+inline TQString int2keymap(int layout)
{
if(layout < 0 || layout >= rdpNumKeymaps)
{
@@ -93,7 +93,7 @@ class RdpHostPref : public HostPref
int m_width;
int m_height;
int m_colorDepth;
- QString m_layout;
+ TQString m_layout;
bool m_askOnConnect;
bool m_useKWallet;
@@ -103,21 +103,21 @@ class RdpHostPref : public HostPref
virtual void remove();
public:
- static const QString RdpType;
+ static const TQString RdpType;
- RdpHostPref(KConfig *conf, const QString &host=QString::null,
- const QString &type=QString::null);
+ RdpHostPref(KConfig *conf, const TQString &host=TQString::null,
+ const TQString &type=TQString::null);
virtual ~RdpHostPref();
- virtual QString prefDescription() const;
+ virtual TQString prefDescription() const;
void setWidth(int w);
int width() const;
void setHeight(int h);
int height() const;
void setColorDepth(int depth);
int colorDepth() const;
- void setLayout(const QString &l);
- QString layout() const;
+ void setLayout(const TQString &l);
+ TQString layout() const;
void setAskOnConnect(bool ask);
bool askOnConnect() const;
bool useKWallet() const;
diff --git a/krdc/smartptr.h b/krdc/smartptr.h
index d80f258e..49fa25c2 100644
--- a/krdc/smartptr.h
+++ b/krdc/smartptr.h
@@ -16,7 +16,7 @@
#ifndef SMARTPTR_H
#define SMARTPTR_H
-#include <qstring.h>
+#include <tqstring.h>
class WeakPtr;
@@ -416,7 +416,7 @@ public:
* Returns a string representation of the pointer.
* @return a string representation
*/
- QString toString() const {
+ TQString toString() const {
int objrcount = 1;
int rcrcount = 0;
@@ -424,7 +424,7 @@ public:
objrcount = rc->refsToObject;
rcrcount = rc->refsToThis;
}
- return QString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3")
+ return TQString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3")
.arg((int)ptr).arg(objrcount).arg(rcrcount);
}
diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp
index f734845b..8050a68b 100644
--- a/krdc/vnc/kvncview.cpp
+++ b/krdc/vnc/kvncview.cpp
@@ -28,13 +28,13 @@
#include <kdialogbase.h>
#include <kwallet.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
-#include <qclipboard.h>
-#include <qbitmap.h>
-#include <qmutex.h>
-#include <qvbox.h>
-#include <qwaitcondition.h>
+#include <tqclipboard.h>
+#include <tqbitmap.h>
+#include <tqmutex.h>
+#include <tqvbox.h>
+#include <tqwaitcondition.h>
#include "vncviewer.h"
@@ -57,21 +57,21 @@ static KVncView *kvncview;
//Passwords and KWallet data
extern KWallet::Wallet *wallet;
bool useKWallet = false;
-static QCString password;
-static QMutex passwordLock;
-static QWaitCondition passwordWaiter;
+static TQCString password;
+static TQMutex passwordLock;
+static TQWaitCondition passwordWaiter;
const unsigned int MAX_SELECTION_LENGTH = 4096;
-KVncView::KVncView(QWidget *parent,
+KVncView::KVncView(TQWidget *parent,
const char *name,
- const QString &_host,
+ const TQString &_host,
int _port,
- const QString &_password,
+ const TQString &_password,
Quality quality,
DotCursorState dotCursorState,
- const QString &encodings) :
+ const TQString &encodings) :
KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
m_cthread(this, m_wthread, m_quitFlag),
m_wthread(this, m_quitFlag),
@@ -90,18 +90,18 @@ KVncView::KVncView(QWidget *parent,
password = _password.latin1();
dpy = qt_xdisplay();
setFixedSize(16,16);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- m_cb = QApplication::clipboard();
- connect(m_cb, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect(m_cb, SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ m_cb = TQApplication::clipboard();
+ connect(m_cb, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect(m_cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
KStandardDirs *dirs = KGlobal::dirs();
- QBitmap cursorBitmap(dirs->findResource("appdata",
+ TQBitmap cursorBitmap(dirs->findResource("appdata",
"pics/pointcursor.png"));
- QBitmap cursorMask(dirs->findResource("appdata",
+ TQBitmap cursorMask(dirs->findResource("appdata",
"pics/pointcursormask.png"));
- m_cursor = QCursor(cursorBitmap, cursorMask);
+ m_cursor = TQCursor(cursorBitmap, cursorMask);
if ((quality != QUALITY_UNKNOWN) ||
!encodings.isNull())
@@ -126,18 +126,18 @@ void KVncView::showDotCursorInternal() {
setCursor(m_cursor);
break;
case DOT_CURSOR_OFF:
- setCursor(QCursor(Qt::BlankCursor));
+ setCursor(TQCursor(Qt::BlankCursor));
break;
case DOT_CURSOR_AUTO:
if (m_enableClientCursor)
- setCursor(QCursor(Qt::BlankCursor));
+ setCursor(TQCursor(Qt::BlankCursor));
else
setCursor(m_cursor);
break;
}
}
-QString KVncView::host() {
+TQString KVncView::host() {
return m_host;
}
@@ -155,7 +155,7 @@ bool KVncView::isQuitting() {
return m_quitFlag;
}
-void KVncView::configureApp(Quality q, const QString specialEncodings) {
+void KVncView::configureApp(Quality q, const TQString specialEncodings) {
appDataConfigured = true;
appData.shareDesktop = 1;
appData.viewOnly = 0;
@@ -203,17 +203,17 @@ bool KVncView::checkLocalKRfb() {
DCOPClient *d = KApplication::dcopClient();
int portNum;
- QByteArray sdata, rdata;
- QCString replyType;
- QDataStream arg(sdata, IO_WriteOnly);
- arg << QString("krfb");
- if (!d->call ("kded", "kinetd", "port(QString)", sdata, replyType, rdata))
+ TQByteArray sdata, rdata;
+ TQCString replyType;
+ TQDataStream arg(sdata, IO_WriteOnly);
+ arg << TQString("krfb");
+ if (!d->call ("kded", "kinetd", "port(TQString)", sdata, replyType, rdata))
return true;
if (replyType != "int")
return true;
- QDataStream answer(rdata, IO_ReadOnly);
+ TQDataStream answer(rdata, IO_ReadOnly);
answer >> portNum;
if (m_port != portNum)
@@ -239,16 +239,16 @@ bool KVncView::editPreferences( HostPrefPtr host )
i18n( "VNC Host Preferences for %1" ).arg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
- QVBox *vbox = dlg->makeVBoxMainWidget();
+ TQVBox *vbox = dlg->makeVBoxMainWidget();
VncPrefs *prefs = new VncPrefs( vbox );
- QWidget *spacer = new QWidget( vbox );
+ TQWidget *spacer = new TQWidget( vbox );
vbox->setStretchFactor( spacer, 10 );
prefs->setQuality( ci );
prefs->setShowPrefs(true);
prefs->setUseKWallet(kwallet);
- if ( dlg->exec() == QDialog::Rejected )
+ if ( dlg->exec() == TQDialog::Rejected )
return false;
ci = prefs->quality();
@@ -331,7 +331,7 @@ bool KVncView::startFullscreen()
return launch_Fullscreen_vnc;
}
-QSize KVncView::framebufferSize() {
+TQSize KVncView::framebufferSize() {
return m_framebufferSize;
}
@@ -358,7 +358,7 @@ void KVncView::enableScaling(bool s) {
}
}
-void KVncView::paintEvent(QPaintEvent *e) {
+void KVncView::paintEvent(TQPaintEvent *e) {
drawRegion(e->rect().x(),
e->rect().y(),
e->rect().width(),
@@ -373,7 +373,7 @@ void KVncView::drawRegion(int x, int y, int w, int h) {
DrawScreenRegionX11Thread(winId(), x, y, w, h);
}
-void KVncView::customEvent(QCustomEvent *e)
+void KVncView::customEvent(TQCustomEvent *e)
{
if (e->type() == ScreenRepaintEventType) {
ScreenRepaintEvent *sre = (ScreenRepaintEvent*) e;
@@ -381,7 +381,7 @@ void KVncView::customEvent(QCustomEvent *e)
}
else if (e->type() == ScreenResizeEventType) {
ScreenResizeEvent *sre = (ScreenResizeEvent*) e;
- m_framebufferSize = QSize(sre->width(), sre->height());
+ m_framebufferSize = TQSize(sre->width(), sre->height());
setFixedSize(m_framebufferSize);
emit changeSize(sre->width(), sre->height());
}
@@ -412,7 +412,7 @@ void KVncView::customEvent(QCustomEvent *e)
emit showingPasswordDialog(true);
if (KPasswordDialog::getPassword(password, i18n("Access to the system requires a password.")) != KPasswordDialog::Accepted)
- password = QCString();
+ password = TQCString();
emit showingPasswordDialog(false);
@@ -421,7 +421,7 @@ void KVncView::customEvent(QCustomEvent *e)
passwordLock.unlock();
}
else if (e->type() == WalletOpenEventType) {
- QString krdc_folder = "KRDC-VNC";
+ TQString krdc_folder = "KRDC-VNC";
emit showingPasswordDialog(true); //Bad things happen if you don't do this.
// Bugfix: Check if wallet has been closed by an outside source
@@ -431,7 +431,7 @@ void KVncView::customEvent(QCustomEvent *e)
// Do we need to open the wallet?
if ( !wallet ) {
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName);
}
@@ -443,7 +443,7 @@ void KVncView::customEvent(QCustomEvent *e)
if (walletOK == true) {
wallet->setFolder(krdc_folder);
- QString newPass;
+ TQString newPass;
if ( wallet->hasEntry(kvncview->host()) && !wallet->readPassword(kvncview->host(), newPass) ) {
password=newPass.latin1();
}
@@ -508,11 +508,11 @@ void KVncView::customEvent(QCustomEvent *e)
emit disconnectedError();
}
else if (e->type() == BeepEventType) {
- QApplication::beep();
+ TQApplication::beep();
}
else if (e->type() == ServerCutEventType) {
ServerCutEvent *sce = (ServerCutEvent*) e;
- QString ctext = QString::fromUtf8(sce->bytes(), sce->length());
+ TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length());
m_dontSendCb = true;
m_cb->setText(ctext, QClipboard::Clipboard);
m_cb->setText(ctext, QClipboard::Selection);
@@ -527,15 +527,15 @@ void KVncView::customEvent(QCustomEvent *e)
}
}
-void KVncView::mouseEvent(QMouseEvent *e) {
+void KVncView::mouseEvent(TQMouseEvent *e) {
if (m_status != REMOTE_VIEW_CONNECTED)
return;
if (m_viewOnly)
return;
- if ( e->type() != QEvent::MouseMove ) {
- if ( (e->type() == QEvent::MouseButtonPress) ||
- (e->type() == QEvent::MouseButtonDblClick)) {
+ if ( e->type() != TQEvent::MouseMove ) {
+ if ( (e->type() == TQEvent::MouseButtonPress) ||
+ (e->type() == TQEvent::MouseButtonDblClick)) {
if ( e->button() & LeftButton )
m_buttonMask |= 0x01;
if ( e->button() & MidButton )
@@ -543,7 +543,7 @@ void KVncView::mouseEvent(QMouseEvent *e) {
if ( e->button() & RightButton )
m_buttonMask |= 0x04;
}
- else if ( e->type() == QEvent::MouseButtonRelease ) {
+ else if ( e->type() == TQEvent::MouseButtonRelease ) {
if ( e->button() & LeftButton )
m_buttonMask &= 0xfe;
if ( e->button() & MidButton )
@@ -566,27 +566,27 @@ void KVncView::mouseEvent(QMouseEvent *e) {
DrawCursorX11Thread(x, y); // in rfbproto.c
}
-void KVncView::mousePressEvent(QMouseEvent *e) {
+void KVncView::mousePressEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseDoubleClickEvent(QMouseEvent *e) {
+void KVncView::mouseDoubleClickEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseReleaseEvent(QMouseEvent *e) {
+void KVncView::mouseReleaseEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseMoveEvent(QMouseEvent *e) {
+void KVncView::mouseMoveEvent(TQMouseEvent *e) {
mouseEvent(e);
e->ignore();
}
-void KVncView::wheelEvent(QWheelEvent *e) {
+void KVncView::wheelEvent(TQWheelEvent *e) {
if (m_status != REMOTE_VIEW_CONNECTED)
return;
if (m_viewOnly)
@@ -643,7 +643,7 @@ bool KVncView::x11Event(XEvent *e) {
else if (e->type == KeyRelease)
pressed = false;
else
- return QWidget::x11Event(e);
+ return TQWidget::x11Event(e);
if (!m_viewOnly) {
unsigned int s = KKeyNative(e).sym();
@@ -670,8 +670,8 @@ bool KVncView::x11Event(XEvent *e) {
}
void KVncView::unpressModifiers() {
- QValueList<unsigned int> keys = m_mods.keys();
- QValueList<unsigned int>::const_iterator it = keys.begin();
+ TQValueList<unsigned int> keys = m_mods.keys();
+ TQValueList<unsigned int>::const_iterator it = keys.begin();
while (it != keys.end()) {
m_wthread.queueKeyEvent(*it, false);
it++;
@@ -679,11 +679,11 @@ void KVncView::unpressModifiers() {
m_mods.clear();
}
-void KVncView::focusOutEvent(QFocusEvent *) {
+void KVncView::focusOutEvent(TQFocusEvent *) {
unpressModifiers();
}
-QSize KVncView::sizeHint() {
+TQSize KVncView::sizeHint() {
return maximumSize();
}
@@ -702,7 +702,7 @@ void KVncView::clipboardChanged() {
if (m_cb->ownsClipboard() || m_dontSendCb)
return;
- QString text = m_cb->text(QClipboard::Clipboard);
+ TQString text = m_cb->text(QClipboard::Clipboard);
if (text.length() > MAX_SELECTION_LENGTH)
return;
@@ -716,7 +716,7 @@ void KVncView::selectionChanged() {
if (m_cb->ownsSelection() || m_dontSendCb)
return;
- QString text = m_cb->text(QClipboard::Selection);
+ TQString text = m_cb->text(QClipboard::Selection);
if (text.length() > MAX_SELECTION_LENGTH)
return;
@@ -765,14 +765,14 @@ int getPassword(char *passwd, int pwlen) {
//Try #2: Is there something in the wallet?
if ( !retV && useKWallet ) {
- QApplication::postEvent(kvncview, new WalletOpenEvent());
+ TQApplication::postEvent(kvncview, new WalletOpenEvent());
passwordWaiter.wait(&passwordLock); //block
if (!password.isNull()) retV = 1; //got it!
}
//Last try: Ask the user
if (!retV) {
- QApplication::postEvent(kvncview, new PasswordRequiredEvent());
+ TQApplication::postEvent(kvncview, new PasswordRequiredEvent());
passwordWaiter.wait(&passwordLock); //block
if (!password.isNull()) retV = 1; //got it!
}
@@ -800,7 +800,7 @@ extern void DrawScreenRegion(int x, int y, int width, int height) {
kvncview->drawRegion(x, y, width, height);
KApplication::kApplication()->unlock();
*/
- QApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height));
+ TQApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height));
}
// call only from x11 thread!
@@ -821,15 +821,15 @@ extern void UnlockFramebuffer() {
}
extern void beep() {
- QApplication::postEvent(kvncview, new BeepEvent());
+ TQApplication::postEvent(kvncview, new BeepEvent());
}
extern void newServerCut(char *bytes, int length) {
- QApplication::postEvent(kvncview, new ServerCutEvent(bytes, length));
+ TQApplication::postEvent(kvncview, new ServerCutEvent(bytes, length));
}
extern void postMouseEvent(int x, int y, int buttonMask) {
- QApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask));
+ TQApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask));
}
#include "kvncview.moc"
diff --git a/krdc/vnc/kvncview.h b/krdc/vnc/kvncview.h
index c0f9fba3..a9de2378 100644
--- a/krdc/vnc/kvncview.h
+++ b/krdc/vnc/kvncview.h
@@ -19,8 +19,8 @@
#define KVNCVIEW_H
#include "kremoteview.h"
-#include <qcursor.h>
-#include <qmap.h>
+#include <tqcursor.h>
+#include <tqmap.h>
#include "pointerlatencyometer.h"
#include "hostpreferences.h"
@@ -36,54 +36,54 @@ private:
ControllerThread m_cthread;
WriterThread m_wthread;
volatile bool m_quitFlag; // if set: all threads should die ASAP
- QMutex m_framebufferLock;
+ TQMutex m_framebufferLock;
bool m_enableFramebufferLocking;
bool m_enableClientCursor;
- QSize m_framebufferSize;
+ TQSize m_framebufferSize;
bool m_scaling;
bool m_remoteMouseTracking;
bool m_viewOnly;
int m_buttonMask;
- QMap<unsigned int,bool> m_mods;
+ TQMap<unsigned int,bool> m_mods;
- QString m_host;
+ TQString m_host;
int m_port;
QClipboard *m_cb;
bool m_dontSendCb;
- QCursor m_cursor;
+ TQCursor m_cursor;
DotCursorState m_cursorState;
PointerLatencyOMeter m_plom;
- void mouseEvent(QMouseEvent*);
- unsigned long toKeySym(QKeyEvent *k);
+ void mouseEvent(TQMouseEvent*);
+ unsigned long toKeySym(TQKeyEvent *k);
bool checkLocalKRfb();
- void paintMessage(const QString &msg);
+ void paintMessage(const TQString &msg);
void showDotCursorInternal();
void unpressModifiers();
protected:
- void paintEvent(QPaintEvent*);
- void customEvent(QCustomEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseDoubleClickEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
- void wheelEvent(QWheelEvent *);
- void focusOutEvent(QFocusEvent *);
+ void paintEvent(TQPaintEvent*);
+ void customEvent(TQCustomEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseDoubleClickEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
+ void wheelEvent(TQWheelEvent *);
+ void focusOutEvent(TQFocusEvent *);
bool x11Event(XEvent*);
public:
- KVncView(QWidget* parent=0, const char *name=0,
- const QString &host = QString(""), int port = 5900,
- const QString &password = QString::null,
+ KVncView(TQWidget* parent=0, const char *name=0,
+ const TQString &host = TQString(""), int port = 5900,
+ const TQString &password = TQString::null,
Quality quality = QUALITY_UNKNOWN,
DotCursorState dotCursorState = DOT_CURSOR_AUTO,
- const QString &encodings = QString::null);
+ const TQString &encodings = TQString::null);
~KVncView();
- QSize sizeHint();
+ TQSize sizeHint();
void drawRegion(int x, int y, int w, int h);
void lockFramebuffer();
void unlockFramebuffer();
@@ -91,15 +91,15 @@ public:
virtual bool scaling() const;
virtual bool supportsScaling() const;
virtual bool supportsLocalCursor() const;
- virtual QSize framebufferSize();
+ virtual TQSize framebufferSize();
void setRemoteMouseTracking(bool s);
bool remoteMouseTracking();
- void configureApp(Quality q, const QString specialEncodings = QString::null);
+ void configureApp(Quality q, const TQString specialEncodings = TQString::null);
void showDotCursor(DotCursorState state);
DotCursorState dotCursorState() const;
virtual void startQuitting();
virtual bool isQuitting();
- virtual QString host();
+ virtual TQString host();
virtual int port();
virtual bool start();
diff --git a/krdc/vnc/pointerlatencyometer.h b/krdc/vnc/pointerlatencyometer.h
index 559536b2..c380431a 100644
--- a/krdc/vnc/pointerlatencyometer.h
+++ b/krdc/vnc/pointerlatencyometer.h
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
struct PointerState {
int x, y;
- QTime timestamp;
+ TQTime timestamp;
};
class PointerLatencyOMeter {
diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp
index fe5a1d62..ec033388 100644
--- a/krdc/vnc/threads.cpp
+++ b/krdc/vnc/threads.cpp
@@ -23,7 +23,7 @@
#include "vncviewer.h"
#include "threads.h"
-#include <qcstring.h>
+#include <tqcstring.h>
// Maximum idle time for writer thread in ms. When it timeouts, it will request
// another incremental update. Must be smaller than the timeout of the server
@@ -49,12 +49,12 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool
void ControllerThread::changeStatus(RemoteViewStatus s) {
m_status = s;
- QApplication::postEvent(m_view, new StatusChangeEvent(s));
+ TQApplication::postEvent(m_view, new StatusChangeEvent(s));
}
void ControllerThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
m_wthread.kick();
}
@@ -109,13 +109,13 @@ void ControllerThread::run() {
return;
}
- QApplication::postEvent(m_view,
+ TQApplication::postEvent(m_view,
new ScreenResizeEvent(si.framebufferWidth,
si.framebufferHeight));
- m_wthread.queueUpdateRequest(QRegion(QRect(0,0,si.framebufferWidth,
+ m_wthread.queueUpdateRequest(TQRegion(TQRect(0,0,si.framebufferWidth,
si.framebufferHeight)));
- QApplication::postEvent(m_view, new DesktopInitEvent());
+ TQApplication::postEvent(m_view, new DesktopInitEvent());
while ((!m_quitFlag) && (!m_desktopInitialized))
m_waiter.wait(1000);
@@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) :
m_incrementalUpdateAnnounced(false),
m_mouseEventNum(0),
m_keyEventNum(0),
- m_clientCut(QString::null)
+ m_clientCut(TQString::null)
{
writerThread = this;
m_lastIncrUpdate.start();
@@ -184,8 +184,8 @@ bool WriterThread::sendIncrementalUpdateRequest() {
return SendIncrementalFramebufferUpdateRequest();
}
-bool WriterThread::sendUpdateRequest(const QRegion &region) {
- QMemArray<QRect> r = region.rects();
+bool WriterThread::sendUpdateRequest(const TQRegion &region) {
+ TQMemArray<TQRect> r = region.rects();
for (unsigned int i = 0; i < r.size(); i++)
if (!SendFramebufferUpdateRequest(r[i].x(),
r[i].y(),
@@ -195,8 +195,8 @@ bool WriterThread::sendUpdateRequest(const QRegion &region) {
return true;
}
-bool WriterThread::sendInputEvents(const QValueList<InputEvent> &events) {
- QValueList<InputEvent>::const_iterator it = events.begin();
+bool WriterThread::sendInputEvents(const TQValueList<InputEvent> &events) {
+ TQValueList<InputEvent>::const_iterator it = events.begin();
while (it != events.end()) {
if ((*it).type == KeyEventType) {
if (!SendKeyEvent((*it).e.k.k, (*it).e.k.down ? True : False))
@@ -224,7 +224,7 @@ void WriterThread::announceIncrementalUpdateRequest() {
}
-void WriterThread::queueUpdateRequest(const QRegion &r) {
+void WriterThread::queueUpdateRequest(const TQRegion &r) {
m_lock.lock();
m_updateRegionRQ += r;
m_waiter.wakeAll();
@@ -283,7 +283,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) {
m_lock.unlock();
}
-void WriterThread::queueClientCut(const QString &text) {
+void WriterThread::queueClientCut(const TQString &text) {
m_lock.lock();
m_clientCut = text;
@@ -299,9 +299,9 @@ void WriterThread::kick() {
void WriterThread::run() {
bool incrementalUpdateRQ = false;
bool incrementalUpdateAnnounced = false;
- QRegion updateRegionRQ;
- QValueList<InputEvent> inputEvents;
- QString clientCut;
+ TQRegion updateRegionRQ;
+ TQValueList<InputEvent> inputEvents;
+ TQString clientCut;
while (!m_quitFlag) {
m_lock.lock();
@@ -324,11 +324,11 @@ void WriterThread::run() {
else {
m_incrementalUpdateRQ = false;
m_incrementalUpdateAnnounced = false;
- m_updateRegionRQ = QRegion();
+ m_updateRegionRQ = TQRegion();
m_inputEvents.clear();
m_keyEventNum = 0;
m_mouseEventNum = 0;
- m_clientCut = QString::null;
+ m_clientCut = TQString::null;
m_lock.unlock();
// always send incremental update, unless
@@ -373,7 +373,7 @@ void WriterThread::run() {
break;
}
if (!clientCut.isNull()) {
- QCString cutTextUtf8(clientCut.utf8());
+ TQCString cutTextUtf8(clientCut.utf8());
if (!SendClientCutText(cutTextUtf8.data(),
(int)cutTextUtf8.length())) {
sendFatalError(ERROR_IO);
@@ -387,6 +387,6 @@ void WriterThread::run() {
void WriterThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
}
diff --git a/krdc/vnc/threads.h b/krdc/vnc/threads.h
index 5f38b71f..08ca4c20 100644
--- a/krdc/vnc/threads.h
+++ b/krdc/vnc/threads.h
@@ -18,14 +18,14 @@
#ifndef THREADS_H
#define THREADS_H
-#include <qthread.h>
-#include <qregion.h>
-#include <qrect.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qevent.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqthread.h>
+#include <tqregion.h>
+#include <tqrect.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
#include <stdlib.h>
@@ -58,24 +58,24 @@ struct InputEvent {
};
-class WriterThread : public QThread {
+class WriterThread : public TQThread {
private:
- QMutex m_lock;
- QWaitCondition m_waiter;
+ TQMutex m_lock;
+ TQWaitCondition m_waiter;
volatile bool &m_quitFlag;
KVncView *m_view;
- QTime m_lastIncrUpdate; // start()ed when a incr update is sent
+ TQTime m_lastIncrUpdate; // start()ed when a incr update is sent
bool m_lastIncrUpdatePostponed;
// all things that can be send follow:
bool m_incrementalUpdateRQ; // for sending an incremental request
bool m_incrementalUpdateAnnounced; // set when a RQ will come soon
- QRegion m_updateRegionRQ; // for sending updates, null if it is done
- QValueList<InputEvent> m_inputEvents; // list of unsent input events
+ TQRegion m_updateRegionRQ; // for sending updates, null if it is done
+ TQValueList<InputEvent> m_inputEvents; // list of unsent input events
MouseEvent m_lastMouseEvent;
int m_mouseEventNum, m_keyEventNum;
- QString m_clientCut;
+ TQString m_clientCut;
void sendFatalError(ErrorCode s);
@@ -84,29 +84,29 @@ public:
void queueIncrementalUpdateRequest();
void announceIncrementalUpdateRequest();
- void queueUpdateRequest(const QRegion &r);
+ void queueUpdateRequest(const TQRegion &r);
void queueMouseEvent(int x, int y, int buttonMask);
void queueKeyEvent(unsigned int k, bool down);
- void queueClientCut(const QString &text);
+ void queueClientCut(const TQString &text);
void kick();
protected:
void run();
bool sendIncrementalUpdateRequest();
- bool sendUpdateRequest(const QRegion &r);
- bool sendInputEvents(const QValueList<InputEvent> &events);
+ bool sendUpdateRequest(const TQRegion &r);
+ bool sendInputEvents(const TQValueList<InputEvent> &events);
};
-class ControllerThread : public QThread {
+class ControllerThread : public TQThread {
private:
KVncView *m_view;
enum RemoteViewStatus m_status;
WriterThread &m_wthread;
volatile bool &m_quitFlag;
volatile bool m_desktopInitialized;
- QWaitCondition m_waiter;
+ TQWaitCondition m_waiter;
void changeStatus(RemoteViewStatus s);
void sendFatalError(ErrorCode s);
diff --git a/krdc/vnc/vnchostpref.cpp b/krdc/vnc/vnchostpref.cpp
index a17f8ea1..7fea2889 100644
--- a/krdc/vnc/vnchostpref.cpp
+++ b/krdc/vnc/vnchostpref.cpp
@@ -19,9 +19,9 @@
#include <kconfig.h>
#include <klocale.h>
-const QString VncHostPref::VncType = "VNC";
+const TQString VncHostPref::VncType = "VNC";
-VncHostPref::VncHostPref(KConfig *conf, const QString &host, const QString &type) :
+VncHostPref::VncHostPref(KConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type),
m_quality(0),
m_useKWallet(true),
@@ -35,7 +35,7 @@ void VncHostPref::save() {
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"quality", m_quality);
m_config->writeEntry(p+"askOnConnect", m_askOnConnect);
@@ -54,7 +54,7 @@ void VncHostPref::load() {
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_quality = m_config->readNumEntry(p+"quality", 0);
m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true);
m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true);
@@ -67,7 +67,7 @@ void VncHostPref::load() {
void VncHostPref::remove() {
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->deleteEntry(p+"exists");
m_config->deleteEntry(p+"quality");
m_config->deleteEntry(p+"askOnConnect");
@@ -80,8 +80,8 @@ void VncHostPref::setDefaults() {
m_useKWallet = m_config->readBoolEntry("vncUseKWallet", true);
}
-QString VncHostPref::prefDescription() const {
- QString q;
+TQString VncHostPref::prefDescription() const {
+ TQString q;
switch(m_quality) {
case 0:
q = i18n("High");
diff --git a/krdc/vnc/vnchostpref.h b/krdc/vnc/vnchostpref.h
index 33a20600..cfd91053 100644
--- a/krdc/vnc/vnchostpref.h
+++ b/krdc/vnc/vnchostpref.h
@@ -34,13 +34,13 @@ protected:
virtual void remove();
public:
- static const QString VncType;
+ static const TQString VncType;
- VncHostPref(KConfig *conf, const QString &host=QString::null,
- const QString &type=QString::null);
+ VncHostPref(KConfig *conf, const TQString &host=TQString::null,
+ const TQString &type=TQString::null);
virtual ~VncHostPref();
- virtual QString prefDescription() const;
+ virtual TQString prefDescription() const;
void setQuality(int q);
int quality() const;
void setAskOnConnect(bool ask);
diff --git a/krfb/kcm_krfb/kcm_krfb.cpp b/krfb/kcm_krfb/kcm_krfb.cpp
index 5647d557..50595505 100644
--- a/krfb/kcm_krfb/kcm_krfb.cpp
+++ b/krfb/kcm_krfb/kcm_krfb.cpp
@@ -19,14 +19,14 @@
#include "kcm_krfb.h"
#include "kcm_krfb.moc"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapplication.h>
#include <kdialog.h>
#include <knuminput.h>
@@ -42,7 +42,7 @@
#define VERSION "0.7"
-typedef KGenericFactory<KcmKRfb, QWidget> KcmKRfbFactory;
+typedef KGenericFactory<KcmKRfb, TQWidget> KcmKRfbFactory;
// Can't use K_EXPORT_COMPONENT_FACTORY, since insertCatalogue necessary
extern "C" {
@@ -53,13 +53,13 @@ extern "C" {
}
-KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
+KcmKRfb::KcmKRfb(TQWidget *p, const char *name, const TQStringList &) :
KCModule(KcmKRfbFactory::instance(), p, name),
m_configuration(KRFB_CONFIGURATION_MODE) {
m_confWidget = new ConfigurationWidget(this);
- QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *l = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l->add(m_confWidget);
setButtons(Default|Apply|Reset);
@@ -74,19 +74,19 @@ KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
load();
- connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
- connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) );
- connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()),
- &m_configuration, SLOT(showManageInvitationsDialog()) );
- connect(&m_configuration, SIGNAL(invitationNumChanged(int)),
- this, SLOT(setInvitationNum(int)));
+ connect(m_confWidget->passwordInput, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->allowUninvitedCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->enableSLPCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->confirmConnectionsCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->allowDesktopControlCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->autoPortCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->portInput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(configChanged()) );
+ connect((TQObject*)m_confWidget->manageInvitations, TQT_SIGNAL(clicked()),
+ &m_configuration, TQT_SLOT(showManageInvitationsDialog()) );
+ connect(&m_configuration, TQT_SIGNAL(invitationNumChanged(int)),
+ this, TQT_SLOT(setInvitationNum(int)));
setInvitationNum(m_configuration.invitations().size());
- connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) );
+ connect(m_confWidget->disableBackgroundCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
}
void KcmKRfb::configChanged() {
@@ -106,17 +106,17 @@ void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
DCOPClient *d = KApplication::dcopClient();
- QByteArray sdata, rdata;
- QCString replyType;
- QDataStream arg(sdata, IO_WriteOnly);
- arg << QString("krfb");
- if (!d->call ("kded", "kinetd", "isInstalled(QString)", sdata, replyType, rdata))
+ TQByteArray sdata, rdata;
+ TQCString replyType;
+ TQDataStream arg(sdata, IO_WriteOnly);
+ arg << TQString("krfb");
+ if (!d->call ("kded", "kinetd", "isInstalled(TQString)", sdata, replyType, rdata))
return;
if (replyType != "bool")
return;
- QDataStream answer(rdata, IO_ReadOnly);
+ TQDataStream answer(rdata, IO_ReadOnly);
answer >> krfbAvailable;
kinetdAvailable = true;
}
@@ -152,7 +152,7 @@ void KcmKRfb::save() {
m_configuration.setPreferredPort(m_confWidget->portInput->value());
m_configuration.setDisableBackground(m_confWidget->disableBackgroundCB->isChecked());
m_configuration.save();
- kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", TQByteArray());
emit changed(false);
}
@@ -171,7 +171,7 @@ void KcmKRfb::defaults() {
emit changed(true);
}
-QString KcmKRfb::quickHelp() const
+TQString KcmKRfb::quickHelp() const
{
return i18n("<h1>Desktop Sharing</h1> This module allows you to configure"
" the KDE desktop sharing.");
diff --git a/krfb/kcm_krfb/kcm_krfb.h b/krfb/kcm_krfb/kcm_krfb.h
index e9271289..9fa81fc9 100644
--- a/krfb/kcm_krfb/kcm_krfb.h
+++ b/krfb/kcm_krfb/kcm_krfb.h
@@ -19,8 +19,8 @@
#ifndef _KCM_KRFB_H_
#define _KCM_KRFB_H_
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <kcmodule.h>
#include "configurationwidget.h"
#include "../krfb/configuration.h"
@@ -32,12 +32,12 @@ private:
ConfigurationWidget *m_confWidget;
void checkKInetd(bool&, bool&);
public:
- KcmKRfb(QWidget *p, const char *name, const QStringList &);
+ KcmKRfb(TQWidget *p, const char *name, const TQStringList &);
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
private slots:
void setInvitationNum(int num);
void configChanged();
diff --git a/krfb/kinetd/kinetd.cpp b/krfb/kinetd/kinetd.cpp
index 5094712e..2f4acadd 100644
--- a/krfb/kinetd/kinetd.cpp
+++ b/krfb/kinetd/kinetd.cpp
@@ -21,7 +21,7 @@
#include "kinetinterface.h"
#include "kuser.h"
#include "uuid.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kservicetype.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -77,8 +77,8 @@ bool PortListener::acquirePort() {
delete m_socket;
m_socket = new KServerSocket(m_port, false);
}
- connect(m_socket, SIGNAL(accepted(KSocket*)),
- SLOT(accepted(KSocket*)));
+ connect(m_socket, TQT_SIGNAL(accepted(KSocket*)),
+ TQT_SLOT(accepted(KSocket*)));
bool s = m_registerService;
bool sd =m_dnssdRegister;
@@ -102,10 +102,10 @@ void PortListener::loadConfig(KService::Ptr s) {
m_valid = true;
m_autoPortRange = 0;
m_enabled = true;
- m_argument = QString::null;
+ m_argument = TQString::null;
m_multiInstance = false;
- QVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
+ TQVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
vsattributes, vslifetime, vdname, vdtype, vddata;
m_execPath = s->exec().utf8();
@@ -154,7 +154,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_registerService = true;
}
else {
- m_serviceURL = QString::null;
+ m_serviceURL = TQString::null;
m_registerService = false;
}
if (vsattributes.isValid()) {
@@ -163,11 +163,11 @@ void PortListener::loadConfig(KService::Ptr s) {
else
m_serviceAttributes = "";
if (vddata.isValid()) {
- QStringList attrs = vddata.toStringList();
- for (QStringList::iterator it=attrs.begin();
+ TQStringList attrs = vddata.toStringList();
+ for (TQStringList::iterator it=attrs.begin();
it!=attrs.end();it++) {
- QString key = (*it).section('=',0,0);
- QString value = processServiceTemplate((*it).section('=',1))[0];
+ TQString key = (*it).section('=',0,0);
+ TQString value = processServiceTemplate((*it).section('=',1))[0];
if (!key.isEmpty()) m_dnssdData[key]=value;
}
}
@@ -181,7 +181,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_dnssdRegister = false;
- m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime);
+ m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime);
m_defaultPortBase = m_portBase;
m_defaultAutoPortRange = m_autoPortRange;
@@ -192,17 +192,17 @@ void PortListener::loadConfig(KService::Ptr s) {
m_portBase);
m_autoPortRange = m_config->readNumEntry("auto_port_range_" + m_serviceName,
m_autoPortRange);
- QDateTime nullTime;
+ TQDateTime nullTime;
m_expirationTime = m_config->readDateTimeEntry("enabled_expiration_"+m_serviceName,
&nullTime);
- if ((!m_expirationTime.isNull()) && (m_expirationTime < QDateTime::currentDateTime()))
+ if ((!m_expirationTime.isNull()) && (m_expirationTime < TQDateTime::currentDateTime()))
m_enabled = false;
m_registerService = m_config->readBoolEntry("enabled_srvreg_"+m_serviceName,
m_registerService);
}
void PortListener::accepted(KSocket *sock) {
- QString host, port;
+ TQString host, port;
KSocketAddress *ksa = KExtendedSocket::peerAddress(sock->socket());
if ((!ksa) || !ksa->address()) {
delete sock;
@@ -223,7 +223,7 @@ void PortListener::accepted(KSocket *sock) {
fcntl(sock->socket(), F_SETFD, fcntl(sock->socket(), F_GETFD) & ~FD_CLOEXEC);
m_process.clearArguments();
- m_process << m_execPath << m_argument << QString::number(sock->socket());
+ m_process << m_execPath << m_argument << TQString::number(sock->socket());
if (!m_process.start(KProcess::DontCare)) {
KNotifyClient::event("ProcessFailed",
i18n("Call \"%1 %2 %3\" failed").arg(m_execPath)
@@ -246,22 +246,22 @@ int PortListener::port() {
return m_port;
}
-QStringList PortListener::processServiceTemplate(const QString &a) {
- QStringList l;
- QValueVector<KInetInterface> v = KInetInterface::getAllInterfaces(false);
- QValueVector<KInetInterface>::Iterator it = v.begin();
+TQStringList PortListener::processServiceTemplate(const TQString &a) {
+ TQStringList l;
+ TQValueVector<KInetInterface> v = KInetInterface::getAllInterfaces(false);
+ TQValueVector<KInetInterface>::Iterator it = v.begin();
while (it != v.end()) {
KInetSocketAddress *address = (*(it++)).address();
if (!address)
continue;
- QString hostName = address->nodeName();
+ TQString hostName = address->nodeName();
KUser u;
- QString x = a; // replace does not work in const QString. Why??
- l.append(x.replace(QRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName))
- .replace(QRegExp("%p"), QString::number(m_port))
- .replace(QRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
- .replace(QRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
- .replace(QRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
+ TQString x = a; // replace does not work in const TQString. Why??
+ l.append(x.replace(TQRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName))
+ .replace(TQRegExp("%p"), TQString::number(m_port))
+ .replace(TQRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
+ .replace(TQRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
+ .replace(TQRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
}
return l;
}
@@ -294,10 +294,10 @@ bool PortListener::setPort(int port, int autoPortRange) {
}
void PortListener::setEnabled(bool e) {
- setEnabledInternal(e, QDateTime());
+ setEnabledInternal(e, TQDateTime());
}
-void PortListener::setEnabledInternal(bool e, const QDateTime &ex) {
+void PortListener::setEnabledInternal(bool e, const TQDateTime &ex) {
m_config->setGroup("ListenerConfig");
m_config->writeEntry("enabled_" + m_serviceName, e);
m_config->writeEntry("enabled_expiration_"+m_serviceName, ex);
@@ -317,7 +317,7 @@ void PortListener::setEnabledInternal(bool e, const QDateTime &ex) {
}
}
-void PortListener::setEnabled(const QDateTime &ex) {
+void PortListener::setEnabled(const TQDateTime &ex) {
setEnabledInternal(true, ex);
}
@@ -343,9 +343,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) {
if (m_enabled && e) {
m_registeredServiceURLs = processServiceTemplate(m_serviceURL);
- QStringList attributes = processServiceTemplate(m_serviceAttributes);
- QStringList::Iterator it = m_registeredServiceURLs.begin();
- QStringList::Iterator it2 = attributes.begin();
+ TQStringList attributes = processServiceTemplate(m_serviceAttributes);
+ TQStringList::Iterator it = m_registeredServiceURLs.begin();
+ TQStringList::Iterator it2 = attributes.begin();
while ((it != m_registeredServiceURLs.end()) &&
(it2 != attributes.end())) {
if (!m_srvreg->registerService(
@@ -356,9 +356,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) {
}
m_serviceRegistered = true;
// make lifetime 30s shorter, because the timeout is not precise
- m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime-30);
+ m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime-30);
} else {
- QStringList::Iterator it = m_registeredServiceURLs.begin();
+ TQStringList::Iterator it = m_registeredServiceURLs.begin();
while (it != m_registeredServiceURLs.end())
m_srvreg->unregisterService(*(it++));
m_serviceRegistered = false;
@@ -383,24 +383,24 @@ void PortListener::dnssdRegister(bool e) {
}
void PortListener::refreshRegistration() {
- if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < QDateTime::currentDateTime())) {
+ if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < TQDateTime::currentDateTime())) {
setServiceRegistrationEnabledInternal(false);
setServiceRegistrationEnabledInternal(true);
}
}
-QDateTime PortListener::expiration() {
+TQDateTime PortListener::expiration() {
return m_expirationTime;
}
-QDateTime PortListener::serviceLifetimeEnd() {
+TQDateTime PortListener::serviceLifetimeEnd() {
if (m_serviceRegistered)
return m_slpLifetimeEnd;
else
- return QDateTime();
+ return TQDateTime();
}
-QString PortListener::name() {
+TQString PortListener::name() {
return m_serviceName;
}
@@ -410,7 +410,7 @@ PortListener::~PortListener() {
}
-KInetD::KInetD(QCString &n) :
+KInetD::KInetD(TQCString &n) :
KDEDModule(n)
{
m_config = new KConfig("kinetdrc");
@@ -421,9 +421,9 @@ KInetD::KInetD(QCString &n) :
m_srvreg = 0;
}
m_portListeners.setAutoDelete(true);
- connect(&m_expirationTimer, SIGNAL(timeout()), SLOT(setExpirationTimer()));
- connect(&m_portRetryTimer, SIGNAL(timeout()), SLOT(portRetryTimer()));
- connect(&m_reregistrationTimer, SIGNAL(timeout()), SLOT(reregistrationTimer()));
+ connect(&m_expirationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(setExpirationTimer()));
+ connect(&m_portRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(portRetryTimer()));
+ connect(&m_reregistrationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(reregistrationTimer()));
loadServiceList();
}
@@ -456,9 +456,9 @@ void KInetD::expirationTimer() {
}
void KInetD::setExpirationTimer() {
- QDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
+ TQDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
if (!nextEx.isNull())
- m_expirationTimer.start(QDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000,
+ m_expirationTimer.start(TQDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000,
false);
else
m_expirationTimer.stop();
@@ -470,12 +470,12 @@ void KInetD::portRetryTimer() {
}
void KInetD::setReregistrationTimer() {
- QDateTime d;
+ TQDateTime d;
PortListener *pl = m_portListeners.first();
while (pl) {
- QDateTime d2 = pl->serviceLifetimeEnd();
+ TQDateTime d2 = pl->serviceLifetimeEnd();
if (!d2.isNull()) {
- if (d2 < QDateTime::currentDateTime()) {
+ if (d2 < TQDateTime::currentDateTime()) {
m_reregistrationTimer.start(0, true);
return;
}
@@ -486,7 +486,7 @@ void KInetD::setReregistrationTimer() {
}
if (!d.isNull()) {
- int s = QDateTime::currentDateTime().secsTo(d);
+ int s = TQDateTime::currentDateTime().secsTo(d);
if (s < 30)
s = 30; // max frequency 30s
m_reregistrationTimer.start(s*1000, true);
@@ -525,7 +525,7 @@ void KInetD::setPortRetryTimer(bool retry) {
m_portRetryTimer.stop();
}
-PortListener *KInetD::getListenerByName(QString name)
+PortListener *KInetD::getListenerByName(TQString name)
{
PortListener *pl = m_portListeners.first();
while (pl) {
@@ -537,14 +537,14 @@ PortListener *KInetD::getListenerByName(QString name)
}
// gets next expiration timer, SIDEEFFECT: disables expired portlisteners while doing this
-QDateTime KInetD::getNextExpirationTime()
+TQDateTime KInetD::getNextExpirationTime()
{
PortListener *pl = m_portListeners.first();
- QDateTime d;
+ TQDateTime d;
while (pl) {
- QDateTime d2 = pl->expiration();
+ TQDateTime d2 = pl->expiration();
if (!d2.isNull()) {
- if (d2 < QDateTime::currentDateTime())
+ if (d2 < TQDateTime::currentDateTime())
pl->setEnabled(false);
else if (d.isNull() || (d2 < d))
d = d2;
@@ -554,9 +554,9 @@ QDateTime KInetD::getNextExpirationTime()
return d;
}
-QStringList KInetD::services()
+TQStringList KInetD::services()
{
- QStringList list;
+ TQStringList list;
PortListener *pl = m_portListeners.first();
while (pl) {
list.append(pl->name());
@@ -565,7 +565,7 @@ QStringList KInetD::services()
return list;
}
-bool KInetD::isEnabled(QString service)
+bool KInetD::isEnabled(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -574,7 +574,7 @@ bool KInetD::isEnabled(QString service)
return pl->isEnabled();
}
-int KInetD::port(QString service)
+int KInetD::port(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -583,7 +583,7 @@ int KInetD::port(QString service)
return pl->port();
}
-bool KInetD::setPort(QString service, int port, int autoPortRange)
+bool KInetD::setPort(TQString service, int port, int autoPortRange)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -595,13 +595,13 @@ bool KInetD::setPort(QString service, int port, int autoPortRange)
return s;
}
-bool KInetD::isInstalled(QString service)
+bool KInetD::isInstalled(TQString service)
{
PortListener *pl = getListenerByName(service);
return (pl != 0);
}
-void KInetD::setEnabled(QString service, bool enable)
+void KInetD::setEnabled(TQString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -612,7 +612,7 @@ void KInetD::setEnabled(QString service, bool enable)
setReregistrationTimer();
}
-void KInetD::setEnabled(QString service, QDateTime expiration)
+void KInetD::setEnabled(TQString service, TQDateTime expiration)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -623,7 +623,7 @@ void KInetD::setEnabled(QString service, QDateTime expiration)
setReregistrationTimer();
}
-void KInetD::setServiceRegistrationEnabled(QString service, bool enable)
+void KInetD::setServiceRegistrationEnabled(TQString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -633,7 +633,7 @@ void KInetD::setServiceRegistrationEnabled(QString service, bool enable)
setReregistrationTimer();
}
-bool KInetD::isServiceRegistrationEnabled(QString service)
+bool KInetD::isServiceRegistrationEnabled(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -650,7 +650,7 @@ KInetD::~KInetD() {
}
extern "C" {
- KDE_EXPORT KDEDModule *create_kinetd(QCString &name)
+ KDE_EXPORT KDEDModule *create_kinetd(TQCString &name)
{
KGlobal::locale()->insertCatalogue("kinetd");
return new KInetD(name);
diff --git a/krfb/kinetd/kinetd.h b/krfb/kinetd/kinetd.h
index e6283e83..32bb2885 100644
--- a/krfb/kinetd/kinetd.h
+++ b/krfb/kinetd/kinetd.h
@@ -23,36 +23,36 @@
#include <kservice.h>
#include <ksock.h>
#include <kprocess.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include <dnssd/publicservice.h>
#include "kserviceregistry.h"
-class PortListener : public QObject {
+class PortListener : public TQObject {
Q_OBJECT
private:
bool m_valid;
- QString m_serviceName;
- QString m_serviceURL, m_serviceAttributes;
- QStringList m_registeredServiceURLs;
- QString m_dnssdName, m_dnssdType;
- QMap<QString,QString> m_dnssdData;
+ TQString m_serviceName;
+ TQString m_serviceURL, m_serviceAttributes;
+ TQStringList m_registeredServiceURLs;
+ TQString m_dnssdName, m_dnssdType;
+ TQMap<TQString,TQString> m_dnssdData;
int m_serviceLifetime;
int m_port;
int m_portBase, m_autoPortRange;
int m_defaultPortBase, m_defaultAutoPortRange;
bool m_multiInstance;
- QString m_execPath;
- QString m_argument;
+ TQString m_execPath;
+ TQString m_argument;
bool m_enabled;
bool m_serviceRegistered, m_registerService;
bool m_dnssdRegister, m_dnssdRegistered;
- QDateTime m_expirationTime;
- QDateTime m_slpLifetimeEnd;
- QString m_uuid;
+ TQDateTime m_expirationTime;
+ TQDateTime m_slpLifetimeEnd;
+ TQString m_uuid;
KServerSocket *m_socket;
KProcess m_process;
@@ -63,7 +63,7 @@ private:
void freePort();
void loadConfig(KService::Ptr s);
- void setEnabledInternal(bool e, const QDateTime &ex);
+ void setEnabledInternal(bool e, const TQDateTime &ex);
void dnssdRegister(bool enabled);
void setServiceRegistrationEnabledInternal(bool enabled);
@@ -73,16 +73,16 @@ public:
bool acquirePort();
bool isValid();
- QString name();
+ TQString name();
void setEnabled(bool enabled);
- void setEnabled(const QDateTime &expiration);
+ void setEnabled(const TQDateTime &expiration);
void setServiceRegistrationEnabled(bool enabled);
bool isServiceRegistrationEnabled();
- QDateTime expiration();
- QDateTime serviceLifetimeEnd();
+ TQDateTime expiration();
+ TQDateTime serviceLifetimeEnd();
bool isEnabled();
int port();
- QStringList processServiceTemplate(const QString &a);
+ TQStringList processServiceTemplate(const TQString &a);
bool setPort(int port = -1, int autoProbeRange = 1);
void refreshRegistration();
@@ -102,14 +102,14 @@ k_dcop:
* (see kinetdmodule.desktop in servicetypes dir).
* @return a list with the names of all services
*/
- QStringList services();
+ TQStringList services();
/**
* Returns true if the service exists and is available.
* @param service name of a service as specified in its .desktop file
* @return true if a service with the given name exists and is enabled
*/
- bool isEnabled(QString service);
+ bool isEnabled(TQString service);
/**
* Enables or disabled the given service. Ignored if the given service
@@ -117,7 +117,7 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
- void setEnabled(QString service, bool enable);
+ void setEnabled(TQString service, bool enable);
/**
* Enables the given service until the given time. Ignored if the given
@@ -125,14 +125,14 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param expiration the time the service will be disabled at
*/
- void setEnabled(QString service, QDateTime expiration);
+ void setEnabled(TQString service, TQDateTime expiration);
/**
* Returns the port of the service, or -1 if not listening.
* @param service name of a service as specified in its .desktop file
* @return the port or -1 if no port used or service does not exist
*/
- int port(QString service);
+ int port(TQString service);
/**
* Sets the port of the service, and possibly a range of ports to try.
@@ -144,14 +144,14 @@ k_dcop:
* @return true if a port could be found or service is disabled, false
* otherwise.
*/
- bool setPort(QString service, int port = -1, int autoPortRange = 1);
+ bool setPort(TQString service, int port = -1, int autoPortRange = 1);
/**
* Tests whether the given service is installed..
* @param service name of a service as specified in its .desktop file
* @return true if installed, false otherwise
*/
- bool isInstalled(QString service);
+ bool isInstalled(TQString service);
/**
* Enables or disables the SLP registration. Ignored if the service does
@@ -160,7 +160,7 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
- void setServiceRegistrationEnabled(QString service, bool enabled);
+ void setServiceRegistrationEnabled(TQString service, bool enabled);
/**
* Returns true if service registration for the given service is enabled.
@@ -169,19 +169,19 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @return true if service registration is enabled
*/
- bool isServiceRegistrationEnabled(QString service);
+ bool isServiceRegistrationEnabled(TQString service);
private:
- QDateTime getNextExpirationTime();
+ TQDateTime getNextExpirationTime();
void setPortRetryTimer(bool retry);
void setReregistrationTimer();
KConfig *m_config;
KServiceRegistry *m_srvreg;
- QPtrList<PortListener> m_portListeners;
- QTimer m_expirationTimer;
- QTimer m_portRetryTimer;
- QTimer m_reregistrationTimer;
+ TQPtrList<PortListener> m_portListeners;
+ TQTimer m_expirationTimer;
+ TQTimer m_portRetryTimer;
+ TQTimer m_reregistrationTimer;
private slots:
void setExpirationTimer();
@@ -190,10 +190,10 @@ k_dcop:
void reregistrationTimer();
public:
- KInetD(QCString &n);
+ KInetD(TQCString &n);
virtual ~KInetD();
void loadServiceList();
- PortListener *getListenerByName(QString name);
+ PortListener *getListenerByName(TQString name);
};
diff --git a/krfb/krfb/configuration.cc b/krfb/krfb/configuration.cc
index 75f8c31d..03439b9d 100644
--- a/krfb/krfb/configuration.cc
+++ b/krfb/krfb/configuration.cc
@@ -26,14 +26,14 @@
#include <ksockaddr.h>
#include <kactivelabel.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
#include <dcopref.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <krun.h>
@@ -58,29 +58,29 @@ Configuration::Configuration(krfb_mode mode) :
connectDCOPSignal( 0, "KRFB::ConfigChanged", "KRFB_ConfigChanged()",
"updateKConfig()", false );
- connect(invMngDlg.newPersonalInvitationButton, SIGNAL(clicked()),
- SLOT(showPersonalInvitationDialog()));
- connect(invMngDlg.newEmailInvitationButton, SIGNAL(clicked()), SLOT(inviteEmail()));
- connect(invMngDlg.deleteOneButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteOnePressed()));
- connect(invMngDlg.deleteAllButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteAllPressed()));
- invMngDlg.listView->setSelectionMode(QListView::Extended);
- invMngDlg.listView->setMinimumSize(QSize(400, 100)); // QTs size is much to small
-
- connect(&invDlg, SIGNAL(createInviteClicked()),
- SLOT(showPersonalInvitationDialog()));
- connect(&invDlg, SIGNAL(emailInviteClicked()),
- SLOT(inviteEmail()));
- connect(&invDlg, SIGNAL(manageInviteClicked()),
- SLOT(showManageInvitationsDialog()));
- connect(&invDlg, SIGNAL(configureClicked()),
- SLOT(showConfigurationModule()));
- connect(this, SIGNAL(invitationNumChanged(int)),
- &invDlg, SLOT(setInviteCount(int)));
- connect(this, SIGNAL(invitationNumChanged(int)),
- &invMngDlg, SLOT(listSizeChanged(int)));
+ connect(invMngDlg.newPersonalInvitationButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(showPersonalInvitationDialog()));
+ connect(invMngDlg.newEmailInvitationButton, TQT_SIGNAL(clicked()), TQT_SLOT(inviteEmail()));
+ connect(invMngDlg.deleteOneButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteOnePressed()));
+ connect(invMngDlg.deleteAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteAllPressed()));
+ invMngDlg.listView->setSelectionMode(TQListView::Extended);
+ invMngDlg.listView->setMinimumSize(TQSize(400, 100)); // QTs size is much to small
+
+ connect(&invDlg, TQT_SIGNAL(createInviteClicked()),
+ TQT_SLOT(showPersonalInvitationDialog()));
+ connect(&invDlg, TQT_SIGNAL(emailInviteClicked()),
+ TQT_SLOT(inviteEmail()));
+ connect(&invDlg, TQT_SIGNAL(manageInviteClicked()),
+ TQT_SLOT(showManageInvitationsDialog()));
+ connect(&invDlg, TQT_SIGNAL(configureClicked()),
+ TQT_SLOT(showConfigurationModule()));
+ connect(this, TQT_SIGNAL(invitationNumChanged(int)),
+ &invDlg, TQT_SLOT(setInviteCount(int)));
+ connect(this, TQT_SIGNAL(invitationNumChanged(int)),
+ &invMngDlg, TQT_SLOT(listSizeChanged(int)));
emit invitationNumChanged(invitationList.size());
- connect(&refreshTimer, SIGNAL(timeout()), SLOT(refreshTimeout()));
+ connect(&refreshTimer, TQT_SIGNAL(timeout()), TQT_SLOT(refreshTimeout()));
refreshTimer.start(1000*60);
}
@@ -94,24 +94,24 @@ void Configuration::updateKConfig()
}
void Configuration::setKInetdEnabled(bool enabled) {
- kinetdRef.send("setEnabled", QString("krfb"), enabled);
- kinetdRef.send("setEnabled", QString("krfb_httpd"), enabled);
+ kinetdRef.send("setEnabled", TQString("krfb"), enabled);
+ kinetdRef.send("setEnabled", TQString("krfb_httpd"), enabled);
}
-void Configuration::setKInetdEnabled(const QDateTime &date) {
- kinetdRef.send("setEnabled", QString("krfb"), date);
- kinetdRef.send("setEnabled", QString("krfb_httpd"), date);
+void Configuration::setKInetdEnabled(const TQDateTime &date) {
+ kinetdRef.send("setEnabled", TQString("krfb"), date);
+ kinetdRef.send("setEnabled", TQString("krfb_httpd"), date);
}
void Configuration::setKInetdServiceRegistrationEnabled(bool enabled) {
kinetdRef.send("setServiceRegistrationEnabled",
- QString("krfb"), enabled);
+ TQString("krfb"), enabled);
kinetdRef.send("setServiceRegistrationEnabled",
- QString("krfb_httpd"), enabled);
+ TQString("krfb_httpd"), enabled);
}
void Configuration::getPortFromKInetd() {
- DCOPReply r = kinetdRef.call("port", QString("krfb"));
+ DCOPReply r = kinetdRef.call("port", TQString("krfb"));
if (!r.isValid())
return; // nice error msg here?
r.get(portNum);
@@ -119,12 +119,12 @@ void Configuration::getPortFromKInetd() {
void Configuration::setKInetdPort(int p) {
DCOPReply r = kinetdRef.call("setPort",
- QString("krfb"), p, 1);
+ TQString("krfb"), p, 1);
// nice error msg here?
}
-void Configuration::removeInvitation(QValueList<Invitation>::iterator it) {
+void Configuration::removeInvitation(TQValueList<Invitation>::iterator it) {
invitationList.remove(it);
save();
}
@@ -139,16 +139,16 @@ void Configuration::doKinetdConf() {
return;
}
- QDateTime lastExpiration;
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQDateTime lastExpiration;
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &ix = (*it);
- QDateTime t = ix.expirationTime();
+ TQDateTime t = ix.expirationTime();
if (t > lastExpiration)
lastExpiration = t;
it++;
}
- if (lastExpiration.isNull() || (lastExpiration < QDateTime::currentDateTime())) {
+ if (lastExpiration.isNull() || (lastExpiration < TQDateTime::currentDateTime())) {
setKInetdEnabled(false);
portNum = -1;
}
@@ -213,7 +213,7 @@ void Configuration::saveToKConfig() {
void Configuration::saveToDialogs() {
invalidateOldInvitations();
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &inv = *(it++);
if (!inv.getViewItem())
@@ -242,7 +242,7 @@ Invitation Configuration::createInvitation() {
}
void Configuration::invalidateOldInvitations() {
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
if (!(*it).isValid())
it = invitationList.remove(it);
@@ -259,10 +259,10 @@ void Configuration::refreshTimeout() {
emit invitationNumChanged(invitationList.size());
}
-QString Configuration::hostname() const
+TQString Configuration::hostname() const
{
KInetSocketAddress *a = KInetInterface::getPublicInetAddress();
- QString hostName;
+ TQString hostName;
if (a) {
hostName = a->nodeName();
delete a;
@@ -294,11 +294,11 @@ bool Configuration::enableSLP() const {
return enableSLPFlag;
}
-QString Configuration::password() const {
+TQString Configuration::password() const {
return passwordString;
}
-QValueList<Invitation> &Configuration::invitations() {
+TQValueList<Invitation> &Configuration::invitations() {
return invitationList;
}
@@ -328,7 +328,7 @@ void Configuration::setAllowDesktopControl(bool allowDesktopControl)
allowDesktopControlFlag = allowDesktopControl;
}
-void Configuration::setPassword(QString password)
+void Configuration::setPassword(TQString password)
{
passwordString = password;
}
@@ -369,7 +369,7 @@ void Configuration::showManageInvitationsDialog() {
}
void Configuration::invMngDlgDeleteOnePressed() {
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &ix = (*it);
KListViewItem *iv = ix.getViewItem();
@@ -439,7 +439,7 @@ void Configuration::inviteEmail() {
emit invitationNumChanged(invitationList.size());
KApplication *app = KApplication::kApplication();
- app->invokeMailer(QString::null, QString::null, QString::null,
+ app->invokeMailer(TQString::null, TQString::null, TQString::null,
i18n("Desktop Sharing (VNC) invitation"),
i18n("You have been invited to a VNC session. If you have the KDE Remote "
"Desktop Connection installed, just click on the link below.\n\n"
diff --git a/krfb/krfb/configuration.h b/krfb/krfb/configuration.h
index cec7a2ed..57e03385 100644
--- a/krfb/krfb/configuration.h
+++ b/krfb/krfb/configuration.h
@@ -26,10 +26,10 @@
#include <dcopref.h>
#include <kconfig.h>
-#include <qtimer.h>
-#include <qobject.h>
-#include <qvalidator.h>
-#include <qstring.h>
+#include <tqtimer.h>
+#include <tqobject.h>
+#include <tqvalidator.h>
+#include <tqstring.h>
#include <dcopobject.h>
@@ -46,7 +46,7 @@ enum krfb_mode {
* standalone-config-dialog and all the invitation dialogs
* @author Tim Jansen
*/
-class Configuration : public QObject, public DCOPObject {
+class Configuration : public TQObject, public DCOPObject {
K_DCOP
Q_OBJECT
public:
@@ -58,8 +58,8 @@ public:
bool allowDesktopControl() const;
bool allowUninvitedConnections() const;
bool enableSLP() const;
- QString password() const;
- QString hostname() const;
+ TQString password() const;
+ TQString hostname() const;
int port() const;
int preferredPort() const;
bool disableBackground() const;
@@ -68,15 +68,15 @@ public:
void setAllowUninvited(bool allowUninvited);
void setEnableSLP(bool e);
void setAskOnConnect(bool askOnConnect);
- void setPassword(QString password);
+ void setPassword(TQString password);
void setPreferredPort(int p);
void setDisableBackground(bool disable);
void setDisableXShm(bool disable);
void save();
void update();
- QValueList<Invitation> &invitations();
- void removeInvitation(QValueList<Invitation>::iterator it);
+ TQValueList<Invitation> &invitations();
+ void removeInvitation(TQValueList<Invitation>::iterator it);
signals:
void invitationFinished();
void invitationNumChanged(int num);
@@ -97,7 +97,7 @@ private:
Invitation createInvitation();
void closeInvDlg();
void invalidateOldInvitations();
- void setKInetdEnabled(const QDateTime &date);
+ void setKInetdEnabled(const TQDateTime &date);
void setKInetdEnabled(bool enabled);
void setKInetdServiceRegistrationEnabled(bool enabled);
void getPortFromKInetd();
@@ -109,7 +109,7 @@ private:
ManageInvitationsDialog invMngDlg;
InviteDialog invDlg;
PersonalInviteDialog persInvDlg;
- QTimer refreshTimer;
+ TQTimer refreshTimer;
bool askOnConnectFlag;
bool allowDesktopControlFlag;
@@ -120,8 +120,8 @@ private:
DCOPRef kinetdRef;
- QString passwordString;
- QValueList<Invitation> invitationList;
+ TQString passwordString;
+ TQValueList<Invitation> invitationList;
bool disableBackgroundFlag;
bool disableXShmFlag;
diff --git a/krfb/krfb/connectiondialog.cc b/krfb/krfb/connectiondialog.cc
index bc9f63c9..d767b5a2 100644
--- a/krfb/krfb/connectiondialog.cc
+++ b/krfb/krfb/connectiondialog.cc
@@ -20,13 +20,13 @@
#include "connectiondialog.h"
#include "connectionwidget.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kiconloader.h>
#include <klocale.h>
-ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name )
+ConnectionDialog::ConnectionDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "New Connection" ),
Ok|Cancel, Cancel, true )
{
@@ -45,7 +45,7 @@ ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name )
setMainWidget( m_connectWidget );
}
-void ConnectionDialog::setRemoteHost( const QString &host )
+void ConnectionDialog::setRemoteHost( const TQString &host )
{
m_connectWidget->remoteHost->setText( host );
}
diff --git a/krfb/krfb/connectiondialog.h b/krfb/krfb/connectiondialog.h
index c110d6db..c5f7e589 100644
--- a/krfb/krfb/connectiondialog.h
+++ b/krfb/krfb/connectiondialog.h
@@ -29,10 +29,10 @@ class ConnectionDialog : public KDialogBase
Q_OBJECT
public:
- ConnectionDialog( QWidget *parent, const char *name );
+ ConnectionDialog( TQWidget *parent, const char *name );
~ConnectionDialog() {};
- void setRemoteHost( const QString &host );
+ void setRemoteHost( const TQString &host );
void setAllowRemoteControl( bool b );
bool allowRemoteControl();
diff --git a/krfb/krfb/invitation.cc b/krfb/krfb/invitation.cc
index 75c4758a..e764036c 100644
--- a/krfb/krfb/invitation.cc
+++ b/krfb/krfb/invitation.cc
@@ -22,18 +22,18 @@
* Function for (en/de)crypting strings for config file, taken from KMail
* Author: Stefan Taferner <taferner@alpin.or.at>
*/
-QString cryptStr(const QString &aStr) {
- QString result;
+TQString cryptStr(const TQString &aStr) {
+ 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;
}
// a random string that doesn't contain i, I, o, O, 1, 0
// based on KApplication::randomString()
-static QString readableRandomString(int length) {
- QString str;
+static TQString readableRandomString(int length) {
+ TQString str;
while (length)
{
int r = KApplication::random() % 62;
@@ -59,8 +59,8 @@ static QString readableRandomString(int length) {
Invitation::Invitation() :
m_viewItem(0) {
m_password = readableRandomString(4)+"-"+readableRandomString(3);
- m_creationTime = QDateTime::currentDateTime();
- m_expirationTime = QDateTime::currentDateTime().addSecs(INVITATION_DURATION);
+ m_creationTime = TQDateTime::currentDateTime();
+ m_expirationTime = TQDateTime::currentDateTime().addSecs(INVITATION_DURATION);
}
Invitation::Invitation(const Invitation &x) :
@@ -71,9 +71,9 @@ Invitation::Invitation(const Invitation &x) :
}
Invitation::Invitation(KConfig* config, int num) {
- m_password = cryptStr(config->readEntry(QString("password%1").arg(num), ""));
- m_creationTime = config->readDateTimeEntry(QString("creation%1").arg(num));
- m_expirationTime = config->readDateTimeEntry(QString("expiration%1").arg(num));
+ m_password = cryptStr(config->readEntry(TQString("password%1").arg(num), ""));
+ m_creationTime = config->readDateTimeEntry(TQString("creation%1").arg(num));
+ m_expirationTime = config->readDateTimeEntry(TQString("expiration%1").arg(num));
m_viewItem = 0;
}
@@ -93,25 +93,25 @@ Invitation &Invitation::operator= (const Invitation&x) {
}
void Invitation::save(KConfig *config, int num) const {
- config->writeEntry(QString("password%1").arg(num), cryptStr(m_password));
- config->writeEntry(QString("creation%1").arg(num), m_creationTime);
- config->writeEntry(QString("expiration%1").arg(num), m_expirationTime);
+ config->writeEntry(TQString("password%1").arg(num), cryptStr(m_password));
+ config->writeEntry(TQString("creation%1").arg(num), m_creationTime);
+ config->writeEntry(TQString("expiration%1").arg(num), m_expirationTime);
}
-QString Invitation::password() const {
+TQString Invitation::password() const {
return m_password;
}
-QDateTime Invitation::expirationTime() const {
+TQDateTime Invitation::expirationTime() const {
return m_expirationTime;
}
-QDateTime Invitation::creationTime() const {
+TQDateTime Invitation::creationTime() const {
return m_creationTime;
}
bool Invitation::isValid() const {
- return m_expirationTime > QDateTime::currentDateTime();
+ return m_expirationTime > TQDateTime::currentDateTime();
}
void Invitation::setViewItem(KListViewItem *i) {
diff --git a/krfb/krfb/invitation.h b/krfb/krfb/invitation.h
index 4f1dd826..fe928d7f 100644
--- a/krfb/krfb/invitation.h
+++ b/krfb/krfb/invitation.h
@@ -21,14 +21,14 @@
#include <kapplication.h>
#include <klistview.h>
#include <kconfig.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
const int INVITATION_DURATION = 60*60;
-QString cryptStr(const QString &aStr);
+TQString cryptStr(const TQString &aStr);
class Invitation {
public:
@@ -38,18 +38,18 @@ public:
Invitation(const Invitation &x);
Invitation &operator= (const Invitation&x);
- QString password() const;
- QDateTime expirationTime() const;
- QDateTime creationTime() const;
+ TQString password() const;
+ TQDateTime expirationTime() const;
+ TQDateTime creationTime() const;
bool isValid() const;
void setViewItem(KListViewItem*);
KListViewItem* getViewItem() const;
void save(KConfig *config, int num) const;
private:
- QString m_password;
- QDateTime m_creationTime;
- QDateTime m_expirationTime;
+ TQString m_password;
+ TQDateTime m_creationTime;
+ TQDateTime m_expirationTime;
KListViewItem *m_viewItem;
};
diff --git a/krfb/krfb/invitedialog.cc b/krfb/krfb/invitedialog.cc
index fe01083a..f3b202a9 100644
--- a/krfb/krfb/invitedialog.cc
+++ b/krfb/krfb/invitedialog.cc
@@ -24,10 +24,10 @@
#include <klocale.h>
#include <kstdguiitem.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
-InviteDialog::InviteDialog( QWidget *parent, const char *name )
+InviteDialog::InviteDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Invitation" ),
User1|Close|Help, NoDefault, true )
{
@@ -38,12 +38,12 @@ InviteDialog::InviteDialog( QWidget *parent, const char *name )
setButtonGuiItem( User1, KStdGuiItem::configure() );
- connect( m_inviteWidget->btnCreateInvite, SIGNAL( clicked() ),
- SIGNAL( createInviteClicked() ) );
- connect( m_inviteWidget->btnEmailInvite, SIGNAL( clicked() ),
- SIGNAL( emailInviteClicked() ) );
- connect( m_inviteWidget->btnManageInvite, SIGNAL( clicked() ),
- SIGNAL( manageInviteClicked() ) );
+ connect( m_inviteWidget->btnCreateInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( createInviteClicked() ) );
+ connect( m_inviteWidget->btnEmailInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( emailInviteClicked() ) );
+ connect( m_inviteWidget->btnManageInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( manageInviteClicked() ) );
}
void InviteDialog::slotUser1()
diff --git a/krfb/krfb/invitedialog.h b/krfb/krfb/invitedialog.h
index dfb0e0f4..a1de109b 100644
--- a/krfb/krfb/invitedialog.h
+++ b/krfb/krfb/invitedialog.h
@@ -29,7 +29,7 @@ class InviteDialog : public KDialogBase
Q_OBJECT
public:
- InviteDialog( QWidget *parent, const char *name );
+ InviteDialog( TQWidget *parent, const char *name );
~InviteDialog() {}
void enableInviteButton( bool enable );
diff --git a/krfb/krfb/krfbifaceimpl.h b/krfb/krfb/krfbifaceimpl.h
index 430a0652..21f3a022 100644
--- a/krfb/krfb/krfbifaceimpl.h
+++ b/krfb/krfb/krfbifaceimpl.h
@@ -1,11 +1,11 @@
#ifndef __KRFB_IFACE_IMPL_H
#define __KRFB_IFACE_IMPL_H
-#include <qobject.h>
+#include <tqobject.h>
#include "rfbcontroller.h"
#include "krfbiface.h"
-class KRfbIfaceImpl : public QObject, public virtual krfbIface
+class KRfbIfaceImpl : public TQObject, public virtual krfbIface
{
Q_OBJECT
private:
diff --git a/krfb/krfb/main.cpp b/krfb/krfb/main.cpp
index 4428e983..0910b9d8 100644
--- a/krfb/krfb/main.cpp
+++ b/krfb/krfb/main.cpp
@@ -31,10 +31,10 @@
#include <kaboutapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qobject.h>
-#include <qwindowdefs.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqobject.h>
+#include <tqwindowdefs.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <dcopref.h>
#include <signal.h>
@@ -57,7 +57,7 @@ void checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
DCOPRef ref("kded", "kinetd");
ref.setDCOPClient(KApplication::dcopClient());
- DCOPReply r = ref.call("isInstalled", QString("krfb"));
+ DCOPReply r = ref.call("isInstalled", TQString("krfb"));
if (!r.isValid()) {
kinetdAvailable = false;
krfbAvailable = false;
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
Configuration *config;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString fdString;
+ TQString fdString;
if (!args->isSet(ARG_KINETD)) {
bool kinetdA, krfbA;
checkKInetd(kinetdA, krfbA);
@@ -145,33 +145,33 @@ int main(int argc, char *argv[])
RFBController controller(config);
KRfbIfaceImpl dcopiface(&controller);
- QObject::connect(&app, SIGNAL(lastWindowClosed()), // dont show passivepopup
- &trayicon, SLOT(prepareQuit()));
- QObject::connect(&app, SIGNAL(lastWindowClosed()),
- &controller, SLOT(closeConnection()));
-
- QObject::connect(&trayicon, SIGNAL(showManageInvitations()),
- config, SLOT(showManageInvitationsDialog()));
- QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)),
- &controller, SLOT(enableDesktopControl(bool)));
- QObject::connect(&trayicon, SIGNAL(diconnectedMessageDisplayed()),
- &app, SLOT(quit()));
-
- QObject::connect(&dcopiface, SIGNAL(exitApp()),
- &controller, SLOT(closeConnection()));
- QObject::connect(&dcopiface, SIGNAL(exitApp()),
- &app, SLOT(quit()));
-
- QObject::connect(&controller, SIGNAL(sessionRefused()),
- &app, SLOT(quit()));
- QObject::connect(&controller, SIGNAL(sessionEstablished(QString)),
- &trayicon, SLOT(showConnectedMessage(QString)));
- QObject::connect(&controller, SIGNAL(sessionFinished()),
- &trayicon, SLOT(showDisconnectedMessage()));
- QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)),
- &trayicon, SLOT(setDesktopControlSetting(bool)));
- QObject::connect(&controller, SIGNAL(quitApp()),
- &app, SLOT(quit()));
+ TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), // dont show passivepopup
+ &trayicon, TQT_SLOT(prepareQuit()));
+ TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()),
+ &controller, TQT_SLOT(closeConnection()));
+
+ TQObject::connect(&trayicon, TQT_SIGNAL(showManageInvitations()),
+ config, TQT_SLOT(showManageInvitationsDialog()));
+ TQObject::connect(&trayicon, TQT_SIGNAL(enableDesktopControl(bool)),
+ &controller, TQT_SLOT(enableDesktopControl(bool)));
+ TQObject::connect(&trayicon, TQT_SIGNAL(diconnectedMessageDisplayed()),
+ &app, TQT_SLOT(quit()));
+
+ TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()),
+ &controller, TQT_SLOT(closeConnection()));
+ TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()),
+ &app, TQT_SLOT(quit()));
+
+ TQObject::connect(&controller, TQT_SIGNAL(sessionRefused()),
+ &app, TQT_SLOT(quit()));
+ TQObject::connect(&controller, TQT_SIGNAL(sessionEstablished(TQString)),
+ &trayicon, TQT_SLOT(showConnectedMessage(TQString)));
+ TQObject::connect(&controller, TQT_SIGNAL(sessionFinished()),
+ &trayicon, TQT_SLOT(showDisconnectedMessage()));
+ TQObject::connect(&controller, TQT_SIGNAL(desktopControlSettingChanged(bool)),
+ &trayicon, TQT_SLOT(setDesktopControlSetting(bool)));
+ TQObject::connect(&controller, TQT_SIGNAL(quitApp()),
+ &app, TQT_SLOT(quit()));
sigset_t sigs;
sigemptyset(&sigs);
diff --git a/krfb/krfb/manageinvitations.ui.h b/krfb/krfb/manageinvitations.ui.h
index 86c1fa4b..74b7cb97 100644
--- a/krfb/krfb/manageinvitations.ui.h
+++ b/krfb/krfb/manageinvitations.ui.h
@@ -3,7 +3,7 @@ void ManageInvitationsDialog::listSizeChanged(int i) {
}
void ManageInvitationsDialog::listSelectionChanged() {
- QListViewItem *i = listView->firstChild();
+ TQListViewItem *i = listView->firstChild();
while(i) {
if (i->isSelected()) {
deleteOneButton->setEnabled(true);
diff --git a/krfb/krfb/personalinvitedialog.cc b/krfb/krfb/personalinvitedialog.cc
index 4be1c3de..a5664bcb 100644
--- a/krfb/krfb/personalinvitedialog.cc
+++ b/krfb/krfb/personalinvitedialog.cc
@@ -20,13 +20,13 @@
#include "personalinvitedialog.h"
#include "personalinvitewidget.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kactivelabel.h>
#include <kiconloader.h>
#include <klocale.h>
-PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name )
+PersonalInviteDialog::PersonalInviteDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Personal Invitation" ),
Close, Close, true )
{
@@ -37,18 +37,18 @@ PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name )
setMainWidget( m_inviteWidget );
}
-void PersonalInviteDialog::setHost( const QString &host, uint port )
+void PersonalInviteDialog::setHost( const TQString &host, uint port )
{
- m_inviteWidget->hostLabel->setText( QString( "%1:%2" )
+ m_inviteWidget->hostLabel->setText( TQString( "%1:%2" )
.arg( host ).arg( port ) );
}
-void PersonalInviteDialog::setPassword( const QString &passwd )
+void PersonalInviteDialog::setPassword( const TQString &passwd )
{
m_inviteWidget->passwordLabel->setText( passwd );
}
-void PersonalInviteDialog::setExpiration( const QDateTime &expire )
+void PersonalInviteDialog::setExpiration( const TQDateTime &expire )
{
m_inviteWidget->expirationLabel->setText( expire.toString( Qt::LocalDate ) );
}
diff --git a/krfb/krfb/personalinvitedialog.h b/krfb/krfb/personalinvitedialog.h
index 2951a93b..6f28a33d 100644
--- a/krfb/krfb/personalinvitedialog.h
+++ b/krfb/krfb/personalinvitedialog.h
@@ -22,19 +22,19 @@
class PersonalInviteWidget;
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdialogbase.h>
class PersonalInviteDialog : public KDialogBase
{
public:
- PersonalInviteDialog( QWidget *parent, const char *name );
+ PersonalInviteDialog( TQWidget *parent, const char *name );
virtual ~PersonalInviteDialog() {}
- void setHost( const QString &host, uint port );
- void setPassword( const QString &passwd );
- void setExpiration( const QDateTime &expire );
+ void setHost( const TQString &host, uint port );
+ void setPassword( const TQString &passwd );
+ void setExpiration( const TQDateTime &expire );
protected:
PersonalInviteWidget *m_inviteWidget;
diff --git a/krfb/krfb/rfbcontroller.cc b/krfb/krfb/rfbcontroller.cc
index 29f48278..51516683 100644
--- a/krfb/krfb/rfbcontroller.cc
+++ b/krfb/krfb/rfbcontroller.cc
@@ -42,18 +42,18 @@
#include <kmessagebox.h>
#include <klocale.h>
#include <kextsock.h>
-#include <qstring.h>
-#include <qcursor.h>
-#include <qwindowdefs.h>
-#include <qtimer.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qglobal.h>
-#include <qlabel.h>
-#include <qmutex.h>
-#include <qdeepcopy.h>
-#include <qclipboard.h>
-#include <qdesktopwidget.h>
+#include <tqstring.h>
+#include <tqcursor.h>
+#include <tqwindowdefs.h>
+#include <tqtimer.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqglobal.h>
+#include <tqlabel.h>
+#include <tqmutex.h>
+#include <tqdeepcopy.h>
+#include <tqclipboard.h>
+#include <tqdesktopwidget.h>
#include <X11/Xutil.h>
#include <X11/extensions/XTest.h>
@@ -167,7 +167,7 @@ static void inetdDisconnectHook()
static void clipboardHook(char* str,int len, rfbClientPtr)
{
- self->clipboardToServer(QString::fromUtf8(str, len));
+ self->clipboardToServer(TQString::fromUtf8(str, len));
}
VNCEvent::~VNCEvent() {
@@ -290,7 +290,7 @@ PointerEvent::PointerEvent(int b, int _x, int _y) :
}
void PointerEvent::exec() {
- QDesktopWidget *desktopWidget = QApplication::desktop();
+ TQDesktopWidget *desktopWidget = TQApplication::desktop();
int screen = desktopWidget->screenNumber();
if (screen < 0)
@@ -307,9 +307,9 @@ void PointerEvent::exec() {
}
-ClipboardEvent::ClipboardEvent(RFBController *c, const QString &ctext) :
+ClipboardEvent::ClipboardEvent(RFBController *c, const TQString &ctext) :
controller(c),
- text(QDeepCopy<QString>(ctext)) {
+ text(TQDeepCopy<TQString>(ctext)) {
}
void ClipboardEvent::exec() {
@@ -325,7 +325,7 @@ void ClipboardEvent::exec() {
}
-KNotifyEvent::KNotifyEvent(const QString &n, const QString &d) :
+KNotifyEvent::KNotifyEvent(const TQString &n, const TQString &d) :
name(n),
desc(d) {
}
@@ -356,14 +356,14 @@ RFBController::RFBController(Configuration *c) :
forcedClose(false)
{
self = this;
- connect(&dialog, SIGNAL(okClicked()), SLOT(dialogAccepted()));
- connect(&dialog, SIGNAL(cancelClicked()), SLOT(dialogRefused()));
- connect(&initIdleTimer, SIGNAL(timeout()), SLOT(checkAsyncEvents()));
- connect(&idleTimer, SIGNAL(timeout()), SLOT(idleSlot()));
+ connect(&dialog, TQT_SIGNAL(okClicked()), TQT_SLOT(dialogAccepted()));
+ connect(&dialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(dialogRefused()));
+ connect(&initIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAsyncEvents()));
+ connect(&idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleSlot()));
- clipboard = QApplication::clipboard();
- connect(clipboard, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect(clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ clipboard = TQApplication::clipboard();
+ connect(clipboard, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect(clipboard, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
asyncQueue.setAutoDelete(true);
@@ -386,11 +386,11 @@ RFBController::~RFBController()
void RFBController::startServer(int inetdFd, bool xtestGrab)
{
framebufferImage = XGetImage(qt_xdisplay(),
- QApplication::desktop()->winId(),
+ TQApplication::desktop()->winId(),
0,
0,
- QApplication::desktop()->width(),
- QApplication::desktop()->height(),
+ TQApplication::desktop()->width(),
+ TQApplication::desktop()->height(),
AllPlanes,
ZPixmap);
@@ -456,7 +456,7 @@ void RFBController::startServer(int inetdFd, bool xtestGrab)
passwordChanged();
scanner = new XUpdateScanner(qt_xdisplay(),
- QApplication::desktop()->winId(),
+ TQApplication::desktop()->winId(),
(unsigned char*)fb, w, h,
server->rfbServerFormat.bitsPerPixel,
server->paddedWidthInBytes,
@@ -484,7 +484,7 @@ void RFBController::stopServer(bool xtestUngrab)
if (xtestUngrab) {
disabler.disable = true;
- QTimer::singleShot(0, &disabler, SLOT(exec()));
+ TQTimer::singleShot(0, &disabler, TQT_SLOT(exec()));
}
}
@@ -613,9 +613,9 @@ void RFBController::idleSlot()
rfbUndrawCursor(server);
- QPtrList<Hint> v;
+ TQPtrList<Hint> v;
v.setAutoDelete(true);
- QPoint p = QCursor::pos();
+ TQPoint p = TQCursor::pos();
scanner->searchUpdates(v, p.y());
Hint *h;
@@ -647,7 +647,7 @@ void RFBController::dialogRefused()
emit sessionRefused();
}
-bool checkPassword(const QString &p,
+bool checkPassword(const TQString &p,
unsigned char *ochallenge,
const char *response,
int len) {
@@ -680,7 +680,7 @@ bool RFBController::handleCheckPassword(rfbClientPtr cl,
cl->authChallenge, response, len);
if (!authd) {
- QValueList<Invitation>::iterator it =
+ TQValueList<Invitation>::iterator it =
configuration->invitations().begin();
while (it != configuration->invitations().end()) {
if (checkPassword((*it).password(),
@@ -719,7 +719,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl)
int socket = cl->sock;
cl->negotiationFinishedHook = negotiationFinishedHook;
- QString host, port;
+ TQString host, port;
KSocketAddress *ksa = KExtendedSocket::peerAddress(socket);
if (ksa) {
hostent *he = 0;
@@ -730,7 +730,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl)
AF_INET);
if (he && he->h_name)
- host = QString(he->h_name);
+ host = TQString(he->h_name);
else
host = ksa->nodeName();
delete ksa;
@@ -799,7 +799,7 @@ void RFBController::handlePointerEvent(int button_mask, int x, int y) {
}
-void RFBController::clipboardToServer(const QString &ctext) {
+void RFBController::clipboardToServer(const TQString &ctext) {
if (!allowDesktopControl)
return;
@@ -814,7 +814,7 @@ void RFBController::clipboardChanged() {
if (clipboard->ownsClipboard())
return;
- QString text = clipboard->text(QClipboard::Clipboard);
+ TQString text = clipboard->text(QClipboard::Clipboard);
// avoid ping-pong between client&server
if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) &&
@@ -825,7 +825,7 @@ void RFBController::clipboardChanged() {
lastClipboardDirection = LAST_SYNC_TO_CLIENT;
lastClipboardText = text;
- QCString ctext = text.utf8();
+ TQCString ctext = text.utf8();
rfbSendServerCutText(server, ctext.data(), ctext.length());
}
@@ -835,7 +835,7 @@ void RFBController::selectionChanged() {
if (clipboard->ownsSelection())
return;
- QString text = clipboard->text(QClipboard::Selection);
+ TQString text = clipboard->text(QClipboard::Selection);
// avoid ping-pong between client&server
if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) &&
(lastClipboardText == text))
@@ -845,7 +845,7 @@ void RFBController::selectionChanged() {
lastClipboardDirection = LAST_SYNC_TO_CLIENT;
lastClipboardText = text;
- QCString ctext = text.utf8();
+ TQCString ctext = text.utf8();
rfbSendServerCutText(server, ctext.data(), ctext.length());
}
@@ -857,7 +857,7 @@ void RFBController::passwordChanged() {
server->rfbAuthPasswdData = (void*) (authRequired ? 1 : 0);
}
-void RFBController::sendKNotifyEvent(const QString &n, const QString &d)
+void RFBController::sendKNotifyEvent(const TQString &n, const TQString &d)
{
asyncMutex.lock();
asyncQueue.append(new KNotifyEvent(n, d));
diff --git a/krfb/krfb/rfbcontroller.h b/krfb/krfb/rfbcontroller.h
index 948456f2..c7646d91 100644
--- a/krfb/krfb/rfbcontroller.h
+++ b/krfb/krfb/rfbcontroller.h
@@ -27,9 +27,9 @@
#include "connectiondialog.h"
#include "xupdatescanner.h"
#include <ksock.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qmutex.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
#define HAVE_PTHREADS
#include "rfb.h"
@@ -89,17 +89,17 @@ public:
class ClipboardEvent : public VNCEvent {
RFBController *controller;
- QString text;
+ TQString text;
public:
- ClipboardEvent(RFBController *c, const QString &text);
+ ClipboardEvent(RFBController *c, const TQString &text);
virtual void exec();
};
class KNotifyEvent : public VNCEvent {
- QString name;
- QString desc;
+ TQString name;
+ TQString desc;
public:
- KNotifyEvent(const QString &n, const QString &d);
+ KNotifyEvent(const TQString &n, const TQString &d);
virtual ~KNotifyEvent();
virtual void exec();
};
@@ -120,7 +120,7 @@ public:
* set.
* @author Tim Jansen
*/
-class RFBController : public QObject {
+class RFBController : public TQObject {
Q_OBJECT
friend class SessionEstablishedEvent;
@@ -139,7 +139,7 @@ public:
void handleKeyEvent(bool down, KeySym keySym);
void handlePointerEvent(int button_mask, int x, int y);
enum rfbNewClientAction handleNewClient(rfbClientPtr cl);
- void clipboardToServer(const QString &text);
+ void clipboardToServer(const TQString &text);
void handleClientGone();
void handleNegotiationFinished(rfbClientPtr cl);
int getPort();
@@ -153,7 +153,7 @@ public slots:
void enableDesktopControl(bool c);
signals:
- void sessionEstablished(QString host);
+ void sessionEstablished(TQString host);
void sessionFinished();
void sessionRefused();
void quitApp();
@@ -161,35 +161,35 @@ signals:
private:
void stopServer(bool xtestUngrab = true);
- void sendKNotifyEvent(const QString &name, const QString &desc);
+ void sendKNotifyEvent(const TQString &name, const TQString &desc);
void sendSessionEstablished();
void disableBackground(bool state);
- QString remoteIp;
+ TQString remoteIp;
volatile bool allowDesktopControl;
- QTimer initIdleTimer;
- QTimer idleTimer;
+ TQTimer initIdleTimer;
+ TQTimer idleTimer;
enum {
LAST_SYNC_TO_SERVER,
LAST_SYNC_TO_CLIENT
} lastClipboardDirection;
- QString lastClipboardText;
+ TQString lastClipboardText;
QClipboard *clipboard;
Configuration *configuration;
XUpdateScanner *scanner;
ConnectionDialog dialog;
- QString desktopName;
+ TQString desktopName;
rfbScreenInfoPtr server;
XImage *framebufferImage;
- QMutex asyncMutex;
- QPtrList<VNCEvent> asyncQueue;
+ TQMutex asyncMutex;
+ TQPtrList<VNCEvent> asyncQueue;
bool disableBackgroundPending; // background, as desired by libvncserver
bool disableBackgroundState; // real background state
@@ -208,7 +208,7 @@ private slots:
* Class to call XTestDiscard at idle time (because otherwise
* it will not work with QT)
*/
-class XTestDisabler : public QObject {
+class XTestDisabler : public TQObject {
Q_OBJECT
public:
XTestDisabler();
diff --git a/krfb/krfb/trayicon.cpp b/krfb/krfb/trayicon.cpp
index 220ff7c0..f7d2c64a 100644
--- a/krfb/krfb/trayicon.cpp
+++ b/krfb/krfb/trayicon.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
#include "trayicon.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kstdaction.h>
#include <kapplication.h>
#include <klocale.h>
@@ -25,19 +25,19 @@
#include <kiconloader.h>
#include <kpopupmenu.h>
-KPassivePopup2::KPassivePopup2(QWidget *parent) :
+KPassivePopup2::KPassivePopup2(TQWidget *parent) :
KPassivePopup(parent){
}
-void KPassivePopup2::hideEvent( QHideEvent *e )
+void KPassivePopup2::hideEvent( TQHideEvent *e )
{
KPassivePopup::hideEvent(e);
emit hidden();
}
-KPassivePopup2 *KPassivePopup2::message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent)
+KPassivePopup2 *KPassivePopup2::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent)
{
KPassivePopup2 *pop = new KPassivePopup2( parent);
pop->setView( caption, text, icon );
@@ -58,10 +58,10 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) :
trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User);
trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User);
setPixmap(trayIconClosed);
- QToolTip::add(this, i18n("Desktop Sharing - connecting"));
+ TQToolTip::add(this, i18n("Desktop Sharing - connecting"));
- manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null,
- 0, this, SIGNAL(showManageInvitations()),
+ manageInvitationsAction = new KAction(i18n("Manage &Invitations"), TQString::null,
+ 0, this, TQT_SIGNAL(showManageInvitations()),
&actionCollection);
manageInvitationsAction->plug(contextMenu());
@@ -71,11 +71,11 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) :
enableControlAction->setCheckedState(i18n("Disable Remote Control"));
enableControlAction->plug(contextMenu());
enableControlAction->setEnabled(false);
- connect(enableControlAction, SIGNAL(toggled(bool)), SIGNAL(enableDesktopControl(bool)));
+ connect(enableControlAction, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(enableDesktopControl(bool)));
contextMenu()->insertSeparator();
- aboutAction = KStdAction::aboutApp(this, SLOT(showAbout()), &actionCollection);
+ aboutAction = KStdAction::aboutApp(this, TQT_SLOT(showAbout()), &actionCollection);
aboutAction->plug(contextMenu());
show();
@@ -94,27 +94,27 @@ void TrayIcon::prepareQuit() {
-void TrayIcon::showConnectedMessage(QString host) {
+void TrayIcon::showConnectedMessage(TQString host) {
setPixmap(trayIconOpen);
KPassivePopup2::message(i18n("Desktop Sharing"),
i18n("The remote user has been authenticated and is now connected."),
trayIconOpen,
this);
- QToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host));
+ TQToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host));
}
void TrayIcon::showDisconnectedMessage() {
if (quitting)
return;
- QToolTip::add(this, i18n("Desktop Sharing - disconnected"));
+ TQToolTip::add(this, i18n("Desktop Sharing - disconnected"));
setPixmap(trayIconClosed);
KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"),
i18n("The remote user has closed the connection."),
trayIconClosed,
this);
- connect(p, SIGNAL(hidden()), this, SIGNAL(diconnectedMessageDisplayed()));
+ connect(p, TQT_SIGNAL(hidden()), this, TQT_SIGNAL(diconnectedMessageDisplayed()));
}
void TrayIcon::setDesktopControlSetting(bool b) {
@@ -122,7 +122,7 @@ void TrayIcon::setDesktopControlSetting(bool b) {
enableControlAction->setChecked(b);
}
-void TrayIcon::mousePressEvent(QMouseEvent *e)
+void TrayIcon::mousePressEvent(TQMouseEvent *e)
{
if (!rect().contains(e->pos()))
return;
diff --git a/krfb/krfb/trayicon.h b/krfb/krfb/trayicon.h
index 4e586efa..ea4e7132 100644
--- a/krfb/krfb/trayicon.h
+++ b/krfb/krfb/trayicon.h
@@ -20,7 +20,7 @@
#include "configuration.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
#include <kaction.h>
#include <ksystemtray.h>
@@ -31,10 +31,10 @@ class KDialog;
class KPassivePopup2 : public KPassivePopup {
Q_OBJECT
public:
- KPassivePopup2(QWidget *parent);
- static KPassivePopup2 *message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent);
+ KPassivePopup2(TQWidget *parent);
+ static KPassivePopup2 *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent);
signals:
void hidden();
@@ -43,7 +43,7 @@ protected:
/**
* Reimplemented to detect hide events.
*/
- virtual void hideEvent( QHideEvent *e );
+ virtual void hideEvent( TQHideEvent *e );
};
/**
@@ -64,12 +64,12 @@ signals:
public slots:
void prepareQuit();
- void showConnectedMessage(QString host);
+ void showConnectedMessage(TQString host);
void showDisconnectedMessage();
void setDesktopControlSetting(bool);
protected:
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
private:
diff --git a/krfb/krfb/xupdatescanner.cc b/krfb/krfb/xupdatescanner.cc
index b2cd4f85..52519475 100644
--- a/krfb/krfb/xupdatescanner.cc
+++ b/krfb/krfb/xupdatescanner.cc
@@ -356,7 +356,7 @@ static void printStatistics(Hint &hint) {
}
void XUpdateScanner::flushHint(int x, int y, int &x0,
- Hint &hint, QPtrList<Hint> &hintList)
+ Hint &hint, TQPtrList<Hint> &hintList)
{
if (x0 < 0)
return;
@@ -371,7 +371,7 @@ void XUpdateScanner::flushHint(int x, int y, int &x0,
hintList.append(new Hint(hint));
}
-void XUpdateScanner::createHints(QPtrList<Hint> &hintList)
+void XUpdateScanner::createHints(TQPtrList<Hint> &hintList)
{
Hint hint;
int x0 = -1;
@@ -441,7 +441,7 @@ void XUpdateScanner::testScanline(int y, bool rememberHits) {
recentHitScanlines[MAX_RECENT_HITS-1] = y;
}
-void XUpdateScanner::searchUpdates(QPtrList<Hint> &hintList, int ptrY)
+void XUpdateScanner::searchUpdates(TQPtrList<Hint> &hintList, int ptrY)
{
count++;
count %= SCANLINES;
diff --git a/krfb/krfb/xupdatescanner.h b/krfb/krfb/xupdatescanner.h
index 00cbec82..fdd02e30 100644
--- a/krfb/krfb/xupdatescanner.h
+++ b/krfb/krfb/xupdatescanner.h
@@ -21,7 +21,7 @@
#ifndef _hexonet_rfb_XUpdateScanner_h_
#define _hexonet_rfb_XUpdateScanner_h_
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
@@ -76,15 +76,15 @@ class XUpdateScanner
// hitList: returns list of changes
// ptrY: ptrY: position of the cursor
- void searchUpdates( QPtrList<Hint> &hintList, int ptrY);
+ void searchUpdates( TQPtrList<Hint> &hintList, int ptrY);
private:
void testScanline(int y, bool rememberHits);
bool copyTile(int x, int y, int tx, int ty);
void copyAllTiles();
void flushHint(int x, int y, int &x0, Hint &hint,
- QPtrList<Hint> &hintList);
- void createHints(QPtrList<Hint> &hintList);
+ TQPtrList<Hint> &hintList);
+ void createHints(TQPtrList<Hint> &hintList);
void addTileToHint(int x, int y, int th, Hint &hint);
void createHintFromTile(int x, int y, int th, Hint &hint);
diff --git a/krfb/libvncserver/main.c b/krfb/libvncserver/main.c
index 207e512d..5b318b8b 100644
--- a/krfb/libvncserver/main.c
+++ b/krfb/libvncserver/main.c
@@ -150,7 +150,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
} else {
sraRgnOr(cl->modifiedRegion,copyRegion);
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
@@ -208,7 +208,7 @@ void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion)
while((cl=rfbClientIteratorNext(iterator))) {
LOCK(cl->updateMutex);
sraRgnOr(cl->modifiedRegion,modRegion);
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
@@ -308,7 +308,7 @@ clientInput(void *data)
/* Get rid of the output thread. */
LOCK(cl->updateMutex);
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
IF_PTHREADS(pthread_join(output_thread, NULL));
diff --git a/krfb/libvncserver/rfb.h b/krfb/libvncserver/rfb.h
index 1d62aca5..7f613300 100644
--- a/krfb/libvncserver/rfb.h
+++ b/krfb/libvncserver/rfb.h
@@ -144,7 +144,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex) int mutex
#define INIT_MUTEX(mutex) fprintf(stderr,"%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex))
#define TINI_MUTEX(mutex) fprintf(stderr,"%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex)
-#define SIGNAL(cond) fprintf(stderr,"%s:%d SIGNAL(%s)\n",__FILE__,__LINE__,#cond)
+#define VSIGNAL(cond) fprintf(stderr,"%s:%d VSIGNAL(%s)\n",__FILE__,__LINE__,#cond)
#define WAIT(cond,mutex) /* fprintf(stderr,"%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex) */
#define COND(cond)
#define INIT_COND(cond) fprintf(stderr,"%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond)
@@ -156,7 +156,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex) pthread_mutex_t (mutex)
#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL)
#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex))
-#define TSIGNAL(cond) pthread_cond_signal(&(cond))
+#define VSIGNAL(cond) pthread_cond_signal(&(cond))
#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex))
#define TIMEDWAIT(cond,mutex,t) {struct timeval tv;\
tv.tv_sec = (t) / 1000;\
@@ -173,7 +173,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex)
#define INIT_MUTEX(mutex)
#define TINI_MUTEX(mutex)
-#define TSIGNAL(cond)
+#define VSIGNAL(cond)
#define WAIT(cond,mutex) this_is_unsupported
#define COND(cond)
#define INIT_COND(cond)
diff --git a/krfb/libvncserver/rfbserver.c b/krfb/libvncserver/rfbserver.c
index 66cc4ee3..baf21bb1 100644
--- a/krfb/libvncserver/rfbserver.c
+++ b/krfb/libvncserver/rfbserver.c
@@ -71,7 +71,7 @@ void rfbDecrClientRef(rfbClientPtr cl)
LOCK(cl->refCountMutex);
cl->refCount--;
if(cl->refCount<=0) /* just to be sure also < 0 */
- TSIGNAL(cl->deleteCond);
+ TQT_SIGNAL(cl->deleteCond);
UNLOCK(cl->refCountMutex);
}
#else
@@ -837,7 +837,7 @@ rfbProcessClientNormalMessage(cl)
sraRgnOr(cl->modifiedRegion,tmpRegion);
sraRgnSubtract(cl->copyRegion,tmpRegion);
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
sraRgnDestroy(tmpRegion);
diff --git a/krfb/libvncserver/sockets.c b/krfb/libvncserver/sockets.c
index 68025b3d..c375e928 100644
--- a/krfb/libvncserver/sockets.c
+++ b/krfb/libvncserver/sockets.c
@@ -318,7 +318,7 @@ rfbCloseClient(cl)
close(cl->sock);
cl->sock = -1;
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
diff --git a/krfb/srvloc/kinetinterface.cpp b/krfb/srvloc/kinetinterface.cpp
index 0599dfa7..d1f45652 100644
--- a/krfb/srvloc/kinetinterface.cpp
+++ b/krfb/srvloc/kinetinterface.cpp
@@ -30,7 +30,7 @@
class KInetInterfacePrivate {
public:
- QString name;
+ TQString name;
int flags;
KInetSocketAddress *address;
KInetSocketAddress *netmask;
@@ -45,7 +45,7 @@ public:
destination(0) {
}
- KInetInterfacePrivate(const QString _name,
+ KInetInterfacePrivate(const TQString _name,
int _flags,
KInetSocketAddress *_address,
KInetSocketAddress *_netmask,
@@ -99,7 +99,7 @@ KInetInterface::KInetInterface() :
d(0) {
}
-KInetInterface::KInetInterface(const QString &_name,
+KInetInterface::KInetInterface(const TQString &_name,
int _flags,
KInetSocketAddress *_address,
KInetSocketAddress *_netmask,
@@ -143,11 +143,11 @@ bool KInetInterface::isValid() const {
return d == 0;
}
-QString KInetInterface::displayName() const {
+TQString KInetInterface::displayName() const {
return d->name;
}
-QString KInetInterface::name() const {
+TQString KInetInterface::name() const {
return d->name;
}
@@ -172,13 +172,13 @@ KInetSocketAddress *KInetInterface::destinationAddress() const {
}
KInetSocketAddress *KInetInterface::getPublicInetAddress() {
- QValueVector<KInetInterface> v = getAllInterfaces(true);
+ TQValueVector<KInetInterface> v = getAllInterfaces(true);
// TODO: first step: take the default route interface
// try to find point-2-point interface, because it may be
// a dial-up connection. Take it.
- QValueVector<KInetInterface>::const_iterator it = v.begin();
+ TQValueVector<KInetInterface>::const_iterator it = v.begin();
while (it != v.end()) {
if (((*it).flags() & (PointToPoint | Up | Running)) &&
(!((*it).flags() & Loopback)) &&
@@ -247,10 +247,10 @@ namespace {
}
}
-QValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopback) {
+TQValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopback) {
struct kde_ifaddrs *ads;
struct kde_ifaddrs *a;
- QValueVector<KInetInterface> r;
+ TQValueVector<KInetInterface> r;
if (kde_getifaddrs(&ads))
return r;
@@ -260,7 +260,7 @@ QValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopba
a = a->ifa_next;
continue;
}
- r.push_back(KInetInterface(QString::fromUtf8(a->ifa_name),
+ r.push_back(KInetInterface(TQString::fromUtf8(a->ifa_name),
convertFlags(a->ifa_flags),
createAddress(a->ifa_addr),
createAddress(a->ifa_netmask),
diff --git a/krfb/srvloc/kinetinterface.h b/krfb/srvloc/kinetinterface.h
index fe3899cb..e3f0328b 100644
--- a/krfb/srvloc/kinetinterface.h
+++ b/krfb/srvloc/kinetinterface.h
@@ -22,9 +22,9 @@
#ifndef KINETINTERFACE_H
#define KINETINTERFACE_H
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
class KInetInterfacePrivate;
@@ -48,7 +48,7 @@ class KInetSocketAddress;
*/
class KInetInterface {
private:
- KInetInterface(const QString &name,
+ KInetInterface(const TQString &name,
int flags,
KInetSocketAddress *address,
KInetSocketAddress *netmask,
@@ -93,14 +93,14 @@ public:
* @return the display name of the interface
* @see name()
*/
- QString displayName() const;
+ TQString displayName() const;
/**
* Returns the name of the interface, e.g. 'eth0'.
* @return the name of the interface
* @see displayName()
*/
- QString name() const;
+ TQString name() const;
/**
* Flags describing the interface. These flags
@@ -177,7 +177,7 @@ public:
* name
* @return the list of IP addresses
*/
- static QValueVector<KInetInterface> getAllInterfaces(bool includeLoopback = false);
+ static TQValueVector<KInetInterface> getAllInterfaces(bool includeLoopback = false);
private:
KInetInterfacePrivate* d;
diff --git a/krfb/srvloc/kinetinterfacewatcher.cpp b/krfb/srvloc/kinetinterfacewatcher.cpp
index 02f21c6c..1e0fa8e6 100644
--- a/krfb/srvloc/kinetinterfacewatcher.cpp
+++ b/krfb/srvloc/kinetinterfacewatcher.cpp
@@ -25,11 +25,11 @@
class KInetInterfaceWatcherPrivate {
public:
- QString interface;
+ TQString interface;
int minInterval; // not used yet, but my be when a daemon watches
- KInetInterfaceWatcherPrivate(const QString &iface,
+ KInetInterfaceWatcherPrivate(const TQString &iface,
int minIntv) :
interface(iface),
minInterval(minIntv) {
@@ -39,17 +39,17 @@ public:
/*
* or all network interfaces.
* @param interface the name of the interface to watch (e.g.'eth0')
- * or QString::null to watch all interfaces
+ * or TQString::null to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
*/
-KInetInterfaceWatcher::KInetInterfaceWatcher(const QString &interface,
+KInetInterfaceWatcher::KInetInterfaceWatcher(const TQString &interface,
int minInterval) {
d = new KInetInterfaceWatcherPrivate(interface, minInterval);
}
-QString KInetInterfaceWatcher::interface() const {
+TQString KInetInterfaceWatcher::interface() const {
return d->interface;
}
diff --git a/krfb/srvloc/kinetinterfacewatcher.h b/krfb/srvloc/kinetinterfacewatcher.h
index 399aa3fc..75d72ef8 100644
--- a/krfb/srvloc/kinetinterfacewatcher.h
+++ b/krfb/srvloc/kinetinterfacewatcher.h
@@ -23,10 +23,10 @@
#define KINETINTERFACEWATCHER_H
#include <kinetinterface.h>
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
class KInetInterfaceWatcherPrivate;
@@ -43,7 +43,7 @@ class KInetInterfaceWatcherPrivate;
* @see KInetInterface
* @since 3.2
*/
-class KInetInterfaceWatcher : public QObject {
+class KInetInterfaceWatcher : public TQObject {
Q_OBJECT
public:
/**
@@ -51,34 +51,34 @@ public:
* you must @ref start() it.
*
* @param interface the name of the interface to watch (e.g.'eth0')
- * or QString::null to watch all interfaces
+ * or TQString::null to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
*/
- KInetInterfaceWatcher(const QString &interface = QString::null,
+ KInetInterfaceWatcher(const TQString &interface = TQString::null,
int minInterval = 60);
/**
* Returns the name of the interface that is being watched.
- * @return the name of the interface, or QString::null if all
+ * @return the name of the interface, or TQString::null if all
* interfaces are watched
*/
- QString interface() const;
+ TQString interface() const;
/**
* Starts the KInetInterfaceWatcher. It watches either one
* or all network interfaces. When one of them changed.
* it emits a @ref changed() signal.
* @param interface the name of the interface to watch (e.g.'eth0')
- * or QString::null to watch all interfaces
+ * or TQString::null to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
* @see changed()
* @see stop()
*/
- void start(const QString &interface = QString::null,
+ void start(const TQString &interface = TQString::null,
int minInterval = 60);
/**
@@ -109,11 +109,11 @@ signals:
* address has changed.
*
* @param interfaceName the name of the interface that is watched,
- * by the emitter, or QString::null if all
+ * by the emitter, or TQString::null if all
* interfaces are being watched
* @see start()
*/
- void changed(QString interfaceName);
+ void changed(TQString interfaceName);
private:
KInetInterfaceWatcherPrivate* d;
diff --git a/krfb/srvloc/kserviceregistry.cpp b/krfb/srvloc/kserviceregistry.cpp
index 49e3de15..f8ab6b51 100644
--- a/krfb/srvloc/kserviceregistry.cpp
+++ b/krfb/srvloc/kserviceregistry.cpp
@@ -31,14 +31,14 @@
class KServiceRegistryPrivate {
public:
- KServiceRegistryPrivate(const QString &lang) :
+ KServiceRegistryPrivate(const TQString &lang) :
m_opened(false),
m_lang(lang) {
}
bool ensureOpen();
bool m_opened;
- QString m_lang;
+ TQString m_lang;
SLPHandle m_handle;
friend void KServiceRegistryRegReport(SLPHandle slp,
@@ -57,7 +57,7 @@ void KServiceRegistryRegReport(SLPHandle,
}
-KServiceRegistry::KServiceRegistry(const QString &lang) {
+KServiceRegistry::KServiceRegistry(const TQString &lang) {
d = new KServiceRegistryPrivate(lang);
}
@@ -86,8 +86,8 @@ bool KServiceRegistry::available() {
return d->ensureOpen();
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QString attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQString attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
@@ -108,24 +108,24 @@ bool KServiceRegistry::registerService(const QString &serviceURL,
return d->m_cbSuccess;
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QMap<QString,QString> attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQMap<TQString,TQString> attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
// TODO: encode strings in map?
- QString s;
- QMap<QString,QString>::iterator it = attributes.begin();
+ TQString s;
+ TQMap<TQString,TQString>::iterator it = attributes.begin();
while (it != attributes.end()) {
if (!s.isEmpty())
s += ",";
- s += QString("(%1=%2)").arg(it.key()).arg(it.data());
+ s += TQString("(%1=%2)").arg(it.key()).arg(it.data());
it++;
}
return registerService(serviceURL, s, lifetime);
}
-void KServiceRegistry::unregisterService(const QString &serviceURL) {
+void KServiceRegistry::unregisterService(const TQString &serviceURL) {
if (!d->m_opened)
return;
SLPDereg(d->m_handle, serviceURL.latin1(),
@@ -133,19 +133,19 @@ void KServiceRegistry::unregisterService(const QString &serviceURL) {
d);
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
char *n;
if (SLPEscape(value.latin1(), &n, SLP_TRUE) == SLP_OK) {
- QString r(n);
+ TQString r(n);
SLPFree(n);
return r;
}
- return QString::null;
+ return TQString::null;
}
#else
-KServiceRegistry::KServiceRegistry(const QString &lang) :
+KServiceRegistry::KServiceRegistry(const TQString &lang) :
d(0) {
}
@@ -156,24 +156,24 @@ bool KServiceRegistry::available() {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QString, unsigned short ) {
+bool KServiceRegistry::registerService(const TQString &, TQString, unsigned short ) {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QMap<QString,QString>, unsigned short) {
+bool KServiceRegistry::registerService(const TQString &, TQMap<TQString,TQString>, unsigned short) {
return false;
}
-void KServiceRegistry::unregisterService(const QString &) {
+void KServiceRegistry::unregisterService(const TQString &) {
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
return value;
}
#endif
-QString KServiceRegistry::createCommaList(const QStringList &values) {
+TQString KServiceRegistry::createCommaList(const TQStringList &values) {
return values.join(",");
}
diff --git a/krfb/srvloc/kserviceregistry.h b/krfb/srvloc/kserviceregistry.h
index a1c439ae..8cd965e6 100644
--- a/krfb/srvloc/kserviceregistry.h
+++ b/krfb/srvloc/kserviceregistry.h
@@ -25,9 +25,9 @@
#ifndef __KSERVICEREGISTRY_H
#define __KSERVICEREGISTRY_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KServiceRegistryPrivate;
@@ -78,7 +78,7 @@ class KServiceRegistryPrivate;
* <pre>
* KServiceRegistry ksr;
* KInetAddress kia = KInetAddress->getLocalAddress();
- * ksr.registerService(QString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
+ * ksr.registerService(TQString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
* "(type=shared)");
* delete kia;
* </pre>
@@ -91,10 +91,10 @@ class KServiceRegistry {
/**
* Creates a new service registration instance for the given
* language.
- * @param lang the language as two letter code, or QString::null for the
+ * @param lang the language as two letter code, or TQString::null for the
* system default
*/
- KServiceRegistry(const QString &lang = QString::null);
+ KServiceRegistry(const TQString &lang = TQString::null);
virtual ~KServiceRegistry();
/**
@@ -110,17 +110,17 @@ class KServiceRegistry {
* @param map the items of this list will be converted
* @return the comma-separated list
*/
- static QString createCommaList(const QStringList &values);
+ static TQString createCommaList(const TQStringList &values);
/**
- * Encodes an QString for use as a attribute value. This will escape
+ * Encodes an TQString for use as a attribute value. This will escape
* all characters that are not allowed. This method is only available
* when a SLP library is available, otherwise it will return the
* given value.
* @param value the value string to encode
* @return the encoded value string
*/
- static QString encodeAttributeValue(const QString &value);
+ static TQString encodeAttributeValue(const TQString &value);
/**
* Registers the given service.
@@ -132,8 +132,8 @@ class KServiceRegistry {
* @return true if successful, false otherwise. False usually means that no
* SA daemon (slpd) is running.
*/
- bool registerService(const QString &serviceURL,
- QString attributes = QString::null,
+ bool registerService(const TQString &serviceURL,
+ TQString attributes = TQString::null,
unsigned short lifetime = 0);
/**
@@ -144,15 +144,15 @@ class KServiceRegistry {
* @return true if successful, false otherwise. False usually means that no
* SA daemon is running (slpd).
*/
- bool registerService(const QString &serviceURL,
- QMap<QString,QString> attributes,
+ bool registerService(const TQString &serviceURL,
+ TQMap<TQString,TQString> attributes,
unsigned short lifetime = 0);
/**
* Unregisters the given service.
* @param serviceURL the service URL to unregister
*/
- void unregisterService(const QString &serviceURL);
+ void unregisterService(const TQString &serviceURL);
private:
KServiceRegistryPrivate *d;
diff --git a/krfb/srvloc/uuid.cpp b/krfb/srvloc/uuid.cpp
index 61f78d86..931f0aa8 100644
--- a/krfb/srvloc/uuid.cpp
+++ b/krfb/srvloc/uuid.cpp
@@ -235,11 +235,11 @@ static void uuid_unparse(const uuid_t uu, char *out)
uuid.node[3], uuid.node[4], uuid.node[5]);
}
-QString createUUID() {
+TQString createUUID() {
char s[37];
uuid_t uu;
uuid_generate_time(uu);
uuid_unparse(uu, s);
- return QString(s);
+ return TQString(s);
}
diff --git a/krfb/srvloc/uuid.h b/krfb/srvloc/uuid.h
index d63f2cf5..eed91de5 100644
--- a/krfb/srvloc/uuid.h
+++ b/krfb/srvloc/uuid.h
@@ -22,8 +22,8 @@
#ifndef UUID_H
#define UUID_H
-#include <qstring.h>
+#include <tqstring.h>
-QString createUUID();
+TQString createUUID();
#endif /* UUID_H */
diff --git a/ksirc/FilterRuleEditor.cpp b/ksirc/FilterRuleEditor.cpp
index 08ac6584..a94c5d6d 100644
--- a/ksirc/FilterRuleEditor.cpp
+++ b/ksirc/FilterRuleEditor.cpp
@@ -9,10 +9,10 @@
#include "FilterRuleEditor.h"
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -23,7 +23,7 @@
FilterRuleEditor::FilterRuleEditor
(
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
: KDialogBase( parent, name, true, i18n( "Edit Filter Rules" ),
@@ -37,20 +37,20 @@ FilterRuleEditor::FilterRuleEditor
newHighlight(0);
// ### split "OkPressed()" into 2 slots
- connect( filter->ModifyButton, SIGNAL(clicked()), SLOT(OkPressed()) );
- connect( filter->InsertButton, SIGNAL(clicked()), SLOT(OkPressed()) );
+ connect( filter->ModifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) );
+ connect( filter->InsertButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) );
- connect( filter->NewButton, SIGNAL(clicked()), SLOT(newRule()) );
- connect( filter->DeleteButton, SIGNAL(clicked()), SLOT(deleteRule()) );
+ connect( filter->NewButton, TQT_SIGNAL(clicked()), TQT_SLOT(newRule()) );
+ connect( filter->DeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteRule()) );
- connect( filter->UpButton, SIGNAL(clicked()), SLOT(raiseRule()) );
- connect( filter->DownButton, SIGNAL(clicked()), SLOT(lowerRule()) );
+ connect( filter->UpButton, TQT_SIGNAL(clicked()), TQT_SLOT(raiseRule()) );
+ connect( filter->DownButton, TQT_SIGNAL(clicked()), TQT_SLOT(lowerRule()) );
- connect( filter->RuleList, SIGNAL(highlighted(int)), SLOT(newHighlight(int)) );
- connect( filter->RuleList, SIGNAL(selected(int)), SLOT(newHighlight(int)) );
+ connect( filter->RuleList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(newHighlight(int)) );
+ connect( filter->RuleList, TQT_SIGNAL(selected(int)), TQT_SLOT(newHighlight(int)) );
- filter->RuleList->setHScrollBarMode( QListBox::AlwaysOff );
+ filter->RuleList->setHScrollBarMode( TQListBox::AlwaysOff );
filter->RuleList->setMultiSelection( FALSE );
filter->DownButton->setPixmap( BarIcon( "down", KIcon::SizeSmall ) );
@@ -64,10 +64,10 @@ FilterRuleEditor::~FilterRuleEditor()
void FilterRuleEditor::newRule()
{
- filter->LineTitle->setText( QString::null );
- filter->LineSearch->setText( QString::null );
- filter->LineFrom->setText( QString::null );
- filter->LineTo->setText( QString::null );
+ filter->LineTitle->setText( TQString::null );
+ filter->LineSearch->setText( TQString::null );
+ filter->LineFrom->setText( TQString::null );
+ filter->LineTo->setText( TQString::null );
filter->LineTitle->setFocus();
filter->InsertButton->setEnabled( true );
@@ -92,10 +92,10 @@ void FilterRuleEditor::OkPressed()
return;
}
- QString name = filter->LineTitle->text();
- QString search = filter->LineSearch->text();
- QString from = filter->LineFrom->text();
- QString to = filter->LineTo->text();
+ TQString name = filter->LineTitle->text();
+ TQString search = filter->LineSearch->text();
+ TQString from = filter->LineFrom->text();
+ TQString to = filter->LineTo->text();
if( name.isEmpty() || search.isEmpty() || from.isEmpty() || to.isEmpty() ){
KMessageBox::error(this, i18n("Cannot create the rule since not\n"
@@ -104,7 +104,7 @@ void FilterRuleEditor::OkPressed()
}
else{
kConfig->setGroup("FilterRules");
- QString key;
+ TQString key;
key.sprintf("name-%d", number);
kConfig->writeEntry(key, convertSpecial(name));
key.sprintf("search-%d", number);
@@ -126,7 +126,7 @@ void FilterRuleEditor::updateListBox(int citem )
filter->RuleList->clear();
for(; number > 0; number--){
- QString key;
+ TQString key;
key.sprintf("name-%d", number);
filter->RuleList->insertItem(kConfig->readEntry(key), 0);
}
@@ -144,8 +144,8 @@ void FilterRuleEditor::moveRule(int from, int to)
{
KConfig *kConfig = kapp->config();
kConfig->setGroup("FilterRules");
- QString src;
- QString dest;
+ TQString src;
+ TQString dest;
src.sprintf("name-%d", from);
dest.sprintf("name-%d", to);
kConfig->writeEntry(dest, kConfig->readEntry(src));
@@ -187,7 +187,7 @@ void FilterRuleEditor::newHighlight(int i)
i++;
KConfig *kConfig = kapp->config();
kConfig->setGroup("FilterRules");
- QString key;
+ TQString key;
key.sprintf("name-%d", i);
filter->LineTitle->setText(convertSpecialBack(kConfig->readEntry(key)));
key.sprintf("search-%d", i);
@@ -226,15 +226,15 @@ void FilterRuleEditor::lowerRule()
}
}
-QString FilterRuleEditor::convertSpecial(QString str)
+TQString FilterRuleEditor::convertSpecial(TQString str)
{
- str.replace(QRegExp("\\$"), "$$");
+ str.replace(TQRegExp("\\$"), "$$");
return str;
}
-QString FilterRuleEditor::convertSpecialBack(QString str)
+TQString FilterRuleEditor::convertSpecialBack(TQString str)
{
- str.replace(QRegExp("\\$\\$"), "$");
+ str.replace(TQRegExp("\\$\\$"), "$");
return str;
}
diff --git a/ksirc/FilterRuleEditor.h b/ksirc/FilterRuleEditor.h
index c9cf0437..b8bf1a0e 100644
--- a/ksirc/FilterRuleEditor.h
+++ b/ksirc/FilterRuleEditor.h
@@ -10,7 +10,7 @@
#ifndef FilterRuleEditor_h
#define FilterRuleEditor_h
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
@@ -24,7 +24,7 @@ public:
FilterRuleEditor
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
@@ -42,8 +42,8 @@ protected slots:
protected:
void updateListBox(int citem = 0);
void moveRule(int, int);
- QString convertSpecial(QString);
- QString convertSpecialBack(QString);
+ TQString convertSpecial(TQString);
+ TQString convertSpecialBack(TQString);
FilterRuleWidget *filter;
};
diff --git a/ksirc/KSOpenkSirc/enter_combo.cpp b/ksirc/KSOpenkSirc/enter_combo.cpp
index 3394423d..197f8f21 100644
--- a/ksirc/KSOpenkSirc/enter_combo.cpp
+++ b/ksirc/KSOpenkSirc/enter_combo.cpp
@@ -1,10 +1,10 @@
#include "enter_combo.h"
-void EnterCombo::keyPressEvent( QKeyEvent *e ){
+void EnterCombo::keyPressEvent( TQKeyEvent *e ){
if(e->key() == Key_Return || e->key() == Key_Enter)
emit(enterPressed());
else
- QComboBox::keyPressEvent(e);
+ TQComboBox::keyPressEvent(e);
}
#include "enter_combo.moc"
diff --git a/ksirc/KSOpenkSirc/enter_combo.h b/ksirc/KSOpenkSirc/enter_combo.h
index f0752a2d..7af88d8f 100644
--- a/ksirc/KSOpenkSirc/enter_combo.h
+++ b/ksirc/KSOpenkSirc/enter_combo.h
@@ -1,29 +1,29 @@
#ifndef ENTER_COMBO_H
#define ENTER_COMBO_H
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qlineedit.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqlineedit.h>
#undef KeyPress // X headers...
-class EnterCombo : public QComboBox {
+class EnterCombo : public TQComboBox {
Q_OBJECT
public:
- EnterCombo ( QWidget * parent=0, const char * name=0 )
- : QComboBox(TRUE, parent, name)
+ EnterCombo ( TQWidget * parent=0, const char * name=0 )
+ : TQComboBox(TRUE, parent, name)
{
}
- EnterCombo ( bool rw, QWidget * parent=0, const char * name=0 )
- : QComboBox(rw, parent, name)
+ EnterCombo ( bool rw, TQWidget * parent=0, const char * name=0 )
+ : TQComboBox(rw, parent, name)
{
- QKeyEvent ke(QEvent::KeyPress, SHIFT|Key_Home, 0, 0);
+ TQKeyEvent ke(TQEvent::KeyPress, SHIFT|Key_Home, 0, 0);
keyPressEvent(&ke);
}
virtual void show(){
- QComboBox::show();
+ TQComboBox::show();
lineEdit()->selectAll();
}
@@ -31,7 +31,7 @@ signals:
void enterPressed();
protected:
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
};
#endif
diff --git a/ksirc/KSOpenkSirc/open_ksirc.cpp b/ksirc/KSOpenkSirc/open_ksirc.cpp
index 5a4a4799..d3ff7488 100644
--- a/ksirc/KSOpenkSirc/open_ksirc.cpp
+++ b/ksirc/KSOpenkSirc/open_ksirc.cpp
@@ -12,11 +12,11 @@
#include "serverFileParser.h"
#include "enter_combo.h"
#include "../ksircserver.h"
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qdict.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqdict.h>
#include <stdlib.h>
#include <unistd.h>
@@ -28,14 +28,14 @@
#include <kmessagebox.h>
#include <kmdcodec.h>
-QPtrList<Server> Groups;
+TQPtrList<Server> Groups;
#undef Inherited
#define Inherited open_ksircData
open_ksirc::open_ksirc
(
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
:
@@ -47,7 +47,7 @@ open_ksirc::open_ksirc
// if it don't exist use $KDEDIR/share/apps/ksirc/servers.txt
// changes are written to ~/.kde/share/apps/ksirc/servers.txt
- QString filename = locate("appdata", "servers.txt");
+ TQString filename = locate("appdata", "servers.txt");
serverFileParser::readDatafile( filename );
Groups.setAutoDelete(TRUE);
@@ -66,29 +66,29 @@ open_ksirc::open_ksirc
KConfig *conf = kapp->config();
conf->setGroup("ServerList");
CheckB_StorePassword->setChecked( conf->readBoolEntry("StorePasswords") );
- QStringList recent = conf->readListEntry("RecentServers");
- for(QStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){
+ TQStringList recent = conf->readListEntry("RecentServers");
+ for(TQStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){
if(conf->hasGroup("RecentServer-" + *it)){
conf->setGroup("RecentServer-" + *it);
- QPtrList<port> rp;
+ TQPtrList<port> rp;
rp.inSort(new port(conf->readEntry("Port", "6667")));
- QString password = decryptPassword(conf->readEntry("Password"));
+ TQString password = decryptPassword(conf->readEntry("Password"));
bool ssl = conf->readBoolEntry("SSL");
Groups.insert(0, new Server(i18n("Recent"), *it, rp,
i18n("Recent Server"), "", password,
ssl));
}
else {
- QStringList info = QStringList::split(":", *it);
+ TQStringList info = TQStringList::split(":", *it);
if (info.isEmpty())
continue;
- QString name = info[0];
- QPtrList<port> rp;
+ TQString name = info[0];
+ TQPtrList<port> rp;
if (info.count() > 1)
rp.inSort(new port(info[1]));
else
rp.inSort(new port("6667"));
- QString password;
+ TQString password;
if (info.count() > 2)
password = decryptPassword(info[2]);
@@ -107,24 +107,24 @@ open_ksirc::open_ksirc
insertGroupList();
- QString blah = i18n("Recent");
+ TQString blah = i18n("Recent");
setGroup(blah);
- connect(ComboB_ServerGroup, SIGNAL(activated( const QString& )),
- this, SLOT(setGroup( const QString& )));
- connect(ComboB_ServerName, SIGNAL(activated( const QString& )),
- this, SLOT(setServer( const QString& )));
+ connect(ComboB_ServerGroup, TQT_SIGNAL(activated( const TQString& )),
+ this, TQT_SLOT(setGroup( const TQString& )));
+ connect(ComboB_ServerName, TQT_SIGNAL(activated( const TQString& )),
+ this, TQT_SLOT(setServer( const TQString& )));
- connect(PB_Connect, SIGNAL(clicked()), this, SLOT(clickConnect()));
- connect(PB_Edit, SIGNAL(clicked()), this, SLOT(clickEdit()));
- connect(PB_Cancel, SIGNAL(clicked()), this, SLOT(clickCancel()));
+ connect(PB_Connect, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickConnect()));
+ connect(PB_Edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickEdit()));
+ connect(PB_Cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickCancel()));
PB_Connect->setDefault(TRUE);
PB_Connect->setAutoDefault(TRUE);
PB_Edit->setEnabled(false); // Not yet implemented.
ComboB_ServerName->setFocus();
- connect(ComboB_ServerName, SIGNAL(enterPressed()), this, SLOT(clickConnect()));
+ connect(ComboB_ServerName, TQT_SIGNAL(enterPressed()), this, TQT_SLOT(clickConnect()));
}
// insert a sorted list of groups into ComboB_ServerGroup, note that
@@ -133,7 +133,7 @@ open_ksirc::open_ksirc
void open_ksirc::insertGroupList()
{
- QStrList tempgroups;
+ TQStrList tempgroups;
Server *serv;
for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) {
@@ -154,7 +154,7 @@ void open_ksirc::insertGroupList()
void open_ksirc::insertServerList( const char * group )
{
- QListBox *newListBox = new QListBox();
+ TQListBox *newListBox = new TQListBox();
Server *serv;
for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) {
@@ -174,11 +174,11 @@ void open_ksirc::insertServerList( const char * group )
// note that this only takes the first occurrance if there is two
// entiies with the same server.
-void open_ksirc::setServer( const QString &serveraddress )
+void open_ksirc::setServer( const TQString &serveraddress )
{
- QListBox *newListBox = new QListBox();
+ TQListBox *newListBox = new TQListBox();
Server *serv;
- QPtrList<port> portlist;
+ TQPtrList<port> portlist;
port *p;
bool defaultport = FALSE;
@@ -209,7 +209,7 @@ void open_ksirc::setServer( const QString &serveraddress )
// Sets the server description if the isn't one set it to "Not Available"
-void open_ksirc::setServerDesc( QString description )
+void open_ksirc::setServerDesc( TQString description )
{
if (description.isNull() || description.isEmpty()) {
Label_ServerDesc->setText( i18n("Not available"));
@@ -224,34 +224,34 @@ void open_ksirc::setServerDesc( QString description )
// and then each byte of the UTF-8 password is xored with the corresponding
// byte of the random string. The returned value is a base64 encoding of
// that random string followed by the scrambled password.
-QString open_ksirc::encryptPassword( const QString &password )
+TQString open_ksirc::encryptPassword( const TQString &password )
{
- QCString utf8 = password.utf8();
+ TQCString utf8 = password.utf8();
// Can contain NULL bytes after XORing
unsigned int utf8Length(utf8.length());
- QByteArray result(utf8Length << 1);
+ TQByteArray result(utf8Length << 1);
memcpy(result.data(), kapp->randomString(utf8Length).latin1(), utf8Length);
for (unsigned int i = 0; i < utf8Length; ++i)
result[i + utf8Length] = utf8[i] ^ result[i];
- return QString::fromLatin1(KCodecs::base64Encode(result));
+ return TQString::fromLatin1(KCodecs::base64Encode(result));
}
-QString open_ksirc::decryptPassword( const QString &scrambled )
+TQString open_ksirc::decryptPassword( const TQString &scrambled )
{
- QByteArray base64, orig;
+ TQByteArray base64, orig;
base64.duplicate(scrambled.latin1(), scrambled.length());
KCodecs::base64Decode(base64, orig);
- QCString result;
+ TQCString result;
for (unsigned int i = 0; i < (orig.size() >> 1); ++i)
result += orig[i] ^ orig[i + (orig.size() >> 1)];
- return QString::fromUtf8(result);
+ return TQString::fromUtf8(result);
}
-void open_ksirc::setGroup( const QString &group )
+void open_ksirc::setGroup( const TQString &group )
{
insertServerList( group );
if (ComboB_ServerName->count() > 0) {
- QString blah = QString(ComboB_ServerName->text( 0 ));
+ TQString blah = TQString(ComboB_ServerName->text( 0 ));
setServer(blah);
} else {
setServerDesc( "" );
@@ -272,9 +272,9 @@ void open_ksirc::clickConnect()
return;
}
- QString server;
- QString port;
- QString script;
+ TQString server;
+ TQString port;
+ TQString script;
Server *serv;
KConfig *conf = kapp->config();
@@ -296,7 +296,7 @@ void open_ksirc::clickConnect()
if(port.isEmpty())
port = "6667";
- QString plain, scrambled;
+ TQString plain, scrambled;
if (!LineE_Password->text().isEmpty())
{
plain = LineE_Password->text();
@@ -306,9 +306,9 @@ void open_ksirc::clickConnect()
conf->setGroup("ServerList");
conf->writeEntry("StorePasswords", CheckB_StorePassword->isChecked());
- QStringList recent = conf->readListEntry("RecentServers");
+ TQStringList recent = conf->readListEntry("RecentServers");
if(recent.contains(server)){
- QStringList::Iterator it = recent.find(server);
+ TQStringList::Iterator it = recent.find(server);
recent.remove(it);
}
@@ -320,10 +320,10 @@ void open_ksirc::clickConnect()
//scrambled is now "server:port" or "server:port:scrambledpass" if
//a password was given and "store password" is checked
- for (QStringList::Iterator it = recent.begin(); it != recent.end(); ) {
+ for (TQStringList::Iterator it = recent.begin(); it != recent.end(); ) {
if ((*it).startsWith(server)) // ignore password
{
- QStringList::Iterator del = it++;
+ TQStringList::Iterator del = it++;
recent.remove(del);
}
else
@@ -362,7 +362,7 @@ void open_ksirc::clickEdit()
// TODO open new server editor
}
-void open_ksirc::passwordChanged( const QString& password )
+void open_ksirc::passwordChanged( const TQString& password )
{
CheckB_StorePassword->setEnabled( !password.isEmpty() );
}
diff --git a/ksirc/KSOpenkSirc/open_ksirc.h b/ksirc/KSOpenkSirc/open_ksirc.h
index 81145fca..29fb4f60 100644
--- a/ksirc/KSOpenkSirc/open_ksirc.h
+++ b/ksirc/KSOpenkSirc/open_ksirc.h
@@ -12,7 +12,7 @@
#include "open_ksircData.h"
-#include <qdict.h>
+#include <tqdict.h>
class KSircServer;
@@ -24,26 +24,26 @@ public:
open_ksirc
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
virtual ~open_ksirc();
protected slots:
- void setGroup( const QString& );
- void setServer( const QString& );
+ void setGroup( const TQString& );
+ void setServer( const TQString& );
void clickConnect();
void clickCancel();
void clickEdit();
- void passwordChanged( const QString& );
+ void passwordChanged( const TQString& );
private:
void insertGroupList();
void insertServerList( const char * );
- void setServerDesc( QString );
- QString encryptPassword( const QString & );
- QString decryptPassword( const QString & );
+ void setServerDesc( TQString );
+ TQString encryptPassword( const TQString & );
+ TQString decryptPassword( const TQString & );
signals:
// void open_ksircprocess( const char *, int, const char * );
diff --git a/ksirc/KSOpenkSirc/serverDataType.h b/ksirc/KSOpenkSirc/serverDataType.h
index 80b94e27..157be09e 100644
--- a/ksirc/KSOpenkSirc/serverDataType.h
+++ b/ksirc/KSOpenkSirc/serverDataType.h
@@ -1,18 +1,18 @@
#ifndef SERVERDATATYPE_H
#define SERVERDATATYPE_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class port
{
public:
- port( const QString &portnum ) { p=portnum; }
- QString portnum() const { return p; }
+ port( const TQString &portnum ) { p=portnum; }
+ TQString portnum() const { return p; }
private:
- QString p;
+ TQString p;
};
@@ -21,12 +21,12 @@ class Server
{
public:
- Server( const QString &group,
- const QString &server,
- QPtrList<port> ports,
- const QString &serverdesc,
- const QString &script,
- const QString &password = QString::null,
+ Server( const TQString &group,
+ const TQString &server,
+ TQPtrList<port> ports,
+ const TQString &serverdesc,
+ const TQString &script,
+ const TQString &password = TQString::null,
bool dossl = false
) {
g=group; s=server; p=ports; sd=serverdesc; sc=script;
@@ -34,21 +34,21 @@ public:
ssl = dossl;
p.setAutoDelete(TRUE);
}
- QString group() const { return g; }
- QString server() const { return s; }
- QPtrList<port> ports() const { return p; }
- QString serverdesc() const { return sd; }
- QString script() const { return sc; }
- QString password() const { return pass; }
+ TQString group() const { return g; }
+ TQString server() const { return s; }
+ TQPtrList<port> ports() const { return p; }
+ TQString serverdesc() const { return sd; }
+ TQString script() const { return sc; }
+ TQString password() const { return pass; }
bool usessl() const { return ssl; }
private:
- QString g;
- QString s;
- QPtrList<port> p;
- QString sd;
- QString sc;
- QString pass;
+ TQString g;
+ TQString s;
+ TQPtrList<port> p;
+ TQString sd;
+ TQString sc;
+ TQString pass;
bool ssl;
};
diff --git a/ksirc/KSOpenkSirc/serverFileParser.cpp b/ksirc/KSOpenkSirc/serverFileParser.cpp
index 8e6ba80e..10960650 100644
--- a/ksirc/KSOpenkSirc/serverFileParser.cpp
+++ b/ksirc/KSOpenkSirc/serverFileParser.cpp
@@ -1,12 +1,12 @@
#include "serverFileParser.h"
#include "serverDataType.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-extern QPtrList<Server> Groups;
+extern TQPtrList<Server> Groups;
// Opens, reads and parses server information from a server file,
// sets the information in the global variable and returns 1 if
@@ -16,30 +16,30 @@ int serverFileParser::readDatafile( const char *fileName )
{
Groups.setAutoDelete( TRUE );
Groups.clear();
- QFile serverFile( fileName );
+ TQFile serverFile( fileName );
if ( !serverFile.open( IO_ReadOnly ) )
return -1;
- QTextStream fileStream(&serverFile);
+ TQTextStream fileStream(&serverFile);
// the file is layed out as follows:
// service:servername:serveraddress:ports:script:
// so we parse it this way
while( !fileStream.eof() ) {
- QString str = fileStream.readLine();
+ TQString str = fileStream.readLine();
const char *strC = str.ascii();
char *token;
char groupC[1024], servernameC[1024], serveraddressC[1024], portsC[1024];
int pos = 0;
- QString group;
- QString servername;
- QString serveraddress;
- QPtrList<port> ports;
- QString script;
+ TQString group;
+ TQString servername;
+ TQString serveraddress;
+ TQPtrList<port> ports;
+ TQString script;
- QString buf;
- QString portbuff;
+ TQString buf;
+ TQString portbuff;
pos = sscanf(strC, "%1023[^:]:%1024[^:]:%1023[^:]:%1023[^:]:", groupC, servernameC, serveraddressC, portsC);
if(pos != 4){
@@ -109,6 +109,6 @@ int serverFileParser::readDatafile( const char *fileName )
int writeDataFile()
{
- QString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt");
+ TQString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt");
return 1;
}
diff --git a/ksirc/KSOpenkSirc/serverFileParser.h b/ksirc/KSOpenkSirc/serverFileParser.h
index f3fd67e1..f17884c5 100644
--- a/ksirc/KSOpenkSirc/serverFileParser.h
+++ b/ksirc/KSOpenkSirc/serverFileParser.h
@@ -1,7 +1,7 @@
#ifndef serverFileParser_included
#define serverFileParser_included
-#include <qobject.h>
+#include <tqobject.h>
class serverFileParser
{
diff --git a/ksirc/KSPrefs/ksprefs.cpp b/ksirc/KSPrefs/ksprefs.cpp
index 2bf97e84..40ccc56f 100644
--- a/ksirc/KSPrefs/ksprefs.cpp
+++ b/ksirc/KSPrefs/ksprefs.cpp
@@ -7,7 +7,7 @@
* *
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -26,37 +26,37 @@
#include "page_looknfeel.h"
#include "page_shortcuts.h"
-KSPrefs::KSPrefs(QWidget * parent, const char * name):
+KSPrefs::KSPrefs(TQWidget * parent, const char * name):
KDialogBase(KDialogBase::IconList, i18n("Configure KSirc"),
KDialogBase::Help | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default,
KDialogBase::Ok, parent, name)
{
setWFlags( getWFlags() | WDestructiveClose );
- QFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) );
- QFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) );
- QFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) );
- QFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) );
- QFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) );
+ TQFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) );
+ TQFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) );
+ TQFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) );
+ TQFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) );
+ TQFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) );
- QFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
- QFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
- QFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
- QFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) );
- QFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
+ TQFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
+ TQFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
+ TQFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
+ TQFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) );
+ TQFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) );
- QVBoxLayout *fontTopLayout = new QVBoxLayout( itemFont, 0, 6 );
+ TQVBoxLayout *fontTopLayout = new TQVBoxLayout( itemFont, 0, 6 );
- QVBoxLayout *looknfeelTopLayout= new QVBoxLayout( itemLooknFeel, 0, 6 );
- QVBoxLayout *generalTopLayout = new QVBoxLayout( itemGeneral, 0, 6 );
- QVBoxLayout *startupTopLayout = new QVBoxLayout( itemStartup, 0, 6 );
- QVBoxLayout *colorsTopLayout = new QVBoxLayout( itemColors, 0, 6 );
- QVBoxLayout *ircColorsTopLayout = new QVBoxLayout( itemIRCColors, 0, 6 );
+ TQVBoxLayout *looknfeelTopLayout= new TQVBoxLayout( itemLooknFeel, 0, 6 );
+ TQVBoxLayout *generalTopLayout = new TQVBoxLayout( itemGeneral, 0, 6 );
+ TQVBoxLayout *startupTopLayout = new TQVBoxLayout( itemStartup, 0, 6 );
+ TQVBoxLayout *colorsTopLayout = new TQVBoxLayout( itemColors, 0, 6 );
+ TQVBoxLayout *ircColorsTopLayout = new TQVBoxLayout( itemIRCColors, 0, 6 );
- QVBoxLayout *rmbMenuTopLayout = new QVBoxLayout( itemRMBMenu, 0, 6 );
- QVBoxLayout *servChanTopLayout = new QVBoxLayout( itemServChan, 0, 6 );
- QVBoxLayout *autoConnectTopLayout = new QVBoxLayout( itemAutoConnect, 0, 6 );
- QVBoxLayout *autoShortcutsTopLayout = new QVBoxLayout( itemShortcuts, 0, 6 );
+ TQVBoxLayout *rmbMenuTopLayout = new TQVBoxLayout( itemRMBMenu, 0, 6 );
+ TQVBoxLayout *servChanTopLayout = new TQVBoxLayout( itemServChan, 0, 6 );
+ TQVBoxLayout *autoConnectTopLayout = new TQVBoxLayout( itemAutoConnect, 0, 6 );
+ TQVBoxLayout *autoShortcutsTopLayout = new TQVBoxLayout( itemShortcuts, 0, 6 );
pageLooknFeel= new PageLooknFeel( itemLooknFeel );
pageGeneral = new PageGeneral( itemGeneral );
@@ -69,20 +69,20 @@ KSPrefs::KSPrefs(QWidget * parent, const char * name):
pageAutoConnect = new PageAutoConnect( itemAutoConnect );
pageShortcuts = new PageShortcuts( itemShortcuts );
- connect(pageLooknFeel, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageGeneral, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageStartup, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageColors, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageIRCColors, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageFont, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageRMBMenu, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageServChan, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageAutoConnect, SIGNAL( modified() ), SLOT( modified() ) );
- connect(pageShortcuts, SIGNAL( modified() ), SLOT( modified() ) );
-
- connect(this, SIGNAL( applyClicked() ), this, SLOT( saveConfig() ) );
- connect(this, SIGNAL( okClicked() ), this, SLOT( saveConfig() ) );
- connect(this, SIGNAL( defaultClicked() ), this, SLOT(defaultConfig() ) );
+ connect(pageLooknFeel, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageGeneral, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageStartup, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageIRCColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageFont, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageRMBMenu, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageServChan, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageAutoConnect, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+ connect(pageShortcuts, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
+
+ connect(this, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( saveConfig() ) );
+ connect(this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( saveConfig() ) );
+ connect(this, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT(defaultConfig() ) );
looknfeelTopLayout->addWidget( pageLooknFeel );
generalTopLayout->addWidget( pageGeneral );
diff --git a/ksirc/KSPrefs/ksprefs.h b/ksirc/KSPrefs/ksprefs.h
index 6c41fd9a..1e5beaf0 100644
--- a/ksirc/KSPrefs/ksprefs.h
+++ b/ksirc/KSPrefs/ksprefs.h
@@ -30,7 +30,7 @@ class KSPrefs : public KDialogBase
Q_OBJECT
public:
- KSPrefs(QWidget * parent = 0, const char * name = 0);
+ KSPrefs(TQWidget * parent = 0, const char * name = 0);
~KSPrefs();
public slots:
diff --git a/ksirc/KSPrefs/page_autoconnect.cpp b/ksirc/KSPrefs/page_autoconnect.cpp
index a6532915..c9ab585d 100644
--- a/ksirc/KSPrefs/page_autoconnect.cpp
+++ b/ksirc/KSPrefs/page_autoconnect.cpp
@@ -10,12 +10,12 @@
#include "page_autoconnect.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <klistview.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -26,7 +26,7 @@
#define PASS 2
#define SSL 3
-PageAutoConnect::PageAutoConnect( QWidget *parent, const char *name ) : PageAutoConnectBase( parent, name)
+PageAutoConnect::PageAutoConnect( TQWidget *parent, const char *name ) : PageAutoConnectBase( parent, name)
{
KLVAutoConnect->setSorting( 0 );
//KLVAutoConnect->header()->hide();
@@ -46,34 +46,34 @@ void PageAutoConnect::saveConfig()
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers;
+ TQStringList servers;
- for(QListViewItem *it = KLVAutoConnect->firstChild();
+ for(TQListViewItem *it = KLVAutoConnect->firstChild();
it != 0;
it = it->nextSibling()){
- QString server = it->text(NAME);
+ TQString server = it->text(NAME);
if(it->text(PK).length() > 0)
server += ":" + it->text(1);
if(it->text(SSL).length() > 0)
server += " (SSL)";
if(it->text(PASS).length() > 0)
- server += QString(" (pass: %1)").arg(it->text(PASS));
+ server += TQString(" (pass: %1)").arg(it->text(PASS));
servers << server;
- QStringList channels;
+ TQStringList channels;
- for(QListViewItem *ch = it->firstChild();
+ for(TQListViewItem *ch = it->firstChild();
ch != 0;
ch = ch->nextSibling()){
- QString channel;
+ TQString channel;
channel = ch->text(NAME);
if(ch->text(PK).length() > 0)
- channel += QString(" (key: %1)").arg(ch->text(PK));
+ channel += TQString(" (key: %1)").arg(ch->text(PK));
channels << channel;
@@ -94,17 +94,17 @@ void PageAutoConnect::readConfig()
{
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers = conf->readListEntry("Servers");
+ TQStringList servers = conf->readListEntry("Servers");
servers.sort();
- QStringList::ConstIterator ser = servers.begin();
+ TQStringList::ConstIterator ser = servers.begin();
for( ; ser != servers.end(); ser++){
- QStringList channels = conf->readListEntry(*ser);
- QString server = *ser;
- QString port = "6667";
- QString ssl = QString::null;
- QString pass = QString::null;
+ TQStringList channels = conf->readListEntry(*ser);
+ TQString server = *ser;
+ TQString port = "6667";
+ TQString ssl = TQString::null;
+ TQString pass = TQString::null;
- QRegExp rx("(.+) \\(SSL\\)(.*)");
+ TQRegExp rx("(.+) \\(SSL\\)(.*)");
if(rx.search(server) >= 0){
server = rx.cap(1) + rx.cap(3);
ssl = i18n("SSL");
@@ -121,19 +121,19 @@ void PageAutoConnect::readConfig()
port = rx.cap(2);
}
kdDebug(5008) << server << ": Done " << port << " " << ssl << " " << pass << endl;
- QListViewItem *s = new QListViewItem(KLVAutoConnect, server, port, pass, ssl);
+ TQListViewItem *s = new TQListViewItem(KLVAutoConnect, server, port, pass, ssl);
s->setOpen(TRUE);
channels.sort();
- QStringList::ConstIterator chan = channels.begin();
+ TQStringList::ConstIterator chan = channels.begin();
for(; chan != channels.end(); chan++){
- QString channel = *chan;
- QString key = QString::null;
- QRegExp crx("(.+) \\(key: (\\S+)\\)");
+ TQString channel = *chan;
+ TQString key = TQString::null;
+ TQRegExp crx("(.+) \\(key: (\\S+)\\)");
if(crx.search(channel) >= 0){
channel = crx.cap(1);
key = crx.cap(2);
}
- new QListViewItem(s, channel, key);
+ new TQListViewItem(s, channel, key);
}
}
}
@@ -152,26 +152,26 @@ void PageAutoConnect::changed()
void PageAutoConnect::add_pressed()
{
int fnd = 0;
- QListViewItem *s = 0;
+ TQListViewItem *s = 0;
s = KLVAutoConnect->selectedItem();
if(!s){ /* new item */
- QString server = ServerLE->text();
- QString ssl = QString::null;
- QString port;
+ TQString server = ServerLE->text();
+ TQString ssl = TQString::null;
+ TQString port;
port.setNum(PortKI->value());
if(sslCB->isChecked())
ssl = i18n("SSL");
- s = new QListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl);
+ s = new TQListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl);
s->setOpen(TRUE);
- s = new QListViewItem(s, ChannelLE->text(), KeyLE->text());
+ s = new TQListViewItem(s, ChannelLE->text(), KeyLE->text());
KLVAutoConnect->setCurrentItem(s);
}
else { /* update the existing one */
- QListViewItem *parent;
- QListViewItem *child;
+ TQListViewItem *parent;
+ TQListViewItem *child;
if(s->parent()){
parent = s->parent();
@@ -183,12 +183,12 @@ void PageAutoConnect::add_pressed()
}
parent->setText(NAME, ServerLE->text());
- parent->setText(PK, QString("%1").arg(PortKI->value()));
+ parent->setText(PK, TQString("%1").arg(PortKI->value()));
parent->setText(PASS, PassLE->text());
if(sslCB->isChecked())
parent->setText(SSL, i18n("SSL"));
else
- parent->setText(SSL, QString::null);
+ parent->setText(SSL, TQString::null);
if(child){
child->setText(NAME, ChannelLE->text());
@@ -197,7 +197,7 @@ void PageAutoConnect::add_pressed()
else {
if(ChannelLE->text().length() > 0){
fnd = 0;
- QListViewItem *c = parent->firstChild();
+ TQListViewItem *c = parent->firstChild();
for( ; c != 0 && fnd == 0; c = c->nextSibling()){
if(c->text(NAME) == ChannelLE->text()){
c->setText(PK, KeyLE->text());
@@ -205,7 +205,7 @@ void PageAutoConnect::add_pressed()
}
}
if(fnd == 0){
- new QListViewItem(parent, ChannelLE->text(), KeyLE->text());
+ new TQListViewItem(parent, ChannelLE->text(), KeyLE->text());
}
}
}
@@ -228,13 +228,13 @@ void PageAutoConnect::new_pressed()
void PageAutoConnect::delete_pressed()
{
- for(QListViewItem *it = KLVAutoConnect->firstChild();
+ for(TQListViewItem *it = KLVAutoConnect->firstChild();
it != 0;
it = it->nextSibling()){
if(it->text(NAME) == ServerLE->text()){
if(ChannelLE->text().isEmpty() == FALSE){
- for(QListViewItem *ch = it->firstChild();
+ for(TQListViewItem *ch = it->firstChild();
ch != 0;
ch = ch->nextSibling()){
if(ch->text(NAME) == ChannelLE->text()){
@@ -257,7 +257,7 @@ void PageAutoConnect::delete_pressed()
changed();
}
-void PageAutoConnect::kvl_clicked(QListViewItem *it)
+void PageAutoConnect::kvl_clicked(TQListViewItem *it)
{
if(it != 0){
if(it->parent() != 0){
diff --git a/ksirc/KSPrefs/page_autoconnect.h b/ksirc/KSPrefs/page_autoconnect.h
index efd9a4ed..04b5b821 100644
--- a/ksirc/KSPrefs/page_autoconnect.h
+++ b/ksirc/KSPrefs/page_autoconnect.h
@@ -9,7 +9,7 @@ class PageAutoConnect : public PageAutoConnectBase
Q_OBJECT
public:
- PageAutoConnect( QWidget* parent = 0, const char* name = 0);
+ PageAutoConnect( TQWidget* parent = 0, const char* name = 0);
~PageAutoConnect();
void saveConfig();
@@ -29,7 +29,7 @@ protected slots:
virtual void new_pressed();
virtual void delete_pressed();
- virtual void kvl_clicked(QListViewItem *);
+ virtual void kvl_clicked(TQListViewItem *);
};
diff --git a/ksirc/KSPrefs/page_colors.cpp b/ksirc/KSPrefs/page_colors.cpp
index f6d68a52..e7b36af4 100644
--- a/ksirc/KSPrefs/page_colors.cpp
+++ b/ksirc/KSPrefs/page_colors.cpp
@@ -9,17 +9,17 @@
#include "page_colors.h"
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <kapplication.h>
#include <kcolorbutton.h>
#include <kdebug.h>
-PageColors::PageColors( QWidget *parent, const char *name ) : PageColorsBase( parent, name)
+PageColors::PageColors( TQWidget *parent, const char *name ) : PageColorsBase( parent, name)
{
changing = 0;
m_dcol.setAutoDelete(true);
@@ -52,13 +52,13 @@ void PageColors::saveConfig()
}
else if(autoOtherColRB->isChecked()){
ksopts->nickColourization = true;
- ksopts->nickForeground = QColor();
- ksopts->nickBackground = QColor();
+ ksopts->nickForeground = TQColor();
+ ksopts->nickBackground = TQColor();
}
else {
ksopts->nickColourization = false;
- ksopts->nickForeground = QColor();
- ksopts->nickBackground = QColor();
+ ksopts->nickForeground = TQColor();
+ ksopts->nickBackground = TQColor();
}
ksopts->msgContainNick = ownContainNickCBtn->color();
@@ -68,7 +68,7 @@ void PageColors::saveConfig()
ksopts->msg1Regex = msg1Regex->isChecked();
}
else {
- ksopts->msg1Contain = QColor();
+ ksopts->msg1Contain = TQColor();
ksopts->msg1String = msg1LE->text();
ksopts->msg1Regex = false;
}
@@ -78,7 +78,7 @@ void PageColors::saveConfig()
ksopts->msg2Regex = msg2Regex->isChecked();
}
else {
- ksopts->msg2Contain = QColor();
+ ksopts->msg2Contain = TQColor();
ksopts->msg2String = msg2LE->text();
ksopts->msg2Regex = false;
}
@@ -88,8 +88,8 @@ void PageColors::saveConfig()
ksopts->colourTheme = themeLB->currentText();
KConfig *conf = kapp->config();
- QDictIterator<KSOColors> it(m_dcol);
- QStringList names;
+ TQDictIterator<KSOColors> it(m_dcol);
+ TQStringList names;
for(; it.current(); ++it){
names << it.currentKey();
conf->setGroup("ColourSchemes-"+ it.currentKey());
@@ -128,8 +128,8 @@ void PageColors::readConfig( const KSOColors *opts )
if( opts->nickColourization ){
autoOtherColRB->setChecked( true );
- nickFGCBtn->setColor( QColor() );
- nickBGCBtn->setColor( QColor() );
+ nickFGCBtn->setColor( TQColor() );
+ nickBGCBtn->setColor( TQColor() );
}
else if( opts->nickForeground.isValid() ||
@@ -140,8 +140,8 @@ void PageColors::readConfig( const KSOColors *opts )
}
else {
noOtherColRB->setChecked( true );
- nickFGCBtn->setColor( QColor() );
- nickBGCBtn->setColor( QColor() );
+ nickFGCBtn->setColor( TQColor() );
+ nickBGCBtn->setColor( TQColor() );
}
@@ -161,7 +161,7 @@ void PageColors::readConfig( const KSOColors *opts )
KConfig *conf = kapp->config();
conf->setGroup("ColourSchemes");
themeLB->clear();
- QStringList names = conf->readListEntry("Names");
+ TQStringList names = conf->readListEntry("Names");
if(names.contains("Custom")){
names.remove(names.find("Custom"));
}
@@ -175,7 +175,7 @@ void PageColors::readConfig( const KSOColors *opts )
m_dcol.clear();
- QStringList::Iterator it = names.begin();
+ TQStringList::Iterator it = names.begin();
for( ; it != names.end(); ++it){
conf->setGroup("ColourSchemes-"+ *it);
m_dcol.insert(*it, new KSOColors);
@@ -207,12 +207,12 @@ void PageColors::changed()
emit modified();
}
-void PageColors::theme_clicked(QListBoxItem *li)
+void PageColors::theme_clicked(TQListBoxItem *li)
{
if(li == 0x0)
return;
- QString name = li->text();
+ TQString name = li->text();
changing = 1;
backCBtn->setColor( m_dcol[name]->backgroundColor );
@@ -239,7 +239,7 @@ void PageColors::themeNewPB_clicked()
void PageColors::themeAddPB_clicked()
{
- QString name = themeLE->text();
+ TQString name = themeLE->text();
kdDebug(5008) << "Got add: " << themeLB->currentText() << endl;
diff --git a/ksirc/KSPrefs/page_colors.h b/ksirc/KSPrefs/page_colors.h
index 188fe0a8..5401aecc 100644
--- a/ksirc/KSPrefs/page_colors.h
+++ b/ksirc/KSPrefs/page_colors.h
@@ -13,16 +13,16 @@
#include "page_colorsbase.h"
#include "ksopts.h"
-#include <qlistbox.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqlistbox.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
class PageColors : public PageColorsBase
{
Q_OBJECT
public:
- PageColors( QWidget *parent = 0, const char *name = 0 );
+ PageColors( TQWidget *parent = 0, const char *name = 0 );
~PageColors();
void saveConfig();
@@ -33,7 +33,7 @@ protected slots:
void changed();
public slots:
- virtual void theme_clicked(QListBoxItem*);
+ virtual void theme_clicked(TQListBoxItem*);
virtual void themeNewPB_clicked();
virtual void themeAddPB_clicked();
virtual void themeDelPB_clicked();
@@ -47,7 +47,7 @@ private:
private:
int changing;
- QDict<KSOColors> m_dcol;
+ TQDict<KSOColors> m_dcol;
};
#endif
diff --git a/ksirc/KSPrefs/page_font.cpp b/ksirc/KSPrefs/page_font.cpp
index e9f9e0e6..5ea0dd9b 100644
--- a/ksirc/KSPrefs/page_font.cpp
+++ b/ksirc/KSPrefs/page_font.cpp
@@ -1,12 +1,12 @@
#include "page_font.h"
-#include "qapplication.h"
-PageFont::PageFont( QWidget *parent, const char *name ) :
- QWidget( parent, name)
+#include "tqapplication.h"
+PageFont::PageFont( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name)
{
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
fontchooser = new KFontChooser(this);
layout->addWidget(fontchooser);
- connect(fontchooser,SIGNAL(fontSelected ( const QFont&)), this, SLOT(update()));
+ connect(fontchooser,TQT_SIGNAL(fontSelected ( const TQFont&)), this, TQT_SLOT(update()));
}
PageFont::~PageFont( )
@@ -21,7 +21,7 @@ void PageFont::update( void ){
void PageFont::saveConfig( void )
{
ksopts->defaultFont = fontchooser->font();
- QApplication::setFont(fontchooser->font(), true, "KSirc::TextView" );
+ TQApplication::setFont(fontchooser->font(), true, "KSirc::TextView" );
}
void PageFont::readConfig( const KSOColors * opts )
diff --git a/ksirc/KSPrefs/page_font.h b/ksirc/KSPrefs/page_font.h
index 0d2fa673..44940170 100644
--- a/ksirc/KSPrefs/page_font.h
+++ b/ksirc/KSPrefs/page_font.h
@@ -1,7 +1,7 @@
#ifndef _PAGE_FONT
#define _PAGE_FONT
#include <kfontdialog.h> // For the font selection widget
-#include <qlayout.h> // For the layout
+#include <tqlayout.h> // For the layout
#include "ksopts.h" // For storing the info.
/**
@@ -17,7 +17,7 @@ class PageFont : public QWidget
/**
* Create the Widget
*/
- PageFont( QWidget *parent = 0, const char *name = 0 );
+ PageFont( TQWidget *parent = 0, const char *name = 0 );
/*
@@ -56,7 +56,7 @@ class PageFont : public QWidget
private:
KFontChooser* fontchooser; /** The font choosing widget from kdelib */
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
};
#endif
diff --git a/ksirc/KSPrefs/page_general.cpp b/ksirc/KSPrefs/page_general.cpp
index d6256e2c..51a78ec3 100644
--- a/ksirc/KSPrefs/page_general.cpp
+++ b/ksirc/KSPrefs/page_general.cpp
@@ -7,15 +7,15 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kcharsets.h>
#include "page_general.h"
#include "../servercontroller.h"
-PageGeneral::PageGeneral( QWidget *parent, const char *name ) : PageGeneralBase( parent, name)
+PageGeneral::PageGeneral( TQWidget *parent, const char *name ) : PageGeneralBase( parent, name)
{
}
@@ -82,10 +82,10 @@ void PageGeneral::readConfig( const KSOGeneral *opts )
encodingsCB->clear();
- QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
+ TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
// remove utf16/ucs2 as it just doesn't work for IRC
- QStringList::Iterator encodingIt = encodings.begin();
+ TQStringList::Iterator encodingIt = encodings.begin();
while ( encodingIt != encodings.end() ) {
if ( ( *encodingIt ).find( "utf16" ) != -1 ||
( *encodingIt ).find( "iso-10646" ) != -1 )
diff --git a/ksirc/KSPrefs/page_general.h b/ksirc/KSPrefs/page_general.h
index ecf515ca..253d6623 100644
--- a/ksirc/KSPrefs/page_general.h
+++ b/ksirc/KSPrefs/page_general.h
@@ -18,7 +18,7 @@ class PageGeneral : public PageGeneralBase
Q_OBJECT
public:
- PageGeneral( QWidget *parent = 0, const char *name = 0 );
+ PageGeneral( TQWidget *parent = 0, const char *name = 0 );
~PageGeneral();
void saveConfig();
diff --git a/ksirc/KSPrefs/page_irccolors.cpp b/ksirc/KSPrefs/page_irccolors.cpp
index aa6ff351..5ed96054 100644
--- a/ksirc/KSPrefs/page_irccolors.cpp
+++ b/ksirc/KSPrefs/page_irccolors.cpp
@@ -9,12 +9,12 @@
#include "page_irccolors.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <kcolorbutton.h>
-PageIRCColors::PageIRCColors( QWidget *parent, const char *name ) : PageIRCColorsBase( parent, name)
+PageIRCColors::PageIRCColors( TQWidget *parent, const char *name ) : PageIRCColorsBase( parent, name)
{
}
diff --git a/ksirc/KSPrefs/page_irccolors.h b/ksirc/KSPrefs/page_irccolors.h
index a34045c3..34565b42 100644
--- a/ksirc/KSPrefs/page_irccolors.h
+++ b/ksirc/KSPrefs/page_irccolors.h
@@ -18,7 +18,7 @@ class PageIRCColors : public PageIRCColorsBase
Q_OBJECT
public:
- PageIRCColors( QWidget *parent = 0, const char *name = 0 );
+ PageIRCColors( TQWidget *parent = 0, const char *name = 0 );
~PageIRCColors();
void saveConfig();
diff --git a/ksirc/KSPrefs/page_looknfeel.cpp b/ksirc/KSPrefs/page_looknfeel.cpp
index 931a897c..29608e04 100644
--- a/ksirc/KSPrefs/page_looknfeel.cpp
+++ b/ksirc/KSPrefs/page_looknfeel.cpp
@@ -7,18 +7,18 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include <kfiledialog.h>
#include "page_looknfeel.h"
-PageLooknFeel::PageLooknFeel( QWidget *parent, const char *name ) : PageLooknFeelBase( parent, name)
+PageLooknFeel::PageLooknFeel( TQWidget *parent, const char *name ) : PageLooknFeelBase( parent, name)
{
- modePreview->setPixmap(QPixmap(locate("data","ksirc/pics/sdi.png")));
+ modePreview->setPixmap(TQPixmap(locate("data","ksirc/pics/sdi.png")));
wallpaperPathLE->fileDialog()->setFilter( "*.jpg *.png *.gif" );
}
@@ -54,14 +54,14 @@ void PageLooknFeel::defaultConfig()
void PageLooknFeel::setPreviewPixmap( bool isSDI )
{
if (isSDI == true)
- modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/sdi.png" ) ) );
+ modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/sdi.png" ) ) );
else
- modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/mdi.png" ) ) );
+ modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/mdi.png" ) ) );
}
-void PageLooknFeel::showWallpaperPixmap( const QString &url )
+void PageLooknFeel::showWallpaperPixmap( const TQString &url )
{
- wallpaperPreview->setPixmap( QPixmap( url ) );
+ wallpaperPreview->setPixmap( TQPixmap( url ) );
}
void PageLooknFeel::changed()
diff --git a/ksirc/KSPrefs/page_looknfeel.h b/ksirc/KSPrefs/page_looknfeel.h
index a5c7f96f..326498cb 100644
--- a/ksirc/KSPrefs/page_looknfeel.h
+++ b/ksirc/KSPrefs/page_looknfeel.h
@@ -18,7 +18,7 @@ class PageLooknFeel : public PageLooknFeelBase
Q_OBJECT
public:
- PageLooknFeel( QWidget *parent = 0, const char *name = 0 );
+ PageLooknFeel( TQWidget *parent = 0, const char *name = 0 );
~PageLooknFeel();
void saveConfig();
@@ -30,7 +30,7 @@ signals:
public slots:
virtual void setPreviewPixmap( bool isSDI );
- virtual void showWallpaperPixmap( const QString &url );
+ virtual void showWallpaperPixmap( const TQString &url );
virtual void changed();
};
diff --git a/ksirc/KSPrefs/page_rmbmenu.cpp b/ksirc/KSPrefs/page_rmbmenu.cpp
index 7baf5da5..de30a829 100644
--- a/ksirc/KSPrefs/page_rmbmenu.cpp
+++ b/ksirc/KSPrefs/page_rmbmenu.cpp
@@ -8,11 +8,11 @@
#include "page_rmbmenu.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
@@ -20,7 +20,7 @@
-PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase( parent, name)
+PageRMBMenu::PageRMBMenu( TQWidget *parent, const char *name ) : PageRMBMenuBase( parent, name)
{
UserControlMenu *ucm;
@@ -41,21 +41,21 @@ PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase(
changeItemPB->hide();
- connect(commandLB, SIGNAL(highlighted( int )),
- this, SLOT(highlighted( int )));
- connect(moveUpPB, SIGNAL(clicked()),
- this, SLOT(moveDown()));
- connect(moveDownPB, SIGNAL(clicked()),
- this, SLOT(moveUp()));
+ connect(commandLB, TQT_SIGNAL(highlighted( int )),
+ this, TQT_SLOT(highlighted( int )));
+ connect(moveUpPB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(moveDown()));
+ connect(moveDownPB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(moveUp()));
- connect(insertSeperatorPB, SIGNAL(clicked()),
- this, SLOT(insSeperator()));
+ connect(insertSeperatorPB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(insSeperator()));
- connect(insertItemPB, SIGNAL(clicked()),
- this, SLOT(insCommand()));
+ connect(insertItemPB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(insCommand()));
- connect(deleteItemPB, SIGNAL(clicked()),
- this, SLOT(delCommand()));
+ connect(deleteItemPB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(delCommand()));
}
@@ -122,7 +122,7 @@ void PageRMBMenu::moveUp()
{
int item = commandLB->currentItem();
- QString txt = commandLB->text(item);
+ TQString txt = commandLB->text(item);
commandLB->removeItem(item);
commandLB->insertItem(txt, item-1);
@@ -139,7 +139,7 @@ void PageRMBMenu::moveDown()
{
int item = commandLB->currentItem();
- QString txt = commandLB->text(item);
+ TQString txt = commandLB->text(item);
commandLB->removeItem(item);
commandLB->insertItem(txt, item+1);
@@ -156,7 +156,7 @@ void PageRMBMenu::insSeperator()
{
int item = commandLB->currentItem();
- QString txt = commandLB->text(item);
+ TQString txt = commandLB->text(item);
commandLB->insertItem("--------------", item);
commandLB->setCurrentItem(item);
@@ -171,8 +171,8 @@ void PageRMBMenu::insCommand()
{
int item = commandLB->currentItem();
- QString te = entryLE->text();
- QString ce = commandLE->text();
+ TQString te = entryLE->text();
+ TQString ce = commandLE->text();
commandLB->insertItem(te, item);
commandLB->setCurrentItem(item);
@@ -193,7 +193,7 @@ void PageRMBMenu::delCommand()
{
int item = commandLB->currentItem();
- QString txt = commandLB->text(item);
+ TQString txt = commandLB->text(item);
commandLB->removeItem(item);
UserControlMenu::UserMenu.remove(item);
diff --git a/ksirc/KSPrefs/page_rmbmenu.h b/ksirc/KSPrefs/page_rmbmenu.h
index cb1de421..1d4a8dac 100644
--- a/ksirc/KSPrefs/page_rmbmenu.h
+++ b/ksirc/KSPrefs/page_rmbmenu.h
@@ -18,7 +18,7 @@ class PageRMBMenu : public PageRMBMenuBase
Q_OBJECT
public:
- PageRMBMenu( QWidget *parent = 0, const char *name = 0 );
+ PageRMBMenu( TQWidget *parent = 0, const char *name = 0 );
~PageRMBMenu();
void saveConfig();
diff --git a/ksirc/KSPrefs/page_servchan.cpp b/ksirc/KSPrefs/page_servchan.cpp
index 4689bd2a..f7587947 100644
--- a/ksirc/KSPrefs/page_servchan.cpp
+++ b/ksirc/KSPrefs/page_servchan.cpp
@@ -9,18 +9,18 @@
#include "page_servchan.h"
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kconfig.h>
-PageServChan::PageServChan( QWidget *parent, const char *name ) : PageServChanBase( parent, name)
+PageServChan::PageServChan( TQWidget *parent, const char *name ) : PageServChanBase( parent, name)
{
- connect(serverDeleteItemPB, SIGNAL(pressed()), this, SLOT(deletePressedSL()));
- connect(ServerAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedSL()));
- connect(chanDeleteItmPB, SIGNAL(pressed()), this, SLOT(deletePressedCL()));
- connect(ChanAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedCL()));
+ connect(serverDeleteItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedSL()));
+ connect(ServerAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedSL()));
+ connect(chanDeleteItmPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedCL()));
+ connect(ChanAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedCL()));
}
@@ -30,10 +30,10 @@ PageServChan::~PageServChan()
void PageServChan::saveConfig()
{
- QStringList sLB;
+ TQStringList sLB;
uint i;
for(i = 0; i < serverLB->count(); i++){
- QString txt = serverLB->text(i);
+ TQString txt = serverLB->text(i);
if(!txt.isNull())
sLB << txt;
}
@@ -41,9 +41,9 @@ void PageServChan::saveConfig()
conf->setGroup("ServerList");
conf->writeEntry("RecentServers", sLB);
- QStringList sCL;
+ TQStringList sCL;
for(i = 0; i < channelLB->count(); i++){
- QString txt = channelLB->text(i);
+ TQString txt = channelLB->text(i);
if(!txt.isNull())
sCL << txt;
}
@@ -55,7 +55,7 @@ void PageServChan::readConfig( const KSOServChan * )
{
KConfig *conf = kapp->config();
conf->setGroup("ServerList");
- QStringList recent = conf->readListEntry("RecentServers");
+ TQStringList recent = conf->readListEntry("RecentServers");
recent.sort();
serverLB->insertStringList(recent);
conf->setGroup("Recent");
@@ -79,7 +79,7 @@ void PageServChan::deletePressedSL() {
void PageServChan::addPressedSL() {
uint i;
- QString txt = LineEdit6->text();
+ TQString txt = LineEdit6->text();
for(i = 0; i < serverLB->count(); i++){
if(txt == serverLB->text(i)){
@@ -111,7 +111,7 @@ void PageServChan::deletePressedCL() {
void PageServChan::addPressedCL() {
uint i;
- QString txt = LineEdit6_2->text();
+ TQString txt = LineEdit6_2->text();
for(i = 0; i < channelLB->count(); i++){
if(txt == channelLB->text(i)){
diff --git a/ksirc/KSPrefs/page_servchan.h b/ksirc/KSPrefs/page_servchan.h
index 07429f2b..1e20e8d7 100644
--- a/ksirc/KSPrefs/page_servchan.h
+++ b/ksirc/KSPrefs/page_servchan.h
@@ -18,7 +18,7 @@ class PageServChan : public PageServChanBase
Q_OBJECT
public:
- PageServChan( QWidget *parent = 0, const char *name = 0 );
+ PageServChan( TQWidget *parent = 0, const char *name = 0 );
~PageServChan();
void saveConfig();
diff --git a/ksirc/KSPrefs/page_shortcuts.cpp b/ksirc/KSPrefs/page_shortcuts.cpp
index 45a83beb..4d2fda54 100644
--- a/ksirc/KSPrefs/page_shortcuts.cpp
+++ b/ksirc/KSPrefs/page_shortcuts.cpp
@@ -7,8 +7,8 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kglobalaccel.h>
@@ -16,12 +16,12 @@
#include "page_shortcuts.h"
#include "../servercontroller.h"
-PageShortcuts::PageShortcuts( QWidget *parent, const char *name ) : PageShortcutsBase( parent, name)
+PageShortcuts::PageShortcuts( TQWidget *parent, const char *name ) : PageShortcutsBase( parent, name)
{
globalGB->setColumnLayout( 0, Qt::Horizontal );
m_key = new KKeyChooser(servercontroller::self()->getGlobalAccel(), globalGB);
- connect(m_key, SIGNAL(keyChange()), this, SLOT(changed()));
+ connect(m_key, TQT_SIGNAL(keyChange()), this, TQT_SLOT(changed()));
globalGB->layout()->add(m_key);
}
diff --git a/ksirc/KSPrefs/page_shortcuts.h b/ksirc/KSPrefs/page_shortcuts.h
index 4c16aa35..36048f44 100644
--- a/ksirc/KSPrefs/page_shortcuts.h
+++ b/ksirc/KSPrefs/page_shortcuts.h
@@ -20,7 +20,7 @@ class PageShortcuts : public PageShortcutsBase
Q_OBJECT
public:
- PageShortcuts( QWidget *parent = 0, const char *name = 0 );
+ PageShortcuts( TQWidget *parent = 0, const char *name = 0 );
~PageShortcuts();
void saveConfig();
diff --git a/ksirc/KSPrefs/page_startup.cpp b/ksirc/KSPrefs/page_startup.cpp
index 060da44d..e2ddfdc1 100644
--- a/ksirc/KSPrefs/page_startup.cpp
+++ b/ksirc/KSPrefs/page_startup.cpp
@@ -7,9 +7,9 @@
* *
***************************************************************************/
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -19,16 +19,16 @@
#include "page_startup.h"
-PageStartup::PageStartup( QWidget *parent, const char *name ) : PageStartupBase( parent, name)
+PageStartup::PageStartup( TQWidget *parent, const char *name ) : PageStartupBase( parent, name)
{
notifyLB->upButton()->hide();
notifyLB->downButton()->hide();
serverLB->upButton()->hide();
serverLB->downButton()->hide();
- QListBox *lb = serverLB->listBox();
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(clickedLB(int)));
+ TQListBox *lb = serverLB->listBox();
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(clickedLB(int)));
changing = false;
@@ -41,11 +41,11 @@ PageStartup::~PageStartup()
void PageStartup::saveConfig()
{
KSOServer glb = ksopts->server["global"];
- QStringList items = serverLB->items();
+ TQStringList items = serverLB->items();
ksopts->server.clear();
- QStringList::iterator it = items.begin();
+ TQStringList::iterator it = items.begin();
for( ; it != items.end(); ++it){
ksopts->server[*it] = server[*it];
}
@@ -65,7 +65,7 @@ void PageStartup::readConfig( const KSOptions *opts )
if(it.data().globalCopy == false)
serverLB->insertItem(it.key());
}
- QListBoxItem *item = serverLB->listBox()->findItem("global");
+ TQListBoxItem *item = serverLB->listBox()->findItem("global");
serverLB->listBox()->setSelected(item, true);
changing = false;
clickedLB(serverLB->listBox()->index(item));
@@ -82,7 +82,7 @@ void PageStartup::changed()
{
emit modified();
- QString ser = serverLB->currentText();
+ TQString ser = serverLB->currentText();
if(ser.isEmpty())
return;
@@ -106,7 +106,7 @@ void PageStartup::changed()
void PageStartup::clickedLB(int index)
{
- QString text = serverLB->text(index);
+ TQString text = serverLB->text(index);
if(!server.contains(text)){
server[text] = server["global"];
server[text].globalCopy = true;
diff --git a/ksirc/KSPrefs/page_startup.h b/ksirc/KSPrefs/page_startup.h
index ecac8305..c2092e65 100644
--- a/ksirc/KSPrefs/page_startup.h
+++ b/ksirc/KSPrefs/page_startup.h
@@ -18,7 +18,7 @@ class PageStartup : public PageStartupBase
Q_OBJECT
public:
- PageStartup( QWidget *parent = 0, const char *name = 0 );
+ PageStartup( TQWidget *parent = 0, const char *name = 0 );
~PageStartup();
void saveConfig();
diff --git a/ksirc/KSProgress/ksprogress.cpp b/ksirc/KSProgress/ksprogress.cpp
index 369b0742..ccf3b194 100644
--- a/ksirc/KSProgress/ksprogress.cpp
+++ b/ksirc/KSProgress/ksprogress.cpp
@@ -10,7 +10,7 @@
KSProgress::KSProgress
(
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
:
@@ -22,7 +22,7 @@ KSProgress::KSProgress
}
-void KSProgress::setID(QString _id)
+void KSProgress::setID(TQString _id)
{
id = _id;
}
@@ -32,12 +32,12 @@ void KSProgress::setRange(int minValue, int maxValue)
progress->setRange(minValue, maxValue);
}
-void KSProgress::setTopText(QString text)
+void KSProgress::setTopText(TQString text)
{
fileName->setText(text);
}
-void KSProgress::setBotText(QString text)
+void KSProgress::setBotText(TQString text)
{
transferStatus->setText(text);
}
diff --git a/ksirc/KSProgress/ksprogress.h b/ksirc/KSProgress/ksprogress.h
index c3feb2c6..2613047d 100644
--- a/ksirc/KSProgress/ksprogress.h
+++ b/ksirc/KSProgress/ksprogress.h
@@ -20,16 +20,16 @@ public:
KSProgress
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
virtual ~KSProgress();
- virtual void setID(QString);
+ virtual void setID(TQString);
virtual void setRange(int minValue, int maxValue);
- virtual void setTopText(QString text);
- virtual void setBotText(QString text);
+ virtual void setTopText(TQString text);
+ virtual void setBotText(TQString text);
public slots:
virtual void setValue(int value);
@@ -37,10 +37,10 @@ public slots:
signals:
void cancel();
- void cancel(QString);
+ void cancel(TQString);
private:
- QString id;
+ TQString id;
bool canceled;
};
diff --git a/ksirc/KSProgress/ksprogressdata.cpp b/ksirc/KSProgress/ksprogressdata.cpp
index 0feb524b..7d146fd9 100644
--- a/ksirc/KSProgress/ksprogressdata.cpp
+++ b/ksirc/KSProgress/ksprogressdata.cpp
@@ -22,7 +22,7 @@
ksprogressData::ksprogressData
(
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
:
@@ -33,15 +33,15 @@ ksprogressData::ksprogressData
progress->setMinimumSize( 10, 10 );
progress->setMaximumSize( 32767, 32767 );
- QPushButton* dlgedit_PushButton_1;
+ TQPushButton* dlgedit_PushButton_1;
dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::cancel(), this, "PushButton_1" );
dlgedit_PushButton_1->setGeometry( 70, 90, 100, 30 );
dlgedit_PushButton_1->setMinimumSize( 10, 10 );
dlgedit_PushButton_1->setMaximumSize( 32767, 32767 );
- connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(cancelPressed()) );
+ connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(cancelPressed()) );
dlgedit_PushButton_1->setAutoRepeat( FALSE );
- fileName = new QLabel( this, "Label_1" );
+ fileName = new TQLabel( this, "Label_1" );
fileName->setGeometry( 10, 10, 230, 20 );
fileName->setMinimumSize( 10, 10 );
fileName->setMaximumSize( 32767, 32767 );
@@ -49,7 +49,7 @@ ksprogressData::ksprogressData
fileName->setAlignment( 289 );
fileName->setMargin( -1 );
- transferStatus = new QLabel( this, "Label_2" );
+ transferStatus = new TQLabel( this, "Label_2" );
transferStatus->setGeometry( 10, 35, 230, 20 );
transferStatus->setMinimumSize( 10, 10 );
transferStatus->setMaximumSize( 32767, 32767 );
diff --git a/ksirc/KSProgress/ksprogressdata.h b/ksirc/KSProgress/ksprogressdata.h
index a2282baf..37e3cf29 100644
--- a/ksirc/KSProgress/ksprogressdata.h
+++ b/ksirc/KSProgress/ksprogressdata.h
@@ -13,8 +13,8 @@
#ifndef ksprogressData_included
#define ksprogressData_included
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include "kprogress.h"
class ksprogressData : public QFrame
@@ -25,7 +25,7 @@ public:
ksprogressData
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
@@ -40,8 +40,8 @@ protected slots:
protected:
KProgress* progress;
- QLabel* fileName;
- QLabel* transferStatus;
+ TQLabel* fileName;
+ TQLabel* transferStatus;
};
diff --git a/ksirc/KSTicker/kspainter.cpp b/ksirc/KSTicker/kspainter.cpp
index fe5fbf65..90ffac0d 100644
--- a/ksirc/KSTicker/kspainter.cpp
+++ b/ksirc/KSTicker/kspainter.cpp
@@ -6,13 +6,13 @@ const int KSPainter::optcolours = 8;
const int KSPainter::startspecial = 16;
const int KSPainter::maxcolour = 16+optcolours;
-const QColor KSPainter::brown ( 165, 42, 42 );
-const QColor KSPainter::orange ( 255, 165, 0 );
-const QColor KSPainter::lightCyan( 224, 255, 255 );
-const QColor KSPainter::lightBlue( 173, 216, 230 );
-const QColor KSPainter::pink ( 255, 192, 203 );
+const TQColor KSPainter::brown ( 165, 42, 42 );
+const TQColor KSPainter::orange ( 255, 165, 0 );
+const TQColor KSPainter::lightCyan( 224, 255, 255 );
+const TQColor KSPainter::lightBlue( 173, 216, 230 );
+const TQColor KSPainter::pink ( 255, 192, 203 );
-QColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white,
+TQColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white,
Qt::black,
Qt::darkBlue,
Qt::darkGreen,
@@ -41,7 +41,7 @@ void KSPainter::initOptColours()
num2colour[startspecial+7] = ksopts->backgroundColor;
}
-int KSPainter::colour2num(const QColor &colour)
+int KSPainter::colour2num(const TQColor &colour)
{
for(int i = 0; i < maxcolour; i++)
if(num2colour[i] == colour)
@@ -50,7 +50,7 @@ int KSPainter::colour2num(const QColor &colour)
return -1;
}
-void KSPainter::colourDrawText(QPainter *p, int startx, int starty,
+void KSPainter::colourDrawText(TQPainter *p, int startx, int starty,
char *str, int length)
{
int offset = 0;
@@ -62,7 +62,7 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty,
// Default pen (colour)
- const QPen qpDefPen = p->pen();
+ const TQPen qpDefPen = p->pen();
for(loc = 0; (str[loc] != 0x00) && (loc != length) ; loc++){
if(str[loc] == 0x03 || str[loc] == '~'){
@@ -121,8 +121,8 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty,
p->setBackgroundMode(Qt::TransparentMode);
}
else if((str[i] == '~') && ((str[i+1] >= 0x61) || (str[i+1] <= 0x7a))){
- QFont fnt = p->font();
- QColor temppen;
+ TQFont fnt = p->font();
+ TQColor temppen;
switch(str[i+1]){
case 'c':
p->setPen(qpDefPen);
diff --git a/ksirc/KSTicker/kspainter.h b/ksirc/KSTicker/kspainter.h
index 21f9495d..b5fa1049 100644
--- a/ksirc/KSTicker/kspainter.h
+++ b/ksirc/KSTicker/kspainter.h
@@ -1,25 +1,25 @@
#ifndef KSPAINTER_H
#define KSPAINTER_H
-#include <qpainter.h>
-#include <qobject.h>
+#include <tqpainter.h>
+#include <tqobject.h>
class KSPainter
{
public:
static void initOptColours();
- static void colourDrawText(QPainter *p, int startx, int starty, char *str, int length = -1);
+ static void colourDrawText(TQPainter *p, int startx, int starty, char *str, int length = -1);
static const int startspecial;
static const int maxcolour;
static const int optcolours;
- static QColor num2colour[16+8];
- static int colour2num(const QColor &colour);
+ static TQColor num2colour[16+8];
+ static int colour2num(const TQColor &colour);
- static const QColor brown;
- static const QColor orange;
- static const QColor lightCyan;
- static const QColor lightBlue;
- static const QColor pink;
+ static const TQColor brown;
+ static const TQColor orange;
+ static const TQColor lightCyan;
+ static const TQColor lightBlue;
+ static const TQColor pink;
};
#endif
diff --git a/ksirc/KSTicker/ksticker.cpp b/ksirc/KSTicker/ksticker.cpp
index dc65118a..e6199427 100644
--- a/ksirc/KSTicker/ksticker.cpp
+++ b/ksirc/KSTicker/ksticker.cpp
@@ -1,10 +1,10 @@
#include <stdlib.h>
-#include <qpainter.h>
-#include <qframe.h>
-#include <qpaintdevice.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqframe.h>
+#include <tqpaintdevice.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kfontdialog.h>
@@ -21,13 +21,13 @@
#include <kwin.h>
#include <kdebug.h>
-KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f)
-: QFrame(parent, name, f)
+KSTicker::KSTicker(TQWidget * parent, const char * name, WFlags f)
+: TQFrame(parent, name, f)
{
pHeight = 1;
- pic = new QPixmap(); // create pic map here, resize it later though.
+ pic = new TQPixmap(); // create pic map here, resize it later though.
// pic->setBackgroundMode(TransparentMode);
KConfig *conf = kapp->config();
@@ -36,7 +36,7 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f)
bAtEnd = FALSE;
setFont(conf->readFontEntry("Font", &ksopts->defaultFont));
- ourFont = font(); //QFont("Courier");
+ ourFont = font(); //TQFont("Courier");
setFont(ourFont);
setMinimumSize(100, 10);
setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight);
@@ -54,13 +54,13 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f)
currentChar = 0;
chars = this->width() / onechar;
- popup = new QPopupMenu();
- popup->insertItem(i18n( "Font..." ), this, SLOT(fontSelector()));
- popup->insertItem(i18n( "Scroll Rate..." ), this, SLOT(scrollRate()));
- iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, SLOT(scrollConstantly()));
+ popup = new TQPopupMenu();
+ popup->insertItem(i18n( "Font..." ), this, TQT_SLOT(fontSelector()));
+ popup->insertItem(i18n( "Scroll Rate..." ), this, TQT_SLOT(scrollRate()));
+ iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, TQT_SLOT(scrollConstantly()));
popup->setItemChecked(iScrollItem, bScrollConstantly);
popup->insertSeparator();
- popup->insertItem(i18n( "Return to Normal Mode" ), this, SIGNAL(doubleClick()));
+ popup->insertItem(i18n( "Return to Normal Mode" ), this, TQT_SIGNAL(doubleClick()));
currentStr = "";
@@ -101,12 +101,12 @@ void KSTicker::show()
*/
// ### FIXME: port to kwin
//KWM::setDecoration(winId(), KWM::tinyDecoration);
- QSize size = this->size();
- size.setHeight(QFontMetrics(font()).height()+10);
- setFixedHeight(QFontMetrics(font()).height()+10);
+ TQSize size = this->size();
+ size.setHeight(TQFontMetrics(font()).height()+10);
+ setFixedHeight(TQFontMetrics(font()).height()+10);
resize(size);
- QFrame::show();
+ TQFrame::show();
if(currentStr.length() != 0)
startTicker();
currentChar = 0;
@@ -116,16 +116,16 @@ void KSTicker::show()
void KSTicker::hide()
{
killTimers();
- QFrame::hide();
+ TQFrame::hide();
}
void KSTicker::iconify()
{
- QFrame::showMinimized();
+ TQFrame::showMinimized();
killTimers();
}
-void KSTicker::setString(QString str)
+void KSTicker::setString(TQString str)
{
strlist.clear();
strlist.append(str);
@@ -133,24 +133,24 @@ void KSTicker::setString(QString str)
startTicker();
}
-void KSTicker::mergeString(QString str, QColor c)
+void KSTicker::mergeString(TQString str, TQColor c)
{
int num = KSPainter::colour2num(c);
if(num != -1){
- str.prepend(QString("~%1").arg(num));
+ str.prepend(TQString("~%1").arg(num));
}
mergeString(str);
}
-void KSTicker::mergeString(QString str)
+void KSTicker::mergeString(TQString str)
{
- QRegExp rx("~n(\\S+)~n");
+ TQRegExp rx("~n(\\S+)~n");
if(rx.search(str) >= 0){
int value = nickColourMaker::colourMaker()->findIdx(rx.cap(1));
if(value >= 0){
- QString newText = QString("~%1\\1~c").arg(value);
+ TQString newText = TQString("~%1\\1~c").arg(value);
str.replace(rx, newText);
}
}
@@ -160,7 +160,7 @@ void KSTicker::mergeString(QString str)
if(strlist.count() > 5){
int found = 0;
- QStringList::Iterator it = strlist.begin();
+ TQStringList::Iterator it = strlist.begin();
for(; it != strlist.end(); it++){
if(((*it).find(ksopts->server["global"].nick, 0, FALSE) == -1) &&
((*it).find(ksopts->server["global"].altNick, 0, FALSE) == -1)){
@@ -179,10 +179,10 @@ void KSTicker::mergeString(QString str)
if(bScrollConstantly == FALSE)
startTicker();
- QStringList sep = QStringList::split(" ", stripCols(str));
+ TQStringList sep = TQStringList::split(" ", stripCols(str));
int len = 0;
- QString brok;
- QStringList::Iterator it = sep.begin();
+ TQString brok;
+ TQStringList::Iterator it = sep.begin();
for(; it != sep.end(); ++it) {
brok += *it + " ";
len += (*it).length();
@@ -197,15 +197,15 @@ void KSTicker::mergeString(QString str)
tipbuffer.append(brok);
while(tipbuffer.count() > 10)
tipbuffer.pop_front();
- QString tip = tipbuffer.join("\n");
+ TQString tip = tipbuffer.join("\n");
-// QToolTip::remove(this);
- QToolTip::add(this, tip);
+// TQToolTip::remove(this);
+ TQToolTip::add(this, tip);
}
-void KSTicker::timerEvent(QTimerEvent *)
+void KSTicker::timerEvent(TQTimerEvent *)
{
if((uint)currentChar >= currentStr.length()){
if(strlist.isEmpty()){
@@ -234,7 +234,7 @@ void KSTicker::timerEvent(QTimerEvent *)
static BGMode bgmode = TransparentMode;
bitBlt(pic, -tickStep, 0, pic);
- QPainter p(pic);
+ TQPainter p(pic);
cOffset += tickStep;
if(cOffset >= onechar){
@@ -243,8 +243,8 @@ void KSTicker::timerEvent(QTimerEvent *)
while(((currentStr[currentChar] == '~') || (currentStr[currentChar] == 0x03))
&& (step > 0)){
step = 1; // reset in case it's our second, or more loop.
- QString text = currentStr.mid(currentChar);
- QString buf = "";
+ TQString text = currentStr.mid(currentChar);
+ TQString buf = "";
if((text[step] >= '0') &&
(text[step] <= '9')) {
@@ -344,7 +344,7 @@ void KSTicker::timerEvent(QTimerEvent *)
}
- QFont fnt = font();
+ TQFont fnt = font();
fnt.setBold(bold);
fnt.setUnderline(underline);
fnt.setItalic(italics);
@@ -364,20 +364,20 @@ void KSTicker::timerEvent(QTimerEvent *)
bitBlt(this, 0, descent, pic);
}
-void KSTicker::paintEvent( QPaintEvent *)
+void KSTicker::paintEvent( TQPaintEvent *)
{
if(isVisible() == FALSE)
return;
bitBlt(this, 0, descent, pic);
}
-void KSTicker::resizeEvent( QResizeEvent *e)
+void KSTicker::resizeEvent( TQResizeEvent *e)
{
- QFrame::resizeEvent(e);
+ TQFrame::resizeEvent(e);
onechar = fontMetrics().width("X");
chars = this->width() / onechar;
killTimers();
- QPixmap *new_pic = new QPixmap(width() + onechar, height());
+ TQPixmap *new_pic = new TQPixmap(width() + onechar, height());
new_pic->fill(backgroundColor());
bitBlt(new_pic,
new_pic->width() - pic->width(), 0,
@@ -390,7 +390,7 @@ void KSTicker::resizeEvent( QResizeEvent *e)
startTicker();
}
-void KSTicker::closeEvent( QCloseEvent *)
+void KSTicker::closeEvent( TQCloseEvent *)
{
emit closing();
killTimers();
@@ -408,18 +408,18 @@ void KSTicker::stopTicker()
killTimers();
}
-void KSTicker::mouseDoubleClickEvent( QMouseEvent * )
+void KSTicker::mouseDoubleClickEvent( TQMouseEvent * )
{
emit doubleClick();
}
-void KSTicker::mousePressEvent( QMouseEvent *e)
+void KSTicker::mousePressEvent( TQMouseEvent *e)
{
if(e->button() == RightButton){
popup->popup(this->cursor().pos());
}
else{
- QFrame::mousePressEvent(e);
+ TQFrame::mousePressEvent(e);
}
}
void KSTicker::fontSelector()
@@ -434,8 +434,8 @@ void KSTicker::scrollRate()
{
SpeedDialog *sd = new SpeedDialog(tickRate, tickStep);
sd->setLimit(5, 200, 1, onechar);
- connect(sd, SIGNAL(stateChange(int, int)),
- this, SLOT(setSpeed(int, int)));
+ connect(sd, TQT_SIGNAL(stateChange(int, int)),
+ this, TQT_SLOT(setSpeed(int, int)));
sd->show();
}
@@ -451,7 +451,7 @@ void KSTicker::scrollConstantly()
conf->sync();
}
-void KSTicker::updateFont(const QFont &font){
+void KSTicker::updateFont(const TQFont &font){
setFont(font);
setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight);
resize(fontMetrics().width("X")*chars,
@@ -474,18 +474,18 @@ void KSTicker::speed(int *_tickRate, int *_tickStep){
*_tickStep = tickStep;
}
-void KSTicker::setBackgroundColor ( const QColor &c )
+void KSTicker::setBackgroundColor ( const TQColor &c )
{
- QFrame::setBackgroundColor(c);
+ TQFrame::setBackgroundColor(c);
pic->fill(c);
bitBlt(this, 0,0, pic);
defbg = backgroundColor();
bg = backgroundColor();
}
-void KSTicker::setPalette ( const QPalette & p )
+void KSTicker::setPalette ( const TQPalette & p )
{
- QFrame::setPalette(p);
+ TQFrame::setPalette(p);
pic->fill(backgroundColor());
bitBlt(this, 0,0, pic);
@@ -495,10 +495,10 @@ void KSTicker::setPalette ( const QPalette & p )
fg = foregroundColor();
}
-QString KSTicker::stripCols( QString str )
+TQString KSTicker::stripCols( TQString str )
{
uint i = 0;
- QString ret;
+ TQString ret;
for(i = 0; i < str.length(); i++){
if(((str[i] == '~') || (str[i] == 0x03))){
if((str[i+1] >= '0') &&
diff --git a/ksirc/KSTicker/ksticker.h b/ksirc/KSTicker/ksticker.h
index d11d8a0f..47beecac 100644
--- a/ksirc/KSTicker/ksticker.h
+++ b/ksirc/KSTicker/ksticker.h
@@ -1,11 +1,11 @@
#ifndef KSTICKER_H
#define KSTICKER_H
-#include <qobject.h>
-#include <qframe.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qpopupmenu.h>
+#include <tqobject.h>
+#include <tqframe.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqpopupmenu.h>
class SInfo {
public:
@@ -17,20 +17,20 @@ class KSTicker : public QFrame
Q_OBJECT
public:
- KSTicker(QWidget * parent=0, const char * name=0, WFlags f=0);
+ KSTicker(TQWidget * parent=0, const char * name=0, WFlags f=0);
virtual ~KSTicker();
- void setString(QString);
- void mergeString(QString);
- void mergeString(QString, QColor);
+ void setString(TQString);
+ void mergeString(TQString);
+ void mergeString(TQString, TQColor);
virtual void show();
virtual void hide();
void speed(int *, int *);
- virtual void setBackgroundColor ( const QColor & );
- virtual void setPalette ( const QPalette & p );
+ virtual void setBackgroundColor ( const TQColor & );
+ virtual void setPalette ( const TQPalette & p );
signals:
void doubleClick();
@@ -42,29 +42,29 @@ public slots:
protected slots:
virtual void fontSelector();
virtual void scrollRate();
- virtual void updateFont(const QFont &font);
+ virtual void updateFont(const TQFont &font);
virtual void scrollConstantly();
protected:
- virtual void timerEvent ( QTimerEvent * );
- virtual void paintEvent ( QPaintEvent * );
- virtual void resizeEvent( QResizeEvent * );
- virtual void closeEvent( QCloseEvent * );
- virtual void mouseDoubleClickEvent( QMouseEvent * );
- virtual void mousePressEvent ( QMouseEvent * );
+ virtual void timerEvent ( TQTimerEvent * );
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void closeEvent( TQCloseEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+ virtual void mousePressEvent ( TQMouseEvent * );
virtual void iconify();
private:
- QString stripCols(QString);
+ TQString stripCols(TQString);
- QStringList strlist; /* everything left to parse */
- QStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */
- QStringList tipbuffer; /* 5 lines for the tooltip */
- QString currentStr; /* the string we are currently parsing */
+ TQStringList strlist; /* everything left to parse */
+ TQStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */
+ TQStringList tipbuffer; /* 5 lines for the tooltip */
+ TQString currentStr; /* the string we are currently parsing */
- QFont ourFont;
+ TQFont ourFont;
int onechar;
int chars;
@@ -86,9 +86,9 @@ private:
int iScrollItem;
bool bAtEnd;
- QPixmap *pic;
+ TQPixmap *pic;
- QPopupMenu *popup;
+ TQPopupMenu *popup;
/*
* Drawing settings and variables
@@ -96,10 +96,10 @@ private:
bool bold;
bool underline;
bool italics;
- QColor defbg;
- QColor deffg;
- QColor bg;
- QColor fg;
+ TQColor defbg;
+ TQColor deffg;
+ TQColor bg;
+ TQColor fg;
};
#endif // KSTICKER_H
diff --git a/ksirc/KSTicker/ksttest.cpp b/ksirc/KSTicker/ksttest.cpp
index 81373bd8..36ad249a 100644
--- a/ksirc/KSTicker/ksttest.cpp
+++ b/ksirc/KSTicker/ksttest.cpp
@@ -1,8 +1,8 @@
#include <kapplication.h>
#include <kconfig.h>
-#include <qapplication.h>
-#include <qsocketnotifier.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqsocketnotifier.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
@@ -19,7 +19,7 @@ StdInTicker::StdInTicker()
: KSTicker()
{
kConfig->setGroup("defaults");
- QFont font;
+ TQFont font;
font = kConfig->readFontEntry("font");
font.setFixedPitch(TRUE);
setFont(font);
@@ -45,8 +45,8 @@ void StdInTicker::readsocket(int socket)
char buf[1024];
int bytes = read(socket, buf, 1024);
if(bytes){
- QCString str(buf, bytes);
- str.replace(QRegExp("\n"), " // ");
+ TQCString str(buf, bytes);
+ str.replace(TQRegExp("\n"), " // ");
mergeString(str);
}
}
@@ -56,7 +56,7 @@ void StdInTicker::end()
delete this;
}
-void StdInTicker::closeEvent ( QCloseEvent *e )
+void StdInTicker::closeEvent ( TQCloseEvent *e )
{
KSTicker::closeEvent(e);
delete this;
@@ -79,11 +79,11 @@ int main(int argc, char **argv){
opts.load();
StdInTicker *kst = new StdInTicker();
- QSocketNotifier *sn = new QSocketNotifier(0, QSocketNotifier::Read);
- QObject::connect(sn, SIGNAL(activated(int)),
- kst, SLOT(readsocket(int)));
- QObject::connect(kst, SIGNAL(doubleClick()), kst, SLOT(end()));
- QObject::connect(kst, SIGNAL(closing()), kst, SLOT(end()));
+ TQSocketNotifier *sn = new TQSocketNotifier(0, TQSocketNotifier::Read);
+ TQObject::connect(sn, TQT_SIGNAL(activated(int)),
+ kst, TQT_SLOT(readsocket(int)));
+ TQObject::connect(kst, TQT_SIGNAL(doubleClick()), kst, TQT_SLOT(end()));
+ TQObject::connect(kst, TQT_SIGNAL(closing()), kst, TQT_SLOT(end()));
a.setMainWidget(kst);
kst->show();
return a.exec();
diff --git a/ksirc/KSTicker/ksttest.h b/ksirc/KSTicker/ksttest.h
index 9d166b66..d3e988ff 100644
--- a/ksirc/KSTicker/ksttest.h
+++ b/ksirc/KSTicker/ksttest.h
@@ -12,7 +12,7 @@ public:
~StdInTicker();
protected:
- void closeEvent ( QCloseEvent * );
+ void closeEvent ( TQCloseEvent * );
public slots:
void readsocket(int socket);
diff --git a/ksirc/KSTicker/speeddialog.cpp b/ksirc/KSTicker/speeddialog.cpp
index eb1ff462..50cb8d80 100644
--- a/ksirc/KSTicker/speeddialog.cpp
+++ b/ksirc/KSTicker/speeddialog.cpp
@@ -15,16 +15,16 @@ SpeedDialog::SpeedDialog
(
int tick,
int step,
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
: speeddialogData( parent, name )
{
setCaption(i18n( "Speed Setup") );
- connect(sliderTick, SIGNAL(valueChanged(int)),
- lcdTick, SLOT(display(int)));
- connect(sliderStep, SIGNAL(valueChanged(int)),
- lcdStep, SLOT(display(int)));
+ connect(sliderTick, TQT_SIGNAL(valueChanged(int)),
+ lcdTick, TQT_SLOT(display(int)));
+ connect(sliderStep, TQT_SIGNAL(valueChanged(int)),
+ lcdStep, TQT_SLOT(display(int)));
lcdTick->display(tick);
sliderTick->setValue(tick);
lcdStep->display(step);
diff --git a/ksirc/KSTicker/speeddialog.h b/ksirc/KSTicker/speeddialog.h
index 4efdb2a8..514c72ee 100644
--- a/ksirc/KSTicker/speeddialog.h
+++ b/ksirc/KSTicker/speeddialog.h
@@ -22,7 +22,7 @@ public:
(
int tick,
int step,
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
diff --git a/ksirc/KSTicker/speeddialogData.cpp b/ksirc/KSTicker/speeddialogData.cpp
index 0dbb1c0b..822d6f7f 100644
--- a/ksirc/KSTicker/speeddialogData.cpp
+++ b/ksirc/KSTicker/speeddialogData.cpp
@@ -12,76 +12,76 @@
#include "speeddialogData.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdialog.h>
-speeddialogData::speeddialogData ( QWidget* parent, const char* name )
- :QDialog( parent, name, 0 )
+speeddialogData::speeddialogData ( TQWidget* parent, const char* name )
+ :TQDialog( parent, name, 0 )
{
- QGridLayout *grid = new QGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint());
- sliderTick = new QSlider( this, "Slider_1" );
+ TQGridLayout *grid = new TQGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint());
+ sliderTick = new TQSlider( this, "Slider_1" );
grid->addWidget( sliderTick, 0, 1 );
- connect( sliderTick, SIGNAL(valueChanged(int)), SLOT(updateTick(int)) );
- sliderTick->setOrientation( QSlider::Horizontal );
+ connect( sliderTick, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateTick(int)) );
+ sliderTick->setOrientation( TQSlider::Horizontal );
sliderTick->setRange( 10, 200 );
sliderTick->setSteps( 10, 50 );
sliderTick->setValue( 30 );
sliderTick->setTracking( TRUE );
- sliderTick->setTickmarks( QSlider::NoMarks );
+ sliderTick->setTickmarks( TQSlider::NoMarks );
sliderTick->setTickInterval( 0 );
- sliderStep = new QSlider( this, "Slider_2" );
+ sliderStep = new TQSlider( this, "Slider_2" );
grid->addWidget( sliderStep, 1, 1 );
- connect( sliderStep, SIGNAL(valueChanged(int)), SLOT(updateStep(int)) );
- sliderStep->setOrientation( QSlider::Horizontal );
+ connect( sliderStep, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateStep(int)) );
+ sliderStep->setOrientation( TQSlider::Horizontal );
sliderStep->setRange( 1, 10 );
sliderStep->setSteps( 1, 2 );
sliderStep->setValue( 3 );
sliderStep->setTracking( TRUE );
- sliderStep->setTickmarks( QSlider::NoMarks );
+ sliderStep->setTickmarks( TQSlider::NoMarks );
sliderStep->setTickInterval( 0 );
- lcdTick = new QLCDNumber( this, "LCDNumber_1" );
+ lcdTick = new TQLCDNumber( this, "LCDNumber_1" );
lcdTick->setFrameStyle( 33 );
lcdTick->setSmallDecimalPoint( FALSE );
lcdTick->setNumDigits( 3 );
- lcdTick->setMode( QLCDNumber::DEC );
- lcdTick->setSegmentStyle( QLCDNumber::Outline );
+ lcdTick->setMode( TQLCDNumber::DEC );
+ lcdTick->setSegmentStyle( TQLCDNumber::Outline );
grid->addWidget( lcdTick, 0, 2 );
- lcdStep = new QLCDNumber( this, "LCDNumber_2" );
+ lcdStep = new TQLCDNumber( this, "LCDNumber_2" );
lcdStep->setFrameStyle( 33 );
lcdStep->setSmallDecimalPoint( FALSE );
lcdStep->setNumDigits( 3 );
- lcdStep->setMode( QLCDNumber::DEC );
- lcdStep->setSegmentStyle( QLCDNumber::Outline );
+ lcdStep->setMode( TQLCDNumber::DEC );
+ lcdStep->setSegmentStyle( TQLCDNumber::Outline );
grid->addWidget( lcdStep, 1, 2 );
- QLabel* dlgedit_Label_1;
- dlgedit_Label_1 = new QLabel( this, "Label_1" );
+ TQLabel* dlgedit_Label_1;
+ dlgedit_Label_1 = new TQLabel( this, "Label_1" );
dlgedit_Label_1->setText( i18n("Tick interval:") );
dlgedit_Label_1->setAlignment( 289 );
dlgedit_Label_1->setMargin( -1 );
grid->addWidget( dlgedit_Label_1, 0, 0 );
- QLabel* dlgedit_Label_2;
- dlgedit_Label_2 = new QLabel( this, "Label_2" );
+ TQLabel* dlgedit_Label_2;
+ dlgedit_Label_2 = new TQLabel( this, "Label_2" );
dlgedit_Label_2->setText( i18n("Step size:") );
dlgedit_Label_2->setAlignment( 289 );
dlgedit_Label_2->setMargin( -1 );
grid->addWidget( dlgedit_Label_2, 1, 0 );
- QPushButton* dlgedit_PushButton_2;
+ TQPushButton* dlgedit_PushButton_2;
dlgedit_PushButton_2 = new KPushButton( KStdGuiItem::close(), this, "PushButton_2" );
- connect( dlgedit_PushButton_2, SIGNAL(pressed()), SLOT(terminate()) );
+ connect( dlgedit_PushButton_2, TQT_SIGNAL(pressed()), TQT_SLOT(terminate()) );
// dlgedit_PushButton_2->setAutoRepeat( FALSE );
// dlgedit_PushButton_2->setAutoResize( FALSE );
grid->addWidget( dlgedit_PushButton_2, 2, 2 );
diff --git a/ksirc/KSTicker/speeddialogData.h b/ksirc/KSTicker/speeddialogData.h
index 6e9f06f9..27b6c27a 100644
--- a/ksirc/KSTicker/speeddialogData.h
+++ b/ksirc/KSTicker/speeddialogData.h
@@ -13,9 +13,9 @@
#ifndef speeddialogData_included
#define speeddialogData_included
-#include <qdialog.h>
-#include <qslider.h>
-#include <qlcdnumber.h>
+#include <tqdialog.h>
+#include <tqslider.h>
+#include <tqlcdnumber.h>
class speeddialogData : public QDialog
{
@@ -25,7 +25,7 @@ public:
speeddialogData
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
@@ -41,10 +41,10 @@ protected slots:
virtual void updateStep(int);
protected:
- QSlider* sliderTick;
- QSlider* sliderStep;
- QLCDNumber* lcdTick;
- QLCDNumber* lcdStep;
+ TQSlider* sliderTick;
+ TQSlider* sliderStep;
+ TQLCDNumber* lcdTick;
+ TQLCDNumber* lcdStep;
};
diff --git a/ksirc/NewWindowDialog.cpp b/ksirc/NewWindowDialog.cpp
index c4af16f1..1a0f2dba 100644
--- a/ksirc/NewWindowDialog.cpp
+++ b/ksirc/NewWindowDialog.cpp
@@ -2,19 +2,19 @@
#include <kconfig.h>
#include <klocale.h>
#include <kcombobox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klineedit.h>
#include "NewWindowDialog.h"
-NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * parent, const char * name)
+NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, TQWidget * parent, const char * name)
: KDialogBase(parent, name, true, i18n("New Window For"), Ok|Cancel, Ok, true),
m_channelInfo(channelInfo)
{
- QHBox * w = makeHBoxMainWidget();
+ TQHBox * w = makeHBoxMainWidget();
- QLabel * l = new QLabel(i18n("C&hannel/Nick:"), w);
+ TQLabel * l = new TQLabel(i18n("C&hannel/Nick:"), w);
m_combo = new KHistoryCombo(w);
m_combo->setFocus();
@@ -24,16 +24,16 @@ NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * pare
l->setBuddy(m_combo);
- QLabel * l2 = new QLabel(i18n("&Key:"), w);
+ TQLabel * l2 = new TQLabel(i18n("&Key:"), w);
m_le = new KLineEdit(w);
m_le->setEnabled(false);
l2->setBuddy(m_le);
connect(
- m_combo, SIGNAL(activated(const QString &)),
- m_combo, SLOT(addToHistory(const QString &)));
- connect( m_combo->lineEdit(), SIGNAL(textChanged ( const QString & )),
- this, SLOT( slotTextChanged( const QString &)));
+ m_combo, TQT_SIGNAL(activated(const TQString &)),
+ m_combo, TQT_SLOT(addToHistory(const TQString &)));
+ connect( m_combo->lineEdit(), TQT_SIGNAL(textChanged ( const TQString & )),
+ this, TQT_SLOT( slotTextChanged( const TQString &)));
KConfig *kConfig = kapp->config();
KConfigGroupSaver saver(kConfig, "Recent");
@@ -48,7 +48,7 @@ NewWindowDialog::~NewWindowDialog()
kConfig->writeEntry("Channels", m_combo->historyItems());
}
-void NewWindowDialog::slotTextChanged( const QString &text)
+void NewWindowDialog::slotTextChanged( const TQString &text)
{
enableButtonOK( !text.isEmpty() );
diff --git a/ksirc/NewWindowDialog.h b/ksirc/NewWindowDialog.h
index 37449e0e..3590c691 100644
--- a/ksirc/NewWindowDialog.h
+++ b/ksirc/NewWindowDialog.h
@@ -14,13 +14,13 @@ class NewWindowDialog : public KDialogBase
public:
- NewWindowDialog(const KSircChannel &, QWidget * parent = 0, const char * name = 0);
+ NewWindowDialog(const KSircChannel &, TQWidget * parent = 0, const char * name = 0);
~NewWindowDialog();
protected slots:
void slotOk();
- void slotTextChanged( const QString &);
+ void slotTextChanged( const TQString &);
signals:
void openTopLevel(const KSircChannel &);
diff --git a/ksirc/ahistlineedit.cpp b/ksirc/ahistlineedit.cpp
index 72e6da35..2455047d 100644
--- a/ksirc/ahistlineedit.cpp
+++ b/ksirc/ahistlineedit.cpp
@@ -34,7 +34,7 @@
focusOutEvent: ditto
Variables:
- QStrList: current list of history items.
+ TQStrList: current list of history items.
current: what I think is the current list item.
*************************************************************************/
@@ -43,31 +43,31 @@
#include "ahistlineedit.h"
#include "colorpicker.h"
#include "ksopts.h"
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpen.h>
-#include <qpainter.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqpen.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kstdaction.h>
#include <kstdaccel.h>
#include <kshortcut.h>
-aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name)
- : QTextEdit(parent, name)
+aHistLineEdit::aHistLineEdit(TQWidget *parent, const char *name)
+ : TQTextEdit(parent, name)
{
m_drawrect = false;
m_height = 0;
- current = hist.append(QString::null); // Set the current as blank
- setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
+ current = hist.append(TQString::null); // Set the current as blank
+ setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
setVScrollBarMode( AlwaysOff );
setHScrollBarMode( AlwaysOff );
-// connect( this, SIGNAL( returnPressed () ), this, SLOT( slotReturn() ) );
- connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) );
+// connect( this, TQT_SIGNAL( returnPressed () ), this, TQT_SLOT( slotReturn() ) );
+ connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) );
setTabChangesFocus(true);
setTextFormat(PlainText);
@@ -80,20 +80,20 @@ aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name)
void aHistLineEdit::setCursorPosition ( int index )
{
- QTextEdit::setCursorPosition(0, index);
+ TQTextEdit::setCursorPosition(0, index);
}
int aHistLineEdit::cursorPosition() const
{
int par, index;
- QTextEdit::getCursorPosition(&par, &index);
+ TQTextEdit::getCursorPosition(&par, &index);
return index;
}
void aHistLineEdit::slotMaybeResize()
{
/*
- if(QTextEdit::text().contains("\n")){
+ if(TQTextEdit::text().contains("\n")){
setText(text());
setCursorPosition(text().length());
}
@@ -112,7 +112,7 @@ void aHistLineEdit::slotMaybeResize()
}
}
- QFontMetrics metrics( currentFont() );
+ TQFontMetrics metrics( currentFont() );
// int h = metrics.height() * lines();
int h = metrics.lineSpacing() * lines()+8;
// only grow if we are less than 1/4 the size of the toplevel
@@ -127,11 +127,11 @@ void aHistLineEdit::slotMaybeResize()
}
if(h != m_height){
m_height = h;
- QSize s = size();
+ TQSize s = size();
s.setHeight(h);
resize(s);
setFixedHeight( h );
- QLayout *l = topLevelWidget()->layout();
+ TQLayout *l = topLevelWidget()->layout();
if(l){
l->invalidate();
l->activate();
@@ -140,7 +140,7 @@ void aHistLineEdit::slotMaybeResize()
}
}
-void aHistLineEdit::keyPressEvent( QKeyEvent *e )
+void aHistLineEdit::keyPressEvent( TQKeyEvent *e )
{
bool accept = true;
bool ignore = false;
@@ -155,7 +155,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e )
// those keycodes correspond to the ones in ksirc.pl in sub hook_fixcolours
if ( e->state() == ControlButton ) {
- QString s = text();
+ TQString s = text();
int curPos = cursorPosition();
switch ( e->key() ) {
case Key_K:
@@ -221,7 +221,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e )
callKeyPressEvent = true;
}
}
- // QLineEdit falsely converts Alt+C to the character 'c', so to work around
+ // TQLineEdit falsely converts Alt+C to the character 'c', so to work around
// this, we just don't pass any Alt+? key on to the keyPressEvent() method.
else if (e->state() == AltButton) {
switch(e->key()){
@@ -293,13 +293,13 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e )
}
else {
if ( callKeyPressEvent ) {
- QTextEdit::keyPressEvent(e);
+ TQTextEdit::keyPressEvent(e);
}
}
}
}
-bool aHistLineEdit::processKeyEvent( QKeyEvent *e )
+bool aHistLineEdit::processKeyEvent( TQKeyEvent *e )
{
/*
* Only put key sequences in here you
@@ -322,13 +322,13 @@ bool aHistLineEdit::processKeyEvent( QKeyEvent *e )
void aHistLineEdit::ColourPickerPopUp()
{
ColorPicker picker( this );
- if ( picker.exec() == QDialog::Accepted )
+ if ( picker.exec() == TQDialog::Accepted )
{
- QString s = text();
+ TQString s = text();
// int curPos = cursorPosition();
int curPos, p;
getCursorPosition(&p, &curPos);
- QString colString = picker.colorString();
+ TQString colString = picker.colorString();
colString.prepend( 0x03 );
s.insert( curPos, colString );
setText( s );
@@ -336,42 +336,42 @@ void aHistLineEdit::ColourPickerPopUp()
}
}
-void aHistLineEdit::focusInEvent(QFocusEvent *e)
+void aHistLineEdit::focusInEvent(TQFocusEvent *e)
{
- QTextEdit::focusInEvent(e);
+ TQTextEdit::focusInEvent(e);
emit gotFocus();
}
-void aHistLineEdit::focusOutEvent(QFocusEvent *e)
+void aHistLineEdit::focusOutEvent(TQFocusEvent *e)
{
- QTextEdit::focusOutEvent(e);
+ TQTextEdit::focusOutEvent(e);
emit lostFocus();
}
#if 0
-void aHistLineEdit::mousePressEvent ( QMouseEvent *e )
+void aHistLineEdit::mousePressEvent ( TQMouseEvent *e )
{
if(e->button() == MidButton){
/*
- * emit pasteText(QApplication::clipboard()->text(QClipboard::Selection));
+ * emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection));
*/
}
else{
- QTextEdit::mousePressEvent(e);
+ TQTextEdit::mousePressEvent(e);
}
}
#endif
-bool aHistLineEdit::eventFilter( QObject *o, QEvent *e )
+bool aHistLineEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == this && e->type() == QEvent::AccelOverride )
- if(processKeyEvent( static_cast<QKeyEvent*>( e ) ) == true)
+ if ( o == this && e->type() == TQEvent::AccelOverride )
+ if(processKeyEvent( static_cast<TQKeyEvent*>( e ) ) == true)
return true;
- return QTextEdit::eventFilter( o, e );
+ return TQTextEdit::eventFilter( o, e );
}
-QString aHistLineEdit::text() const
+TQString aHistLineEdit::text() const
{
- QString s = QTextEdit::text();
+ TQString s = TQTextEdit::text();
s.remove("\n");
return s;
}
@@ -381,27 +381,27 @@ void aHistLineEdit::paste()
{
/* we let the top level take it */
if(ksopts->oneLineEntry) {
- emit pasteText(QApplication::clipboard()->text(QClipboard::Selection));
+ emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection));
}
else {
- QString paste = QApplication::clipboard()->text(QClipboard::Selection);
+ TQString paste = TQApplication::clipboard()->text(QClipboard::Selection);
paste.replace("\n", " ~ ");
insert(paste);
}
}
-void aHistLineEdit::paintEvent ( QPaintEvent *p )
+void aHistLineEdit::paintEvent ( TQPaintEvent *p )
{
- QTextEdit::paintEvent(p);
+ TQTextEdit::paintEvent(p);
if(m_drawrect == true){
- QPainter paint(this);
- QPen pen = paint.pen();
+ TQPainter paint(this);
+ TQPen pen = paint.pen();
pen.setWidth(5);
pen.setStyle(Qt::SolidLine);
pen.setColor(palette().active().highlight());
paint.setPen(pen);
- QRect r = frameRect();
+ TQRect r = frameRect();
paint.drawRect(r);
}
@@ -414,7 +414,7 @@ void aHistLineEdit::doEnterKey()
if (!text().isEmpty()) {
// text() has something -> store it in current and add a new empty one
*current = text();
- hist.append(QString::null); // always add empty line at end
+ hist.append(TQString::null); // always add empty line at end
if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries
hist.remove(hist.begin()); // if so then delete the first entry
}
@@ -424,7 +424,7 @@ void aHistLineEdit::doEnterKey()
// both !isEmpty() and != -> append at end
current = hist.fromLast(); // goto last entry which is empty
*current = text(); // change content to text()
- hist.append(QString::null); // always add empty line at end
+ hist.append(TQString::null); // always add empty line at end
if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries
hist.remove(hist.begin()); // if so then delete the first entry
}
diff --git a/ksirc/ahistlineedit.h b/ksirc/ahistlineedit.h
index a273791f..750d79a0 100644
--- a/ksirc/ahistlineedit.h
+++ b/ksirc/ahistlineedit.h
@@ -1,27 +1,27 @@
#ifndef AHISTLINEEDIT_H
#define AHISTLINEEDIT_H
-#include <qtextedit.h>
-#include <qstringlist.h>
-#include <qsize.h>
+#include <tqtextedit.h>
+#include <tqstringlist.h>
+#include <tqsize.h>
class aHistLineEdit : public QTextEdit
{
Q_OBJECT
public:
- aHistLineEdit(QWidget *parent = 0, const char *name = 0);
+ aHistLineEdit(TQWidget *parent = 0, const char *name = 0);
int cursorPosition () const;
void setCursorPosition(int);
- QString text() const;
+ TQString text() const;
signals:
// Don't use returnPressed from the textEdit
void gotReturnPressed();
void gotFocus();
void lostFocus();
- void pasteText(const QString&);
+ void pasteText(const TQString&);
void notTab();
void resized();
@@ -30,22 +30,22 @@ public slots:
virtual void slotMaybeResize();
protected:
- bool processKeyEvent( QKeyEvent * );
- virtual void keyPressEvent ( QKeyEvent * );
- virtual void focusInEvent ( QFocusEvent * );
- virtual void focusOutEvent ( QFocusEvent * );
-// virtual void mousePressEvent ( QMouseEvent * );
+ bool processKeyEvent( TQKeyEvent * );
+ virtual void keyPressEvent ( TQKeyEvent * );
+ virtual void focusInEvent ( TQFocusEvent * );
+ virtual void focusOutEvent ( TQFocusEvent * );
+// virtual void mousePressEvent ( TQMouseEvent * );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
- virtual void paintEvent ( QPaintEvent * );
+ virtual void paintEvent ( TQPaintEvent * );
private:
void doEnterKey();
- QStringList hist;
- QStringList::Iterator current;
+ TQStringList hist;
+ TQStringList::Iterator current;
void ColourPickerPopUp();
int m_height;
diff --git a/ksirc/alistbox.cpp b/ksirc/alistbox.cpp
index 9b632676..779bd730 100644
--- a/ksirc/alistbox.cpp
+++ b/ksirc/alistbox.cpp
@@ -16,42 +16,42 @@
#include "alistbox.h"
#include "nickColourMaker.h"
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kurldrag.h>
-aListBox::aListBox(QWidget *parent, const char *name )
- : QListBox(parent,name)
+aListBox::aListBox(TQWidget *parent, const char *name )
+ : TQListBox(parent,name)
{
clear();
p_scroll = palette().copy();
setAcceptDrops( true );
- connect(this, SIGNAL(selected (const QString&)),
- this, SIGNAL(selectedNick(const QString&)));
+ connect(this, TQT_SIGNAL(selected (const TQString&)),
+ this, TQT_SIGNAL(selectedNick(const TQString&)));
m_nickListDirty = true;
updateNickPrefixWidth();
- connect( this, SIGNAL( contextMenuRequested( QListBoxItem *, const QPoint & ) ),
- this, SLOT( reEmitContextMenuRequest( QListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *, const TQPoint & ) ),
+ this, TQT_SLOT( reEmitContextMenuRequest( TQListBoxItem * ) ) );
}
aListBox::~aListBox()
{
}
-void aListBox::reEmitContextMenuRequest( QListBoxItem *item )
+void aListBox::reEmitContextMenuRequest( TQListBoxItem *item )
{
emit contextMenuRequested( index( item ) );
}
void aListBox::clear()
{
- QListBox::clear();
+ TQListBox::clear();
}
@@ -72,7 +72,7 @@ void aListBox::inSort ( nickListItem *lbi)
m_nickListDirty = true;
}
-void aListBox::inSort ( QString text, bool top)
+void aListBox::inSort ( TQString text, bool top)
{
nickListItem *nli = new nickListItem();
nli->setText(text);
@@ -91,7 +91,7 @@ int aListBox::findSep()
return i;
}
-int aListBox::searchFor(const QString &nick, bool &found, bool top)
+int aListBox::searchFor(const TQString &nick, bool &found, bool top)
{
int min = 0, max = 0;
int current = 0, compare = 0;
@@ -198,7 +198,7 @@ bool aListBox::isTop(int index)
return TRUE;
}
-int aListBox::findNick(const QString &str)
+int aListBox::findNick(const TQString &str)
{
bool found;
int index;
@@ -213,15 +213,15 @@ int aListBox::findNick(const QString &str)
}
nickListItem *aListBox::item(int index){
- return (nickListItem *) QListBox::item(index);
+ return (nickListItem *) TQListBox::item(index);
}
-void aListBox::dragMoveEvent( QDragMoveEvent *e )
+void aListBox::dragMoveEvent( TQDragMoveEvent *e )
{
bool ok = (count() > 0 && KURLDrag::canDecode( e ));
if(!ok)
- ok = QTextDrag::canDecode(e);
+ ok = TQTextDrag::canDecode(e);
e->accept( ok );
if ( ok )
@@ -229,22 +229,22 @@ void aListBox::dragMoveEvent( QDragMoveEvent *e )
}
-void aListBox::dropEvent( QDropEvent *e )
+void aListBox::dropEvent( TQDropEvent *e )
{
- QListBoxItem *item = itemAt( e->pos() );
+ TQListBoxItem *item = itemAt( e->pos() );
if ( !item )
return;
setCurrentItem( item );
- QStringList urls;
+ TQStringList urls;
KURLDrag::decodeLocalFiles( e, urls );
- QString text;
+ TQString text;
if ( !urls.isEmpty() )
emit urlsDropped( urls, item->text() );
- else if(QTextDrag::decode(e, text)){
+ else if(TQTextDrag::decode(e, text)){
emit textDropped( item, text);
}
}
@@ -264,7 +264,7 @@ void aListBox::updateNeedNickPrefixFlag() const
m_needNickPrefix = false;
if(ksopts->useColourNickList == false){
- QListBoxItem *item = firstItem();
+ TQListBoxItem *item = firstItem();
for (; item; item = item->next() )
{
nickListItem *nickItem = static_cast<nickListItem *>( item );
@@ -282,15 +282,15 @@ void aListBox::updateNeedNickPrefixFlag() const
m_nickListDirty = false;
}
-void aListBox::fontChange( const QFont &f )
+void aListBox::fontChange( const TQFont &f )
{
- QListBox::fontChange( f );
+ TQListBox::fontChange( f );
updateNickPrefixWidth();
}
void aListBox::updateNickPrefixWidth()
{
- QFontMetrics metrics( font() );
+ TQFontMetrics metrics( font() );
m_nickPrefixWidth = 0;
@@ -320,7 +320,7 @@ void aListBox::clearAdvOps()
}
nickListItem::nickListItem()
- : QListBoxItem()
+ : TQListBoxItem()
{
is_op = FALSE;
is_voice = FALSE;
@@ -330,7 +330,7 @@ nickListItem::nickListItem()
}
nickListItem::nickListItem(const nickListItem &old)
- : QListBoxItem()
+ : TQListBoxItem()
{
is_op = old.is_op;
is_voice = old.is_voice;
@@ -372,20 +372,20 @@ void nickListItem::setIrcOp(bool _ircop)
static_cast<aListBox *>( listBox() )->setNickListDirty();
}
-void nickListItem::forceColour(const QColor *col)
+void nickListItem::forceColour(const TQColor *col)
{
forcedCol = col;
}
-void nickListItem::paint(QPainter *p)
+void nickListItem::paint(TQPainter *p)
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos; // vertical text position
int nickPosX = 3;
yPos = fm.ascent() + fm.leading()/2;
- QPen pen = p->pen();
- QFont font = p->font();
+ TQPen pen = p->pen();
+ TQFont font = p->font();
if(ksopts->useColourNickList == true) {
if(ksopts->nickColourization){
@@ -400,25 +400,25 @@ void nickListItem::paint(QPainter *p)
}
if(is_voice == TRUE){
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->channelColor);
p->drawText( nickPosX, yPos, "+" );
nickPosX += fm.width( "+" );
p->setPen(open);
-// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->channelColor, Qt::Dense7Pattern));
+// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->channelColor, Qt::Dense7Pattern));
}
if(is_op == TRUE) {
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->errorColor);
p->drawText( nickPosX, yPos, "@" );
nickPosX += fm.width( "@" );
p->setPen(open);
-// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->errorColor, Qt::Dense7Pattern));
+// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->errorColor, Qt::Dense7Pattern));
}
if(is_away == TRUE)
p->setPen(p->pen().color().dark(150));
if(is_ircop == TRUE){
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->errorColor);
p->drawText( nickPosX, yPos, "*" );
nickPosX += fm.width( "*" );
@@ -435,7 +435,7 @@ void nickListItem::paint(QPainter *p)
if(is_away == TRUE)
p->setPen(p->pen().color().dark(150));
if(is_ircop == TRUE){
- QFont bfont = font;
+ TQFont bfont = font;
bfont.setBold(TRUE);
p->setFont(bfont);
}
@@ -460,9 +460,9 @@ void nickListItem::paint(QPainter *p)
p->setFont(font);
}
-QString nickListItem::nickPrefix() const
+TQString nickListItem::nickPrefix() const
{
- QString prefix;
+ TQString prefix;
if ( voice() )
prefix += aListBox::nickPrefixVoice();
@@ -479,19 +479,19 @@ QString nickListItem::nickPrefix() const
return prefix;
}
-int nickListItem::height(const QListBox *lb ) const
+int nickListItem::height(const TQListBox *lb ) const
{
return lb->fontMetrics().lineSpacing() + 1;
}
-int nickListItem::width(const QListBox *lb ) const
+int nickListItem::width(const TQListBox *lb ) const
{
return
static_cast<const aListBox *>( lb )->nickPrefixWidth() +
lb->fontMetrics().width( text() ) + 6;
}
-const QPixmap* nickListItem::pixmap() const
+const TQPixmap* nickListItem::pixmap() const
{
return 0l;
}
diff --git a/ksirc/alistbox.h b/ksirc/alistbox.h
index 0f818bba..e1e4c2c9 100644
--- a/ksirc/alistbox.h
+++ b/ksirc/alistbox.h
@@ -1,7 +1,7 @@
#ifndef ALISTBOX_H
#define ALISTBOX_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include "ksopts.h"
class nickListItem : public QListBoxItem
@@ -11,10 +11,10 @@ class nickListItem : public QListBoxItem
nickListItem(const nickListItem &old);
virtual ~nickListItem();
- virtual int height ( const QListBox * ) const;
- virtual int width ( const QListBox * ) const;
- QString text () const { return string; }
- const QPixmap* pixmap () const;
+ virtual int height ( const TQListBox * ) const;
+ virtual int width ( const TQListBox * ) const;
+ TQString text () const { return string; }
+ const TQPixmap* pixmap () const;
bool op() const { return is_op; }
bool voice() const { return is_voice; }
@@ -26,16 +26,16 @@ class nickListItem : public QListBoxItem
void setAway(bool _away = FALSE);
void setIrcOp(bool _ircop = FALSE);
- void setText(const QString &str) { string = str; }
+ void setText(const TQString &str) { string = str; }
- QString nickPrefix() const;
+ TQString nickPrefix() const;
- void forceColour(const QColor *col);
+ void forceColour(const TQColor *col);
nickListItem &operator= ( const nickListItem & nli );
protected:
- virtual void paint ( QPainter * );
+ virtual void paint ( TQPainter * );
private:
bool is_op:1;
@@ -43,8 +43,8 @@ protected:
bool is_away:1;
bool is_ircop:1;
- QString string;
- const QColor *forcedCol;
+ TQString string;
+ const TQColor *forcedCol;
};
class aListBox : public QListBox
@@ -52,20 +52,20 @@ class aListBox : public QListBox
Q_OBJECT
public:
- aListBox(QWidget *parent = 0, const char *name = 0);
+ aListBox(TQWidget *parent = 0, const char *name = 0);
virtual ~aListBox();
void clear();
void inSort ( nickListItem *);
- void inSort ( QString text, bool top=FALSE);
+ void inSort ( TQString text, bool top=FALSE);
nickListItem *item(int index);
bool isTop(int index);
- int findNick(const QString &str);
+ int findNick(const TQString &str);
void clearAdvOps();
@@ -77,33 +77,33 @@ public:
unsigned short int nickPrefixWidth() const
{ return m_nickPrefixWidth; }
- virtual void fontChange( const QFont &f );
+ virtual void fontChange( const TQFont &f );
- static QString nickPrefixOp() { return QString::fromLatin1( "o" ); }
- static QString nickPrefixVoice() { return QString::fromLatin1( "v" ); }
- static QString nickPrefixAway() { return QString::fromLatin1( "a" ); }
- static QString nickPrefixIrcOp() { return QString::fromLatin1( "O" ); }
+ static TQString nickPrefixOp() { return TQString::fromLatin1( "o" ); }
+ static TQString nickPrefixVoice() { return TQString::fromLatin1( "v" ); }
+ static TQString nickPrefixAway() { return TQString::fromLatin1( "a" ); }
+ static TQString nickPrefixIrcOp() { return TQString::fromLatin1( "O" ); }
signals:
void contextMenuRequested(int index);
- void selectedNick(const QString&);
- void urlsDropped( const QStringList& urls, const QString& nick );
- void textDropped( const QListBoxItem *item, const QString& text );
+ void selectedNick(const TQString&);
+ void urlsDropped( const TQStringList& urls, const TQString& nick );
+ void textDropped( const TQListBoxItem *item, const TQString& text );
protected:
virtual int findSep();
- virtual int searchFor(const QString &nick, bool &found, bool top);
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dropEvent( QDropEvent * );
+ virtual int searchFor(const TQString &nick, bool &found, bool top);
+ virtual void dragMoveEvent( TQDragMoveEvent * );
+ virtual void dropEvent( TQDropEvent * );
private slots:
- void reEmitContextMenuRequest( QListBoxItem *item );
+ void reEmitContextMenuRequest( TQListBoxItem *item );
private:
void updateNeedNickPrefixFlag() const;
void updateNickPrefixWidth();
- QPalette p_scroll;
+ TQPalette p_scroll;
mutable bool m_nickListDirty;
mutable bool m_needNickPrefix;
int m_nickPrefixWidth;
diff --git a/ksirc/baserules.cpp b/ksirc/baserules.cpp
index 11e5850c..df4a40cc 100644
--- a/ksirc/baserules.cpp
+++ b/ksirc/baserules.cpp
@@ -3,15 +3,15 @@
#include "ksopts.h"
#include "ksircprocess.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
-void KSMBaseRules::sirc_receive(QCString, bool)
+void KSMBaseRules::sirc_receive(TQCString, bool)
{
}
-void KSMBaseRules::control_message(int, QString)
+void KSMBaseRules::control_message(int, TQString)
{
}
@@ -81,8 +81,8 @@ filterRuleList *KSMBaseRules::defaultRules()
frl->append(fr);
}
if( ksopts->msgContainNick.isValid() ){
- //QString nick = ksopts->nick;
- QString nick = ksircProcess()->getNick();
+ //TQString nick = ksopts->nick;
+ TQString nick = ksircProcess()->getNick();
if ( !nick.isEmpty() ) {
if(nick.length() > 83){
qDebug("Nick too long");
@@ -92,7 +92,7 @@ filterRuleList *KSMBaseRules::defaultRules()
* Since the nick is used in the regex we must
* escape all regex words
*/
- nick = QRegExp::escape(nick);
+ nick = TQRegExp::escape(nick);
sprintf(match_us,
"(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", nick.latin1());
@@ -107,16 +107,16 @@ filterRuleList *KSMBaseRules::defaultRules()
}
}
if( ksopts->msg1Contain.isValid() ){
- //QString nick = ksopts->nick;
+ //TQString nick = ksopts->nick;
/*
* Since the nick is used in the regex we must
* escape all regex words
*/
- QString msg = ksopts->msg1String;
+ TQString msg = ksopts->msg1String;
if(msg.length() > 0){
if(ksopts->msg1Regex == false)
- msg = QRegExp::escape(msg);
+ msg = TQRegExp::escape(msg);
snprintf(msg1_match, 100,
"(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1());
@@ -131,16 +131,16 @@ filterRuleList *KSMBaseRules::defaultRules()
}
}
if( ksopts->msg2Contain.isValid() ){
- //QString nick = ksopts->nick;
+ //TQString nick = ksopts->nick;
/*
* Since the nick is used in the regex we must
* escape all regex words
*/
- QString msg = ksopts->msg2String;
+ TQString msg = ksopts->msg2String;
if(msg.length() > 0){
if(ksopts->msg2Regex == false)
- msg = QRegExp::escape(msg);
+ msg = TQRegExp::escape(msg);
snprintf(msg2_match, 100,
"(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1());
diff --git a/ksirc/baserules.h b/ksirc/baserules.h
index 690ed28e..1ba79bf7 100644
--- a/ksirc/baserules.h
+++ b/ksirc/baserules.h
@@ -15,9 +15,9 @@ public:
{
}
- virtual void sirc_receive(QCString str, bool broadcast);
+ virtual void sirc_receive(TQCString str, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void control_message(int, TQString);
filterRuleList *defaultRules();
diff --git a/ksirc/boundscheckingarray.h b/ksirc/boundscheckingarray.h
index a8a29ca1..92b528b7 100644
--- a/ksirc/boundscheckingarray.h
+++ b/ksirc/boundscheckingarray.h
@@ -20,9 +20,9 @@
#define __boundscheckingarray__
#include <assert.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
-/* I wish QValueVector would check bounds upon extraction.. */
+/* I wish TQValueVector would check bounds upon extraction.. */
template <typename T, const unsigned int size>
class BoundsCheckingArray
@@ -51,9 +51,9 @@ public:
return m_data[ index ];
}
- QValueVector<T> toValueVector() const
+ TQValueVector<T> toValueVector() const
{
- QValueVector<T> vector( size );
+ TQValueVector<T> vector( size );
for ( unsigned int i = 0; i < size; ++i )
vector[ i ] = m_data[ i ];
return vector;
diff --git a/ksirc/chanButtons.cpp b/ksirc/chanButtons.cpp
index f40c7176..b6974fd5 100644
--- a/ksirc/chanButtons.cpp
+++ b/ksirc/chanButtons.cpp
@@ -9,65 +9,65 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
#include "ksircprocess.h"
-static void makeSquare(QWidget *w)
+static void makeSquare(TQWidget *w)
{
- QSize sh = w->sizeHint();
+ TQSize sh = w->sizeHint();
int s = sh.height();
w->setFixedSize(s,s);
}
-chanButtons::chanButtons(KSircProcess *proc, QWidget *parent, const char *name)
-: QWidget(parent, name),
+chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name)
+: TQWidget(parent, name),
m_proc(proc)
{
Popupmenu = new KPopupMenu( this );
Popupmenu->insertTitle(i18n("Channel Modes"));
- toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, SLOT(invite()));
- toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, SLOT(limited()));
- toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, SLOT(key()));
- toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, SLOT(secret()));
+ toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, TQT_SLOT(invite()));
+ toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, TQT_SLOT(limited()));
+ toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, TQT_SLOT(key()));
+ toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, TQT_SLOT(secret()));
Popupmenu->insertSeparator();
Popupmenu->insertTitle(i18n("User Modes"));
- toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, SLOT(invisible()));
- toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, SLOT(wallops()));
- toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, SLOT(serverNotices()));
+ toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, TQT_SLOT(invisible()));
+ toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, TQT_SLOT(wallops()));
+ toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, TQT_SLOT(serverNotices()));
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
- protectButton = new QPushButton(i18n("T"), this);
+ protectButton = new TQPushButton(i18n("T"), this);
protectButton->setToggleButton(true);
makeSquare(protectButton);
- QToolTip::add(protectButton, i18n("Only op'ed users can change the topic"));
- connect(protectButton, SIGNAL(clicked()), this, SLOT(protectMode()));
+ TQToolTip::add(protectButton, i18n("Only op'ed users can change the topic"));
+ connect(protectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(protectMode()));
layout->addWidget(protectButton);
- outsideButton = new QPushButton(i18n("N"), this);
+ outsideButton = new TQPushButton(i18n("N"), this);
outsideButton->setToggleButton(true);
makeSquare(outsideButton);
- QToolTip::add(outsideButton, i18n("No outside messages"));
- connect(outsideButton, SIGNAL(clicked()), this, SLOT(outsideMode()));
+ TQToolTip::add(outsideButton, i18n("No outside messages"));
+ connect(outsideButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(outsideMode()));
layout->addWidget(outsideButton);
- moderateButton = new QPushButton(i18n("M"), this);
+ moderateButton = new TQPushButton(i18n("M"), this);
moderateButton->setToggleButton(true);
makeSquare(moderateButton);
- QToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak"));
- connect(moderateButton, SIGNAL(clicked()), this, SLOT(moderateMode()));
+ TQToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak"));
+ connect(moderateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(moderateMode()));
layout->addWidget(moderateButton);
- menuButton = new QPushButton(i18n("..."), this);
+ menuButton = new TQPushButton(i18n("..."), this);
makeSquare(menuButton);
menuButton->setFixedWidth(menuButton->width()*2);
menuButton->setPopup(Popupmenu);
- QToolTip::add(menuButton, i18n("More mode commands"));
+ TQToolTip::add(menuButton, i18n("More mode commands"));
layout->addWidget(menuButton);
}
@@ -75,11 +75,11 @@ void chanButtons::invite()
{
if (Popupmenu->isItemChecked(toggleMenu[0])) {
Popupmenu->setItemChecked(toggleMenu[0], false);
- emit mode(QString("-i"), 0);
+ emit mode(TQString("-i"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[0], true);
- emit mode(QString("+i"), 0);
+ emit mode(TQString("+i"), 0);
}
}
@@ -89,11 +89,11 @@ void chanButtons::limited()
chanDialog->exec();
if (chanDialog->sendLimitedUsers() == 0) {
Popupmenu->setItemChecked(toggleMenu[1], false);
- emit mode(QString("-l"), 0);
+ emit mode(TQString("-l"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[1], true);
- emit mode(QString("+l %1").arg(chanDialog->sendLimitedUsers()), 0);
+ emit mode(TQString("+l %1").arg(chanDialog->sendLimitedUsers()), 0);
}
delete chanDialog;
}
@@ -104,12 +104,12 @@ void chanButtons::key()
if (Popupmenu->isItemChecked(toggleMenu[2])) {
chanDialog->exec();
Popupmenu->setItemChecked(toggleMenu[2], false);
- emit mode(QString("-k %1").arg(chanDialog->sendKey()), 0);
+ emit mode(TQString("-k %1").arg(chanDialog->sendKey()), 0);
}
else {
chanDialog->exec();
Popupmenu->setItemChecked(toggleMenu[2], true);
- emit mode(QString("+k %1").arg(chanDialog->sendKey()), 0);
+ emit mode(TQString("+k %1").arg(chanDialog->sendKey()), 0);
}
delete chanDialog;
}
@@ -118,11 +118,11 @@ void chanButtons::secret()
{
if (Popupmenu->isItemChecked(toggleMenu[3])) {
Popupmenu->setItemChecked(toggleMenu[3], false);
- emit mode(QString("-s"), 0);
+ emit mode(TQString("-s"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[3], true);
- emit mode(QString("+s"), 0);
+ emit mode(TQString("+s"), 0);
}
}
@@ -130,11 +130,11 @@ void chanButtons::invisible()
{
if (Popupmenu->isItemChecked(toggleMenu[4])) {
Popupmenu->setItemChecked(toggleMenu[4], false);
- emit mode(QString("-i"), 1, m_proc->getNick());
+ emit mode(TQString("-i"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[4], true);
- emit mode(QString("+i"), 1, m_proc->getNick());
+ emit mode(TQString("+i"), 1, m_proc->getNick());
}
}
@@ -142,11 +142,11 @@ void chanButtons::wallops()
{
if (Popupmenu->isItemChecked(toggleMenu[5])) {
Popupmenu->setItemChecked(toggleMenu[5], false);
- emit mode(QString("-w"), 1, m_proc->getNick());
+ emit mode(TQString("-w"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[5], true);
- emit mode(QString("+w"), 1, m_proc->getNick());
+ emit mode(TQString("+w"), 1, m_proc->getNick());
}
}
@@ -154,36 +154,36 @@ void chanButtons::serverNotices()
{
if (Popupmenu->isItemChecked(toggleMenu[6])) {
Popupmenu->setItemChecked(toggleMenu[6], false);
- emit mode(QString("-s"), 1, m_proc->getNick());
+ emit mode(TQString("-s"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[6], true);
- emit mode(QString("+s"), 1, m_proc->getNick());
+ emit mode(TQString("+s"), 1, m_proc->getNick());
}
}
void chanButtons::protectMode()
{
if (protectButton->isOn())
- emit mode(QString("+t"), 0);
+ emit mode(TQString("+t"), 0);
else
- emit mode(QString("-t"), 0);
+ emit mode(TQString("-t"), 0);
}
void chanButtons::outsideMode()
{
if (outsideButton->isOn())
- emit mode(QString("+n"), 0);
+ emit mode(TQString("+n"), 0);
else
- emit mode(QString("-n"), 0);
+ emit mode(TQString("-n"), 0);
}
void chanButtons::moderateMode()
{
if (moderateButton->isOn())
- emit mode(QString("+m"), 0);
+ emit mode(TQString("+m"), 0);
else
- emit mode(QString("-m"), 0);
+ emit mode(TQString("-m"), 0);
}
void chanButtons::setButtonsEnabled(bool enabled)
@@ -203,14 +203,14 @@ void chanButtons::setMenuItemMode(int id, bool value)
Popupmenu->setItemChecked(toggleMenu[id], value);
}
-chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
+chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent,
const char *name, bool modal) : KDialog(parent, name, modal)
{
m_sendKey = "";
m_sendLimitedUsers = 0;
resize(190, 82);
setCaption(i18n("Limit Number of Users"));
- LimitedLayout = new QVBoxLayout(this);
+ LimitedLayout = new TQVBoxLayout(this);
LimitedLayout->setSpacing(9);
LimitedLayout->setMargin(11);
@@ -220,7 +220,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
LimitedLayout->addWidget(SpinBox);
break;
case key:
- EditBox = new QLineEdit(this);
+ EditBox = new TQLineEdit(this);
LimitedLayout->addWidget(EditBox);
break;
}
@@ -230,28 +230,28 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
Layout->setMargin(0);
okButton = new KPushButton(KStdGuiItem::ok(), this);
- okButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1,
+ okButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1,
okButton->sizePolicy().hasHeightForWidth()));
Layout->addWidget(okButton);
switch (modeType) {
case limited:
- connect(okButton, SIGNAL(clicked()), SLOT(limitedUsers()));
+ connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(limitedUsers()));
break;
case key:
- connect(okButton, SIGNAL(clicked()), SLOT(keyString()));
+ connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(keyString()));
break;
}
Layout->addWidget(okButton);
cancelButton = new KPushButton(KStdGuiItem::cancel(), this);
- cancelButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1,
+ cancelButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1,
cancelButton->sizePolicy().hasHeightForWidth()));
Layout->addWidget(cancelButton);
- connect(cancelButton, SIGNAL(clicked()), SLOT(reject()));
+ connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
LimitedLayout->addLayout(Layout);
- QSpacerItem *spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
LimitedLayout->addItem(spacer);
}
diff --git a/ksirc/chanButtons.h b/ksirc/chanButtons.h
index 2b7edc3a..a7000361 100644
--- a/ksirc/chanButtons.h
+++ b/ksirc/chanButtons.h
@@ -3,8 +3,8 @@
#ifndef CHANBUTTONS_H
#define CHANBUTTONS_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#include <kdialog.h>
class QHBoxLayout;
@@ -21,7 +21,7 @@ class chanButtons : public QWidget
Q_OBJECT
friend class KSircTopLevel;
public:
- chanButtons(KSircProcess *proc, QWidget* parent=0, const char* name=0);
+ chanButtons(KSircProcess *proc, TQWidget* parent=0, const char* name=0);
~chanButtons() {};
void setProtectMode(bool value) { protectButton->setOn(value); }
@@ -31,7 +31,7 @@ class chanButtons : public QWidget
void setMenuItemMode(int, bool);
signals:
- void mode(QString, int, QString nick = QString::null); /// int == 0 channel mode, int == 1 user nick mode
+ void mode(TQString, int, TQString nick = TQString::null); /// int == 0 channel mode, int == 1 user nick mode
private slots:
void protectMode();
@@ -47,11 +47,11 @@ class chanButtons : public QWidget
private:
int toggleMenu[7];
- QHBoxLayout *layout;
- QPushButton *protectButton;
- QPushButton *moderateButton;
- QPushButton *outsideButton;
- QPushButton *menuButton;
+ TQHBoxLayout *layout;
+ TQPushButton *protectButton;
+ TQPushButton *moderateButton;
+ TQPushButton *outsideButton;
+ TQPushButton *menuButton;
KPopupMenu *Popupmenu;
chanbuttonsDialog *chanDialog;
KSircProcess *m_proc;
@@ -63,22 +63,22 @@ class chanbuttonsDialog : public KDialog
friend class chanButtons;
public:
enum type { limited, key };
- chanbuttonsDialog(const type &modeType, QWidget *parent=0, const char *name=0, bool modal=true);
+ chanbuttonsDialog(const type &modeType, TQWidget *parent=0, const char *name=0, bool modal=true);
~chanbuttonsDialog() {};
private slots:
void keyString();
void limitedUsers();
- QString sendKey() { return m_sendKey; }
+ TQString sendKey() { return m_sendKey; }
int sendLimitedUsers() { return m_sendLimitedUsers; };
private:
- QString m_sendKey;
+ TQString m_sendKey;
int m_sendLimitedUsers;
- QVBoxLayout *LimitedLayout;
- QHBoxLayout *Layout;
+ TQVBoxLayout *LimitedLayout;
+ TQHBoxLayout *Layout;
KIntSpinBox *SpinBox;
- QLineEdit *EditBox;
+ TQLineEdit *EditBox;
KPushButton *okButton;
KPushButton *cancelButton;
};
diff --git a/ksirc/chanparser.cpp b/ksirc/chanparser.cpp
index 8429a6f5..f3015019 100644
--- a/ksirc/chanparser.cpp
+++ b/ksirc/chanparser.cpp
@@ -13,15 +13,15 @@
#include <stdio.h>
-#include <qregexp.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
// Static parser table is "initialized"
-QDict<parseFunc> ChannelParser::parserTable;
+TQDict<parseFunc> ChannelParser::parserTable;
ChannelParser::ChannelParser(KSircTopLevel *_top)
@@ -64,13 +64,13 @@ ChannelParser::ChannelParser(KSircTopLevel *_top)
}
-parseResult *ChannelParser::parse(QString string)
+parseResult *ChannelParser::parse(TQString string)
{
// for older Qts
parseFunc *pf;
if(string.length() < 3){
- return new parseError(string, QString("Dumb string, too short"));
+ return new parseError(string, TQString("Dumb string, too short"));
}
/**
@@ -85,8 +85,8 @@ parseResult *ChannelParser::parse(QString string)
if ((string[0] == '`') & (string.length() > 7))
{
- QString prefix = "`"+string[7]+"`";
- string = prefix + QString(" ") + string.mid(8).stripWhiteSpace();
+ TQString prefix = "`"+string[7]+"`";
+ string = prefix + TQString(" ") + string.mid(8).stripWhiteSpace();
}
else if((string[0] == '*') && (string[1] == ' ')) {
string.insert(1, ' ');
@@ -114,31 +114,31 @@ parseResult *ChannelParser::parse(QString string)
return 0;
}
-parseResult * ChannelParser::parseSSFEClear(QString string)
+parseResult * ChannelParser::parseSSFEClear(TQString string)
{
// top->mainw->clear();
top->clearWindow();
// top->mainw->repaint(TRUE);
string.truncate(0);
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEStatus(QString string)
+parseResult * ChannelParser::parseSSFEStatus(TQString string)
{
string.remove(0, 12); // strip off the first 12 characters "<junk> [sirc] "
if(string.length() == 0)
return new parseError("", i18n("Unable to parse status string"));
//kdDebug(5008) << "String: " << string << endl;
- QRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)");
+ TQRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)");
if(rx.search(string) == -1){
return new parseError("", i18n("Unable to parse status (no known format) string"));
}
- QString nick = rx.cap(1);
- QString modes = rx.cap(2);
- QString chan = rx.cap(3);
- QString chanmode = rx.cap(4);
+ TQString nick = rx.cap(1);
+ TQString modes = rx.cap(2);
+ TQString chan = rx.cap(3);
+ TQString chanmode = rx.cap(4);
/*
* fix up modes which may have gotten the (away) part
@@ -191,24 +191,24 @@ parseResult * ChannelParser::parseSSFEStatus(QString string)
top->channelButtons->setMenuItemMode(6, true);
else top->channelButtons->setMenuItemMode(6, false);
- QString status_line = QString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes);
+ TQString status_line = TQString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes);
/*
* Go srearching for key and limit messages
*/
- QRegExp rxKey("<key: (\\S+)>");
+ TQRegExp rxKey("<key: (\\S+)>");
if(rxKey.search(string) >= 0){
top->channelButtons->setMenuItemMode(2, true);
- status_line += QString("<key: %1>").arg(rxKey.cap(1));
+ status_line += TQString("<key: %1>").arg(rxKey.cap(1));
}
else {
top->channelButtons->setMenuItemMode(2, false);
}
- QRegExp rxLimit("<limit: (\\S+)>");
+ TQRegExp rxLimit("<limit: (\\S+)>");
if(rxLimit.search(string) >= 0){
top->channelButtons->setMenuItemMode(1, true);
- status_line += QString("<limit: %1>").arg(rxLimit.cap(1));
+ status_line += TQString("<limit: %1>").arg(rxLimit.cap(1));
}
else {
top->channelButtons->setMenuItemMode(1, false);
@@ -241,38 +241,38 @@ parseResult * ChannelParser::parseSSFEStatus(QString string)
top->caption = status_line; // Make copy so we're not
// constantly changing the title bar
}
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEInit(QString)
+parseResult * ChannelParser::parseSSFEInit(TQString)
{
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEOut(QString)
+parseResult * ChannelParser::parseSSFEOut(TQString)
{
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEMsg(QString string)
+parseResult * ChannelParser::parseSSFEMsg(TQString string)
{
if(string.length() > 100)
- return new parseError(QString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long."));
+ return new parseError(TQString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long."));
int l = string.length();
if (l <= 0)
return new parseError(string, i18n("String not long enough"));
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEPrompt(QString string)
+parseResult * ChannelParser::parseSSFEPrompt(TQString string)
{
if(prompt_active == FALSE){
- QString prompt, caption;
+ TQString prompt, caption;
ssfePrompt *sp;
// Flush the screen.
@@ -280,7 +280,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string)
// (it's garunteed to be the first one)
top->LineBuffer.remove( *top->LineBuffer.begin() );
top->Buffer = FALSE;
- top->sirc_receive(QString(""));
+ top->sirc_receive(TQString(""));
// "'[pP]' " gives 4 spaces
if(string.length() < 5)
@@ -293,7 +293,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string)
// if we haven't popped up on the remote display yet.
KSirc::TextParagIterator it = top->mainw->firstParag();
- QString last;
+ TQString last;
while(it.atEnd() == FALSE) {
last = it.plainText();
++it;
@@ -319,39 +319,39 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string)
prompt_active = FALSE;
}
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseSSFEReconnect(QString)
+parseResult * ChannelParser::parseSSFEReconnect(TQString)
{
if(top->channelInfo().channel()[0] == '#' ||
top->channelInfo().channel()[0] == '&'){
- QString str = "/join " + QString(top->channelInfo().channel()) + "\n";
+ TQString str = "/join " + TQString(top->channelInfo().channel()) + "\n";
emit top->outputUnicodeLine(str);
}
- return new parseSucc(QString::null); // Null string, don't display anything
+ return new parseSucc(TQString::null); // Null string, don't display anything
}
-parseResult * ChannelParser::parseINFOInfo(QString string)
+parseResult * ChannelParser::parseINFOInfo(TQString string)
{
string.remove(0, 3); // takes off the junk
return new parseSucc(string, ksopts->infoColor, "user|servinfo"); // Null string, don't display anything
}
-parseResult * ChannelParser::parseINFOError(QString string)
+parseResult * ChannelParser::parseINFOError(TQString string)
{
string.remove(0, 3); // strip the junk
return new parseSucc(string,ksopts->errorColor, "user|error"); // Null string, don't display anything
}
-parseResult * ChannelParser::parseINFONicks(QString in_string)
+parseResult * ChannelParser::parseINFONicks(TQString in_string)
{
- QString string = in_string;
- QString channel_name;
+ TQString string = in_string;
+ TQString channel_name;
bool clear_box = FALSE;
// Check to see if it's a continued line
@@ -368,12 +368,12 @@ parseResult * ChannelParser::parseINFONicks(QString in_string)
top->nicks->setCurrentItem(current_item);
top->nicks->setTopItem(top_item);
top->nicks->repaint(TRUE);
- return new parseSucc(QString::null); // Parsing ok, don't print anything though
+ return new parseSucc(TQString::null); // Parsing ok, don't print anything though
}
else if(string[1] == '$'){
top->nicks->clearAdvOps();
//kdDebug(5008) << "Turning off advanced ops" << endl;
- return new parseSucc(QString::null); // Parsing ok, don't print anything though
+ return new parseSucc(TQString::null); // Parsing ok, don't print anything though
}
@@ -381,7 +381,7 @@ parseResult * ChannelParser::parseINFONicks(QString in_string)
// Search for the first space, since : can be embeded into channel names.
//count = sscanf(string, "*!* Users on %100[^ ]", channelInfo().channel());
// *!* Users on #TEST: boren asj asj_
- QRegExp rx("\\*\\S\\* Users on (\\S+): (.+)");
+ TQRegExp rx("\\*\\S\\* Users on (\\S+): (.+)");
if(rx.search(string) == -1){
return new parseError(string, i18n("Could not find channel name"));
}
@@ -407,10 +407,10 @@ parseResult * ChannelParser::parseINFONicks(QString in_string)
//strcpy(place_holder, string.ascii()+start+2);
//nick = strtok(place_holder, " ");
// while(nick != 0x0){ // While there's nick to go...
- QStringList nicks = QStringList::split(QRegExp("\\s+"), rx.cap(2));
+ TQStringList nicks = TQStringList::split(TQRegExp("\\s+"), rx.cap(2));
- for ( QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) {
- QString nick = *it;
+ for ( TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) {
+ TQString nick = *it;
nickListItem *irc = new nickListItem();
bool done = FALSE;
@@ -448,17 +448,17 @@ parseResult * ChannelParser::parseINFONicks(QString in_string)
top->nicks->inSort(irc);
}
- return new parseSucc(QString::null); // Parsing ok, don't print anything though
+ return new parseSucc(TQString::null); // Parsing ok, don't print anything though
}
-parseResult * ChannelParser::parseINFOJoin(QString string)
+parseResult * ChannelParser::parseINFOJoin(TQString string)
{
string.remove(0, 4); // strip *>* to save a few compares
// You have joined channel #Linux
- QRegExp rx("You have joined channel (\\S+)");
+ TQRegExp rx("You have joined channel (\\S+)");
if(rx.search(string) != -1){
- //QString channel = rx.cap(1).lower();
- QString channel = rx.cap(1);
+ //TQString channel = rx.cap(1).lower();
+ TQString channel = rx.cap(1);
//kdDebug(5008) << "Channel: " << channel << endl;
if(top->channelInfo().channel() != channel) {
@@ -474,8 +474,8 @@ parseResult * ChannelParser::parseINFOJoin(QString string)
// reef-diddy (nenernener@xnet-3B34A9E2.snet.net) has joined channel #aquaria
rx.setPattern("(\\S+) .+ has joined channel (\\S+)");
if(rx.search(string) != -1){
- QString nick = rx.cap(1);
- QString channel = rx.cap(2).lower();
+ TQString nick = rx.cap(1);
+ TQString channel = rx.cap(2).lower();
//kdDebug(5008) << "Channel: " << channel << " nick: " << nick << endl;
if(top->channelInfo().channel().lower() != channel){
return new parseWrongChannel(" " + string, ksopts->errorColor, "user|join");
@@ -490,12 +490,12 @@ parseResult * ChannelParser::parseINFOJoin(QString string)
return 0; // ??
}
-parseResult * ChannelParser::parseINFOPart(QString string)
+parseResult * ChannelParser::parseINFOPart(TQString string)
{
bool foundNick = false;
- QString pixname = "user|kick";
- QString nick("");
+ TQString pixname = "user|kick";
+ TQString nick("");
string.remove(0, 4); // clear junk
@@ -507,7 +507,7 @@ parseResult * ChannelParser::parseINFOPart(QString string)
// 3. /kick, kicked off the channel, nick after "kicked off \w+$"
//
// Signoff: looser
- QRegExp rx("Signoff: (\\S+)");
+ TQRegExp rx("Signoff: (\\S+)");
if(rx.search(string) != -1) {
nick = rx.cap(1);
foundNick = true;
@@ -521,11 +521,11 @@ parseResult * ChannelParser::parseINFOPart(QString string)
*/
rx.setPattern("You have left channel (\\S+)");
if((foundNick == false) && (rx.search(string) != -1)) {
- QString channel = rx.cap(1);
+ TQString channel = rx.cap(1);
if(top->channelInfo().channel().lower() == channel.lower()) {
- QApplication::postEvent(top, new QCloseEvent());
+ TQApplication::postEvent(top, new TQCloseEvent());
// WE'RE DEAD
- return new parseSucc(QString::null);
+ return new parseSucc(TQString::null);
}
pixname = "user|part";
}
@@ -535,12 +535,12 @@ parseResult * ChannelParser::parseINFOPart(QString string)
*/
rx.setPattern("You have been kicked off channel (\\S+)");
if((foundNick == false) && (rx.search(string) != -1)) {
- QString channel = rx.cap(1);
+ TQString channel = rx.cap(1);
if(top->channelInfo().channel().lower() != channel.lower())
return new parseWrongChannel(string, ksopts->errorColor, "user|kick");
if (ksopts->autoRejoin == TRUE)
{
- QString str = QString("/join %1\n").arg(top->channelInfo().channel());
+ TQString str = TQString("/join %1\n").arg(top->channelInfo().channel());
emit top->outputUnicodeLine(str);
/* if(top->ticker)
top->ticker->show();
@@ -555,7 +555,7 @@ parseResult * ChannelParser::parseINFOPart(QString string)
int result = KMessageBox::questionYesNo(top, string, i18n("You Have Been Kicked"), i18n("Rejoin"), i18n("Leave"));
if (result == KMessageBox::Yes)
{
- QString str = QString("/join %1\n").arg(top->channelInfo().channel());
+ TQString str = TQString("/join %1\n").arg(top->channelInfo().channel());
emit top->outputUnicodeLine(str);
/* if(top->ticker)
* top->ticker->show();
@@ -566,7 +566,7 @@ parseResult * ChannelParser::parseINFOPart(QString string)
else
{
// WE'RE DEAD
- QApplication::postEvent(top, new QCloseEvent());
+ TQApplication::postEvent(top, new TQCloseEvent());
top->KickWinOpen = false;
}
}
@@ -578,13 +578,13 @@ parseResult * ChannelParser::parseINFOPart(QString string)
rx.setPattern("(\\S+) has left channel (\\S+)");
if((foundNick == false) && (rx.search(string) != -1)) {
nick = rx.cap(1);
- QString channel = rx.cap(2);
+ TQString channel = rx.cap(2);
// kdDebug(5008) << "Nick: " << nick << " Channel: " << channel << " top: " << top->channelInfo().channel() << endl;
if(top->channelInfo().channel().lower() == channel.lower()) {
foundNick = true;
}
else{
- return new parseWrongChannel(QString::null);
+ return new parseWrongChannel(TQString::null);
}
pixname = "user|part";
highlightNick(string, nick);
@@ -595,11 +595,11 @@ parseResult * ChannelParser::parseINFOPart(QString string)
rx.setPattern("(\\S+) has been kicked off channel (\\S+)");
if((foundNick == false) && (rx.search(string) != -1)) {
nick = rx.cap(1);
- QString channel = rx.cap(2);
+ TQString channel = rx.cap(2);
if(top->channelInfo().channel().lower() == channel.lower()) {
foundNick = true;
} else {
- return new parseWrongChannel(QString::null);
+ return new parseWrongChannel(TQString::null);
}
highlightNick(string, nick);
pixname = "user|kick";
@@ -615,7 +615,7 @@ parseResult * ChannelParser::parseINFOPart(QString string)
return new parseJoinPart(" " + string, ksopts->channelColor, pixname);
}
else {
- return new parseJoinPart(QString::null);
+ return new parseJoinPart(TQString::null);
}
}
else {
@@ -625,10 +625,10 @@ parseResult * ChannelParser::parseINFOPart(QString string)
return 0;
}
-parseResult * ChannelParser::parseINFOChangeNick(QString string)
+parseResult * ChannelParser::parseINFOChangeNick(TQString string)
{
//char old_nick[101], new_nick[101];
- QString old_nick, new_nick;
+ TQString old_nick, new_nick;
string.remove(0, 4); // Remove the leading *N* and space
@@ -636,7 +636,7 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string)
* *N* asj_ is now known as bleh
*/
//kdDebug(5008) << "Nick change: " << string << endl;
- QRegExp rx("(\\S+) is now known as (\\S+)");
+ TQRegExp rx("(\\S+) is now known as (\\S+)");
if(rx.search(string) == -1){
if(string.contains("already taken")){
return new parseSucc(" " + string, ksopts->errorColor, "user|error");
@@ -687,29 +687,29 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string)
top->channelInfo().channel() == old_nick)
return new parseSucc(" " + string, ksopts->channelColor, "user|elipsis");
else
- return new parseSucc(QString::null);
+ return new parseSucc(TQString::null);
}
// warning("Toplevel-N: nick change search failed on %s", s3.data());
- // return new parseSucc(QString::null);
+ // return new parseSucc(TQString::null);
}
class mode_info {
public:
- mode_info(bool op, QChar mode, QString arg);
+ mode_info(bool op, TQChar mode, TQString arg);
bool op() const;
- QChar mode() const;
- QString arg() const;
+ TQChar mode() const;
+ TQString arg() const;
private:
const bool m_op;
- const QChar m_mode;
- const QString m_arg;
+ const TQChar m_mode;
+ const TQString m_arg;
};
-mode_info::mode_info(bool op, QChar mode, QString arg) :
+mode_info::mode_info(bool op, TQChar mode, TQString arg) :
m_op(op),
m_mode(mode),
m_arg(arg)
@@ -720,16 +720,16 @@ bool mode_info::op() const {
return m_op;
}
-QChar mode_info::mode() const {
+TQChar mode_info::mode() const {
return m_mode;
}
-QString mode_info::arg() const {
+TQString mode_info::arg() const {
return m_arg;
}
-parseResult * ChannelParser::parseINFOMode(QString string)
+parseResult * ChannelParser::parseINFOMode(TQString string)
{
// Basic idea here is simple, go through the mode change and
// assign each mode a + or a - and an argument or "" if there is
@@ -744,7 +744,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
/*
* 1k is pretty safe since KProcess returns 1 k blocks, and lines don't get split between reads. This is emprical
*/
- QString modes, args, channel;
+ TQString modes, args, channel;
int found = 0;
if(string.find("for user") >= 0)
@@ -753,7 +753,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
/*
* We need to 2 scanf's, one for the case of arguments, and one for no args.
*/
- QRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)");
+ TQRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)");
if(rx.search(string) >= 0){
modes = rx.cap(1);
args = rx.cap(2);
@@ -780,7 +780,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
if(found == 0)
- return new parseError(" Failed to parse mode change: " + string, QString::null);
+ return new parseError(" Failed to parse mode change: " + string, TQString::null);
/*
* op specifie if it's a + or -. tru is + false is -
@@ -791,13 +791,13 @@ parseResult * ChannelParser::parseINFOMode(QString string)
* we use the itirator to tstep through the list
* as need be
*/
- QStringList arglist = QStringList::split(" ", args);
- QStringList::Iterator ai = arglist.begin();
+ TQStringList arglist = TQStringList::split(" ", args);
+ TQStringList::Iterator ai = arglist.begin();
/*
* the ptr list structure contains the parsed contents
*/
- QPtrList<const mode_info> pmList;
+ TQPtrList<const mode_info> pmList;
pmList.setAutoDelete(true);
for(uint pos = 0; pos < modes.length(); pos++){
@@ -814,7 +814,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
* +l otoh does, so read the argument
*/
if(op == false){
- pmList.append(new mode_info(op, 'l', QString::null));
+ pmList.append(new mode_info(op, 'l', TQString::null));
break;
}
case 'o': // Op, arg is the nick
@@ -822,7 +822,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
case 'b': // Ban, arg is mask banned
case 'k': // kcik, arg is nick
if(ai == NULL)
- return new parseError(i18n("Unable to parse mode change: %1").arg(string), QString::null);
+ return new parseError(i18n("Unable to parse mode change: %1").arg(string), TQString::null);
pmList.append(new mode_info(op, modes.at(pos), *ai));
ai++;
break;
@@ -837,11 +837,11 @@ parseResult * ChannelParser::parseINFOMode(QString string)
/*
* Mode changes which don't take args
*/
- pmList.append(new mode_info(op, modes.at(pos), QString::null));
+ pmList.append(new mode_info(op, modes.at(pos), TQString::null));
break;
default:
kdDebug(5008) << "Unknown mode change: " << modes.mid(pos, 1) << " Assume no args" << endl;
- pmList.append(new mode_info(op, modes.at(pos), QString::null));
+ pmList.append(new mode_info(op, modes.at(pos), TQString::null));
}
}
// We have the modes set in mode and arg, now we go though
@@ -851,7 +851,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
bool mode_b_plus = false;
bool mode_b_minus = false;
- QPtrListIterator<const mode_info> it(pmList);
+ TQPtrListIterator<const mode_info> it(pmList);
const mode_info *mi;
while ( (mi = it.current()) != 0 ) {
++it;
@@ -944,9 +944,9 @@ parseResult * ChannelParser::parseINFOMode(QString string)
}
}
else{
- QChar c(mi->mode());
- QString m(&c, 1);
- QString o;
+ TQChar c(mi->mode());
+ TQString m(&c, 1);
+ TQString o;
if(mi->op())
o = "+";
else
@@ -957,7 +957,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
/*
* We're all done, so output the message and be done with it
*/
- QString pixname = "user|mode";
+ TQString pixname = "user|mode";
if(mode_o_plus)
pixname = "user|oplus";
@@ -971,7 +971,7 @@ parseResult * ChannelParser::parseINFOMode(QString string)
return new parseSucc(" " + string, ksopts->infoColor, pixname);
}
-parseResult * ChannelParser::parseCTCPAction(QString string)
+parseResult * ChannelParser::parseCTCPAction(TQString string)
{
string.remove(0, 2); // * <something> use fancy * pixmap. Remove 2, leave one for space after te *
@@ -979,7 +979,7 @@ parseResult * ChannelParser::parseCTCPAction(QString string)
return new parseSucc(string, ksopts->textColor, "user|action");
}
-parseResult * ChannelParser::parseINFOTopic(QString string)
+parseResult * ChannelParser::parseINFOTopic(TQString string)
{
int found = 0;
@@ -989,11 +989,11 @@ parseResult * ChannelParser::parseINFOTopic(QString string)
//kdDebug(5008) << "Topic parser: " << string << endl;
// Topic for #boo: this is a nice test
- QRegExp rx( "Topic for (\\S+): (.*)" );
+ TQRegExp rx( "Topic for (\\S+): (.*)" );
if(rx.search( string ) != -1){
- QString channel = rx.cap(1);
- QString topic = rx.cap(2);
- topic.replace( QRegExp( "~~" ), "~" );
+ TQString channel = rx.cap(1);
+ TQString topic = rx.cap(2);
+ topic.replace( TQRegExp( "~~" ), "~" );
/*
* check where it's going.
@@ -1019,18 +1019,18 @@ parseResult * ChannelParser::parseINFOTopic(QString string)
rx.setPattern("(\\S+) has changed the topic on channel (\\S+) to (.+)");
if(found == 0 && rx.search(string) != -1){
- QString nick = rx.cap(1);
- QString channel = rx.cap(2);
+ TQString nick = rx.cap(1);
+ TQString channel = rx.cap(2);
//kdDebug(5008) << "Channel: " << channel << endl;
if(top->channelInfo().channel().lower() == channel.lower()){
- QString topic = rx.cap(3);
+ TQString topic = rx.cap(3);
//kdDebug(5008) << "Topic: " << topic << endl;
- topic.replace(QRegExp("~~"), "~");
+ topic.replace(TQRegExp("~~"), "~");
/*
* topic is in double quotes, so remove them
*/
top->setTopic( topic.mid(1, topic.length()-2) );
- QString cmd = "/eval &dostatus();\n";
+ TQString cmd = "/eval &dostatus();\n";
top->sirc_write(cmd);
}
highlightNick(string, nick);
@@ -1039,9 +1039,9 @@ parseResult * ChannelParser::parseINFOTopic(QString string)
}
-void ChannelParser::highlightNick(QString &string, QString &nick)
+void ChannelParser::highlightNick(TQString &string, TQString &nick)
{
- QRegExp rx(QString("(^|\\s+)%1(\\s+|$)").arg(QRegExp::escape(nick)));
+ TQRegExp rx(TQString("(^|\\s+)%1(\\s+|$)").arg(TQRegExp::escape(nick)));
string.replace(rx, "\\1~n" + nick + "~n\\2");
}
diff --git a/ksirc/chanparser.h b/ksirc/chanparser.h
index ef130680..a79e7372 100644
--- a/ksirc/chanparser.h
+++ b/ksirc/chanparser.h
@@ -1,8 +1,8 @@
#ifndef CHAN_PARSER_H
#define CHAN_PARSER_H
-#include <qcolor.h>
-#include <qdict.h>
+#include <tqcolor.h>
+#include <tqdict.h>
/*
* This file defines the parser, and all exceptions generated
@@ -27,11 +27,11 @@ public:
class parseSucc : public parseResult
{
public:
- QString string; // String to display
- QColor colour;
- QString pm;
+ TQString string; // String to display
+ TQColor colour;
+ TQString pm;
- parseSucc(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null){
+ parseSucc(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null){
string = _s;
colour = _c;
pm = _pm;
@@ -46,10 +46,10 @@ public:
class parseError : public parseResult
{
public:
- QString str;
- QString err;
+ TQString str;
+ TQString err;
- parseError(const QString &_s, const QString &_e)
+ parseError(const TQString &_s, const TQString &_e)
{
str = _s;
err = _e;
@@ -59,7 +59,7 @@ public:
class parseWrongChannel : public parseSucc
{
public:
- parseWrongChannel(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null)
+ parseWrongChannel(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null)
: parseSucc(_s, _c, _pm)
{
}
@@ -69,7 +69,7 @@ public:
class parseJoinPart : public parseSucc
{
public:
- parseJoinPart(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null)
+ parseJoinPart(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null)
: parseSucc(_s, _c, _pm)
{
}
@@ -88,10 +88,10 @@ public:
class badModeChangeError // Mode change barfed up, exit out
{
public:
- QString str;
+ TQString str;
char *msg;
- badModeChangeError(QString _str, char *_msg)
+ badModeChangeError(TQString _str, char *_msg)
{
str = _str;
msg = _msg;
@@ -122,8 +122,8 @@ public:
class parseFunc
{
public:
- parseResult *(ChannelParser::*parser)(QString);
- parseFunc(parseResult *(ChannelParser::*_parser)(QString)){
+ parseResult *(ChannelParser::*parser)(TQString);
+ parseFunc(parseResult *(ChannelParser::*_parser)(TQString)){
parser = _parser;
}
@@ -149,7 +149,7 @@ public:
* parse() thanks the string to be parsed and parses it.
* It returns a class of type 'parseResult' or 0.
*/
- parseResult *parse(QString string);
+ parseResult *parse(TQString string);
private:
KSircTopLevel *top;
@@ -175,7 +175,7 @@ private:
* - On failure generate: parseFailed, etc
*/
- static QDict<parseFunc> parserTable;
+ static TQDict<parseFunc> parserTable;
/*
* Note regarding ssfe control messages:
@@ -195,38 +195,38 @@ private:
/**
* SSFE clear 'l' function, clears main window
*/
- parseResult * parseSSFEClear(QString string);
+ parseResult * parseSSFEClear(TQString string);
/**
* SSFE Status is used to update caption, and op status
*
*/
- parseResult * parseSSFEStatus(QString string);
+ parseResult * parseSSFEStatus(TQString string);
/**
* SSFE Init is called by ssfe when it's time to init and setup
*/
- parseResult * parseSSFEInit(QString string);
+ parseResult * parseSSFEInit(TQString string);
/**
* SSFE msg is called for each /msg sent to a diffrent user
*/
- parseResult * parseSSFEMsg(QString string);
+ parseResult * parseSSFEMsg(TQString string);
/**
* SSFE Out, not used
*/
- parseResult * parseSSFEOut(QString string);
+ parseResult * parseSSFEOut(TQString string);
/**
* SSFE Prompt, same function used for p and P, gives a password prompt
*/
- parseResult * parseSSFEPrompt(QString string);
+ parseResult * parseSSFEPrompt(TQString string);
/**
* SSFE Reconnect called when (re)connected to a server
*/
- parseResult * parseSSFEReconnect(QString string);
+ parseResult * parseSSFEReconnect(TQString string);
/**
* That's all the SSFE control messages, the rest are info *\S* message
@@ -235,55 +235,55 @@ private:
/**
* *** is a generic infomation messge
*/
- parseResult * parseINFOInfo(QString string);
+ parseResult * parseINFOInfo(TQString string);
/**
* *E* is a error message
*/
- parseResult * parseINFOError(QString string);
+ parseResult * parseINFOError(TQString string);
/**
* *#* is a list of nicks, used to update the nick list if it's for
* the current channel.
*/
- parseResult * parseINFONicks(QString in_string);
+ parseResult * parseINFONicks(TQString in_string);
/**
* *>* is a join message. If it's for the current channel
*/
- parseResult * parseINFOJoin(QString string);
+ parseResult * parseINFOJoin(TQString string);
/**
* *<* is a part message, if it's for the current channel remove it.
* There's multiple part types, so parsing it more complicated.
*/
- parseResult * parseINFOPart(QString string);
+ parseResult * parseINFOPart(TQString string);
/**
* *N* Is a nick change, update the nick list if needed
* Nick changes go outto all windows, so the nick may not be on
* out current channel.
*/
- parseResult * parseINFOChangeNick(QString string);
+ parseResult * parseINFOChangeNick(TQString string);
/*
* *M* is a mode change. Parsing is mode changes is probably the most
* complicated of all the parsings
*/
- parseResult * parseINFOMode(QString string);
+ parseResult * parseINFOMode(TQString string);
/*
* * is a ctcp actiion. Simply print a pretty * for the user
*/
- parseResult * parseCTCPAction(QString string);
+ parseResult * parseCTCPAction(TQString string);
/*
* *T* is a topic message, catch it and update the status is required
*/
- parseResult * parseINFOTopic(QString string);
+ parseResult * parseINFOTopic(TQString string);
private:
- void highlightNick(QString &string, QString &nick);
+ void highlightNick(TQString &string, TQString &nick);
};
#endif
diff --git a/ksirc/charSelector.cpp b/ksirc/charSelector.cpp
index 6cfe09a4..8ad8526f 100644
--- a/ksirc/charSelector.cpp
+++ b/ksirc/charSelector.cpp
@@ -3,32 +3,32 @@
#include "charSelector.h"
#include "charSelector.moc"
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <klocale.h>
-charSelector::charSelector(QWidget *parent, const char* name)
+charSelector::charSelector(TQWidget *parent, const char* name)
: KDialog(parent, name, false)
{
- testLayout = new QVBoxLayout(this);
+ testLayout = new TQVBoxLayout(this);
testLayout->setSpacing( spacingHint() );
testLayout->setMargin( marginHint() );
- charSelect = new KCharSelect(this, QCString(name) + "_kcharselector", "", 0);
+ charSelect = new KCharSelect(this, TQCString(name) + "_kcharselector", "", 0);
testLayout->addWidget(charSelect);
charSelect->installEventFilter(this);
- connect(charSelect, SIGNAL(doubleClicked()), SLOT(insertText()));
+ connect(charSelect, TQT_SIGNAL(doubleClicked()), TQT_SLOT(insertText()));
- QHBoxLayout *buttonLayout = new QHBoxLayout;
+ TQHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->setSpacing( spacingHint() );
- insertButton = new QPushButton(i18n("&Insert Char"), this);
- connect(insertButton, SIGNAL(clicked()), SLOT(insertText()));
+ insertButton = new TQPushButton(i18n("&Insert Char"), this);
+ connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertText()));
buttonLayout->addWidget(insertButton);
- QSpacerItem *spacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(50, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
buttonLayout->addItem(spacer);
testLayout->addLayout(buttonLayout);
@@ -45,7 +45,7 @@ void charSelector::insertText()
emit clicked();
}
-void charSelector::setFont( const QString &font )
+void charSelector::setFont( const TQString &font )
{
charSelect->setFont(font);
}
@@ -56,16 +56,16 @@ void charSelector::reject()
close();
}
-void charSelector::keyPressEvent(QKeyEvent *e)
+void charSelector::keyPressEvent(TQKeyEvent *e)
{
KDialog::keyPressEvent(e);
}
-bool charSelector::eventFilter ( QObject *, QEvent * e )
+bool charSelector::eventFilter ( TQObject *, TQEvent * e )
{
- if ( e->type() == QEvent::AccelOverride ) {
+ if ( e->type() == TQEvent::AccelOverride ) {
// special processing for key press
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
if(k->key() == Key_Escape){
keyPressEvent(k);
return TRUE; // eat event
diff --git a/ksirc/charSelector.h b/ksirc/charSelector.h
index 927cb5e5..9ea4b400 100644
--- a/ksirc/charSelector.h
+++ b/ksirc/charSelector.h
@@ -14,16 +14,16 @@ class charSelector : public KDialog
{
Q_OBJECT
public:
- charSelector(QWidget *parent=0, const char *name=0);
+ charSelector(TQWidget *parent=0, const char *name=0);
~charSelector();
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
void insertText();
- QString currentText() { return charSelect->chr(); }
+ TQString currentText() { return charSelect->chr(); }
- void setFont( const QString &font );
+ void setFont( const TQString &font );
protected slots:
virtual void reject();
@@ -32,11 +32,11 @@ class charSelector : public KDialog
void clicked();
protected:
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
private:
KCharSelect *charSelect;
- QVBoxLayout* testLayout;
- QPushButton *insertButton;
+ TQVBoxLayout* testLayout;
+ TQPushButton *insertButton;
};
#endif
diff --git a/ksirc/colorpicker.cpp b/ksirc/colorpicker.cpp
index 13b2805c..9bb5f03f 100644
--- a/ksirc/colorpicker.cpp
+++ b/ksirc/colorpicker.cpp
@@ -20,49 +20,49 @@
#include "colorpicker.h"
#include "ksopts.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qvbox.h>
-#include <qstyle.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqvbox.h>
+#include <tqstyle.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klocale.h>
-ColorPicker::ColorPicker( QWidget *parent, const char *name )
+ColorPicker::ColorPicker( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true /*modal*/, i18n( "Pick Color" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Cancel ),
m_foregroundColor( -1 ), m_backgroundColor( -1 )
{
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
- QWidget *sampleBox = new QWidget( mainWidget );
- QHBoxLayout *sampleLayout = new QHBoxLayout( sampleBox );
+ TQWidget *sampleBox = new TQWidget( mainWidget );
+ TQHBoxLayout *sampleLayout = new TQHBoxLayout( sampleBox );
- QLabel *preview = new QLabel( i18n( "Preview:" ), sampleBox );
+ TQLabel *preview = new TQLabel( i18n( "Preview:" ), sampleBox );
sampleLayout->addWidget( preview );
- m_sample = new QLineEdit( i18n( "Sample Text" ), sampleBox );
+ m_sample = new TQLineEdit( i18n( "Sample Text" ), sampleBox );
m_sample->setFocusPolicy( NoFocus );
- m_sample->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
+ m_sample->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
m_sample->sizePolicy().verData() ) );
sampleLayout->addWidget( m_sample );
sampleLayout->addStretch();
- QHBox *box = new QHBox( mainWidget );
- QLabel *description = new QLabel( i18n( "&Foreground:" ), box );
+ TQHBox *box = new TQHBox( mainWidget );
+ TQLabel *description = new TQLabel( i18n( "&Foreground:" ), box );
ColorBar *foregroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box );
description->setBuddy( foregroundColor );
- box = new QHBox( mainWidget );
- description = new QLabel( i18n( "&Background:" ), box );
+ box = new TQHBox( mainWidget );
+ description = new TQLabel( i18n( "&Background:" ), box );
ColorBar *backgroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box );
description->setBuddy( backgroundColor );
- QPushButton *ok = actionButton( KDialogBase::Ok );
- QPushButton *cancel = actionButton( KDialogBase::Cancel );
+ TQPushButton *ok = actionButton( KDialogBase::Ok );
+ TQPushButton *cancel = actionButton( KDialogBase::Cancel );
setTabOrder( foregroundColor, backgroundColor );
setTabOrder( backgroundColor, ok );
@@ -71,31 +71,31 @@ ColorPicker::ColorPicker( QWidget *parent, const char *name )
ok->setAutoDefault( false );
cancel->setAutoDefault( false );
- connect( foregroundColor, SIGNAL( colorPicked( int ) ),
- this, SLOT( setForegroundColor( int ) ) );
- connect( backgroundColor, SIGNAL( colorPicked( int ) ),
- this, SLOT( setBackgroundColor( int ) ) );
+ connect( foregroundColor, TQT_SIGNAL( colorPicked( int ) ),
+ this, TQT_SLOT( setForegroundColor( int ) ) );
+ connect( backgroundColor, TQT_SIGNAL( colorPicked( int ) ),
+ this, TQT_SLOT( setBackgroundColor( int ) ) );
ok->setEnabled( false );
updateSample();
}
-QString ColorPicker::colorString() const
+TQString ColorPicker::colorString() const
{
assert( m_foregroundColor != -1 );
- QString res( QString::number( m_foregroundColor ) );
+ TQString res( TQString::number( m_foregroundColor ) );
if ( m_backgroundColor != -1 )
{
res += ',';
- res += QString::number( m_backgroundColor );
+ res += TQString::number( m_backgroundColor );
}
return res;
}
void ColorPicker::setForegroundColor( int col )
{
- QPushButton * ok =actionButton( KDialogBase::Ok );
+ TQPushButton * ok =actionButton( KDialogBase::Ok );
assert( ok );
ok->setEnabled( true );
@@ -111,28 +111,28 @@ void ColorPicker::setBackgroundColor( int col )
void ColorPicker::updateSample()
{
- QColorGroup cg( colorGroup() );
+ TQColorGroup cg( colorGroup() );
- QColor col = ksopts->textColor;
+ TQColor col = ksopts->textColor;
if ( m_foregroundColor != -1 )
col = ksopts->ircColors[ m_foregroundColor ];
- cg.setColor( QColorGroup::Foreground, col );
- cg.setColor( QColorGroup::Text, col );
+ cg.setColor( TQColorGroup::Foreground, col );
+ cg.setColor( TQColorGroup::Text, col );
if ( m_backgroundColor != -1 )
{
col = ksopts->ircColors[ m_backgroundColor ];
- cg.setColor( QColorGroup::Background, col );
- cg.setColor( QColorGroup::Base, col );
+ cg.setColor( TQColorGroup::Background, col );
+ cg.setColor( TQColorGroup::Base, col );
}
- m_sample->setPalette( QPalette( cg, cg, cg ) );
+ m_sample->setPalette( TQPalette( cg, cg, cg ) );
}
-ColorBar::ColorBar( const QValueVector<QColor> &colors, QWidget *parent,
+ColorBar::ColorBar( const TQValueVector<TQColor> &colors, TQWidget *parent,
const char *name )
- : QFrame( parent, name, WStaticContents | WRepaintNoErase ),
+ : TQFrame( parent, name, WStaticContents | WRepaintNoErase ),
m_currentCell( -1 ), m_focusedCell( - 1 ), m_colors( colors ),
m_cellSize( 0 )
{
@@ -143,7 +143,7 @@ ColorBar::ColorBar( const QValueVector<QColor> &colors, QWidget *parent,
setFocusPolicy( StrongFocus );
}
-void ColorBar::drawContents( QPainter *p )
+void ColorBar::drawContents( TQPainter *p )
{
int x = contentsRect().x();
int y = contentsRect().y();
@@ -153,15 +153,15 @@ void ColorBar::drawContents( QPainter *p )
i == static_cast<uint>( m_currentCell ) );
bool isFocusedCell = ( m_focusedCell != -1 &&
i == static_cast<uint>( m_focusedCell ) );
- drawCell( p, x, y, m_colors[ i ], QString::number( i ),
+ drawCell( p, x, y, m_colors[ i ], TQString::number( i ),
isFocusedCell, isCurrentCell );
}
}
-void ColorBar::keyPressEvent( QKeyEvent *ev )
+void ColorBar::keyPressEvent( TQKeyEvent *ev )
{
if ( m_focusedCell == -1 ) {
- QFrame::keyPressEvent( ev );
+ TQFrame::keyPressEvent( ev );
return;
}
@@ -189,36 +189,36 @@ void ColorBar::keyPressEvent( QKeyEvent *ev )
default: break;
}
- QFrame::keyPressEvent( ev );
+ TQFrame::keyPressEvent( ev );
}
-void ColorBar::focusInEvent( QFocusEvent *ev )
+void ColorBar::focusInEvent( TQFocusEvent *ev )
{
- if ( ev->reason() == QFocusEvent::Tab ||
- ev->reason() == QFocusEvent::Backtab )
+ if ( ev->reason() == TQFocusEvent::Tab ||
+ ev->reason() == TQFocusEvent::Backtab )
m_focusedCell = 0;
- QFrame::focusInEvent( ev );
+ TQFrame::focusInEvent( ev );
}
-void ColorBar::focusOutEvent( QFocusEvent *ev )
+void ColorBar::focusOutEvent( TQFocusEvent *ev )
{
- if ( ev->reason() == QFocusEvent::Tab ||
- ev->reason() == QFocusEvent::Backtab ||
- ev->reason() == QFocusEvent::Mouse )
+ if ( ev->reason() == TQFocusEvent::Tab ||
+ ev->reason() == TQFocusEvent::Backtab ||
+ ev->reason() == TQFocusEvent::Mouse )
m_focusedCell = -1;
- QFrame::focusOutEvent( ev );
+ TQFrame::focusOutEvent( ev );
}
-void ColorBar::fontChange( const QFont &oldFont )
+void ColorBar::fontChange( const TQFont &oldFont )
{
updateCellSize();
- QFrame::fontChange( oldFont );
+ TQFrame::fontChange( oldFont );
}
-void ColorBar::styleChange( QStyle &oldStyle )
+void ColorBar::styleChange( TQStyle &oldStyle )
{
updateCellSize();
- QFrame::styleChange( oldStyle );
+ TQFrame::styleChange( oldStyle );
}
bool ColorBar::focusNextPrevChild( bool next )
@@ -233,7 +233,7 @@ bool ColorBar::focusNextPrevChild( bool next )
update();
return true;
}
- return QFrame::focusNextPrevChild( next );
+ return TQFrame::focusNextPrevChild( next );
}
if ( m_focusedCell > 1 )
@@ -243,43 +243,43 @@ bool ColorBar::focusNextPrevChild( bool next )
return true;
}
- return QFrame::focusNextPrevChild( next );
+ return TQFrame::focusNextPrevChild( next );
}
-void ColorBar::mousePressEvent( QMouseEvent *ev )
+void ColorBar::mousePressEvent( TQMouseEvent *ev )
{
- const QPoint &p = ev->pos();
+ const TQPoint &p = ev->pos();
if ( contentsRect().contains( p ) )
{
m_focusedCell = p.x() / m_cellSize;
update();
}
- QFrame::mousePressEvent( ev );
+ TQFrame::mousePressEvent( ev );
}
-void ColorBar::mouseReleaseEvent( QMouseEvent *ev )
+void ColorBar::mouseReleaseEvent( TQMouseEvent *ev )
{
if ( m_focusedCell != -1 )
{
setCurrentCell( m_focusedCell );
update();
}
- QFrame::mouseReleaseEvent( ev );
+ TQFrame::mouseReleaseEvent( ev );
}
void ColorBar::updateCellSize()
{
- setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) );
+ setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) );
- QFontMetrics metrics( font() );
+ TQFontMetrics metrics( font() );
- m_cellSize = metrics.width( QString::number( m_colors.size() ) ) +
+ m_cellSize = metrics.width( TQString::number( m_colors.size() ) ) +
( s_indicatorSize * 2 ) +
( s_focusSize * 2 ) +
( s_innerMargin * 2 );
- setFixedSize( QSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ),
+ setFixedSize( TQSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ),
m_cellSize + ( frameWidth() * 2 ) ) );
}
@@ -289,13 +289,13 @@ void ColorBar::setCurrentCell( int cell )
emit colorPicked( cell );
}
-void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color,
- const QString &text, bool isFocusedCell,
+void ColorBar::drawCell( TQPainter *p, int x, int y, const TQColor &color,
+ const TQString &text, bool isFocusedCell,
bool isCurrentCell )
{
p->fillRect( x, y, m_cellSize, m_cellSize, color );
- QColor penColor = black;
+ TQColor penColor = black;
// ### hack
if ( color.red() < 127 && color.green() < 127 && color.blue() < 127 )
penColor = white;
@@ -329,7 +329,7 @@ void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color,
s_focusSize, focusRectSize - ( 2 * s_focusSize ), penColor );
}
- QFontMetrics metrics( p->font() );
+ TQFontMetrics metrics( p->font() );
int offset = ( m_cellSize / 2 ) - ( metrics.width( text ) / 2 );
p->drawText( x + offset, y + s_focusSize + s_indicatorSize +
diff --git a/ksirc/colorpicker.h b/ksirc/colorpicker.h
index 18222bfa..2118fc88 100644
--- a/ksirc/colorpicker.h
+++ b/ksirc/colorpicker.h
@@ -19,8 +19,8 @@
#ifndef __colorpicker_h__
#define __colorpicker_h__
-#include <qvaluevector.h>
-#include <qcolor.h>
+#include <tqvaluevector.h>
+#include <tqcolor.h>
#include <kdialogbase.h>
@@ -30,9 +30,9 @@ class ColorPicker : public KDialogBase
{
Q_OBJECT
public:
- ColorPicker( QWidget *parent, const char *name = 0 );
+ ColorPicker( TQWidget *parent, const char *name = 0 );
- QString colorString() const;
+ TQString colorString() const;
private slots:
void setForegroundColor( int col );
@@ -41,7 +41,7 @@ private slots:
private:
void updateSample();
- QLineEdit *m_sample;
+ TQLineEdit *m_sample;
int m_foregroundColor;
int m_backgroundColor;
};
@@ -50,33 +50,33 @@ class ColorBar : public QFrame
{
Q_OBJECT
public:
- ColorBar( const QValueVector<QColor> &colors, QWidget *parent, const char *name = 0 );
+ ColorBar( const TQValueVector<TQColor> &colors, TQWidget *parent, const char *name = 0 );
signals:
void colorPicked( int col );
protected:
- virtual void drawContents( QPainter *p );
- virtual void keyPressEvent( QKeyEvent *ev );
- virtual void focusInEvent( QFocusEvent *ev );
- virtual void focusOutEvent( QFocusEvent *ev );
- virtual void fontChange( const QFont &oldFont );
- virtual void styleChange( QStyle &oldStyle );
+ virtual void drawContents( TQPainter *p );
+ virtual void keyPressEvent( TQKeyEvent *ev );
+ virtual void focusInEvent( TQFocusEvent *ev );
+ virtual void focusOutEvent( TQFocusEvent *ev );
+ virtual void fontChange( const TQFont &oldFont );
+ virtual void styleChange( TQStyle &oldStyle );
virtual bool focusNextPrevChild( bool next );
- virtual void mousePressEvent( QMouseEvent *ev );
- virtual void mouseReleaseEvent( QMouseEvent *ev );
+ virtual void mousePressEvent( TQMouseEvent *ev );
+ virtual void mouseReleaseEvent( TQMouseEvent *ev );
private:
void updateCellSize();
void setCurrentCell( int cell );
- void drawCell( QPainter *p, int x, int y, const QColor &color,
- const QString &text, bool isFocusedCell,
+ void drawCell( TQPainter *p, int x, int y, const TQColor &color,
+ const TQString &text, bool isFocusedCell,
bool isCurrentCell );
int m_currentCell;
int m_focusedCell;
- const QValueVector<QColor> m_colors;
+ const TQValueVector<TQColor> m_colors;
int m_cellSize;
// ### style me
diff --git a/ksirc/dccManager.cpp b/ksirc/dccManager.cpp
index 44d85dee..386644b9 100644
--- a/ksirc/dccManager.cpp
+++ b/ksirc/dccManager.cpp
@@ -8,8 +8,8 @@
#include "dccManager.h"
#include "dccNew.h"
-#include <qobject.h>
-#include <qsignal.h>
+#include <tqobject.h>
+#include <tqsignal.h>
#include <kdebug.h>
#include <klocale.h>
@@ -22,8 +22,8 @@
#define COL_CPS 4
#define COL_PER 5
-dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size )
- : QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
+dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size )
+ : TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
{
m_percent = 0;
m_status = status;
@@ -38,13 +38,13 @@ dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, con
if(m_type == dccChat)
setText(COL_SIZE, "");
else
- setText(COL_SIZE, QString("%1").arg(size));
+ setText(COL_SIZE, TQString("%1").arg(size));
setText(COL_PER, "");
}
-dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size )
-: QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
+dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size )
+: TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
{
m_percent = 0;
m_status = status;
@@ -56,7 +56,7 @@ dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type,
setText(COL_WHO, who);
setText(COL_STAT, enumToStatus(status));
if(type != dccChat)
- setText(COL_SIZE, QString("%1").arg(size));
+ setText(COL_SIZE, TQString("%1").arg(size));
setText(COL_PER, "");
}
@@ -65,9 +65,9 @@ dccItem::~dccItem()
{
}
-QString dccItem::enumToStatus(enum dccStatus status)
+TQString dccItem::enumToStatus(enum dccStatus status)
{
- QString str;
+ TQString str;
switch(status){
case dccRecving:
str = i18n("Receiving");
@@ -106,17 +106,17 @@ QString dccItem::enumToStatus(enum dccStatus status)
return str;
}
-void dccItem::setWhoPostfix(const QString &post) {
+void dccItem::setWhoPostfix(const TQString &post) {
m_post = post;
- setText(COL_WHO, QString("%1 %2").arg(m_who).arg(post));
+ setText(COL_WHO, TQString("%1 %2").arg(m_who).arg(post));
}
-void dccItem::changeFilename(const QString &file) {
+void dccItem::changeFilename(const TQString &file) {
setText(COL_FILE, file);
m_file = file;
}
-void dccItem::changeWho(const QString &who) {
+void dccItem::changeWho(const TQString &who) {
setText(COL_WHO, who);
m_who = who;
}
@@ -146,13 +146,13 @@ void dccItem::setReceivedBytes(int bytes)
(ctime >= (m_lasttime + 2))
){
m_lasttime = ctime;
- setText(COL_SIZE, QString("%1/%2").arg(bytes).arg(m_size));
- setText(COL_PER, QString("%1%").arg(per));
+ setText(COL_SIZE, TQString("%1/%2").arg(bytes).arg(m_size));
+ setText(COL_PER, TQString("%1%").arg(per));
m_percent = per;
if(m_status == dccResumed)
m_stime = 0; /* if we are got a resume request don't update CPS, reset it */
else
- setText(COL_CPS, QString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2));
+ setText(COL_CPS, TQString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2));
}
@@ -177,13 +177,13 @@ void dccItem::okRename(int col)
{
KListViewItem::okRename(col);
if(type() == dccGet){
- QString oldfile = m_file;
+ TQString oldfile = m_file;
changeFilename(text(COL_FILE));
emit itemRenamed(this, m_who, oldfile);
setRenameEnabled(COL_FILE, false);
}
else if(type() == dccChat){
- QString oldwho = m_who;
+ TQString oldwho = m_who;
changeWho(text(COL_WHO));
emit itemRenamed(this, oldwho, m_file);
setRenameEnabled(COL_WHO, false);
@@ -199,7 +199,7 @@ void dccItem::cancelRename(int col)
}
}
-dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( parent, name)
+dccManager::dccManager( TQWidget *parent, const char *name ) : dccManagerbase( parent, name)
{
dccNewDialog = 0x0;
@@ -215,10 +215,10 @@ dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( pa
m_sendit->setSelectable(false);
m_chatit->setSelectable(false);
-// connect(klvBox, SIGNAL(clicked(QListViewItem *)),
-// this, SLOT(getSelChange(QListViewItem *)));
- connect(klvBox, SIGNAL(currentChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+// connect(klvBox, TQT_SIGNAL(clicked(TQListViewItem *)),
+// this, TQT_SLOT(getSelChange(TQListViewItem *)));
+ connect(klvBox, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
klvBox->setCurrentItem(m_chatit);
getSelChange(klvBox->currentItem());
@@ -228,31 +228,31 @@ dccManager::~dccManager()
{
}
-dccItem *dccManager::newSendItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size)
+dccItem *dccManager::newSendItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_sendit, this, dccItem::dccSend, file, who, status, size);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
-dccItem *dccManager::newGetItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size)
+dccItem *dccManager::newGetItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_getit, this, dccItem::dccGet, file, who, status, size);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
-dccItem *dccManager::newChatItem(QString who, enum dccItem::dccStatus status)
+dccItem *dccManager::newChatItem(TQString who, enum dccItem::dccStatus status)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_chatit, this, dccItem::dccChat, "", who, status, 0);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
@@ -268,20 +268,20 @@ void dccManager::kpbNew_clicked()
dccNewDialog = new dccNew();
dccNewDialog->show();
- connect(dccNewDialog, SIGNAL(accepted(int, QString, QString)),
- this, SLOT(dccNewAccepted(int, QString, QString)));
+ connect(dccNewDialog, TQT_SIGNAL(accepted(int, TQString, TQString)),
+ this, TQT_SLOT(dccNewAccepted(int, TQString, TQString)));
}
-void dccManager::dccNewAccepted(int type, QString nick, QString file){
+void dccManager::dccNewAccepted(int type, TQString nick, TQString file){
kdDebug(5008) << "Type: " << type << " nick: " << nick << " file: " << file << endl;
if(type == dccNew::Chat){
- QCString cstr = QCString("/dcc chat ") + nick.latin1() + "\n";
+ TQCString cstr = TQCString("/dcc chat ") + nick.latin1() + "\n";
kdDebug(5008) << "Output: " << cstr << endl;
emit outputLine(cstr);
}
else if(type == dccNew::Send){
- QCString cstr = QCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n";
+ TQCString cstr = TQCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n";
emit outputLine(cstr);
}
delete dccNewDialog;
@@ -318,7 +318,7 @@ void dccManager::kpbAbort_clicked()
}
}
-void dccManager::getSelChange(QListViewItem *_i) {
+void dccManager::getSelChange(TQListViewItem *_i) {
kpbAbort->setEnabled(false);
kpbResume->setEnabled(false);
kpbRename->setEnabled(false);
@@ -374,7 +374,7 @@ void dccManager::getSelChange(QListViewItem *_i) {
}
-void dccManager::sendSelChange(QListViewItem *) {
+void dccManager::sendSelChange(TQListViewItem *) {
/*
if(_i == 0)
return;
diff --git a/ksirc/dccManager.h b/ksirc/dccManager.h
index 41412479..6e8c464c 100644
--- a/ksirc/dccManager.h
+++ b/ksirc/dccManager.h
@@ -12,7 +12,7 @@
#include <time.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "dccManagerbase.h"
#include "klistview.h"
@@ -22,7 +22,7 @@ class dccManager;
class QSignal;
class QObject;
-class dccItem : public QObject,
+class dccItem : public TQObject,
public KListViewItem
{
Q_OBJECT
@@ -46,19 +46,19 @@ public:
dccSend
};
- dccItem( KListView *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size );
- dccItem( KListViewItem *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size );
+ dccItem( KListView *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size );
+ dccItem( KListViewItem *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size );
virtual ~dccItem();
void changeStatus(enum dccStatus);
void setReceivedBytes(int bytes);
- void setWhoPostfix(const QString &post);
- void changeFilename(const QString &file);
- void changeWho(const QString &who);
+ void setWhoPostfix(const TQString &post);
+ void changeFilename(const TQString &file);
+ void changeWho(const TQString &who);
- const QString who() { return m_who; }
- const QString file() { return m_file; }
+ const TQString who() { return m_who; }
+ const TQString file() { return m_file; }
enum dccStatus status() { return m_status; }
enum dccType type() { return m_type; }
double getPercent() { return m_percent; }
@@ -66,11 +66,11 @@ public:
void doRename();
signals:
- void statusChanged(QListViewItem *);
- void itemRenamed(dccItem *, QString oldNick, QString oldFile);
+ void statusChanged(TQListViewItem *);
+ void itemRenamed(dccItem *, TQString oldNick, TQString oldFile);
protected:
- QString enumToStatus(enum dccStatus);
+ TQString enumToStatus(enum dccStatus);
virtual void okRename ( int col );
virtual void cancelRename ( int col );
@@ -78,9 +78,9 @@ protected:
private:
dccManager *m_manager;
- QString m_who;
- QString m_file;
- QString m_post;
+ TQString m_who;
+ TQString m_file;
+ TQString m_post;
int m_percent;
unsigned int m_size;
enum dccStatus m_status;
@@ -97,14 +97,14 @@ class dccManager : public dccManagerbase
Q_OBJECT
public:
- dccManager( QWidget *parent = 0, const char *name = 0 );
+ dccManager( TQWidget *parent = 0, const char *name = 0 );
~dccManager();
- dccItem *newSendItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size);
- dccItem *newGetItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size);
- dccItem *newChatItem(QString who, enum dccItem::dccStatus);
+ dccItem *newSendItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size);
+ dccItem *newGetItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size);
+ dccItem *newChatItem(TQString who, enum dccItem::dccStatus);
- void doChanged() { emit changed(false, QString("dcc activity")); };
+ void doChanged() { emit changed(false, TQString("dcc activity")); };
public slots:
virtual void kpbNew_clicked();
@@ -114,17 +114,17 @@ public slots:
virtual void kpbAbort_clicked();
signals:
- void outputLine(QCString);
- void changed(bool, QString);
+ void outputLine(TQCString);
+ void changed(bool, TQString);
virtual void dccConnectClicked(dccItem *);
virtual void dccResumeClicked(dccItem *);
virtual void dccRenameClicked(dccItem *);
virtual void dccAbortClicked(dccItem *);
protected slots:
- virtual void getSelChange(QListViewItem *);
- virtual void sendSelChange(QListViewItem *);
- virtual void dccNewAccepted(int type, QString nick, QString file);
+ virtual void getSelChange(TQListViewItem *);
+ virtual void sendSelChange(TQListViewItem *);
+ virtual void dccNewAccepted(int type, TQString nick, TQString file);
private:
diff --git a/ksirc/dccMgrTest.cpp b/ksirc/dccMgrTest.cpp
index 77d5fdac..6d83938e 100644
--- a/ksirc/dccMgrTest.cpp
+++ b/ksirc/dccMgrTest.cpp
@@ -17,7 +17,7 @@ public:
bytes = 0;
startTimer( 100 );
}
- void timerEvent( QTimerEvent * )
+ void timerEvent( TQTimerEvent * )
{
m_it->changeStatus(dccItem::dccSending);
bytes += 1000;
diff --git a/ksirc/dccNew.cpp b/ksirc/dccNew.cpp
index fe44fae6..0ace8c56 100644
--- a/ksirc/dccNew.cpp
+++ b/ksirc/dccNew.cpp
@@ -6,12 +6,12 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qlistbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqlistbox.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -27,29 +27,29 @@
#include "dccNew.h"
#include "objFinder.h"
-dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick )
+dccNew::dccNew( TQWidget *parent, const char *name, int type, TQString nick )
: dccNewBase( parent, name)
{
- QColorGroup cg_mainw = kapp->palette().active();
- cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor);
- cg_mainw.setColor(QColorGroup::Text, ksopts->textColor);
- cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor);
- cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor);
- cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor);
- nickList->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
+ TQColorGroup cg_mainw = kapp->palette().active();
+ cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor);
+ cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor);
+ cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor);
+ cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor);
+ cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor);
+ nickList->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
- QStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::"));
+ TQStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::"));
- for ( QStringList::Iterator it = allalist.begin();
+ for ( TQStringList::Iterator it = allalist.begin();
it != allalist.end();
++it ) {
- QString name = (*it).section("::", 1);
+ TQString name = (*it).section("::", 1);
kdDebug(5008) << "Looking at: " << *it << "/" << name << endl;
aListBox *a = static_cast<aListBox *>(objFinder::find(name.latin1(), "aListBox"));
if(a){
- QListBoxItem *i;
+ TQListBoxItem *i;
for(i = a->firstItem(); i != 0x0; i = i->next()){
nickListItem *it = new nickListItem(*a->item(a->index(i)));
nickList->inSort(it);
@@ -62,7 +62,7 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick )
KCompletion *comp = cbNicks->completionObject();
- QListBoxItem *i;
+ TQListBoxItem *i;
for(i = nickList->firstItem(); i != 0x0; i = i->next()){
comp->addItem(i->text());
cbNicks->insertItem(i->text());
@@ -94,14 +94,14 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick )
fileSendClicked();
}
- connect(nickList, SIGNAL(highlighted(const QString &)),
- cbNicks, SLOT(setEditText(const QString &)));
+ connect(nickList, TQT_SIGNAL(highlighted(const TQString &)),
+ cbNicks, TQT_SLOT(setEditText(const TQString &)));
- connect(pbCancel, SIGNAL(clicked()),
- this, SLOT(reject()));
+ connect(pbCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
- connect(pbSend, SIGNAL(clicked()),
- this, SLOT(accept()));
+ connect(pbSend, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accept()));
}
@@ -134,17 +134,17 @@ void dccNew::sendClicked()
void dccNew::fileClicked()
{
- QString file =
+ TQString file =
KFileDialog::getOpenFileName();
leFile->setText(file);
}
-QString dccNew::getFile() {
+TQString dccNew::getFile() {
return leFile->text() ;
}
-QString dccNew::getNick() {
+TQString dccNew::getNick() {
return cbNicks->currentText();
}
@@ -155,7 +155,7 @@ int dccNew::getType() {
void dccNew::reject()
{
- emit accepted(-1, QString::null, QString::null);
+ emit accepted(-1, TQString::null, TQString::null);
}
diff --git a/ksirc/dccNew.h b/ksirc/dccNew.h
index e0adcf80..35638b59 100644
--- a/ksirc/dccNew.h
+++ b/ksirc/dccNew.h
@@ -16,22 +16,22 @@ class dccNew : public dccNewBase
Q_OBJECT
public:
- dccNew( QWidget *parent = 0,
+ dccNew( TQWidget *parent = 0,
const char *name = 0,
int type = -1,
- QString nick = QString::null );
+ TQString nick = TQString::null );
~dccNew();
enum { Chat, Send };
- QString getFile();
- QString getNick();
+ TQString getFile();
+ TQString getNick();
int getType();
signals:
void modified();
- void accepted(int type, QString nick, QString file);
+ void accepted(int type, TQString nick, TQString file);
protected slots:
virtual void chatClicked();
diff --git a/ksirc/dccToplevel.cpp b/ksirc/dccToplevel.cpp
index 5e5437d2..bd66b944 100644
--- a/ksirc/dccToplevel.cpp
+++ b/ksirc/dccToplevel.cpp
@@ -1,6 +1,6 @@
-#include <qvbox.h>
-#include <qpopupmenu.h>
+#include <tqvbox.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <kstdaction.h>
@@ -15,17 +15,17 @@ extern DisplayMgr *displayMgr;
#define DTL_WINDOW_ID 10
-dccTopLevel::dccTopLevel(QWidget *parent, const char *name)
+dccTopLevel::dccTopLevel(TQWidget *parent, const char *name)
: KMainWindow(parent, name, Qt::WDestructiveClose)
{
- m_mgr = new dccManager(this, QCString(QObject::name()) + "_dccManager");
+ m_mgr = new dccManager(this, TQCString(TQObject::name()) + "_dccManager");
// m_mgr->show();
setCentralWidget(m_mgr);
- connect(m_mgr, SIGNAL(changed(bool, QString)), this, SIGNAL(changed(bool, QString)));
+ connect(m_mgr, TQT_SIGNAL(changed(bool, TQString)), this, TQT_SIGNAL(changed(bool, TQString)));
- QPopupMenu *win = new QPopupMenu(this, QCString(QObject::name()) + "_popup_window");
- KAction *act = KStdAction::close(this, SLOT( close() ), actionCollection() );
+ TQPopupMenu *win = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_window");
+ KAction *act = KStdAction::close(this, TQT_SLOT( close() ), actionCollection() );
act->plug(win);
menuBar()->insertItem(i18n("&File"), win, DTL_WINDOW_ID, -1);
diff --git a/ksirc/dccToplevel.h b/ksirc/dccToplevel.h
index db9f3f67..204c1d4f 100644
--- a/ksirc/dccToplevel.h
+++ b/ksirc/dccToplevel.h
@@ -12,14 +12,14 @@ class dccTopLevel : public KMainWindow
Q_OBJECT
public:
- dccTopLevel(QWidget *parent = 0, const char *name = 0);
+ dccTopLevel(TQWidget *parent = 0, const char *name = 0);
virtual ~dccTopLevel();
dccManager *mgr() { return m_mgr; }
signals:
- void changeChannel(const QString&,const QString&);
- void changed(bool, QString);
+ void changeChannel(const TQString&,const TQString&);
+ void changed(bool, TQString);
public slots:
diff --git a/ksirc/displayMgr.h b/ksirc/displayMgr.h
index e0838ba0..62af2b18 100644
--- a/ksirc/displayMgr.h
+++ b/ksirc/displayMgr.h
@@ -1,7 +1,7 @@
#ifndef DISPLAYMGR_H
#define DISPLAYMGR_H
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
@@ -9,17 +9,17 @@ class DisplayMgr {
public:
virtual ~DisplayMgr() {};
- virtual void newTopLevel(QWidget *, bool show = false) = 0;
+ virtual void newTopLevel(TQWidget *, bool show = false) = 0;
- virtual void removeTopLevel(QWidget *) = 0;
+ virtual void removeTopLevel(TQWidget *) = 0;
- virtual void show(QWidget *) = 0;
+ virtual void show(TQWidget *) = 0;
- virtual void hide(QWidget *) = 0;
+ virtual void hide(TQWidget *) = 0;
- virtual void raise(QWidget *, bool takefocus = false) = 0;
+ virtual void raise(TQWidget *, bool takefocus = false) = 0;
- virtual void setCaption(QWidget *, const QString&) = 0;
+ virtual void setCaption(TQWidget *, const TQString&) = 0;
};
diff --git a/ksirc/displayMgrMDI.cpp b/ksirc/displayMgrMDI.cpp
index ae1e5b39..f8286ed6 100644
--- a/ksirc/displayMgrMDI.cpp
+++ b/ksirc/displayMgrMDI.cpp
@@ -4,7 +4,7 @@
#include <unistd.h>
#include <assert.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kwin.h>
#include <kaccel.h>
#include <kaction.h>
@@ -31,24 +31,24 @@ DisplayMgrMDI::~DisplayMgrMDI()
#define DMM_MOVEL_ID 51
#define DMM_MOVER_ID 52
-void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
+void DisplayMgrMDI::newTopLevel( TQWidget *w, bool show )
{
topLevel()->addWidget( w, show );
if(w->inherits("KSircTopLevel")){
KSircTopLevel *t = static_cast<KSircTopLevel *>(w);
- connect(m_topLevel->tabWidget(), SIGNAL(currentChanged(QWidget *)), t, SLOT(focusChange(QWidget *)));
+ connect(m_topLevel->tabWidget(), TQT_SIGNAL(currentChanged(TQWidget *)), t, TQT_SLOT(focusChange(TQWidget *)));
}
if(w->inherits("KMainWindow")){
KMainWindow *t = static_cast<KMainWindow *>(w);
- QMenuBar *cmenu = t->menuBar();
+ TQMenuBar *cmenu = t->menuBar();
if(cmenu){
- QPopupMenu *m = new QPopupMenu(t, QCString(t->name()) + "_popup_MDI");
+ TQPopupMenu *m = new TQPopupMenu(t, TQCString(t->name()) + "_popup_MDI");
m->setCheckable(true);
- m->insertItem(i18n("Detach Window"), this, SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0);
+ m->insertItem(i18n("Detach Window"), this, TQT_SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0);
m->insertSeparator(0);
- m->insertItem(i18n("Move Tab Left"), this, SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0);
- m->insertItem(i18n("Move Tab Right"), this, SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0);
+ m->insertItem(i18n("Move Tab Left"), this, TQT_SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0);
+ m->insertItem(i18n("Move Tab Right"), this, TQT_SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0);
/*
* By using an posisiton of 4 this works for KSircTopLevel
* and DCCTopLevel but will cause problems when we have
@@ -58,23 +58,23 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
cmenu->insertItem(i18n("&Window"), m, DMM_MDI_ID, 4);
cmenu->setAccel(Key_M, DMM_MDI_ID);
- QPopupMenu *sm = new QPopupMenu(t, "settings" );
+ TQPopupMenu *sm = new TQPopupMenu(t, "settings" );
KToggleAction *showmenu = KStdAction::showMenubar( 0, 0, t->actionCollection() );
showmenu->plug( sm );
- connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) );
+ connect( showmenu, TQT_SIGNAL(toggled(bool)), cmenu, TQT_SLOT(setShown(bool)) );
KSelectAction *selectTabbar = new KSelectAction(i18n("&Tab Bar"), 0, this, "tabbar" );
- QStringList tabbaritems;
+ TQStringList tabbaritems;
tabbaritems << i18n("&Top") << i18n("&Bottom");
selectTabbar->setItems(tabbaritems);
selectTabbar->setCurrentItem(1);
selectTabbar->plug( sm );
- connect( selectTabbar, SIGNAL(activated(int)), this, SLOT(setTabPosition(int)) );
+ connect( selectTabbar, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTabPosition(int)) );
KToggleAction *showfull = KStdAction::fullScreen( 0, 0, t->actionCollection(), t );
showfull->plug( sm );
- connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) );
+ connect( showfull, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFullScreen(bool)) );
cmenu->insertItem( i18n("&Settings"), sm, -1, 5 );
}
@@ -82,7 +82,7 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
topLevel()->show();
}
-void DisplayMgrMDI::removeTopLevel(QWidget *w )
+void DisplayMgrMDI::removeTopLevel(TQWidget *w )
{
if ( !m_topLevel )
return;
@@ -106,7 +106,7 @@ void DisplayMgrMDI::removeTopLevel(QWidget *w )
}
}
-void DisplayMgrMDI::show(QWidget *w)
+void DisplayMgrMDI::show(TQWidget *w)
{
if ( !m_topLevel )
return;
@@ -115,7 +115,7 @@ void DisplayMgrMDI::show(QWidget *w)
m_topLevel->show();
}
-void DisplayMgrMDI::hide(QWidget *w)
+void DisplayMgrMDI::hide(TQWidget *w)
{
if ( !m_topLevel )
return;
@@ -126,7 +126,7 @@ void DisplayMgrMDI::hide(QWidget *w)
}
}
-void DisplayMgrMDI::raise(QWidget *w, bool takefocus)
+void DisplayMgrMDI::raise(TQWidget *w, bool takefocus)
{
assert( m_topLevel );
if(takefocus){
@@ -145,13 +145,13 @@ void DisplayMgrMDI::raise(QWidget *w, bool takefocus)
}
-void DisplayMgrMDI::setCaption(QWidget *w, const QString& cap)
+void DisplayMgrMDI::setCaption(TQWidget *w, const TQString& cap)
{
assert( m_topLevel );
w->setCaption(cap);
- QString esc = cap;
+ TQString esc = cap;
esc.replace("&", "&&");
kdDebug(5008) << "Set caption: " << esc << endl;
@@ -178,8 +178,8 @@ void DisplayMgrMDI::reparentReq()
{
kdDebug(5008) << "got reparent" << endl;
- QWidget *o = kapp->focusWidget();
- QWidget *s;
+ TQWidget *o = kapp->focusWidget();
+ TQWidget *s;
if(o == NULL){
kdDebug(5008) << "Kapp says no widget has focus!" << endl;
@@ -192,7 +192,7 @@ void DisplayMgrMDI::reparentReq()
}
else {
- kdDebug(5008) << "QWidget is: " << o->className() << " name: " << o->name("none give") << endl;
+ kdDebug(5008) << "TQWidget is: " << o->className() << " name: " << o->name("none give") << endl;
s = o;
@@ -206,24 +206,24 @@ void DisplayMgrMDI::reparentReq()
}
-// QWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach
+// TQWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach
if(s){
KMainWindow *kst = static_cast<KMainWindow *>(s);
kdDebug(5008) << "Top is: " << kst->name("none give") <<endl;
- QMenuData *tmenu = kst->menuBar();
+ TQMenuData *tmenu = kst->menuBar();
if(tmenu){
- QMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
+ TQMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
if(menui){
- QMenuData *cmenu = menui->popup();
+ TQMenuData *cmenu = menui->popup();
if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){
- kst->reparent( topLevel()->tabWidget(), 0, QPoint( 0, 0 ), true );
+ kst->reparent( topLevel()->tabWidget(), 0, TQPoint( 0, 0 ), true );
show(kst);
cmenu->setItemChecked(DMM_DEATCH_ID, false);
}
else {
hide(kst);
- kst->reparent( 0, QPoint(0,0), true );
+ kst->reparent( 0, TQPoint(0,0), true );
cmenu->setItemChecked(DMM_DEATCH_ID, true);
}
}
@@ -239,8 +239,8 @@ MDITopLevel *DisplayMgrMDI::topLevel()
m_topLevel->show();
KAccel *a = new KAccel( m_topLevel );
- a->insert( "cycle left", i18n("Cycle left"), QString::null, ALT+Key_Left, ALT+Key_Left, this, SLOT(slotCycleTabsLeft()) );
- a->insert( "cycle right", i18n("Cycle right"), QString::null, ALT+Key_Right, ALT+Key_Right, this, SLOT(slotCycleTabsRight()) );
+ a->insert( "cycle left", i18n("Cycle left"), TQString::null, ALT+Key_Left, ALT+Key_Left, this, TQT_SLOT(slotCycleTabsLeft()) );
+ a->insert( "cycle right", i18n("Cycle right"), TQString::null, ALT+Key_Right, ALT+Key_Right, this, TQT_SLOT(slotCycleTabsRight()) );
}
return m_topLevel;
@@ -250,10 +250,10 @@ void DisplayMgrMDI::setTabPosition( int idx ) {
switch ( idx ) {
case 0:
- m_topLevel->tabWidget()->setTabPosition(QTabWidget::Top);
+ m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Top);
break;
case 1:
- m_topLevel->tabWidget()->setTabPosition(QTabWidget::Bottom);
+ m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Bottom);
break;
}
}
@@ -282,7 +282,7 @@ void DisplayMgrMDI::moveWindow(int step)
return;
}
- QWidget *w = m_topLevel->tabWidget()->currentPage();
+ TQWidget *w = m_topLevel->tabWidget()->currentPage();
if(w != 0x0){
int index = m_topLevel->tabWidget()->currentPageIndex();
index += step;
@@ -294,7 +294,7 @@ void DisplayMgrMDI::moveWindow(int step)
m_topLevel->setUpdatesEnabled(false);
m_topLevel->hideWidget(w);
int space = w->caption().find(" ");
- QString esc = space < 1 ? w->caption():w->caption().left(space);
+ TQString esc = space < 1 ? w->caption():w->caption().left(space);
esc.replace("&", "&&");
kdDebug(5008) << "Insert tab: " << esc << endl;
m_topLevel->tabWidget()->insertTab( w, esc, index );
diff --git a/ksirc/displayMgrMDI.h b/ksirc/displayMgrMDI.h
index 81528421..84e17631 100644
--- a/ksirc/displayMgrMDI.h
+++ b/ksirc/displayMgrMDI.h
@@ -4,21 +4,21 @@
#include "displayMgr.h"
#include "mditoplevel.h"
-class DisplayMgrMDI : public QObject, public DisplayMgr
+class DisplayMgrMDI : public TQObject, public DisplayMgr
{
Q_OBJECT
public:
DisplayMgrMDI();
virtual ~DisplayMgrMDI();
- virtual void newTopLevel(QWidget *, bool show = FALSE);
- virtual void removeTopLevel(QWidget *);
+ virtual void newTopLevel(TQWidget *, bool show = FALSE);
+ virtual void removeTopLevel(TQWidget *);
- virtual void show(QWidget *);
- virtual void hide(QWidget *);
- virtual void raise(QWidget *, bool takefocus = false);
+ virtual void show(TQWidget *);
+ virtual void hide(TQWidget *);
+ virtual void raise(TQWidget *, bool takefocus = false);
- virtual void setCaption(QWidget *, const QString&);
+ virtual void setCaption(TQWidget *, const TQString&);
public slots:
virtual void slotCycleTabsLeft();
@@ -38,9 +38,9 @@ protected:
private:
MDITopLevel *topLevel();
- QGuardedPtr<MDITopLevel> m_topLevel;
+ TQGuardedPtr<MDITopLevel> m_topLevel;
int m_moveRightTab, m_moveLeftTab;
- QPopupMenu *m_popupWindows;
+ TQPopupMenu *m_popupWindows;
};
diff --git a/ksirc/displayMgrSDI.cpp b/ksirc/displayMgrSDI.cpp
index ee5de75b..5b59f815 100644
--- a/ksirc/displayMgrSDI.cpp
+++ b/ksirc/displayMgrSDI.cpp
@@ -1,6 +1,6 @@
#include "displayMgrSDI.h"
-#include <qwidget.h>
+#include <tqwidget.h>
DisplayMgrSDI::DisplayMgrSDI()
{
@@ -9,23 +9,23 @@ DisplayMgrSDI::DisplayMgrSDI()
DisplayMgrSDI::~DisplayMgrSDI(){
}
-void DisplayMgrSDI::newTopLevel(QWidget *w, bool show){
+void DisplayMgrSDI::newTopLevel(TQWidget *w, bool show){
if(show == TRUE)
w->show();
}
-void DisplayMgrSDI::removeTopLevel(QWidget *){
+void DisplayMgrSDI::removeTopLevel(TQWidget *){
}
-void DisplayMgrSDI::show(QWidget *w){
+void DisplayMgrSDI::show(TQWidget *w){
w->show();
}
-void DisplayMgrSDI::hide(QWidget *w){
+void DisplayMgrSDI::hide(TQWidget *w){
w->hide();
}
-void DisplayMgrSDI::raise(QWidget *w, bool takefocus){
+void DisplayMgrSDI::raise(TQWidget *w, bool takefocus){
w->show();
w->raise();
if(takefocus)
@@ -34,7 +34,7 @@ void DisplayMgrSDI::raise(QWidget *w, bool takefocus){
}
-void DisplayMgrSDI::setCaption(QWidget *w, const QString& cap){
+void DisplayMgrSDI::setCaption(TQWidget *w, const TQString& cap){
w->setCaption(cap);
}
diff --git a/ksirc/displayMgrSDI.h b/ksirc/displayMgrSDI.h
index 04bf21fe..02ac88aa 100644
--- a/ksirc/displayMgrSDI.h
+++ b/ksirc/displayMgrSDI.h
@@ -8,14 +8,14 @@ public:
DisplayMgrSDI();
virtual ~DisplayMgrSDI();
- virtual void newTopLevel(QWidget *, bool show = FALSE);
- virtual void removeTopLevel(QWidget *);
+ virtual void newTopLevel(TQWidget *, bool show = FALSE);
+ virtual void removeTopLevel(TQWidget *);
- virtual void show(QWidget *);
- virtual void hide(QWidget *);
- virtual void raise(QWidget *, bool takefocus = false);
+ virtual void show(TQWidget *);
+ virtual void hide(TQWidget *);
+ virtual void raise(TQWidget *, bool takefocus = false);
- virtual void setCaption(QWidget *, const QString&);
+ virtual void setCaption(TQWidget *, const TQString&);
private:
};
diff --git a/ksirc/dockservercontroller.cpp b/ksirc/dockservercontroller.cpp
index f83f5ada..6053e5ab 100644
--- a/ksirc/dockservercontroller.cpp
+++ b/ksirc/dockservercontroller.cpp
@@ -9,12 +9,12 @@
#include "dockservercontroller.h"
-#include <qpopupmenu.h>
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qcursor.h>
+#include <tqpopupmenu.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
#include <kpassivepopup.h>
#include <kpopupmenu.h>
#include <klocale.h>
@@ -42,7 +42,7 @@
extern DisplayMgr *displayMgr;
-dscNickInfo::dscNickInfo(QString nick, QString server) :
+dscNickInfo::dscNickInfo(TQString nick, TQString server) :
m_nick(nick),
m_server(server)
{
@@ -53,7 +53,7 @@ dscNickInfo::~dscNickInfo()
}
-dockServerController::dockServerController(servercontroller *sc, QWidget *parent, const char *_name)
+dockServerController::dockServerController(servercontroller *sc, TQWidget *parent, const char *_name)
: KSystemTray(parent, _name),
m_sc(sc)
{
@@ -63,24 +63,24 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent
pop->setName("dockServerController_menu_pop");
#ifndef NDEBUG
- pop->insertItem(i18n("Dump Object Tree"), sc, SLOT(dump_obj()));
- pop->insertItem(i18n("Server Debug Window"), sc, SLOT(server_debug()));
+ pop->insertItem(i18n("Dump Object Tree"), sc, TQT_SLOT(dump_obj()));
+ pop->insertItem(i18n("Server Debug Window"), sc, TQT_SLOT(server_debug()));
pop->insertSeparator();
#endif
pop->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."),
- m_sc, SLOT(filter_rule_editor()));
+ m_sc, TQT_SLOT(filter_rule_editor()));
- KStdAction::preferences(m_sc, SLOT(general_prefs()),
+ KStdAction::preferences(m_sc, TQT_SLOT(general_prefs()),
m_sc->actionCollection())->plug(pop);
- KStdAction::configureNotifications(m_sc, SLOT(notification_prefs()), actionCollection())->plug(pop);
+ KStdAction::configureNotifications(m_sc, TQT_SLOT(notification_prefs()), actionCollection())->plug(pop);
pop->insertSeparator();
pop->insertItem(i18n("New &Server..."),
- m_sc, SLOT(new_connection()));
- pop->insertItem(i18n("&Do Autoconnect..."), m_sc, SLOT(start_autoconnect_check()));
- connect(this, SIGNAL(quitSelected()), m_sc, SLOT(endksirc()));
+ m_sc, TQT_SLOT(new_connection()));
+ pop->insertItem(i18n("&Do Autoconnect..."), m_sc, TQT_SLOT(start_autoconnect_check()));
+ connect(this, TQT_SIGNAL(quitSelected()), m_sc, TQT_SLOT(endksirc()));
#if KDE_IS_VERSION(3,1,92)
m_pic_dock = KSystemTray::loadIcon( "ksirc" );
@@ -96,8 +96,8 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent
m_mainPopVisible = false;
createMainPopup();
- m_blinkTimer = new QTimer( this );
- connect( m_blinkTimer, SIGNAL(timeout()), this, SLOT( blinkDockedIcon() ) );
+ m_blinkTimer = new TQTimer( this );
+ connect( m_blinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( blinkDockedIcon() ) );
m_blinkStatus = false;
m_blinkActive = false;
@@ -107,14 +107,14 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent
i18n("If someone said your nick in a window, this action "
"will make that window active for you."),
ALT+CTRL+Key_A, KKey::QtWIN+CTRL+Key_A, this,
- SLOT(raiseLastActiveWindow()));
+ TQT_SLOT(raiseLastActiveWindow()));
servercontroller::self()
->getGlobalAccel()
->insert("Clear Blink", i18n("Clear Blinking Dock Icon"),
i18n("If the dock icon is blinking, but you don't want "
"to go to the window this will clear the blinking."),
ALT+CTRL+Key_Down, KKey::QtWIN+CTRL+Key_Down, this,
- SLOT(blinkClear()));
+ TQT_SLOT(blinkClear()));
// mainPop = new KPopupMenu(this, "dockServerController_main_pop");
// mainPop->setTitle(i18n("KSirc Dock Menu"));
@@ -130,7 +130,7 @@ kdDebug(5008) << "~dockServerController in" << endl;
kdDebug(5008) << "~dockServerController out" << endl;
}
-int dockServerController::intoPopupSorted(QString str, QPopupMenu *what)
+int dockServerController::intoPopupSorted(TQString str, TQPopupMenu *what)
{
uint i = 0;
@@ -161,15 +161,15 @@ void dockServerController::createMainPopup()
if(mainPop)
delete mainPop;
mainPop = new KPopupMenu(this, "dockservercontrller_main_pop");
- connect(mainPop, SIGNAL(activated(int)),
- this, SLOT(mainActivated(int)));
- connect(mainPop, SIGNAL(aboutToShow()),
- this, SLOT(mainPopShow()));
- connect(mainPop, SIGNAL(aboutToHide()),
- this, SLOT(mainPopHide()));
+ connect(mainPop, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(mainActivated(int)));
+ connect(mainPop, TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(mainPopShow()));
+ connect(mainPop, TQT_SIGNAL(aboutToHide()),
+ this, TQT_SLOT(mainPopHide()));
- QDictIterator<dscNickInfo> it( m_nicks );
+ TQDictIterator<dscNickInfo> it( m_nicks );
for( ; it.current(); ++it){
KPopupMenu *sub = new KPopupMenu(mainPop);
if(it.current()->status() == dscNickInfo::isOnline){
@@ -187,8 +187,8 @@ void dockServerController::createMainPopup()
sub->setItemParameter(cid, id);
sub->setItemParameter(wid, id);
sub->setItemParameter(dcid, id);
- connect(sub, SIGNAL(activated(int)),
- this, SLOT(subItemActivated(int)));
+ connect(sub, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(subItemActivated(int)));
}
else {
sub->insertItem(i18n("Went Offline: ") + it.current()->offline().toString("hh:mm"));
@@ -201,40 +201,40 @@ void dockServerController::createMainPopup()
}
if(m_blink_reason.count() > 0){
mainPop->insertSeparator();
- for ( QStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) {
+ for ( TQStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) {
mainPop->insertItem(*it);
}
}
if(mainPop->count() == 0){
- mainPop->insertItem(i18n("Help on Notify Popup..."), this, SLOT(helpNotice()));
- mainPop->insertItem(i18n("Configure Notify..."), this, SLOT(configNotify()));
+ mainPop->insertItem(i18n("Help on Notify Popup..."), this, TQT_SLOT(helpNotice()));
+ mainPop->insertItem(i18n("Configure Notify..."), this, TQT_SLOT(configNotify()));
}
}
void dockServerController::subItemActivated(int sub_id)
{
- const QPopupMenu *sub = dynamic_cast<const QPopupMenu *>(sender());
+ const TQPopupMenu *sub = dynamic_cast<const TQPopupMenu *>(sender());
if(!sub){
- kdDebug(5008) << "subItemActivated by non QPopupMenu" << endl;
+ kdDebug(5008) << "subItemActivated by non TQPopupMenu" << endl;
return;
}
int main_id = sub->itemParameter(sub_id);
- QString mainText = mainPop->text(main_id);
+ TQString mainText = mainPop->text(main_id);
if(mainText.isNull()){
kdDebug(5008) << "failed to get mainPop text" << endl;
}
- QRegExp rx("(\\S+) -> (\\S+) ");
+ TQRegExp rx("(\\S+) -> (\\S+) ");
if(rx.search(mainText) >= 0){
- QString mserver = rx.cap(1);
- QString mnick = rx.cap(2);
+ TQString mserver = rx.cap(1);
+ TQString mnick = rx.cap(2);
- QString ns = mserver + "/" + mnick;
+ TQString ns = mserver + "/" + mnick;
if(m_nicks[ns]){
kdDebug(5008) << "Got " << sub->text(sub_id) << " request for " << ns << endl;
- QString cmd = sub->text(sub_id);
- QString server = m_nicks[ns]->server();
- QString nick = m_nicks[ns]->nick();
+ TQString cmd = sub->text(sub_id);
+ TQString server = m_nicks[ns]->server();
+ TQString nick = m_nicks[ns]->nick();
if(cmd == i18n("Chat")){
servercontroller::self()->new_toplevel(KSircChannel(server, nick));
@@ -259,7 +259,7 @@ void dockServerController::subItemActivated(int sub_id)
}
-void dockServerController::mousePressEvent( QMouseEvent *e )
+void dockServerController::mousePressEvent( TQMouseEvent *e )
{
if(e->button() == LeftButton){
showPopupMenu(mainPop);
@@ -269,39 +269,39 @@ void dockServerController::mousePressEvent( QMouseEvent *e )
}
}
-void dockServerController::showPopupMenu( QPopupMenu *menu )
+void dockServerController::showPopupMenu( TQPopupMenu *menu )
{
Q_ASSERT( menu != 0L );
- menu->popup(QCursor::pos());
+ menu->popup(TQCursor::pos());
}
-void dockServerController::nickOnline(QString server, QString nick)
+void dockServerController::nickOnline(TQString server, TQString nick)
{
- QString sn = server + "/" + nick;
+ TQString sn = server + "/" + nick;
if(!m_nicks[sn])
m_nicks.insert(sn, new dscNickInfo(nick, server));
m_nicks[sn]->setOnline();
createMainPopup();
}
-void dockServerController::nickOffline(QString server, QString nick)
+void dockServerController::nickOffline(TQString server, TQString nick)
{
- QString sn = server + "/" + nick;
+ TQString sn = server + "/" + nick;
if(!m_nicks[sn])
m_nicks.insert(sn, new dscNickInfo(nick, server));
m_nicks[sn]->setOffline();
createMainPopup();
}
-void dockServerController::serverOpen(QString)
+void dockServerController::serverOpen(TQString)
{
}
-void dockServerController::serverClose(QString server)
+void dockServerController::serverClose(TQString server)
{
- QDictIterator<dscNickInfo> it( m_nicks );
+ TQDictIterator<dscNickInfo> it( m_nicks );
while(it.current()){
if(it.current()->server() == server)
m_nicks.remove(it.currentKey());
@@ -311,7 +311,7 @@ void dockServerController::serverClose(QString server)
createMainPopup();
}
-void dockServerController::startBlink(const QString& reason, const QString& text)
+void dockServerController::startBlink(const TQString& reason, const TQString& text)
{
if(m_blinkActive == false){
// change icon (to "someone's talking to you" icon)
@@ -321,12 +321,12 @@ void dockServerController::startBlink(const QString& reason, const QString& text
m_blinkTimer->start( 500 ); // half a second
}
if(!reason.isNull()){
- QString br(reason);
+ TQString br(reason);
if(text.isNull() && ksopts->runDocked && ksopts->dockPopups)
- KPassivePopup::message(QString("Notify: %1").arg(reason), this);
+ KPassivePopup::message(TQString("Notify: %1").arg(reason), this);
else {
- QStringList sl;
- QString cutup = text;
+ TQStringList sl;
+ TQString cutup = text;
int i = 0;
br = reason + " " + text.left(50);
if(text.length() > 50)
@@ -338,16 +338,16 @@ void dockServerController::startBlink(const QString& reason, const QString& text
cutup = sl.join("\n");
cutup.truncate(cutup.length()-1);
if(ksopts->runDocked && ksopts->dockPopups)
- KPassivePopup::message(QString("%1").arg(reason), cutup, this);
+ KPassivePopup::message(TQString("%1").arg(reason), cutup, this);
}
m_blink_reason.append(br);
createMainPopup();
kdDebug(5008) << "Blink reason: " << br << endl;
- QRegExp rx("(\\S+) -> (\\S+)");
+ TQRegExp rx("(\\S+) -> (\\S+)");
if(rx.search(reason) >= 0){
- QString server = rx.cap(1);
- QString nick = rx.cap(2);
+ TQString server = rx.cap(1);
+ TQString nick = rx.cap(2);
m_last_server = server;
m_last_nick = nick;
@@ -355,7 +355,7 @@ void dockServerController::startBlink(const QString& reason, const QString& text
}
}
-void dockServerController::stopBlink(const QString& reason, bool clear)
+void dockServerController::stopBlink(const TQString& reason, bool clear)
{
if(clear == true){
m_blinkActive = false;
@@ -377,10 +377,10 @@ void dockServerController::blinkClear()
void dockServerController::mainActivated(int id)
{
- QRegExp rx("(\\S+) -> (\\S+) ");
+ TQRegExp rx("(\\S+) -> (\\S+) ");
if(rx.search(mainPop->text(id)) >= 0){
- QString server = rx.cap(1);
- QString nick = rx.cap(2);
+ TQString server = rx.cap(1);
+ TQString nick = rx.cap(2);
raiseWindow(server, nick);
@@ -421,8 +421,8 @@ void dockServerController::helpNotice()
void dockServerController::configNotify()
{
KSPrefs *kp = new KSPrefs();
- connect(kp, SIGNAL(update(int)),
- m_sc, SLOT(configChange()));
+ connect(kp, TQT_SIGNAL(update(int)),
+ m_sc, TQT_SLOT(configChange()));
kp->resize(550, 450);
kp->showPage(2); /* Show auto connect page */
kp->show();
@@ -430,13 +430,13 @@ void dockServerController::configNotify()
}
-void dockServerController::raiseWindow(QString server, QString name)
+void dockServerController::raiseWindow(TQString server, TQString name)
{
- QCString txt = server.utf8() + "_" + name.utf8() + "_toplevel";
- QWidget *obj = dynamic_cast<QWidget *>( objFinder::find(txt, "KSircTopLevel"));
+ TQCString txt = server.utf8() + "_" + name.utf8() + "_toplevel";
+ TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel"));
if(obj == 0x0){
txt = server.utf8() + "_!" + name.utf8() + "_toplevel";
- obj = dynamic_cast<QWidget *>( objFinder::find(txt, "KSircTopLevel"));
+ obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel"));
}
if(obj != 0x0){
diff --git a/ksirc/dockservercontroller.h b/ksirc/dockservercontroller.h
index 5c5bdb59..605c9ad5 100644
--- a/ksirc/dockservercontroller.h
+++ b/ksirc/dockservercontroller.h
@@ -3,11 +3,11 @@
#define dockservercontroller_included
#include <ksystemtray.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
class QPopupMenu;
class QWidget;
@@ -19,7 +19,7 @@ class QTimer;
class dscNickInfo
{
public:
- dscNickInfo(QString nick, QString server);
+ dscNickInfo(TQString nick, TQString server);
~dscNickInfo();
enum status {
@@ -27,24 +27,24 @@ public:
isOffline
};
- QString nick() { return m_nick; }
- QString server() { return m_server; }
+ TQString nick() { return m_nick; }
+ TQString server() { return m_server; }
- void setOnline() { m_status = isOnline; m_online = QTime::currentTime(); }
- const QTime &online() { return m_online; }
+ void setOnline() { m_status = isOnline; m_online = TQTime::currentTime(); }
+ const TQTime &online() { return m_online; }
- void setOffline() { m_status = isOffline; m_offline = QTime::currentTime(); }
- const QTime offline() { return m_offline; }
+ void setOffline() { m_status = isOffline; m_offline = TQTime::currentTime(); }
+ const TQTime offline() { return m_offline; }
void setStatus(enum status stat) { m_status = stat; }
enum status status() { return m_status; }
private:
- QString m_nick;
- QString m_server;
+ TQString m_nick;
+ TQString m_server;
enum status m_status;
- QTime m_online;
- QTime m_offline;
+ TQTime m_online;
+ TQTime m_offline;
};
@@ -52,21 +52,21 @@ class dockServerController : public KSystemTray
{
Q_OBJECT
public:
- dockServerController(servercontroller *_sc, QWidget *parent = 0x0, const char *_name = 0x0);
+ dockServerController(servercontroller *_sc, TQWidget *parent = 0x0, const char *_name = 0x0);
~dockServerController();
- void startBlink(const QString& reason = QString::null, const QString& text = QString::null);
- void stopBlink(const QString& reason = QString::null, bool clear = false);
+ void startBlink(const TQString& reason = TQString::null, const TQString& text = TQString::null);
+ void stopBlink(const TQString& reason = TQString::null, bool clear = false);
- void nickOnline(QString server, QString nick);
- void nickOffline(QString server, QString nick);
+ void nickOnline(TQString server, TQString nick);
+ void nickOffline(TQString server, TQString nick);
- void serverOpen(QString server);
- void serverClose(QString server);
+ void serverOpen(TQString server);
+ void serverClose(TQString server);
protected:
- void mousePressEvent( QMouseEvent *);
- virtual void showPopupMenu( QPopupMenu *);
+ void mousePressEvent( TQMouseEvent *);
+ virtual void showPopupMenu( TQPopupMenu *);
public slots:
void raiseLastActiveWindow();
@@ -83,26 +83,26 @@ protected slots:
void mainPopHide();
private:
- int intoPopupSorted(QString, QPopupMenu *);
+ int intoPopupSorted(TQString, TQPopupMenu *);
void createMainPopup();
- void raiseWindow(QString server, QString name);
- QDict<dscNickInfo> m_nicks;
+ void raiseWindow(TQString server, TQString name);
+ TQDict<dscNickInfo> m_nicks;
servercontroller *m_sc;
KPopupMenu *mainPop;
- QString m_last_nick;
- QString m_last_server;
+ TQString m_last_nick;
+ TQString m_last_server;
- QPixmap m_pic_dock;
- QPixmap m_pic_info;
+ TQPixmap m_pic_dock;
+ TQPixmap m_pic_info;
bool m_mainPopVisible;
bool m_blinkActive;
bool m_blinkStatus; // true: blue icon, false: normal icon
- QTimer* m_blinkTimer;
+ TQTimer* m_blinkTimer;
- QStringList m_blink_reason;
+ TQStringList m_blink_reason;
};
diff --git a/ksirc/ioBroadcast.cpp b/ksirc/ioBroadcast.cpp
index 9bac4e30..b36e4420 100644
--- a/ksirc/ioBroadcast.cpp
+++ b/ksirc/ioBroadcast.cpp
@@ -12,7 +12,7 @@
Implementation:
- Make a QDictIterator, iterate over the windows sedning to each
+ Make a TQDictIterator, iterate over the windows sedning to each
broadcaster that's not itself.
*** NOTE! don't have 2 broadcasters or else they'll broadcast forever!
@@ -27,10 +27,10 @@ KSircIOBroadcast::~KSircIOBroadcast()
{
}
-void KSircIOBroadcast::sirc_receive(QCString str, bool)
+void KSircIOBroadcast::sirc_receive(TQCString str, bool)
{
- QDictIterator<KSircMessageReceiver> it(proc->getWindowList());
+ TQDictIterator<KSircMessageReceiver> it(proc->getWindowList());
KSircMessageReceiver *dflt = (proc->getWindowList())["!default"];
if(dflt->getBroadcast() == TRUE)
@@ -46,10 +46,10 @@ void KSircIOBroadcast::sirc_receive(QCString str, bool)
}
-void KSircIOBroadcast::control_message(int command, QString str)
+void KSircIOBroadcast::control_message(int command, TQString str)
{
- QDictIterator<KSircMessageReceiver> it(proc->getWindowList());
+ TQDictIterator<KSircMessageReceiver> it(proc->getWindowList());
it.toFirst();
diff --git a/ksirc/ioBroadcast.h b/ksirc/ioBroadcast.h
index 5be56390..9bb33ff9 100644
--- a/ksirc/ioBroadcast.h
+++ b/ksirc/ioBroadcast.h
@@ -13,8 +13,8 @@ public:
}
virtual ~KSircIOBroadcast();
- virtual void sirc_receive(QCString str, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void sirc_receive(TQCString str, bool broadcast);
+ virtual void control_message(int, TQString);
virtual filterRuleList *defaultRules();
diff --git a/ksirc/ioDCC.cpp b/ksirc/ioDCC.cpp
index 7c576904..ff2d5022 100644
--- a/ksirc/ioDCC.cpp
+++ b/ksirc/ioDCC.cpp
@@ -17,12 +17,12 @@
#include <klocale.h>
#include <kpassivepopup.h>
-#include <qregexp.h>
+#include <tqregexp.h>
extern DisplayMgr *displayMgr;
KSircIODCC::KSircIODCC(KSircProcess *_proc) :
- QObject(),
+ TQObject(),
KSircMessageReceiver(_proc)
{
proc = _proc;
@@ -31,11 +31,11 @@ KSircIODCC::KSircIODCC(KSircProcess *_proc) :
displayMgr->newTopLevel(mgr, FALSE);
displayMgr->setCaption(mgr, proc->serverName() + i18n(" DCC Controller"));
- connect(mgr->mgr(), SIGNAL(dccConnectClicked(dccItem *)), this, SLOT(dccConnectClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccResumeClicked(dccItem *)), this, SLOT(dccResumeClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccRenameClicked(dccItem *)), this, SLOT(dccRenameClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccAbortClicked(dccItem *)), this, SLOT(dccAbortClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(outputLine(QCString)), this, SIGNAL(outputLine(QCString)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccConnectClicked(dccItem *)), this, TQT_SLOT(dccConnectClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccResumeClicked(dccItem *)), this, TQT_SLOT(dccResumeClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccRenameClicked(dccItem *)), this, TQT_SLOT(dccRenameClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccAbortClicked(dccItem *)), this, TQT_SLOT(dccAbortClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(outputLine(TQCString)), this, TQT_SIGNAL(outputLine(TQCString)));
}
@@ -46,7 +46,7 @@ KSircIODCC::~KSircIODCC()
delete (dccTopLevel *) mgr;
}
-void KSircIODCC::sirc_receive(QCString str, bool )
+void KSircIODCC::sirc_receive(TQCString str, bool )
{
if(!mgr)
return;
@@ -59,9 +59,9 @@ void KSircIODCC::sirc_receive(QCString str, bool )
// once in a long long time (compared to the byte messages) so if it takes
// a few extra clock cycles to find them, who cares?
if(str.find("DCC GET read:", 0) != -1){ /*fold01*/
- QRegExp rx("read: (.+) who: (.+) bytes: (.*)");
+ TQRegExp rx("read: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
- QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
+ TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
uint bytesXfer = rx.cap(3).toUInt();
//
@@ -74,9 +74,9 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND write:", 0) != -1){ /*fold01*/
- QRegExp rx("write: (.+) who: (.+) bytes: (.*)");
+ TQRegExp rx("write: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
- QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
+ TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
uint bytesXfer = rx.cap(3).toUInt();
if(DCCSendItems[key]){
@@ -85,12 +85,12 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)");
+ TQRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString size = rx.cap(3);
- QString ip = rx.cap(4);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString size = rx.cap(3);
+ TQString ip = rx.cap(4);
//QSTring port = rx.cap(5);
int fileSize = size.toInt(); // Bytes per step
@@ -99,25 +99,25 @@ void KSircIODCC::sirc_receive(QCString str, bool )
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newGetItem(filename, who, dccItem::dccGotOffer, fileSize);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
it->setWhoPostfix("(" + ip + ")");
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
/*
* don't add duplicates, this cuases real headaches
* for both us and the user.
*/
- QString renamed;
+ TQString renamed;
dccItem *old = DCCGetItems.take(key);
int i;
for(i = 0; i <= (int) DCCGetItems.count()+1; i++){
- renamed = QString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who());
+ renamed = TQString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who());
if( DCCGetItems[renamed] == 0x0)
break;
}
- old->changeFilename(QString("%1 (finished %2)").arg(filename).arg(i+1));
+ old->changeFilename(TQString("%1 (finished %2)").arg(filename).arg(i+1));
DCCGetItems.insert(renamed, it);
}
@@ -128,18 +128,18 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("Sent DCC SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) size: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) size: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString size = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString size = rx.cap(3);
int fileSize = size.toInt(); // Bytes per step
fileSize /= 1024;
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newSendItem(filename, who, dccItem::dccSentOffer, fileSize);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
/*
* don't add duplicates, this cuases real headaches
@@ -147,15 +147,15 @@ void KSircIODCC::sirc_receive(QCString str, bool )
* We can get these on repeated sends or old files,
* just renamed them, their finished anyways
*/
- QString renamed;
+ TQString renamed;
dccItem *old = DCCSendItems.take(key);
int i;
for(i = 0; i <= (int) DCCSendItems.count()+1; i++){
- renamed = QString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who());
+ renamed = TQString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who());
if( DCCSendItems[renamed] == 0x0)
break;
}
- old->changeFilename(QString("%1 (sent %2)").arg(filename).arg(i+1));
+ old->changeFilename(TQString("%1 (sent %2)").arg(filename).arg(i+1));
DCCSendItems.insert(renamed, it);
}
DCCSendItems.insert(key, it);
@@ -165,16 +165,16 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) ip: (.+) port: (.+)");
+ TQRegExp rx("who: (.+) ip: (.+) port: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString ip = rx.cap(2);
- QString port = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString ip = rx.cap(2);
+ TQString port = rx.cap(3);
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccGotOffer);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
it->setWhoPostfix("(" + ip + ")");
DCCChatItems.insert(who, it);
}
@@ -183,15 +183,15 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccSentOffer);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
DCCChatItems.insert(who, it);
}
else {
@@ -199,11 +199,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND terminated") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
enum dccItem::dccStatus status = dccItem::dccDone;
if(error == "CLOSE"){
@@ -213,7 +213,7 @@ void KSircIODCC::sirc_receive(QCString str, bool )
status = dccItem::dccError;
KPassivePopup::message(i18n("DCC SEND with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr());
}
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
kdDebug(5008) << "SendPercent: " << DCCSendItems[key]->getPercent() << endl;
if((status == dccItem::dccDone) && (DCCSendItems[key]->getPercent() < 100))
@@ -224,18 +224,18 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
else if(str.find ("DCC GET terminated") != -1){ /*fold01*/
kdDebug(5008) << "Term: " << str << endl;
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
enum dccItem::dccStatus status = dccItem::dccDone;
if(error != "OK"){
status = dccItem::dccError;
KPassivePopup::message(i18n("DCC GET with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr());
}
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
kdDebug(5008) << "GetPercent: " << DCCGetItems[key]->getPercent() << endl;
if((status == dccItem::dccDone) && (DCCGetItems[key]->getPercent() < 100))
@@ -248,11 +248,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC GET resumed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
dccItem *it = DCCGetItems[key];
kdDebug(5008) << "Got DCC GET resumed message..." << it->file() << endl;
@@ -263,34 +263,34 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND resumed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
DCCSendItems[key]->changeStatus(dccItem::dccResumed);
}
}
}
else if(str.find("DCC GET established") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccRecving);
}
}
}
else if(str.find("DCC SEND established") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+) ip: (\\S+)");
+ TQRegExp rx("who: (.+) file: (.+) ip: (\\S+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString ip = rx.cap(3);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString ip = rx.cap(3);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
DCCSendItems[key]->setWhoPostfix("(" + ip + ")");
DCCSendItems[key]->changeStatus(dccItem::dccSending);
@@ -298,34 +298,34 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT established") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccOpen);
- proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower()));
+ proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower()));
}
}
}
else if(str.find("DCC CHAT inbound established") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) ip: (.+)");
+ TQRegExp rx("who: (.+) ip: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString ip = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString ip = rx.cap(2);
if(DCCChatItems[who]){
DCCChatItems[who]->setWhoPostfix("(" + ip + ")");
DCCChatItems[who]->changeStatus(dccItem::dccOpen);
- proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower()));
+ proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower()));
}
}
}
else if(str.find("DCC GET failed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccError);
}
@@ -333,10 +333,10 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT failed") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString error = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString error = rx.cap(2);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccError);
}
@@ -344,59 +344,59 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT renamed") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) to: (.+)");
+ TQRegExp rx("who: (.+) to: (.+)");
if(rx.search(str)){
- QString oldwho = rx.cap(1);
- QString newwho = rx.cap(2);
+ TQString oldwho = rx.cap(1);
+ TQString newwho = rx.cap(2);
- QString oldwin = "=" + oldwho;
+ TQString oldwin = "=" + oldwho;
if(proc->getWindowList().find(oldwin)){
- proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,QString("=" +newwho).lower());
+ proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower());
}
}
}
else if(str.find("Closing DCC GET") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccCancel);
}
}
}
// else if(str.find("Closing DCC SEND") != -1){ /*FOLD01*/
-// QRegExp rx("who: (.+) file: (.+)");
+// TQRegExp rx("who: (.+) file: (.+)");
// if(rx.search(str)){
-// QString who = rx.cap(1);
-// QString filename = rx.cap(2);
-// QString key = QString("%1/%2").arg(filename).arg(who);
+// TQString who = rx.cap(1);
+// TQString filename = rx.cap(2);
+// TQString key = TQString("%1/%2").arg(filename).arg(who);
// if(DCCSendItems[key]){
// DCCSendItems[key]->changeStatus(dccItem::dccCancel);
// }
// }
// }
else if(str.find("Closing DCC CHAT") != -1){ /*fold01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccDone);
}
}
}
else if(str.find("No DCC SEND") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
- //QString key = QString("%1/%2").arg(filename).arg(who);
+ //TQString key = TQString("%1/%2").arg(filename).arg(who);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCSendItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCSendItems );
for(;it.current(); ++it){
if((it.current()->who() == who) &&
(it.current()->file() == filename)
@@ -413,14 +413,14 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("No DCC GET") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCGetItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCGetItems );
for(;it.current(); ++it){
if((it.current()->who() == who) &&
(it.current()->file() == filename)
@@ -437,13 +437,13 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("No DCC CHAT") != -1){ /*fold01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCChatItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCChatItems );
for(;it.current(); ++it){
if(it.current()->who() == who){
toDel.append(it.current());
@@ -463,11 +463,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
-void KSircIODCC::control_message(int, QString)
+void KSircIODCC::control_message(int, TQString)
{
}
-void KSircIODCC::cancelTransfer(QString filename)
+void KSircIODCC::cancelTransfer(TQString filename)
{
//if(DlgList[filename]){
//emit outputLine(DCCStatus[filename]->cancelMessage.ascii());
@@ -481,17 +481,17 @@ void KSircIODCC::cancelTransfer(QString filename)
void KSircIODCC::getFile()
{
/*
- QString text = pending->fileListing()->text(pending->fileListing()->currentItem());
+ TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
int pos = text.find(" ", 0);
- QString nick = text.mid(0, pos);
+ TQString nick = text.mid(0, pos);
pos = text.find(" ", pos+1) + 1;
- QString filename = text.mid(pos, text.length() - pos);
+ TQString filename = text.mid(pos, text.length() - pos);
//if(DlgList[filename]->isVisible() == FALSE)
// DlgList[filename]->show();
- QString command = "/dcc get " + nick + " " + filename + "\n";
+ TQString command = "/dcc get " + nick + " " + filename + "\n";
emit outputLine(command.ascii());
for(uint i = 0; i < pending->fileListing()->count(); i++)
- if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
+ if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
pending->fileListing()->removeItem(i);
if(pending->fileListing()->count() == 0)
@@ -502,15 +502,15 @@ void KSircIODCC::getFile()
void KSircIODCC::forgetFile()
{
/*
- QString text = pending->fileListing()->text(pending->fileListing()->currentItem());
+ TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
int pos = text.find(" ", 0);
- QString nick = text.mid(0, pos);
+ TQString nick = text.mid(0, pos);
pos = text.find(" ", pos+1) + 1;
- QString filename = text.mid(pos, text.length() - pos);
- QString command = "/dcc close get " + nick + " " + filename + "\n";
+ TQString filename = text.mid(pos, text.length() - pos);
+ TQString command = "/dcc close get " + nick + " " + filename + "\n";
emit outputLine(command.ascii());
for(uint i = 0; i < pending->fileListing()->count(); i++)
- if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
+ if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
pending->fileListing()->removeItem(i);
if(pending->fileListing()->count() == 0)
@@ -539,7 +539,7 @@ filterRuleList *KSircIODCC::defaultRules()
void KSircIODCC::dccConnectClicked(dccItem *it)
{
- QString str;
+ TQString str;
kdDebug(5008) << "Got connect click on " << it->who() << " " << it->type() << endl;
switch(it->type()){
case dccItem::dccGet:
@@ -557,7 +557,7 @@ void KSircIODCC::dccConnectClicked(dccItem *it)
}
void KSircIODCC::dccResumeClicked(dccItem *it)
{
- QString str;
+ TQString str;
kdDebug(5008) << "Got resume click on " << it->who() << " " << it->type() << endl;
switch(it->type()){
case dccItem::dccGet:
@@ -576,17 +576,17 @@ void KSircIODCC::dccRenameClicked(dccItem *it)
}
void KSircIODCC::dccAbortClicked(dccItem *it)
{
- QString str;
+ TQString str;
switch(it->status()){
case dccItem::dccDone:
case dccItem::dccCancel:
case dccItem::dccError:
switch(it->type()) {
case dccItem::dccGet:
- DCCGetItems.remove(QString("%1/%2").arg(it->file()).arg(it->who()));
+ DCCGetItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who()));
break;
case dccItem::dccSend:
- DCCSendItems.remove(QString("%1/%2").arg(it->file()).arg(it->who()));
+ DCCSendItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who()));
break;
case dccItem::dccChat:
DCCChatItems.remove(it->who());
@@ -612,14 +612,14 @@ void KSircIODCC::dccAbortClicked(dccItem *it)
}
}
-void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile)
+void KSircIODCC::dccRenameDone(dccItem *it, TQString oldWho, TQString oldFile)
{
if(it->type() == dccItem::dccGet){
- QString str = QString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file());
- QString key = QString("%1/%2").arg(oldFile).arg(oldWho);
+ TQString str = TQString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file());
+ TQString key = TQString("%1/%2").arg(oldFile).arg(oldWho);
if(DCCGetItems[key]){
DCCGetItems.take(key);
- QString newkey = QString("%1/%2").arg(it->file()).arg(it->who());
+ TQString newkey = TQString("%1/%2").arg(it->file()).arg(it->who());
DCCGetItems.insert(newkey, it);
}
emit outputLine(str.ascii());
@@ -629,7 +629,7 @@ void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile)
DCCChatItems.take(oldWho);
DCCChatItems.insert(it->who(), it);
}
- QString str = QString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who());
+ TQString str = TQString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who());
emit outputLine(str.ascii());
}
diff --git a/ksirc/ioDCC.h b/ksirc/ioDCC.h
index 76a93941..a9768f29 100644
--- a/ksirc/ioDCC.h
+++ b/ksirc/ioDCC.h
@@ -1,9 +1,9 @@
#ifndef KIODCCC_H
#define KIODCCC_H
-#include <qdict.h>
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include "dccManager.h"
#include "dccToplevel.h"
@@ -12,14 +12,14 @@
class KSProgress;
struct DCCInfo {
- QString nick;
- QString cancelMessage;
+ TQString nick;
+ TQString cancelMessage;
int LastSize;
int PercentSize;
bool inProgress;
};
-class KSircIODCC : public QObject,
+class KSircIODCC : public TQObject,
public KSircMessageReceiver
{
Q_OBJECT
@@ -27,14 +27,14 @@ public:
KSircIODCC(KSircProcess *_proc);
virtual ~KSircIODCC();
- virtual void sirc_receive(QCString, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void sirc_receive(TQCString, bool broadcast);
+ virtual void control_message(int, TQString);
virtual filterRuleList *defaultRules();
virtual void showMgr();
protected slots:
- void cancelTransfer(QString);
+ void cancelTransfer(TQString);
void getFile();
void forgetFile();
@@ -43,21 +43,21 @@ protected slots:
void dccRenameClicked(dccItem *);
void dccAbortClicked(dccItem *);
- void dccRenameDone(dccItem *, QString, QString);
+ void dccRenameDone(dccItem *, TQString, TQString);
signals:
- void outputLine(QCString);
+ void outputLine(TQCString);
private:
-// QDict<QProgressDialog> DlgList;
- //QDict<KSProgress> DlgList;
- //QDict<DCCInfo> DCCStatus;
- QDict<dccItem> DCCGetItems;
- QDict<dccItem> DCCSendItems;
- QDict<dccItem> DCCChatItems;
+// TQDict<TQProgressDialog> DlgList;
+ //TQDict<KSProgress> DlgList;
+ //TQDict<DCCInfo> DCCStatus;
+ TQDict<dccItem> DCCGetItems;
+ TQDict<dccItem> DCCSendItems;
+ TQDict<dccItem> DCCChatItems;
//dccDialog *pending;
- QGuardedPtr<dccTopLevel> mgr;
+ TQGuardedPtr<dccTopLevel> mgr;
KSircProcess *proc;
};
diff --git a/ksirc/ioDiscard.cpp b/ksirc/ioDiscard.cpp
index 7ce4173e..6210d615 100644
--- a/ksirc/ioDiscard.cpp
+++ b/ksirc/ioDiscard.cpp
@@ -14,10 +14,10 @@ KSircIODiscard::~KSircIODiscard()
{
}
-void KSircIODiscard::sirc_receive(QCString, bool)
+void KSircIODiscard::sirc_receive(TQCString, bool)
{
}
-void KSircIODiscard::control_message(int, QString)
+void KSircIODiscard::control_message(int, TQString)
{
}
diff --git a/ksirc/ioDiscard.h b/ksirc/ioDiscard.h
index e15c62da..4c4df665 100644
--- a/ksirc/ioDiscard.h
+++ b/ksirc/ioDiscard.h
@@ -11,8 +11,8 @@ public:
}
virtual ~KSircIODiscard();
- virtual void sirc_receive(QCString, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void sirc_receive(TQCString, bool broadcast);
+ virtual void control_message(int, TQString);
private:
};
diff --git a/ksirc/ioLAG.cpp b/ksirc/ioLAG.cpp
index 50f3f082..0a1a2ec7 100644
--- a/ksirc/ioLAG.cpp
+++ b/ksirc/ioLAG.cpp
@@ -13,7 +13,7 @@
#include <kdebug.h>
KSircIOLAG::KSircIOLAG(KSircProcess *_proc)
- : QObject(),
+ : TQObject(),
KSircMessageReceiver(_proc)
{
proc = _proc;
@@ -29,7 +29,7 @@ KSircIOLAG::~KSircIOLAG()
killTimers();
}
-void KSircIOLAG::sirc_receive(QCString str, bool)
+void KSircIOLAG::sirc_receive(TQCString str, bool)
{
if(str.contains("*L*")){
@@ -40,7 +40,7 @@ void KSircIOLAG::sirc_receive(QCString str, bool)
kdDebug(5008) << "Lag mesage broken: " << str << endl;
return;
}
- QString lag = str.mid(s1, s2 - s1);
+ TQString lag = str.mid(s1, s2 - s1);
// cerr << "Lag: " << str << endl;
// cerr << "Setting lag to: " << lag << endl;
(proc->getWindowList())["!all"]->control_message(SET_LAG, lag);
@@ -48,13 +48,13 @@ void KSircIOLAG::sirc_receive(QCString str, bool)
}
-void KSircIOLAG::control_message(int, QString)
+void KSircIOLAG::control_message(int, TQString)
{
}
-void KSircIOLAG::timerEvent ( QTimerEvent * )
+void KSircIOLAG::timerEvent ( TQTimerEvent * )
{
- QCString cmd = "/lag\n";
+ TQCString cmd = "/lag\n";
emit outputLine(cmd);
}
diff --git a/ksirc/ioLAG.h b/ksirc/ioLAG.h
index 1c3bc00d..6fc99901 100644
--- a/ksirc/ioLAG.h
+++ b/ksirc/ioLAG.h
@@ -1,11 +1,11 @@
#ifndef KIOLAG_H
#define KIOLAG_H
-#include <qobject.h>
+#include <tqobject.h>
#include "messageReceiver.h"
-class KSircIOLAG : public QObject,
+class KSircIOLAG : public TQObject,
public KSircMessageReceiver
{
Q_OBJECT
@@ -13,16 +13,16 @@ public:
KSircIOLAG(KSircProcess *_proc);
virtual ~KSircIOLAG();
- virtual void sirc_receive(QCString, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void sirc_receive(TQCString, bool broadcast);
+ virtual void control_message(int, TQString);
protected slots:
protected:
- virtual void timerEvent ( QTimerEvent * );
+ virtual void timerEvent ( TQTimerEvent * );
signals:
- void outputLine(QCString);
+ void outputLine(TQCString);
private:
KSircProcess *proc;
diff --git a/ksirc/ioNotify.cpp b/ksirc/ioNotify.cpp
index 14c6e9e8..b3b4a52f 100644
--- a/ksirc/ioNotify.cpp
+++ b/ksirc/ioNotify.cpp
@@ -12,7 +12,7 @@
#include <kdebug.h>
KSircIONotify::KSircIONotify(KSircProcess *_proc)
- : QObject(),
+ : TQObject(),
KSircMessageReceiver(_proc)
{
proc = _proc;
@@ -24,7 +24,7 @@ KSircIONotify::~KSircIONotify()
{
}
-void KSircIONotify::sirc_receive(QCString str, bool)
+void KSircIONotify::sirc_receive(TQCString str, bool)
{
if(str.contains("*)*")){
int s1, s2;
@@ -34,7 +34,7 @@ void KSircIONotify::sirc_receive(QCString str, bool)
kdDebug(5008) << "Nick Notify mesage broken: " << str << endl;
return;
}
- QString nick = str.mid(s1, s2 - s1);
+ TQString nick = str.mid(s1, s2 - s1);
emit notify_online(nick);
}
else if(str.contains("*(*")){
@@ -45,7 +45,7 @@ void KSircIONotify::sirc_receive(QCString str, bool)
kdDebug(5008) << "Nick Notify mesage broken: " << str << endl;
return;
}
- QString nick = str.mid(s1, s2 - s1);
+ TQString nick = str.mid(s1, s2 - s1);
emit notify_offline(nick);
}
else{
@@ -54,7 +54,7 @@ void KSircIONotify::sirc_receive(QCString str, bool)
}
}
-void KSircIONotify::control_message(int, QString)
+void KSircIONotify::control_message(int, TQString)
{
}
diff --git a/ksirc/ioNotify.h b/ksirc/ioNotify.h
index e95edabe..b5a9890e 100644
--- a/ksirc/ioNotify.h
+++ b/ksirc/ioNotify.h
@@ -1,11 +1,11 @@
#ifndef KIONOTIFY_H
#define KIONOTIFY_H
-#include <qobject.h>
+#include <tqobject.h>
#include "messageReceiver.h"
-class KSircIONotify : public QObject,
+class KSircIONotify : public TQObject,
public KSircMessageReceiver
{
Q_OBJECT
@@ -13,14 +13,14 @@ public:
KSircIONotify(KSircProcess *_proc);
virtual ~KSircIONotify();
- virtual void sirc_receive(QCString, bool broadcast);
- virtual void control_message(int, QString);
+ virtual void sirc_receive(TQCString, bool broadcast);
+ virtual void control_message(int, TQString);
virtual filterRuleList *defaultRules();
signals:
- virtual void notify_online(QString);
- virtual void notify_offline(QString);
+ virtual void notify_online(TQString);
+ virtual void notify_offline(TQString);
protected slots:
diff --git a/ksirc/iocontroller.cpp b/ksirc/iocontroller.cpp
index 61b0b49c..d63fba7b 100644
--- a/ksirc/iocontroller.cpp
+++ b/ksirc/iocontroller.cpp
@@ -54,9 +54,9 @@
- Should be called for stderr data, not connected, does
nothing.
- stdin_write(QString):
+ stdin_write(TQString):
- Slot that get's connected to by KSircProcess to each
- window. QString shold be written un touched! Let the
+ window. TQString shold be written un touched! Let the
writter figure out what ever he wants to do.
sircDied:
@@ -74,11 +74,11 @@
#include "messageReceiver.h"
#include "ksopts.h"
-#include <qlistbox.h>
-#include <qtextcodec.h>
+#include <tqlistbox.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kglobal.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -89,7 +89,7 @@
int KSircIOController::counter = 0;
KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc)
- : QObject()
+ : TQObject()
{
counter++;
@@ -103,20 +103,20 @@ KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc)
// Connect the data arrived
// to sirc receive for adding
// the main text window
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, SLOT(stdout_read(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, TQT_SLOT(stdout_read(KProcess*, char*, int)));
// Connect the stderr data
// to sirc receive for adding
// the main text window
- connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(stderr_read(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(stderr_read(KProcess*, char*, int)));
- connect(proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(sircDied(KProcess *)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(sircDied(KProcess *)));
// Notify on sirc dying
- connect(proc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(procCTS(KProcess*)));
+ connect(proc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(procCTS(KProcess*)));
proc_CTS = TRUE;
#if 0
showDebugTraffic(true);
@@ -175,12 +175,12 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
*/
int pos,pos2,pos3;
- QCString name, line;
+ TQCString name, line;
assert(_buffer != 0);
assert(buflen > 0);
- QCString buffer(_buffer, buflen+1);
+ TQCString buffer(_buffer, buflen+1);
//fprintf(stderr, "first print: \n");
//my_print(buffer);
//kdDebug(5008) << "<-- read: " << buffer << endl;
@@ -229,7 +229,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
line = buffer.mid(pos, pos2 - pos);
if(m_debugLB){
- QString s = QString::fromUtf8(line);
+ TQString s = TQString::fromUtf8(line);
m_debugLB->insertItem(s);
}
@@ -243,9 +243,9 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
line.remove(0, pos3+1);
}
}
- QString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding );
- QTextCodec *qtc = KGlobal::charsets()->codecForName( enc );
- QString qsname = qtc->toUnicode(name);
+ TQString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding );
+ TQTextCodec *qtc = KGlobal::charsets()->codecForName( enc );
+ TQString qsname = qtc->toUnicode(name);
/*
char *b = qstrdup(line);
kdDebug(5008) << "----------------------------------------" << endl;
@@ -302,7 +302,7 @@ void KSircIOController::stderr_read(KProcess *p, char *b, int l)
stdout_read(p, b, l);
}
-void KSircIOController::stdin_write(QCString s)
+void KSircIOController::stdin_write(TQCString s)
{
if (!proc->isRunning())
{
@@ -328,7 +328,7 @@ void KSircIOController::stdin_write(QCString s)
}
else{
if(m_debugLB){
- QString s = QString::fromUtf8(buffer);
+ TQString s = TQString::fromUtf8(buffer);
m_debugLB->insertItem(s);
m_debugLB->setContentsPos( 0, m_debugLB->contentsHeight());
}
@@ -351,7 +351,7 @@ void KSircIOController::sircDied(KProcess *process)
kdDebug(5008) << "IOController: KProcess died!\n";
ksircproc->TopList["!all"]->sirc_receive("*E* DSIRC IS DEAD");
ksircproc->TopList["!all"]->sirc_receive("*E* KSIRC WINDOW HALTED");
- ksircproc->TopList["!all"]->sirc_receive( QCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + QCString( "\n" ) );
+ ksircproc->TopList["!all"]->sirc_receive( TQCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + TQCString( "\n" ) );
ksircproc->TopList["!all"]->sirc_receive("*E* DID YOU READ THE INSTALL INTRUCTIONS?");
}
@@ -361,30 +361,30 @@ void KSircIOController::procCTS ( KProcess *)
delete[] send_buf;
send_buf = 0x0;
if(!buffer.isEmpty()){
- QCString str = "";
+ TQCString str = "";
stdin_write(str);
}
}
-void KSircIOController::showContextMenuOnDebugWindow(QListBoxItem *, const QPoint &pos)
+void KSircIOController::showContextMenuOnDebugWindow(TQListBoxItem *, const TQPoint &pos)
{
if (!m_debugLB)
return;
- QPopupMenu popup(m_debugLB);
+ TQPopupMenu popup(m_debugLB);
popup.insertItem("Save Contents to File...", 1);
if (popup.exec( pos ) != 1)
return;
- QString path = KFileDialog::getSaveFileName();
+ TQString path = KFileDialog::getSaveFileName();
if (path.isEmpty())
return;
- QFile file(path);
+ TQFile file(path);
if (!file.open(IO_WriteOnly))
return;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
for (uint i = 0; i < m_debugLB->count(); ++i)
stream << m_debugLB->text(i) << endl;
@@ -394,11 +394,11 @@ void KSircIOController::showDebugTraffic(bool show)
{
kdDebug(5008) << "Got show request: " << show << endl;
if(m_debugLB == 0 && show == true){
- m_debugLB = new QListBox(0x0, QCString(this->name()) + "_debugWindow");
+ m_debugLB = new TQListBox(0x0, TQCString(this->name()) + "_debugWindow");
m_debugLB->resize(600, 300);
m_debugLB->show();
- connect(m_debugLB,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)),
- this,SLOT(showContextMenuOnDebugWindow(QListBoxItem *,const QPoint &)));
+ connect(m_debugLB,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)),
+ this,TQT_SLOT(showContextMenuOnDebugWindow(TQListBoxItem *,const TQPoint &)));
}
else if(m_debugLB != 0 && show == false){
delete m_debugLB;
@@ -415,7 +415,7 @@ bool KSircIOController::isDebugTraffic()
return false;
}
-void KSircIOController::appendDebug(QString s)
+void KSircIOController::appendDebug(TQString s)
{
if(m_debugLB){
m_debugLB->insertItem(s);
diff --git a/ksirc/iocontroller.h b/ksirc/iocontroller.h
index 76c97e18..2e7e79f6 100644
--- a/ksirc/iocontroller.h
+++ b/ksirc/iocontroller.h
@@ -1,7 +1,7 @@
#ifndef IOCONTROL_H
#define IOCONTROL_H
-#include <qobject.h>
+#include <tqobject.h>
class KProcess;
class KSircProcess;
@@ -24,31 +24,31 @@ public slots:
virtual void stdout_read(KProcess *proc, char *_buffer, int buflen);
virtual void stderr_read(KProcess *proc, char *_buffer, int buflen);
- virtual void stdin_write(QCString);
+ virtual void stdin_write(TQCString);
virtual void sircDied(KProcess *);
- virtual void appendDebug(QString);
+ virtual void appendDebug(TQString);
protected slots:
virtual void procCTS(KProcess *);
private slots:
- void showContextMenuOnDebugWindow( QListBoxItem *, const QPoint &pos );
+ void showContextMenuOnDebugWindow( TQListBoxItem *, const TQPoint &pos );
private:
- QCString holder;
+ TQCString holder;
bool proc_CTS;
KProcess *proc;
KSircProcess *ksircproc;
char *send_buf;
- QCString buffer;
+ TQCString buffer;
static int counter;
- QListBox *m_debugLB;
+ TQListBox *m_debugLB;
};
#endif
diff --git a/ksirc/ksirc.cpp b/ksirc/ksirc.cpp
index eddb450a..88abb6d6 100644
--- a/ksirc/ksirc.cpp
+++ b/ksirc/ksirc.cpp
@@ -15,7 +15,7 @@
#include <stdlib.h>
-#include <qsessionmanager.h>
+#include <tqsessionmanager.h>
#include <kuniqueapplication.h>
#include <kaboutdata.h>
@@ -32,8 +32,8 @@
static const char description[] =
I18N_NOOP("KDE IRC client");
-//QDict<KSircTopLevel> TopList;
-//QDict<KSircMessageReceiver> TopList;
+//TQDict<KSircTopLevel> TopList;
+//TQDict<KSircMessageReceiver> TopList;
class KCmdLineOptions options[] =
{
@@ -58,8 +58,8 @@ public:
// if the controller is hidden KMWSessionManaged won't send the fake close event.
// we want it in any way however.
if ( controller->isHidden() ) {
- QCloseEvent e;
- QApplication::sendEvent( controller, &e );
+ TQCloseEvent e;
+ TQApplication::sendEvent( controller, &e );
}
return true;
@@ -110,16 +110,16 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QCString nickName = args->getOption( "nick" );
- QCString server = args->getOption( "server" );
- QCString channel = args->getOption( "channel" );
+ TQCString nickName = args->getOption( "nick" );
+ TQCString server = args->getOption( "server" );
+ TQCString channel = args->getOption( "channel" );
if ( !nickName.isEmpty() )
ksopts->server["global"].nick = nickName;
if ( !server.isEmpty() ) {
- QString ser = QString::fromLocal8Bit( server );
- QString port = "6667";
+ TQString ser = TQString::fromLocal8Bit( server );
+ TQString port = "6667";
if(ser.contains(":")){
port = ser.section(":", 1, 1);
ser = ser.section(":", 0, 0);
@@ -127,9 +127,9 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
KSircServer kss(ser, port, "", "", false);
sc->new_ksircprocess( kss );
if ( !channel.isEmpty() ) {
- QStringList channels = QStringList::split( ',', QString::fromLocal8Bit( channel ) );
- QStringList::ConstIterator it = channels.begin();
- QStringList::ConstIterator end = channels.end();
+ TQStringList channels = TQStringList::split( ',', TQString::fromLocal8Bit( channel ) );
+ TQStringList::ConstIterator it = channels.begin();
+ TQStringList::ConstIterator end = channels.end();
for ( ; it != end; ++it ) {
sc->new_toplevel( KSircChannel(ser, *it), true );
}
diff --git a/ksirc/ksircchannel.h b/ksirc/ksircchannel.h
index 1913b530..a70f0ef6 100644
--- a/ksirc/ksircchannel.h
+++ b/ksirc/ksircchannel.h
@@ -1,34 +1,34 @@
#ifndef KSIRCCHANNEL_H
#define KSIRCCHANNEL_H
-#include <qstring.h>
+#include <tqstring.h>
class KSircChannel
{
public:
- KSircChannel( const QString server,
- const QString channel,
- const QString key = QString::null,
- const QString encoding = QString::null
+ KSircChannel( const TQString server,
+ const TQString channel,
+ const TQString key = TQString::null,
+ const TQString encoding = TQString::null
) :
m_server(server), m_channel(channel),
m_key(key), m_encoding(encoding) {}
- const QString server() const { return m_server; }
- const QString channel() const { return m_channel; }
- const QString key() const { return m_key; }
- const QString encoding() const { return m_encoding; }
+ const TQString server() const { return m_server; }
+ const TQString channel() const { return m_channel; }
+ const TQString key() const { return m_key; }
+ const TQString encoding() const { return m_encoding; }
- void setChannel(QString channel) { m_channel = channel; }
- void setKey(QString key) { m_key = key; }
- void setEncoding(QString encoding) { m_encoding = encoding; }
+ void setChannel(TQString channel) { m_channel = channel; }
+ void setKey(TQString key) { m_key = key; }
+ void setEncoding(TQString encoding) { m_encoding = encoding; }
private:
- const QString m_server; /* channels can never change server */
- QString m_channel;
- QString m_key;
- QString m_encoding;
+ const TQString m_server; /* channels can never change server */
+ TQString m_channel;
+ TQString m_key;
+ TQString m_encoding;
};
diff --git a/ksirc/ksircprocess.cpp b/ksirc/ksircprocess.cpp
index 1fff6807..26dbc8c7 100644
--- a/ksirc/ksircprocess.cpp
+++ b/ksirc/ksircprocess.cpp
@@ -15,7 +15,7 @@
server: is the name of the server to connect to. It must be
provided or else start sirc will barf. :(
parent: parent window, this _should_ be null
- name: name, passed to QObject...
+ name: name, passed to TQObject...
~KSirProcess:
kill the sirc process, and iocontrollller, emit delete_toplevel
@@ -105,7 +105,7 @@
#include <stdlib.h>
#include <time.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -117,8 +117,8 @@
extern DisplayMgr *displayMgr;
-KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * parent, const char * name )
- : QObject(parent, name), m_kss(kss), m_serverid(server_id)
+KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * parent, const char * name )
+ : TQObject(parent, name), m_kss(kss), m_serverid(server_id)
{
proc = new KProcess();
@@ -130,7 +130,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
//server = qstrdup(kss.server());
- QDict<KSircMessageReceiver> nTopList(17, FALSE);
+ TQDict<KSircMessageReceiver> nTopList(17, FALSE);
TopList = nTopList;
// TopList.setAutoDelete(TRUE)
@@ -140,7 +140,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
ksopts->serverSetup(kss);
// Setup the environment for KSirc
- QString qsNick, qsRealname, qsUserID, qsAltNick;
+ TQString qsNick, qsRealname, qsUserID, qsAltNick;
KConfig *kConfig = kapp->config();
kConfig->setGroup("StartUp");
qsNick = ksopts->serv(kss).nick;
@@ -168,7 +168,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
proc->setEnvironment("SIRCLIB", KGlobal::dirs()->findResourceDir("appdata", "ksirc.pl"));
proc->setEnvironment("SIRCWAIT", "1");
- QString env = locate("appdata", "ksircrc");
+ TQString env = locate("appdata", "ksircrc");
if (!env.isEmpty())
proc->setEnvironment("SIRCRC", env);
env = locate("appdata", "ksircrc.pl");
@@ -178,7 +178,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
// Setup the proc now, so iocontroller can use it. It's latter
// though. started bellow though.
- proc->setName(QCString(name) + "_kprocess");
+ proc->setName(TQCString(name) + "_kprocess");
objFinder::insert(proc);
// insertChild(proc);
@@ -187,7 +187,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
// Fixes 47157.
proc->setEnvironment( "SIRCSERVER", "[" + kss.server() + "]:" + kss.port() + ":" + kss.password());
- QString sslopt;
+ TQString sslopt;
if(kss.usessl())
sslopt = "-S";
*proc << "perl" << KGlobal::dirs()->findExe("dsirc") << "-8" << "-r" << sslopt;
@@ -195,7 +195,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
// Finally start the iocontroller.
iocontrol = new KSircIOController(proc, this);
- iocontrol->setName(QCString(name) + "_iocontrol");
+ iocontrol->setName(TQCString(name) + "_iocontrol");
// Create toplevel before iocontroller so it has somewhere to write stuff.
@@ -215,22 +215,22 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
KSircIODCC *dcc = new KSircIODCC(this);
TopList.insert("!dcc", dcc);
dcc = static_cast<KSircIODCC *>( TopList["!dcc"] ); // g++ bug
- connect(dcc, SIGNAL(outputLine(QCString)),
- iocontrol, SLOT(stdin_write(QCString)));
+ connect(dcc, TQT_SIGNAL(outputLine(TQCString)),
+ iocontrol, TQT_SLOT(stdin_write(TQCString)));
KSircIOLAG *lag = new KSircIOLAG(this);
TopList.insert("!lag", lag);
lag = static_cast<KSircIOLAG*>( TopList["!lag"] ); // g++ bug!
- connect(lag, SIGNAL(outputLine(QCString)),
- iocontrol, SLOT(stdin_write(QCString)));
+ connect(lag, TQT_SIGNAL(outputLine(TQCString)),
+ iocontrol, TQT_SLOT(stdin_write(TQCString)));
KSircIONotify *notify = new KSircIONotify(this);
TopList.insert("!notify", notify);
notify = static_cast<KSircIONotify *>( TopList["!notify"] ); // g++ bug
- connect(notify, SIGNAL(notify_online(QString)),
- this, SLOT(notify_forw_online(QString)));
- connect(notify, SIGNAL(notify_offline(QString)),
- this, SLOT(notify_forw_offline(QString)));
+ connect(notify, TQT_SIGNAL(notify_online(TQString)),
+ this, TQT_SLOT(notify_forw_online(TQString)));
+ connect(notify, TQT_SIGNAL(notify_offline(TQString)),
+ this, TQT_SLOT(notify_forw_offline(TQString)));
TopList.insert("!base_rules", new KSMBaseRules(this));
@@ -239,10 +239,10 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare
proc->start(KProcess::NotifyOnExit, KProcess::All);
// Intial commands to load ASAP.
// turn on sirc ssfe mode
- QCString command = "/eval $ssfe=1\n";
+ TQCString command = "/eval $ssfe=1\n";
iocontrol->stdin_write(command);
- command = "/eval $version .= \"+KSIRC/" + QCString(KSIRC_VERSION) + "\"\n";
+ command = "/eval $version .= \"+KSIRC/" + TQCString(KSIRC_VERSION) + "\"\n";
iocontrol->stdin_write(command);
command = "/load " + locate("appdata", "filters.pl").local8Bit() + "\n";
iocontrol->stdin_write(command);
@@ -279,11 +279,11 @@ KSircProcess::~KSircProcess()
cleanup();
}
-QPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const
+TQPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const
{
- QPtrList<KSircMessageReceiver> res;
+ TQPtrList<KSircMessageReceiver> res;
res.setAutoDelete( false );
- QDictIterator<KSircMessageReceiver> it( TopList );
+ TQDictIterator<KSircMessageReceiver> it( TopList );
for (; it.current(); ++it )
if ( it.currentKey() != "!default" &&
it.currentKey() != "!no_channel" )
@@ -291,7 +291,7 @@ QPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const
return res;
}
-const QDict<KSircMessageReceiver> &KSircProcess::mrList() const
+const TQDict<KSircMessageReceiver> &KSircProcess::mrList() const
{
return TopList;
}
@@ -305,12 +305,12 @@ void KSircProcess::cleanup()
TopList.setAutoDelete(true);
TopList.clear();
- emit ProcMessage(m_serverid, ProcCommand::procClose, QString());
+ emit ProcMessage(m_serverid, ProcCommand::procClose, TQString());
// Do closing down commands, this should release all puke widgets
#if 0
dsirc does this on SIGTERM (malte)
- QString quit_cmd = "/eval &dohooks(\"quit\");\n";
+ TQString quit_cmd = "/eval &dohooks(\"quit\");\n";
proc->writeStdin(quit_cmd.ascii(), quit_cmd.length());
sleep(1);
#endif
@@ -358,7 +358,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
i18n("Flood Warning"), i18n("Turn Off"), i18n("Keep Enabled"));
switch(res) {
case KMessageBox::Yes:
- emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString());
+ emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString());
}
last_window_open = current_time;
number_open = 0;
@@ -383,20 +383,20 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
// Connect needed signals. For a message window we never want it
// becomming the default so we ignore focusIn events into it.
- connect(wm, SIGNAL(outputLine(QCString)),
- iocontrol, SLOT(stdin_write(QCString)));
- connect(wm, SIGNAL(open_toplevel(const KSircChannel &)),
- this,SLOT(new_toplevel (const KSircChannel &)));
- connect(wm, SIGNAL(closing(KSircTopLevel *, QString)),
- this,SLOT(close_toplevel(KSircTopLevel *, QString)));
- connect(wm, SIGNAL(currentWindow(KSircTopLevel *)),
- this,SLOT(default_window(KSircTopLevel *)));
- connect(wm, SIGNAL(changeChannel(const QString &, const QString &)),
- this,SLOT(recvChangeChannel(const QString &, const QString &)));
- connect(wm, SIGNAL(destroyed(QObject *)),
- this,SLOT(clean_toplevel(QObject *)));
- connect( wm, SIGNAL( requestQuit( const QCString& ) ),
- SLOT( request_quit( const QCString& ) ) );
+ connect(wm, TQT_SIGNAL(outputLine(TQCString)),
+ iocontrol, TQT_SLOT(stdin_write(TQCString)));
+ connect(wm, TQT_SIGNAL(open_toplevel(const KSircChannel &)),
+ this,TQT_SLOT(new_toplevel (const KSircChannel &)));
+ connect(wm, TQT_SIGNAL(closing(KSircTopLevel *, TQString)),
+ this,TQT_SLOT(close_toplevel(KSircTopLevel *, TQString)));
+ connect(wm, TQT_SIGNAL(currentWindow(KSircTopLevel *)),
+ this,TQT_SLOT(default_window(KSircTopLevel *)));
+ connect(wm, TQT_SIGNAL(changeChannel(const TQString &, const TQString &)),
+ this,TQT_SLOT(recvChangeChannel(const TQString &, const TQString &)));
+ connect(wm, TQT_SIGNAL(destroyed(TQObject *)),
+ this,TQT_SLOT(clean_toplevel(TQObject *)));
+ connect( wm, TQT_SIGNAL( requestQuit( const TQCString& ) ),
+ TQT_SLOT( request_quit( const TQCString& ) ) );
default_window(wm); // Set it to the default window.
emit ProcMessage(serverID(), ProcCommand::addTopLevel, channelInfo.channel());
@@ -407,13 +407,13 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
wm->lineEdit()->setFocus(); // Give focus back to the linee, someone takes it away on new create
}
else {
- QWidget *w = dynamic_cast<QWidget *>(TopList.find(channelInfo.channel()));
+ TQWidget *w = dynamic_cast<TQWidget *>(TopList.find(channelInfo.channel()));
if(w)
displayMgr->raise(w);
}
}
-void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name)
+void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name)
{
if(auto_create_really == TRUE)
turn_on_autocreate();
@@ -423,7 +423,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name)
// the removeTopLevel below also deletes the mditoplevel (in case
// we are using mdi) , which deletes its children, which deletes
// 'wm' , so watch out not to delete twice! (Simon)
- QGuardedPtr<KSircTopLevel> guardedwm = wm;
+ TQGuardedPtr<KSircTopLevel> guardedwm = wm;
// Do this now or we get junk left on the screen
displayMgr->removeTopLevel(wm);
@@ -436,13 +436,13 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name)
// So let's go grab a default, and make sure it's not "!" control
// object.
- QDictIterator<KSircMessageReceiver> it(TopList);
+ TQDictIterator<KSircMessageReceiver> it(TopList);
for(;it.current() && it.currentKey().startsWith("!"); ++it);
if (!it.current())
{
// No top-level windows left.
- QCString command = "/quit\n"; // "/signoff" ?
+ TQCString command = "/quit\n"; // "/signoff" ?
iocontrol->stdin_write(command); // kill sirc
kdDebug(5008) << "KSP closing: " << m_kss.server() << endl;
delete guardedwm;
@@ -456,8 +456,8 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name)
// Let's let em know she's deleted!
if(ksopts->autoCreateWin == TRUE){
- emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString());
- QTimer::singleShot(5000, this, SLOT(turn_on_autocreate()));
+ emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString());
+ TQTimer::singleShot(5000, this, TQT_SLOT(turn_on_autocreate()));
auto_create_really = TRUE;
}
else{
@@ -468,7 +468,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name)
emit ProcMessage(serverID(), ProcCommand::deleteTopLevel, name);
}
-void KSircProcess::clean_toplevel(QObject *clean){
+void KSircProcess::clean_toplevel(TQObject *clean){
if(!clean){
qWarning("Passed null to cleaner!!");
return;
@@ -476,10 +476,10 @@ void KSircProcess::clean_toplevel(QObject *clean){
bool cont = FALSE;
do{
cont = FALSE;
- QDictIterator<KSircMessageReceiver> it(TopList);
+ TQDictIterator<KSircMessageReceiver> it(TopList);
while(it.current() != 0x0){
- if((QObject *)it.current() == clean){
- QString key = it.currentKey();
+ if((TQObject *)it.current() == clean){
+ TQString key = it.currentKey();
while(TopList[key] != 0x0){
TopList.remove(key);
}
@@ -491,22 +491,22 @@ void KSircProcess::clean_toplevel(QObject *clean){
} while(cont == TRUE);
}
-void KSircProcess::request_quit( const QCString& command )
+void KSircProcess::request_quit( const TQCString& command )
{
iocontrol->stdin_write( command );
// Since removing the toplevels will delete the one that emitted this
// signal as well, we need to defer this a little (malte)
- QTimer::singleShot( 0, this, SLOT( do_quit() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( do_quit() ) );
}
void KSircProcess::do_quit()
{
- for ( QDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it )
+ for ( TQDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it )
{
if ( it.currentKey() == "!default" ) continue;
if ( KSircTopLevel* topLevel = dynamic_cast< KSircTopLevel* >( it.current() ) )
{
- QGuardedPtr< KSircTopLevel > guardedTL = topLevel;
+ TQGuardedPtr< KSircTopLevel > guardedTL = topLevel;
displayMgr->removeTopLevel( topLevel );
delete guardedTL;
}
@@ -530,7 +530,7 @@ void KSircProcess::default_window(KSircTopLevel *w)
}
-void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new_chan)
+void KSircProcess::recvChangeChannel(const TQString &old_chan, const TQString &new_chan)
{
//
// Channel changed name, add our own name and off we go.
@@ -551,10 +551,10 @@ void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new
void KSircProcess::filters_update()
{
- QString command, next_part, key, data;
+ TQString command, next_part, key, data;
command = "/crule\n";
iocontrol->stdin_write(command.ascii());
- QDictIterator<KSircMessageReceiver> it(TopList);
+ TQDictIterator<KSircMessageReceiver> it(TopList);
KSircMessageReceiver *cur, *br;
filterRuleList *frl;
filterRule *fr;
@@ -605,17 +605,17 @@ void KSircProcess::filters_update()
}
-void KSircProcess::notify_forw_online(QString nick)
+void KSircProcess::notify_forw_online(TQString nick)
{
emit ProcMessage(serverID(), ProcCommand::nickOnline, nick);
}
-void KSircProcess::notify_forw_offline(QString nick)
+void KSircProcess::notify_forw_offline(TQString nick)
{
emit ProcMessage(serverID(), ProcCommand::nickOffline, nick);
}
-void KSircProcess::ServMessage(QString dst_server, int command, QString args)
+void KSircProcess::ServMessage(TQString dst_server, int command, TQString args)
{
if(dst_server.isEmpty() || (dst_server == serverID())){
switch(command){
@@ -631,13 +631,13 @@ void KSircProcess::ServMessage(QString dst_server, int command, QString args)
void KSircProcess::turn_on_autocreate()
{
- emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, QString());
+ emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, TQString());
auto_create_really = FALSE;
}
-void KSircProcess::setNick(const QString nick)
+void KSircProcess::setNick(const TQString nick)
{
- QString new_nick = nick;
+ TQString new_nick = nick;
while (!new_nick.isEmpty() &&
(new_nick[0].latin1() == '@' || new_nick[0].latin1() == '*'))
new_nick.remove(0, 1);
@@ -653,7 +653,7 @@ void KSircProcess::setNick(const QString nick)
}
-const QString KSircProcess::getNick() const
+const TQString KSircProcess::getNick() const
{
return m_nick;
}
diff --git a/ksirc/ksircprocess.h b/ksirc/ksircprocess.h
index 9a4cf7c3..bf61245a 100644
--- a/ksirc/ksircprocess.h
+++ b/ksirc/ksircprocess.h
@@ -4,8 +4,8 @@
class KSircProcess;
class KSircTopLevel;
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include "iocontroller.h"
#include "ksircserver.h"
@@ -21,45 +21,45 @@ class KSircProcess : public QObject
Q_OBJECT
friend class KSircIOController;
public:
- KSircProcess(QString &server_id, KSircServer &kss, QObject * parent=0, const char * name=0);
+ KSircProcess(TQString &server_id, KSircServer &kss, TQObject * parent=0, const char * name=0);
virtual ~KSircProcess();
- QDict<KSircMessageReceiver> &getWindowList()
+ TQDict<KSircMessageReceiver> &getWindowList()
{
return TopList;
}
- QPtrList<KSircMessageReceiver> messageReceivers() const;
- const QDict<KSircMessageReceiver> &mrList() const;
+ TQPtrList<KSircMessageReceiver> messageReceivers() const;
+ const TQDict<KSircMessageReceiver> &mrList() const;
- QString serverName() const { return m_kss.server(); }
- QString serverPort() const { return m_kss.port(); }
- QString serverID() const { return m_serverid; }
+ TQString serverName() const { return m_kss.server(); }
+ TQString serverPort() const { return m_kss.port(); }
+ TQString serverID() const { return m_serverid; }
KSircIOController *getIOController() { return iocontrol; }
- const QString getNick() const;
- void setNick(const QString nick);
+ const TQString getNick() const;
+ void setNick(const TQString nick);
signals:
- void ProcMessage(QString, int, QString);
+ void ProcMessage(TQString, int, TQString);
public slots:
- virtual void ServMessage(QString server, int command, QString args);
- virtual void close_toplevel(KSircTopLevel *, QString);
+ virtual void ServMessage(TQString server, int command, TQString args);
+ virtual void close_toplevel(KSircTopLevel *, TQString);
virtual void default_window(KSircTopLevel *);
- virtual void recvChangeChannel(const QString &, const QString &);
+ virtual void recvChangeChannel(const TQString &, const TQString &);
virtual void new_toplevel(const KSircChannel &, bool safe = false);
virtual void filters_update();
- virtual void notify_forw_online(QString);
- virtual void notify_forw_offline(QString);
+ virtual void notify_forw_online(TQString);
+ virtual void notify_forw_offline(TQString);
protected slots:
- virtual void clean_toplevel(QObject *clean);
- virtual void request_quit( const QCString& command );
+ virtual void clean_toplevel(TQObject *clean);
+ virtual void request_quit( const TQCString& command );
virtual void do_quit();
virtual void turn_on_autocreate();
@@ -72,19 +72,19 @@ private:
KSircIOController *iocontrol;
KProcess *proc;
- QDict<KSircMessageReceiver> TopList;
+ TQDict<KSircMessageReceiver> TopList;
bool running_window;
bool default_follow_focus;
bool auto_create_really;
KSircServer m_kss;
- const QString m_serverid;
+ const TQString m_serverid;
/*
* m_nick is our nick as reported by the lower levels
*/
- QString m_nick;
+ TQString m_nick;
// char *server;
};
diff --git a/ksirc/ksircserver.h b/ksirc/ksircserver.h
index ec63e1f6..d2d9ab70 100644
--- a/ksirc/ksircserver.h
+++ b/ksirc/ksircserver.h
@@ -1,32 +1,32 @@
#ifndef KSIRCSERVER_H
#define KSIRCSERVER_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KSircServer
{
public:
- KSircServer( const QString &server,
- const QString &port,
- const QString &script = QString::null,
- const QString &password = QString::null,
+ KSircServer( const TQString &server,
+ const TQString &port,
+ const TQString &script = TQString::null,
+ const TQString &password = TQString::null,
bool ssl = false ) :
m_server(server), m_port(port), m_script(script),
m_password(password), m_ssl(ssl) {}
- const QString server() const { return m_server; }
- const QString port() const { return m_port; }
- const QString script() const { return m_script; }
- const QString password() const { return m_password; }
+ const TQString server() const { return m_server; }
+ const TQString port() const { return m_port; }
+ const TQString script() const { return m_script; }
+ const TQString password() const { return m_password; }
bool usessl() const { return m_ssl; }
private:
- const QString m_server;
- const QString m_port;
- const QString m_script;
- const QString m_password;
+ const TQString m_server;
+ const TQString m_port;
+ const TQString m_script;
+ const TQString m_password;
const bool m_ssl;
};
diff --git a/ksirc/ksopts.cpp b/ksirc/ksopts.cpp
index 11b25ad8..b1df2f40 100644
--- a/ksirc/ksopts.cpp
+++ b/ksirc/ksopts.cpp
@@ -41,10 +41,10 @@ KSOGeneral::KSOGeneral()
}
-QPixmap KSOGeneral::backgroundPixmap()
+TQPixmap KSOGeneral::backgroundPixmap()
{
if ( m_backgroundPixmap.isNull() && !backgroundFile.isEmpty() )
- m_backgroundPixmap = QPixmap( backgroundFile );
+ m_backgroundPixmap = TQPixmap( backgroundFile );
return m_backgroundPixmap;
}
@@ -63,9 +63,9 @@ KSOServer::KSOServer()
struct passwd *pw = getpwuid( getuid() );
if ( pw )
{
- nick = QString::fromLocal8Bit( pw->pw_name );
- userID = QString::fromLocal8Bit( pw->pw_name );
- realName = QString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 );
+ nick = TQString::fromLocal8Bit( pw->pw_name );
+ userID = TQString::fromLocal8Bit( pw->pw_name );
+ realName = TQString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 );
}
#endif
}
@@ -89,24 +89,24 @@ KSOColors::KSOColors()
msg1Regex = false;
msg2Regex = false;
- backgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Mid );
- selBackgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Highlight );
- selForegroundColor = kapp->palette().color( QPalette::Active, QColorGroup::HighlightedText );
+ backgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Mid );
+ selBackgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Highlight );
+ selForegroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::HighlightedText );
ircColors[0] = Qt::white;
ircColors[1] = Qt::black;
ircColors[2] = Qt::darkBlue;
ircColors[3] = Qt::darkGreen;
ircColors[4] = Qt::red;
- ircColors[5] = QColor ( 165, 42, 42 );
+ ircColors[5] = TQColor ( 165, 42, 42 );
ircColors[6] = Qt::darkMagenta;
- ircColors[7] = QColor( 255, 0x7b, 00 );
+ ircColors[7] = TQColor( 255, 0x7b, 00 );
ircColors[8] = Qt::yellow;
ircColors[9] = Qt::green;
ircColors[10] = Qt::darkCyan;
ircColors[11] = Qt::cyan;
ircColors[12] = Qt::blue;
- ircColors[13] = QColor( 255, 0, 255 );
+ ircColors[13] = TQColor( 255, 0, 255 );
ircColors[14] = Qt::gray;
ircColors[15] = Qt::lightGray;
@@ -232,17 +232,17 @@ void KSOptions::load( int sections )
colourTheme = conf->readEntry("ColourTheme", colourTheme );
for ( int i = 0; i < 16; ++i ) {
ircColors[i] =
- conf->readColorEntry(QString::fromLatin1( "IRC-%1" ).arg( i ),
+ conf->readColorEntry(TQString::fromLatin1( "IRC-%1" ).arg( i ),
&ircColors[i] );
nickHighlight[i] =
- conf->readBoolEntry(QString::fromLatin1( "nickHighlight-%1" ).arg( i ),
+ conf->readBoolEntry(TQString::fromLatin1( "nickHighlight-%1" ).arg( i ),
&nickHighlight[i] );
}
}
conf->setGroup( "GlobalOptions" );
- QFont df = kapp->font(0);
+ TQFont df = kapp->font(0);
defaultFont = conf->readFontEntry( "MainFont", &df);
- QApplication::setFont( defaultFont, true, "KSirc::TextView" );
+ TQApplication::setFont( defaultFont, true, "KSirc::TextView" );
}
if ( sections & Channels )
{
@@ -254,7 +254,7 @@ void KSOptions::load( int sections )
if(channel.contains("global") == FALSE){
KSOChannel global;
ChannelOpMap coMap;
- channel.insert(QString("global"), coMap);
+ channel.insert(TQString("global"), coMap);
channel["global"].insert("global", global);
channel["global"]["global"].server = "global";
channel["global"]["global"].channel = "global";
@@ -268,16 +268,16 @@ void KSOptions::load( int sections )
channel["global"]["global"].encoding = conf->readEntry("globalglobalEncoding", "Default");
}
- QDateTime now(QDateTime::currentDateTime());
- QStringList servers = conf->readListEntry("Servers");
- QStringList::ConstIterator ser = servers.begin();
+ TQDateTime now(TQDateTime::currentDateTime());
+ TQStringList servers = conf->readListEntry("Servers");
+ TQStringList::ConstIterator ser = servers.begin();
for( ; ser != servers.end(); ser++){
ChannelOpMap coMap;
channel.insert(*ser, coMap);
- QStringList channels = conf->readListEntry(*ser);
- QStringList::ConstIterator chan = channels.begin();
+ TQStringList channels = conf->readListEntry(*ser);
+ TQStringList::ConstIterator chan = channels.begin();
for( ; chan != channels.end(); chan++){
- QDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now);
+ TQDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now);
if((lastUsed.daysTo(now) < 30 )||
(*chan == "global" && *ser == "global"))
{
@@ -317,7 +317,7 @@ void KSOptions::load( int sections )
*/
if(server.contains("global") == FALSE){
KSOServer global;
- server.insert(QString("global"), global);
+ server.insert(TQString("global"), global);
server["global"].server = "global";
server["global"].globalCopy = false;
@@ -333,9 +333,9 @@ void KSOptions::load( int sections )
kdDebug(5008) << "Load: in Server" << endl;
- QStringList servers = conf->readListEntry("Servers");
+ TQStringList servers = conf->readListEntry("Servers");
- QStringList::ConstIterator ser = servers.begin();
+ TQStringList::ConstIterator ser = servers.begin();
for( ; ser != servers.end(); ser++){
KSOServer ksos;
ksos = server["global"];
@@ -422,8 +422,8 @@ void KSOptions::save( int sections )
conf->writeEntry( "nickColourization", nickColourization );
conf->writeEntry( "ColourTheme", colourTheme );
for ( int i = 0; i < 16; ++i ) {
- conf->writeEntry( QString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] );
- conf->writeEntry( QString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] );
+ conf->writeEntry( TQString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] );
+ conf->writeEntry( TQString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] );
}
/* Store the font setting */
conf->setGroup( "GlobalOptions" );
@@ -432,14 +432,14 @@ void KSOptions::save( int sections )
}
if ( sections & Channels )
{
- QStringList servers;
+ TQStringList servers;
conf->deleteGroup( "Channel" );
conf->setGroup( "Channel" );
ServerChannelOpMap::Iterator ser;
for( ser = channel.begin(); ser != channel.end(); ++ser ){
- QStringList channels;
+ TQStringList channels;
servers << ser.key();
@@ -462,14 +462,14 @@ void KSOptions::save( int sections )
}
if ( sections & Servers )
{
- QStringList servers;
+ TQStringList servers;
conf->deleteGroup( "Servers" );
conf->setGroup( "Server" );
ServerOpMap::Iterator ser;
for( ser = server.begin(); ser != server.end(); ++ser ){
- QStringList channels;
+ TQStringList channels;
if(ser.data().globalCopy == true)
continue;
@@ -488,7 +488,7 @@ void KSOptions::save( int sections )
conf->sync();
}
-void KSOptions::channelSetup(QString serv, QString chan)
+void KSOptions::channelSetup(TQString serv, TQString chan)
{
if(channel.contains(serv) == FALSE){
ChannelOpMap coMap;
@@ -500,10 +500,10 @@ void KSOptions::channelSetup(QString serv, QString chan)
channel[serv].insert(chan, ksoc);
channel[serv][chan].server = serv;
channel[serv][chan].channel = chan;
- channel[serv][chan].lastUsed = QDateTime::currentDateTime();
+ channel[serv][chan].lastUsed = TQDateTime::currentDateTime();
}
else {
- channel[serv][chan].lastUsed = QDateTime::currentDateTime();
+ channel[serv][chan].lastUsed = TQDateTime::currentDateTime();
}
}
@@ -522,7 +522,7 @@ void KSOptions::applyChannelGlobal(void)
}
-void KSOptions::serverSetup(QString serv)
+void KSOptions::serverSetup(TQString serv)
{
if(server.contains(serv) == FALSE){
KSOServer ksos;
@@ -530,10 +530,10 @@ void KSOptions::serverSetup(QString serv)
server.insert(serv, ksos);
server[serv].server = serv;
server[serv].globalCopy = true;
- server[serv].lastUsed = QDateTime::currentDateTime();
+ server[serv].lastUsed = TQDateTime::currentDateTime();
}
else {
- server[serv].lastUsed = QDateTime::currentDateTime();
+ server[serv].lastUsed = TQDateTime::currentDateTime();
}
}
diff --git a/ksirc/ksopts.h b/ksirc/ksopts.h
index 5739f6fd..9bd96192 100644
--- a/ksirc/ksopts.h
+++ b/ksirc/ksopts.h
@@ -1,15 +1,15 @@
#ifndef _KSOPTS_H_
#define _KSOPTS_H_
-#include <qmap.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qrect.h>
-#include <qpixmap.h>
-#include <qdatetime.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqrect.h>
+#include <tqpixmap.h>
+#include <tqdatetime.h>
#define IRC_SAFE_MAX_LINE 450
@@ -45,12 +45,12 @@ public:
bool dockPopups : 1;
bool autoSaveHistory : 1;
int windowLength;
- QString backgroundFile;
+ TQString backgroundFile;
- QPixmap backgroundPixmap();
+ TQPixmap backgroundPixmap();
private:
- QPixmap m_backgroundPixmap;
+ TQPixmap m_backgroundPixmap;
};
class KSOChannel
@@ -58,8 +58,8 @@ class KSOChannel
public:
KSOChannel();
- QString server;
- QString channel;
+ TQString server;
+ TQString channel;
bool timeStamp : 1;
bool beepNotify : 1;
@@ -67,9 +67,9 @@ public:
bool logging : 1;
bool topicShow : 1;
bool filterJoinPart : 1;
- QString encoding;
+ TQString encoding;
- QDateTime lastUsed;
+ TQDateTime lastUsed;
static bool applyGlobally;
@@ -82,16 +82,16 @@ class KSOServer
public:
KSOServer();
- QString server;
+ TQString server;
bool globalCopy;
- QString nick;
- QString altNick;
- QString realName;
- QString userID;
- QStringList notifyList;
+ TQString nick;
+ TQString altNick;
+ TQString realName;
+ TQString userID;
+ TQStringList notifyList;
- QDateTime lastUsed;
+ TQDateTime lastUsed;
};
class KSOStartup
@@ -99,12 +99,12 @@ class KSOStartup
public:
KSOStartup();
- QRect geometry;
-// QString nick;
-// QString altNick;
-// QString realName;
-// QString userID;
-// QStringList notifyList;
+ TQRect geometry;
+// TQString nick;
+// TQString altNick;
+// TQString realName;
+// TQString userID;
+// TQStringList notifyList;
};
class KSOColors
@@ -114,36 +114,36 @@ public:
KSOColors();
- QColor textColor;
- QColor linkColor;
- QColor infoColor;
- QColor channelColor;
- QColor errorColor;
- QColor ownNickColor;
+ TQColor textColor;
+ TQColor linkColor;
+ TQColor infoColor;
+ TQColor channelColor;
+ TQColor errorColor;
+ TQColor ownNickColor;
bool ownNickBold : 1;
bool ownNickUl : 1;
bool ownNickRev : 1;
- QColor msgContainNick; // needs config + impl
- QColor msg1Contain; // needs config
- QString msg1String; // needs config
+ TQColor msgContainNick; // needs config + impl
+ TQColor msg1Contain; // needs config
+ TQString msg1String; // needs config
bool msg1Regex;
- QColor msg2Contain; // need config
- QString msg2String; // needs config
+ TQColor msg2Contain; // need config
+ TQString msg2String; // needs config
bool msg2Regex;
- QColor nickForeground;
- QColor nickBackground;
- QColor backgroundColor;
- QColor selBackgroundColor;
- QColor selForegroundColor;
- //QColor ircColors[numColors];
- BoundsCheckingArray<QColor, numColors> ircColors;
+ TQColor nickForeground;
+ TQColor nickBackground;
+ TQColor backgroundColor;
+ TQColor selBackgroundColor;
+ TQColor selForegroundColor;
+ //TQColor ircColors[numColors];
+ BoundsCheckingArray<TQColor, numColors> ircColors;
BoundsCheckingArray<bool, numColors> nickHighlight;
- QString colourTheme;
+ TQString colourTheme;
- QFont defaultFont;
+ TQFont defaultFont;
bool ksircColors : 1;
bool mircColors : 1;
bool nickColourization : 1;
@@ -162,9 +162,9 @@ public:
KSOServChan();
};
-typedef QMap<QString, KSOChannel> ChannelOpMap;
-typedef QMap<QString, ChannelOpMap> ServerChannelOpMap;
-typedef QMap<QString, KSOServer> ServerOpMap;
+typedef TQMap<TQString, KSOChannel> ChannelOpMap;
+typedef TQMap<TQString, ChannelOpMap> ServerChannelOpMap;
+typedef TQMap<TQString, KSOServer> ServerOpMap;
class KSOptions
: public KSOGeneral,
@@ -194,10 +194,10 @@ public:
return server[servInfo.server()];
}
- void channelSetup(QString serv, QString chan);
+ void channelSetup(TQString serv, TQString chan);
void applyChannelGlobal(void);
- void serverSetup(QString server);
+ void serverSetup(TQString server);
void serverSetup( const KSircServer &servInfo )
{
serverSetup(servInfo.server());
diff --git a/ksirc/ksparser.cpp b/ksirc/ksparser.cpp
index e0f2f5ee..a02bd3bd 100644
--- a/ksirc/ksparser.cpp
+++ b/ksirc/ksparser.cpp
@@ -18,33 +18,33 @@
// $Id$
-#include <qstring.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include "ksopts.h"
#include "ksparser.h"
-QString KSParser::parse( const QString &message )
+TQString KSParser::parse( const TQString &message )
{
- QString res;
+ TQString res;
m_tags.clear();
m_attributes.clear();
m_beeped = false;
for (unsigned int i = 0; i < message.length();)
{
- QChar ch = message[i++];
+ TQChar ch = message[i++];
if (ch.latin1() == 0x03 || ch == '~' && i < message.length())
{
- QChar next = message[ i++ ];
+ TQChar next = message[ i++ ];
if (next.latin1() >= 0x30 && next.latin1() <= 0x39)
{
int fg = -1, len;
int bg = -1;
- QRegExp colorRex("^[0-9]+");
+ TQRegExp colorRex("^[0-9]+");
if (colorRex.search(message.mid(--i)) >= 0)
{
len = colorRex.matchedLength();
@@ -60,15 +60,15 @@ QString KSParser::parse( const QString &message )
i += len;
}
}
- QString at;
- QColor c = ircColor(fg);
+ TQString at;
+ TQColor c = ircColor(fg);
if ( c.isValid() ) {
- at += QString( "color=\"%1\" " ).arg( c.name() );
+ at += TQString( "color=\"%1\" " ).arg( c.name() );
}
c = ircColor(bg);
if ( c.isValid() ) {
- at += QString( "bgcolor=\"%1\" " ).arg( c.name() );
+ at += TQString( "bgcolor=\"%1\" " ).arg( c.name() );
}
if(at.length() > 0){
res += pushTag( "font", at );
@@ -108,13 +108,13 @@ QString KSParser::parse( const QString &message )
res += toggleTag( "u" );
break;
case 'n':
- res += toggleTag( "font", QString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) );
+ res += toggleTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) );
break;
case 'o':
- res += pushTag( "font", QString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) );
+ res += pushTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) );
break;
case '#':
- res += pushTag( "font", QString( "color=\"#%1\"" ).arg( message.mid(i, 6) ));
+ res += pushTag( "font", TQString( "color=\"#%1\"" ).arg( message.mid(i, 6) ));
i+=6;
break;
case '~':
@@ -137,9 +137,9 @@ QString KSParser::parse( const QString &message )
return res;
}
-QString KSParser::pushTag(const QString &tag, const QString &attributes)
+TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
- QString res;
+ TQString res;
m_tags.push(tag);
if (!m_attributes.contains(tag))
m_attributes.insert(tag, attributes);
@@ -151,13 +151,13 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes)
return res + ">";
}
-QString KSParser::popTag(const QString &tag)
+TQString KSParser::popTag(const TQString &tag)
{
if (!m_tags.contains(tag))
- return QString::null;
+ return TQString::null;
- QString res;
- QValueStack<QString> savedTags;
+ TQString res;
+ TQValueStack<TQString> savedTags;
while (m_tags.top() != tag)
{
savedTags.push(m_tags.pop());
@@ -170,23 +170,23 @@ QString KSParser::popTag(const QString &tag)
return res;
}
-QString KSParser::toggleTag(const QString &tag, const QString &attributes)
+TQString KSParser::toggleTag(const TQString &tag, const TQString &attributes)
{
return m_attributes.contains(tag) ? popTag(tag) : pushTag(tag, attributes);
}
-QString KSParser::popAll()
+TQString KSParser::popAll()
{
- QString res;
+ TQString res;
while (!m_tags.isEmpty())
res.append("</" + m_tags.pop() + ">");
m_attributes.clear();
return res;
}
-QColor KSParser::ircColor(int code)
+TQColor KSParser::ircColor(int code)
{
if (code >= 0 && code < 16)
return ksopts->ircColors[code];
- return QColor();
+ return TQColor();
}
diff --git a/ksirc/ksparser.h b/ksirc/ksparser.h
index e7d2647f..b6e95a5c 100644
--- a/ksirc/ksparser.h
+++ b/ksirc/ksparser.h
@@ -7,10 +7,10 @@
#ifndef __ksparser_h__
#define __ksparser_h__
-#include <qstring.h>
-#include <qmap.h>
-#include <qcolor.h>
-#include <qvaluestack.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqcolor.h>
+#include <tqvaluestack.h>
// Helper class to parse IRC colour/style codes and convert them to
// richtext. The parser maintains an internal stack of the styles
@@ -22,19 +22,19 @@
class KSParser
{
public:
- QString parse(const QString &);
+ TQString parse(const TQString &);
bool beeped() const { return m_beeped; }
private:
- QString pushTag(const QString &, const QString & = QString::null);
- QString popTag(const QString &);
- QString toggleTag(const QString &, const QString & = QString::null);
- QString popAll();
- QColor ircColor(int);
+ TQString pushTag(const TQString &, const TQString & = TQString::null);
+ TQString popTag(const TQString &);
+ TQString toggleTag(const TQString &, const TQString & = TQString::null);
+ TQString popAll();
+ TQColor ircColor(int);
private:
- QValueStack<QString> m_tags;
- QMap<QString, QString> m_attributes;
+ TQValueStack<TQString> m_tags;
+ TQMap<TQString, TQString> m_attributes;
bool m_beeped;
};
diff --git a/ksirc/kstextview.cpp b/ksirc/kstextview.cpp
index deb7d6c4..2589e59a 100644
--- a/ksirc/kstextview.cpp
+++ b/ksirc/kstextview.cpp
@@ -20,12 +20,12 @@
#include "kstextview.h"
#include "stringparserstate.h"
-#include <qpainter.h>
-#include <qvaluestack.h>
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qclipboard.h>
-#include <qdict.h>
+#include <tqpainter.h>
+#include <tqvaluestack.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
+#include <tqdict.h>
#include <kcharsets.h>
#include <kapplication.h>
#include <kmimesourcefactory.h>
@@ -36,37 +36,37 @@
using namespace KSirc;
-typedef StringParserState<QChar> ParsingState;
+typedef StringParserState<TQChar> ParsingState;
static const int PaintBufferExtend = 128;
// temporary(!)
-static QDict<QPixmap> *ksTextViewPixmapDict = 0;
+static TQDict<TQPixmap> *ksTextViewPixmapDict = 0;
static void cleanupKSTextViewPixmapDict()
{
delete ksTextViewPixmapDict;
ksTextViewPixmapDict = 0;
}
-QPixmap ksTextViewLoadPixmap( const QString &icon )
+TQPixmap ksTextViewLoadPixmap( const TQString &icon )
{
if ( !ksTextViewPixmapDict )
{
- ksTextViewPixmapDict = new QDict<QPixmap>;
+ ksTextViewPixmapDict = new TQDict<TQPixmap>;
ksTextViewPixmapDict->setAutoDelete( true );
qAddPostRoutine( cleanupKSTextViewPixmapDict );
}
- QPixmap *pix = ksTextViewPixmapDict->find( icon );
+ TQPixmap *pix = ksTextViewPixmapDict->find( icon );
if ( !pix )
{
- QImage img;
+ TQImage img;
- const QMimeSource *src = kapp->mimeSourceFactory()->data( icon, QString::null );
- if ( !src || !QImageDrag::decode( src, img ) || img.isNull() )
- return QPixmap();
+ const TQMimeSource *src = kapp->mimeSourceFactory()->data( icon, TQString::null );
+ if ( !src || !TQImageDrag::decode( src, img ) || img.isNull() )
+ return TQPixmap();
- pix = new QPixmap( img );
+ pix = new TQPixmap( img );
ksTextViewPixmapDict->insert( icon, pix );
}
return *pix;
@@ -153,11 +153,11 @@ Item *Item::create( TextParag *parag, const Token &tok, const ItemProperties &pr
if ( tok.value == "img" )
{
- QString url = CONSTSTRING( tok.attributes[ "src" ] );
+ TQString url = CONSTSTRING( tok.attributes[ "src" ] );
if ( url.isEmpty() )
return 0;
- QPixmap pixmap = ksTextViewLoadPixmap( url );
+ TQPixmap pixmap = ksTextViewLoadPixmap( url );
if ( pixmap.isNull() )
return 0;
@@ -178,7 +178,7 @@ TextChunk::TextChunk( TextParag *parag, const StringPtr &text, const ItemPropert
{
}
-void TextChunk::paint( QPainter &p )
+void TextChunk::paint( TQPainter &p )
{
p.setFont( m_props.font );
@@ -276,8 +276,8 @@ int TextChunk::calcSelectionOffset( int x )
{
// ### how to optimize?
- QConstString tmp( m_text.ptr, m_text.len );
- const QString &s = tmp.string();
+ TQConstString tmp( m_text.ptr, m_text.len );
+ const TQString &s = tmp.string();
uint i = 0;
int px = 0;
@@ -302,13 +302,13 @@ StringPtr TextChunk::text() const
void TextChunk::setProps( const ItemProperties &props )
{
Item::setProps( props );
- m_metrics = QFontMetrics( props.font );
+ m_metrics = TQFontMetrics( props.font );
}
void TextChunk::calcExtends() const
{
- QConstString tmp( m_text.ptr, m_text.len );
- const QString &text = tmp.string();
+ TQConstString tmp( m_text.ptr, m_text.len );
+ const TQString &text = tmp.string();
m_width = m_metrics.width( text );
m_height = m_metrics.lineSpacing();
@@ -334,8 +334,8 @@ void TextChunk::calcExtends() const
StringPtr TextChunk::breakInTheMiddle( int width )
{
- QConstString tmp( m_text.ptr, m_text.len );
- const QString &s = tmp.string();
+ TQConstString tmp( m_text.ptr, m_text.len );
+ const TQString &s = tmp.string();
uint i = 0;
for (; i < m_text.len; ++i )
@@ -396,7 +396,7 @@ Item *TextChunk::hardBreak( const StringPtr &rightHandSide )
return chunk;
}
-void TextChunk::paintSelection( QPainter &p )
+void TextChunk::paintSelection( TQPainter &p )
{
int selectionStart = 0;
int selectionEnd = 0;
@@ -426,14 +426,14 @@ void TextChunk::paintSelection( QPainter &p )
}
}
-int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text )
+int TextChunk::paintSelection( TQPainter &p, int x, const StringPtr &text )
{
- QConstString constString( text.ptr, text.len );
- const QString &str = constString.string();
+ TQConstString constString( text.ptr, text.len );
+ const TQString &str = constString.string();
const int width = m_metrics.width( str );
- const QColorGroup &cg = m_parag->textView()->colorGroup();
+ const TQColorGroup &cg = m_parag->textView()->colorGroup();
if (m_props.bgSelColor.isValid())
p.fillRect( x, 0, width, height(), m_props.bgSelColor );
@@ -450,10 +450,10 @@ int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text )
return width;
}
-int TextChunk::paintText( QPainter &p, int x, const StringPtr &text )
+int TextChunk::paintText( TQPainter &p, int x, const StringPtr &text )
{
- QConstString constString( text.ptr, text.len );
- const QString &str = constString.string();
+ TQConstString constString( text.ptr, text.len );
+ const TQString &str = constString.string();
const int width = m_metrics.width( str );
@@ -489,12 +489,12 @@ void TextChunk::mergeSelection( TextChunk *child, SelectionPoint *selection )
m_selection = child->selectionStatus();
}
-ImageItem::ImageItem( TextParag *parag, const QPixmap &pixmap )
+ImageItem::ImageItem( TextParag *parag, const TQPixmap &pixmap )
: Item( parag ), m_pixmap( pixmap )
{
}
-void ImageItem::paint( QPainter &painter )
+void ImageItem::paint( TQPainter &painter )
{
int y = 0;
if(m_line) {
@@ -512,7 +512,7 @@ void ImageItem::paint( QPainter &painter )
if (m_props.bgSelColor.isValid())
painter.fillRect( 0, 0, width(), h, m_props.bgSelColor );
else {
- const QColorGroup &cg = m_parag->textView()->colorGroup();
+ const TQColorGroup &cg = m_parag->textView()->colorGroup();
painter.fillRect( 0, 0, width(), h, cg.highlight() );
}
}
@@ -549,7 +549,7 @@ Tokenizer::Tokenizer( PString &text )
}
}
-Tokenizer::PString Tokenizer::preprocess( const QString &richText )
+Tokenizer::PString Tokenizer::preprocess( const TQString &richText )
{
PString result;
result.data = richText;
@@ -558,12 +558,12 @@ Tokenizer::PString Tokenizer::preprocess( const QString &richText )
return result;
}
-QString Tokenizer::convertToRichText( const PString &ptext )
+TQString Tokenizer::convertToRichText( const PString &ptext )
{
if ( ptext.tags.isEmpty() )
return ptext.data;
- QString result = ptext.data;
+ TQString result = ptext.data;
uint i = 0;
TagIndexList tags = ptext.tags;
TagIndexList::Iterator it = tags.begin();
@@ -578,13 +578,13 @@ QString Tokenizer::convertToRichText( const PString &ptext )
}
unsigned short indexAdjustment = 0;
- const QChar ch = result[ i ];
+ const TQChar ch = result[ i ];
// ### incomplete!
/* this doesn't work quite right (when resolving back
* KCharSet's fromEntity breaks)
if ( ch == '<' || ch == '>' || ch == '&' )
{
- QString entity = KGlobal::charsets()->toEntity( ch );
+ TQString entity = KGlobal::charsets()->toEntity( ch );
indexAdjustment = entity.length() - 1;
result.replace( i, 1, entity );
}
@@ -676,7 +676,7 @@ bool Tokenizer::parseNextToken( Token &tok )
if ( lastType == TagIndex::Open &&
type == TagIndex::Close )
{
- const QChar *tagStart = m_text.unicode() + lastIndex + 1;
+ const TQChar *tagStart = m_text.unicode() + lastIndex + 1;
uint tagLen = ( index - 1 ) - ( lastIndex + 1 ) + 1;
// </bleh> ?
if ( *tagStart == '/' )
@@ -713,11 +713,11 @@ bool Tokenizer::parseNextToken( Token &tok )
return false;
}
-Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text )
+Tokenizer::TagIndexList Tokenizer::scanTagIndices( const TQString &text )
{
- const QChar *start = text.unicode();
- const QChar *p = start;
- const QChar *endP = p + text.length();
+ const TQChar *start = text.unicode();
+ const TQChar *p = start;
+ const TQChar *endP = p + text.length();
bool quoted = false;
bool inTag = false;
@@ -725,7 +725,7 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text )
for (; p < endP; ++p )
{
- const QChar ch = *p;
+ const TQChar ch = *p;
if ( ch == '"' && inTag )
{
quoted = quoted ? false : true;
@@ -752,13 +752,13 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text )
return tags;
}
-void Tokenizer::resolveEntities( QString &text, TagIndexList &tags )
+void Tokenizer::resolveEntities( TQString &text, TagIndexList &tags )
{
- const QChar *p = text.unicode();
- const QChar *endP = p + text.length();
+ const TQChar *p = text.unicode();
+ const TQChar *endP = p + text.length();
uint i = 0;
bool scanForSemicolon = false;
- const QChar *ampersand = 0;
+ const TQChar *ampersand = 0;
TagIndexList::Iterator tagInfoIt = tags.begin();
TagIndexList::Iterator tagsEnd = tags.end();
@@ -768,7 +768,7 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags )
i > (*tagInfoIt).index )
++tagInfoIt;
- const QChar ch = *p;
+ const TQChar ch = *p;
if ( ch == '&' ) {
ampersand = p;
@@ -783,13 +783,13 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags )
scanForSemicolon = false;
- const QChar *entityBegin = ampersand + 1;
+ const TQChar *entityBegin = ampersand + 1;
const uint entityLength = p - entityBegin;
if ( entityLength == 0 )
continue;
- const QChar entityValue = KCharsets::fromEntity( QConstString( entityBegin, entityLength ).string() );
+ const TQChar entityValue = KCharsets::fromEntity( TQConstString( entityBegin, entityLength ).string() );
if ( entityValue.isNull() )
continue;
@@ -818,9 +818,9 @@ void Tokenizer::parseTag( const StringPtr &text,
attributes.clear();
tag = StringPtr();
- const QChar *p = text.ptr;
- const QChar *endP = p + text.len;
- const QChar *start = p;
+ const TQChar *p = text.ptr;
+ const TQChar *endP = p + text.len;
+ const TQChar *start = p;
int state = ScanForName;
@@ -828,7 +828,7 @@ void Tokenizer::parseTag( const StringPtr &text,
while ( p < endP )
{
- const QChar ch = *p;
+ const TQChar ch = *p;
if ( ch == ' ' )
{
@@ -889,7 +889,7 @@ void Tokenizer::parseTag( const StringPtr &text,
continue;
}
- const QChar *valueEnd = p;
+ const TQChar *valueEnd = p;
StringPtr value = StringPtr( start, valueEnd - start );
attributes[ key ] = value;
@@ -934,7 +934,7 @@ ItemProperties::ItemProperties()
{
}
-ItemProperties::ItemProperties( const QFont &defaultFont )
+ItemProperties::ItemProperties( const TQFont &defaultFont )
: font( defaultFont ), reversed( false )
{
}
@@ -975,7 +975,7 @@ ItemProperties::ItemProperties( const ItemProperties &other,
StringPtr colAttr = attributes[ "color" ];
if ( !colAttr.isNull() )
{
- QColor col( CONSTSTRING( colAttr ) );
+ TQColor col( CONSTSTRING( colAttr ) );
if ( col.isValid() ){
if(!reversed)
color = col;
@@ -986,7 +986,7 @@ ItemProperties::ItemProperties( const ItemProperties &other,
colAttr = attributes[ "bgcolor" ];
if ( !colAttr.isNull() )
{
- QColor col( CONSTSTRING( colAttr ) );
+ TQColor col( CONSTSTRING( colAttr ) );
if ( col.isValid() ) {
if(!reversed)
bgColor = col;
@@ -1019,9 +1019,9 @@ ItemProperties &ItemProperties::operator=( const ItemProperties &rhs )
return *this;
}
-void ItemProperties::updateFont( const QFont &newFont )
+void ItemProperties::updateFont( const TQFont &newFont )
{
- QFont f = newFont;
+ TQFont f = newFont;
f.setUnderline( font.underline() );
f.setBold( font.bold() );
f.setItalic( font.italic() );
@@ -1034,25 +1034,25 @@ TextLine::TextLine()
m_items.setAutoDelete( true );
}
-TextLine::TextLine( const QPtrList<Item> &items )
+TextLine::TextLine( const TQPtrList<Item> &items )
: m_maxHeight( 0 )
{
m_items.setAutoDelete( true );
assert( !items.autoDelete() );
- QPtrListIterator<Item> it( items );
+ TQPtrListIterator<Item> it( items );
for (; it.current(); ++it )
appendItem( it.current(), UpdateMaxHeight );
}
-QString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
+TQString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
{
- QString selectedText;
+ TQString selectedText;
// fixes a crash where because of an empty list i becomes null
if ( m_items.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( start.line == this )
{
@@ -1085,7 +1085,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP
StringPtr txt = i->text();
if ( !txt.isNull() )
- selectedText += QString( txt.ptr + start.offset,
+ selectedText += TQString( txt.ptr + start.offset,
txt.len - start.offset );
}
else if ( i == end.item )
@@ -1094,7 +1094,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP
StringPtr txt = i->text();
if ( !txt.isNull() )
- selectedText += QString( txt.ptr, end.offset + 1 );
+ selectedText += TQString( txt.ptr, end.offset + 1 );
}
else
{
@@ -1123,13 +1123,13 @@ void TextLine::appendItem( Item *i, int layoutUpdatePolicy )
m_maxHeight = kMax( m_maxHeight, i->height() );
}
-Item *TextLine::resetLayout( QPtrList<Item> &remainingItems)
+Item *TextLine::resetLayout( TQPtrList<Item> &remainingItems)
{
Item *lastLineItem = m_items.getLast();
Item *it = m_items.first();
// We have to use the tobeDel structure or we call resetLayout on the Item
// twice for each item we want to delete
- QPtrList<Item> tobeDel;
+ TQPtrList<Item> tobeDel;
while ( it )
{
if ( it->resetLayout() == Item::KeepItem )
@@ -1143,9 +1143,9 @@ Item *TextLine::resetLayout( QPtrList<Item> &remainingItems)
return lastLineItem;
}
-void TextLine::paint( QPainter &p, int y )
+void TextLine::paint( TQPainter &p, int y )
{
- QPtrListIterator<Item> it( m_items );
+ TQPtrListIterator<Item> it( m_items );
int x = 0;
for (; it.current(); ++it )
{
@@ -1159,7 +1159,7 @@ void TextLine::paint( QPainter &p, int y )
Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo,
Item::SelectionAccuracy accuracy )
{
- QPtrListIterator<Item> it( m_items );
+ TQPtrListIterator<Item> it( m_items );
int x = 0;
int width = 0;
for (; it.current(); ++it )
@@ -1193,18 +1193,18 @@ Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo,
return 0;
}
-QString TextLine::plainText() const
+TQString TextLine::plainText() const
{
- QString res;
- QPtrListIterator<Item> it( m_items );
+ TQString res;
+ TQPtrListIterator<Item> it( m_items );
for (; it.current(); ++it )
res += it.current()->text().toQString();
return res;
}
-void TextLine::fontChange( const QFont &newFont )
+void TextLine::fontChange( const TQFont &newFont )
{
- QPtrListIterator<Item> it( m_items );
+ TQPtrListIterator<Item> it( m_items );
for (; it.current(); ++it )
{
ItemProperties props = it.current()->props();
@@ -1213,7 +1213,7 @@ void TextLine::fontChange( const QFont &newFont )
}
}
-TextParag::TextParag( TextView *textView, const QString &richText )
+TextParag::TextParag( TextView *textView, const TQString &richText )
: m_layouted( false ), m_height( 0 ), m_minWidth( 0 ),
m_textView( textView )
{
@@ -1227,7 +1227,7 @@ TextParag::~TextParag()
void TextParag::layout( int width )
{
- QPtrList<Item> items;
+ TQPtrList<Item> items;
TextLine *row = m_lines.first();
@@ -1249,7 +1249,7 @@ void TextParag::layout( int width )
SelectionPoint *selEnd = m_textView->selectionEnd();
assert( selStart && selEnd );
- QPtrListIterator<Item> it( items );
+ TQPtrListIterator<Item> it( items );
while ( it.current() )
{
m_minWidth = kMax( m_minWidth, it.current()->minWidth() );
@@ -1313,7 +1313,7 @@ void TextParag::layout( int width )
selEnd->parag == this )
{
// ### move to TextLine?
- QPtrListIterator<Item> it( line->iterator() );
+ TQPtrListIterator<Item> it( line->iterator() );
for (; it.current(); ++it )
{
if ( selStart->item == it.current() )
@@ -1327,7 +1327,7 @@ void TextParag::layout( int width )
m_layouted = true;
}
-void TextParag::paint( QPainter &p, int y, int maxY )
+void TextParag::paint( TQPainter &p, int y, int maxY )
{
TextLine *row = m_lines.first();
for (; row; row = m_lines.next() )
@@ -1374,9 +1374,9 @@ Item *TextParag::itemAt( int px, int py, SelectionPoint *selectionInfo,
return 0;
}
-QString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
+TQString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
{
- QString selectedText;
+ TQString selectedText;
// sanity check
// (don't put it lower because it changes the current list item)
@@ -1415,7 +1415,7 @@ void TextParag::clearSelection()
line->clearSelection();
}
-void TextParag::setRichText( const QString &richText )
+void TextParag::setRichText( const TQString &richText )
{
m_layouted = false;
m_height = 0;
@@ -1434,7 +1434,7 @@ void TextParag::setRichText( const QString &richText )
Token tok;
Token lastTextToken;
- QValueStack<Tag> tagStack;
+ TQValueStack<Tag> tagStack;
TextLine *line = new TextLine;
@@ -1500,25 +1500,25 @@ void TextParag::setRichText( const QString &richText )
m_lines.append( line );
}
-QString TextParag::plainText() const
+TQString TextParag::plainText() const
{
- QString result;
- QPtrListIterator<TextLine> it( m_lines );
+ TQString result;
+ TQPtrListIterator<TextLine> it( m_lines );
for (; it.current(); ++it )
result += it.current()->plainText();
return result;
}
-void TextParag::fontChange( const QFont &newFont )
+void TextParag::fontChange( const TQFont &newFont )
{
- QPtrListIterator<TextLine> it( m_lines );
+ TQPtrListIterator<TextLine> it( m_lines );
for (; it.current(); ++it )
it.current()->fontChange( newFont );
}
-ContentsPaintAlgorithm::ContentsPaintAlgorithm( const QPtrListIterator<TextParag> &paragIt,
- QWidget *viewport, QPixmap &paintBuffer,
- QPainter &painter, int clipX, int clipY,
+ContentsPaintAlgorithm::ContentsPaintAlgorithm( const TQPtrListIterator<TextParag> &paragIt,
+ TQWidget *viewport, TQPixmap &paintBuffer,
+ TQPainter &painter, int clipX, int clipY,
int clipHeight )
: m_paragIt( paragIt ), m_viewport( viewport ), m_paintBuffer( paintBuffer ),
m_painter( painter ), m_clipX( clipX ), m_clipY( clipY ), m_clipHeight( clipHeight ),
@@ -1539,7 +1539,7 @@ int ContentsPaintAlgorithm::goToFirstVisibleParagraph()
return y;
}
-int ContentsPaintAlgorithm::paint( QPainter &bufferedPainter, int currentY )
+int ContentsPaintAlgorithm::paint( TQPainter &bufferedPainter, int currentY )
{
const int startY = currentY;
@@ -1600,7 +1600,7 @@ void ContentsPaintAlgorithm::paint()
while ( y < yEnd )
{
m_paintBuffer.fill( m_viewport, 0, y );
- QPainter bufferedPainter( &m_paintBuffer );
+ TQPainter bufferedPainter( &m_paintBuffer );
bufferedPainter.translate( -m_clipX, -y );
int nextY = paint( bufferedPainter, y );
@@ -1613,8 +1613,8 @@ void ContentsPaintAlgorithm::paint()
}
}
-TextView::TextView( QWidget *parent, const char *name )
- : QScrollView( parent, name, WRepaintNoErase ),
+TextView::TextView( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name, WRepaintNoErase ),
m_paintBuffer( PaintBufferExtend, PaintBufferExtend ),
m_selectionEndBeforeStart( false ), m_mousePressed( false ),
m_mmbPressed( false ),
@@ -1624,9 +1624,9 @@ TextView::TextView( QWidget *parent, const char *name )
m_parags.setAutoDelete( true );
viewport()->setBackgroundMode( PaletteBase );
viewport()->setMouseTracking( true );
- m_autoScrollTimer = new QTimer( this );
- connect(verticalScrollBar(), SIGNAL(valueChanged( int ) ),
- this, SLOT(scrolling( int )));
+ m_autoScrollTimer = new TQTimer( this );
+ connect(verticalScrollBar(), TQT_SIGNAL(valueChanged( int ) ),
+ this, TQT_SLOT(scrolling( int )));
setDragAutoScroll( false );
@@ -1637,7 +1637,7 @@ TextView::~TextView()
{
}
-void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int clipHeight )
+void TextView::drawContents( TQPainter *painter, int clipX, int clipY, int , int clipHeight )
{
if ( m_parags.isEmpty() )
return;
@@ -1645,7 +1645,7 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int
if ( m_paintBuffer.width() != visibleWidth() )
m_paintBuffer.resize( visibleWidth(), PaintBufferExtend );
- QPtrListIterator<TextParag> paragIt( m_parags );
+ TQPtrListIterator<TextParag> paragIt( m_parags );
ContentsPaintAlgorithm( paragIt,
viewport(), m_paintBuffer, *painter, clipX, clipY,
@@ -1653,9 +1653,9 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int
.paint();
}
-void TextView::viewportResizeEvent( QResizeEvent *ev )
+void TextView::viewportResizeEvent( TQResizeEvent *ev )
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
if ( ev->size().width() != ev->oldSize().width() )
layout();
@@ -1724,13 +1724,13 @@ void TextView::clear()
viewport()->erase();
}
-TextParagIterator TextView::appendParag( const QString &richText )
+TextParagIterator TextView::appendParag( const TQString &richText )
{
TextParag *parag = new TextParag( this, richText );
m_parags.append( parag );
layout( false );
scrollToBottom();
- QPtrListIterator<TextParag> it( m_parags );
+ TQPtrListIterator<TextParag> it( m_parags );
it.toLast();
return TextParagIterator( it );
}
@@ -1773,7 +1773,7 @@ void TextView::clearSelection( bool repaint )
m_selectionStart = SelectionPoint();
m_selectionEnd = SelectionPoint();
m_selectionEndBeforeStart = false;
- m_selectedText = QString::null;
+ m_selectedText = TQString::null;
clearSelectionInternal();
if ( repaint )
updateContents();
@@ -1781,16 +1781,16 @@ void TextView::clearSelection( bool repaint )
TextParagIterator TextView::firstParag() const
{
- return TextParagIterator( QPtrListIterator<TextParag>( m_parags ) );
+ return TextParagIterator( TQPtrListIterator<TextParag>( m_parags ) );
}
-QString TextView::plainText() const
+TQString TextView::plainText() const
{
if ( m_parags.isEmpty() )
- return QString::null;
+ return TQString::null;
- QString result;
- QPtrListIterator<TextParag> paragIt( m_parags );
+ TQString result;
+ TQPtrListIterator<TextParag> paragIt( m_parags );
while ( paragIt.current() )
{
result += paragIt.current()->plainText();
@@ -1802,19 +1802,19 @@ QString TextView::plainText() const
return result;
}
-QColor TextView::linkColor() const
+TQColor TextView::linkColor() const
{
return m_linkColor;
}
-void TextView::setLinkColor( const QColor &linkColor )
+void TextView::setLinkColor( const TQColor &linkColor )
{
m_linkColor = linkColor;
}
void TextView::copy()
{
- QApplication::clipboard()->setText( m_selectedText );
+ TQApplication::clipboard()->setText( m_selectedText );
}
void TextView::clearSelectionInternal()
@@ -1825,7 +1825,7 @@ void TextView::clearSelectionInternal()
p->clearSelection();
}
-void TextView::contentsMousePressEvent( QMouseEvent *ev )
+void TextView::contentsMousePressEvent( TQMouseEvent *ev )
{
if ( ev->button() & RightButton ) {
emitLinkClickedForMouseEvent( ev );
@@ -1855,7 +1855,7 @@ void TextView::contentsMousePressEvent( QMouseEvent *ev )
}
}
-void TextView::contentsMouseMoveEvent( QMouseEvent *ev )
+void TextView::contentsMouseMoveEvent( TQMouseEvent *ev )
{
if ( m_mousePressed && ev->state() == NoButton )
{
@@ -1864,14 +1864,14 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev )
}
if ( m_mousePressed && !m_dragURL.isEmpty() &&
- ( m_dragStartPos - ev->pos() ).manhattanLength() > QApplication::startDragDistance() ) {
+ ( m_dragStartPos - ev->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
m_mousePressed = false;
- m_dragStartPos = QPoint();
+ m_dragStartPos = TQPoint();
startDrag();
- m_dragURL = QString::null;
+ m_dragURL = TQString::null;
return;
}
@@ -1934,26 +1934,26 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev )
}
}
- QCursor c = KCursor::arrowCursor();
+ TQCursor c = KCursor::arrowCursor();
if ( viewport()->cursor().handle() != c.handle() )
viewport()->setCursor( c );
}
-void TextView::contentsMouseReleaseEvent( QMouseEvent *ev )
+void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev )
{
stopAutoScroll();
bool clicked = (m_mousePressed || m_mmbPressed) &&
- (m_dragStartPos - ev->pos()).manhattanLength() < QApplication::startDragDistance();
+ (m_dragStartPos - ev->pos()).manhattanLength() < TQApplication::startDragDistance();
m_mousePressed = false;
m_mmbPressed = false;
- m_dragStartPos = QPoint();
- m_dragURL = QString::null;
+ m_dragStartPos = TQPoint();
+ m_dragURL = TQString::null;
m_selectionMaybeStart = SelectionPoint();
if ( (ev->button() & Qt::LeftButton) && !m_selectedText.isEmpty() )
- QApplication::clipboard()->setText( m_selectedText, QClipboard::Selection );
+ TQApplication::clipboard()->setText( m_selectedText, QClipboard::Selection );
if ( clicked ) {
emitLinkClickedForMouseEvent( ev );
@@ -1967,9 +1967,9 @@ void TextView::contentsMouseReleaseEvent( QMouseEvent *ev )
}
}
-void TextView::fontChange( const QFont & )
+void TextView::fontChange( const TQFont & )
{
- QPtrListIterator<TextParag> it( m_parags );
+ TQPtrListIterator<TextParag> it( m_parags );
for (; it.current(); ++it )
it.current()->fontChange( font() );
@@ -1978,7 +1978,7 @@ void TextView::fontChange( const QFont & )
void TextView::startDrag()
{
- QDragObject *dragObj = dragObject( m_dragURL );
+ TQDragObject *dragObj = dragObject( m_dragURL );
if ( !dragObj )
return;
@@ -1987,7 +1987,7 @@ void TextView::startDrag()
dragObj->drag();
}
-QDragObject *TextView::dragObject( const QString &dragURL )
+TQDragObject *TextView::dragObject( const TQString &dragURL )
{
#if KDE_IS_VERSION(3,1,92)
return new KURLDrag( KURL( dragURL ), viewport() );
@@ -1998,9 +1998,9 @@ QDragObject *TextView::dragObject( const QString &dragURL )
void TextView::autoScroll()
{
- QPoint cursor = viewport()->mapFromGlobal( QCursor::pos() );
+ TQPoint cursor = viewport()->mapFromGlobal( TQCursor::pos() );
- QPoint contentsPos = viewportToContents( cursor );
+ TQPoint contentsPos = viewportToContents( cursor );
cursor.rx() -= viewport()->x();
cursor.ry() -= viewport()->y();
@@ -2012,7 +2012,7 @@ void TextView::autoScroll()
}
}
-void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev )
+void TextView::emitLinkClickedForMouseEvent( TQMouseEvent *ev )
{
TextChunk *text = dynamic_cast<TextChunk *>( itemAt( ev->pos() ) );
if ( !text )
@@ -2028,16 +2028,16 @@ void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev )
void TextView::startAutoScroll()
{
if(m_autoScrollTimer->isActive() == false){
- connect( m_autoScrollTimer, SIGNAL( timeout() ),
- this, SLOT( autoScroll() ) );
+ connect( m_autoScrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( autoScroll() ) );
m_autoScrollTimer->start( 75, false );
}
}
void TextView::stopAutoScroll()
{
- disconnect( m_autoScrollTimer, SIGNAL( timeout() ),
- this, SLOT( autoScroll() ) );
+ disconnect( m_autoScrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( autoScroll() ) );
m_autoScrollTimer->stop();
}
@@ -2090,9 +2090,9 @@ SelectionPoint *TextView::selectionEnd()
return m_selectionEndBeforeStart ? &m_selectionStart : &m_selectionEnd;
}
-QString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
+TQString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end )
{
- QString selectedText;
+ TQString selectedText;
if ( start.item == end.item )
{
@@ -2104,7 +2104,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP
if ( start.pos.x() == end.pos.x() )
{
i->setSelectionStatus( Item::NoSelection );
- return QString::null;
+ return TQString::null;
}
i->setSelectionStatus( Item::SelectionBoth );
@@ -2114,7 +2114,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP
if ( t )
{
StringPtr text = t->text();
- selectedText = QString( text.ptr + start.offset, 1 );
+ selectedText = TQString( text.ptr + start.offset, 1 );
}
}
else
@@ -2127,10 +2127,10 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP
{
StringPtr text = t->text();
if (end.offset > start.offset)
- selectedText = QString( text.ptr + start.offset,
+ selectedText = TQString( text.ptr + start.offset,
end.offset - start.offset + 1 );
else
- selectedText = QString( text.ptr + end.offset,
+ selectedText = TQString( text.ptr + end.offset,
start.offset - end.offset + 1 );
}
@@ -2162,7 +2162,7 @@ void TextView::layout( bool force )
int contentsWidth = visibleWidth();
int width = contentsWidth;
- QPtrListIterator<TextParag> it( m_parags );
+ TQPtrListIterator<TextParag> it( m_parags );
for (; it.current(); ++it )
{
if ( !it.current()->isLayouted() || force )
@@ -2195,7 +2195,7 @@ void TextView::contentsChange(int heightChange, bool force)
}
-Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo,
+Item *TextView::itemAt( const TQPoint &pos, SelectionPoint *selectionInfo,
Item::SelectionAccuracy accuracy )
{
int px = pos.x();
@@ -2203,7 +2203,7 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo,
int y = 0;
int height = 0;
- QPtrListIterator<TextParag> it( m_parags );
+ TQPtrListIterator<TextParag> it( m_parags );
for (; it.current(); ++it )
{
height = it.current()->height();
@@ -2232,15 +2232,15 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo,
return 0;
}
-QString TextParagIterator::richText() const
+TQString TextParagIterator::richText() const
{
if ( atEnd() )
- return QString::null;
+ return TQString::null;
return Tokenizer::convertToRichText( m_paragIt.current()->processedRichText() );
}
-void TextParagIterator::setRichText( const QString &richText )
+void TextParagIterator::setRichText( const TQString &richText )
{
if ( atEnd() )
return;
@@ -2254,10 +2254,10 @@ void TextParagIterator::setRichText( const QString &richText )
textView->updateContents();
}
-QString TextParagIterator::plainText() const
+TQString TextParagIterator::plainText() const
{
if ( atEnd() )
- return QString::null;
+ return TQString::null;
return m_paragIt.current()->plainText();
}
diff --git a/ksirc/kstextview.h b/ksirc/kstextview.h
index 27a63eb5..4f9d59f4 100644
--- a/ksirc/kstextview.h
+++ b/ksirc/kstextview.h
@@ -19,12 +19,12 @@
#ifndef __kstextview_h__
#define __kstextview_h__
-#include <qscrollview.h>
-#include <qpen.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqscrollview.h>
+#include <tqpen.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
class QTimer;
class QDragObject;
@@ -37,22 +37,22 @@ class TextView;
struct StringPtr
{
StringPtr() : ptr( 0 ), len( 0 ) {}
- StringPtr( const QChar *_ptr, uint _len )
+ StringPtr( const TQChar *_ptr, uint _len )
: ptr( _ptr ), len( _len ) {}
- explicit StringPtr( const QString &s ) // use with care!
+ explicit StringPtr( const TQString &s ) // use with care!
: ptr( s.unicode() ), len( s.length() ) {}
inline bool isNull() const { return ptr == 0; }
// makes deep copy
- inline QString toQString() const
- { return ( ptr && len > 0 ) ? QString( ptr, len ) : QString::null; }
+ inline TQString toQString() const
+ { return ( ptr && len > 0 ) ? TQString( ptr, len ) : TQString::null; }
- const QChar *ptr;
+ const TQChar *ptr;
uint len;
};
-#define CONSTSTRING( substr ) QConstString( substr.ptr, substr.len ).string()
+#define CONSTSTRING( substr ) TQConstString( substr.ptr, substr.len ).string()
inline bool operator<( const StringPtr &s1, const StringPtr &s2 )
{
@@ -69,23 +69,23 @@ inline bool operator==( const StringPtr &s1, const char *s2 )
return CONSTSTRING( s1 ) == s2;
}
-class AttributeMap : public QMap<StringPtr, StringPtr>
+class AttributeMap : public TQMap<StringPtr, StringPtr>
{
public:
AttributeMap() {}
- AttributeMap( const AttributeMap &rhs ) : QMap<StringPtr, StringPtr>( rhs ) {}
+ AttributeMap( const AttributeMap &rhs ) : TQMap<StringPtr, StringPtr>( rhs ) {}
AttributeMap &operator=( const AttributeMap &rhs )
- { QMap<StringPtr, StringPtr>::operator=( rhs ); return *this; }
+ { TQMap<StringPtr, StringPtr>::operator=( rhs ); return *this; }
// helper for 'const char *' key...
ConstIterator findAttribute( const char *key ) const
{
- QString qkey( key );
+ TQString qkey( key );
return find( StringPtr( qkey ) );
}
Iterator findAttribute( const char *key )
{
- QString qkey( key );
+ TQString qkey( key );
return find( StringPtr( qkey ) );
}
@@ -98,7 +98,7 @@ public:
}
StringPtr &operator[]( const StringPtr &key )
{
- return QMap<StringPtr, StringPtr>::operator[]( key );
+ return TQMap<StringPtr, StringPtr>::operator[]( key );
}
};
@@ -115,21 +115,21 @@ struct Token
struct ItemProperties
{
ItemProperties();
- ItemProperties( const QFont &defaultFont );
+ ItemProperties( const TQFont &defaultFont );
ItemProperties( const ItemProperties &other,
const Token &token,
TextView *textView );
ItemProperties( const ItemProperties &rhs );
ItemProperties &operator=( const ItemProperties &rhs );
- void updateFont( const QFont &newFont );
+ void updateFont( const TQFont &newFont );
// these three are inherited/merged
- QFont font;
- QColor color;
- QColor selColor;
- QColor bgColor;
- QColor bgSelColor;
+ TQFont font;
+ TQColor color;
+ TQColor selColor;
+ TQColor bgColor;
+ TQColor bgSelColor;
bool reversed;
// ### todo: inherit these, too
AttributeMap attributes;
@@ -153,7 +153,7 @@ public:
virtual const char *type() { return "Item"; }
- virtual void paint( QPainter &painter ) = 0;
+ virtual void paint( TQPainter &painter ) = 0;
int width() const;
@@ -207,7 +207,7 @@ public:
virtual const char *type() { return "TextChunk"; }
- virtual void paint( QPainter &painter );
+ virtual void paint( TQPainter &painter );
virtual Item *breakLine( int width );
@@ -226,26 +226,26 @@ private:
StringPtr breakInTheMiddle( int width );
Item *hardBreak( const StringPtr &rightHandSide );
- void paintSelection( QPainter &p );
- int paintSelection( QPainter &p, int x, const StringPtr &text );
- int paintText( QPainter &p, int x, const StringPtr &text );
+ void paintSelection( TQPainter &p );
+ int paintSelection( TQPainter &p, int x, const StringPtr &text );
+ int paintText( TQPainter &p, int x, const StringPtr &text );
void mergeSelection( TextChunk *child, SelectionPoint *selection );
StringPtr m_text;
uint m_originalTextLength;
- QFontMetrics m_metrics;
+ TQFontMetrics m_metrics;
class TextChunk *m_parent;
};
class ImageItem : public Item
{
public:
- ImageItem( TextParag *parag, const QPixmap &pixmap );
+ ImageItem( TextParag *parag, const TQPixmap &pixmap );
virtual const char *type() { return "Image"; }
- virtual void paint( QPainter &painter );
+ virtual void paint( TQPainter &painter );
virtual LayoutResetStatus resetLayout();
@@ -253,7 +253,7 @@ protected:
virtual void calcExtends() const;
private:
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
};
class Tokenizer
@@ -268,20 +268,20 @@ public:
uint index;
int type;
};
- typedef QValueList<TagIndex> TagIndexList;
+ typedef TQValueList<TagIndex> TagIndexList;
// preprocessed string
struct PString
{
- QString data;
+ TQString data;
TagIndexList tags;
};
Tokenizer( PString &text );
- static PString preprocess( const QString &richText );
+ static PString preprocess( const TQString &richText );
- static QString convertToRichText( const PString &ptext );
+ static TQString convertToRichText( const PString &ptext );
bool parseNextToken( Token &tok );
@@ -290,12 +290,12 @@ private:
StringPtr &tag,
AttributeMap &attributes );
- static TagIndexList scanTagIndices( const QString &text );
- static void resolveEntities( QString &text, TagIndexList &tags );
+ static TagIndexList scanTagIndices( const TQString &text );
+ static void resolveEntities( TQString &text, TagIndexList &tags );
enum TagParsingState { ScanForName, ScanForEqual, ScanForValue };
- QString &m_text;
+ TQString &m_text;
TagIndexList m_tags;
TagIndexList::ConstIterator m_lastTag;
bool m_textBeforeFirstTagProcessed;
@@ -315,11 +315,11 @@ public:
TextLine();
// tranfers ownership of items! make sure that 'items' does not
// have autodeletion enabled!
- TextLine( const QPtrList<Item> &items );
+ TextLine( const TQPtrList<Item> &items );
int maxHeight() const { return m_maxHeight; }
- QString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
+ TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
void clearSelection();
// transfers ownership
@@ -327,21 +327,21 @@ public:
bool isEmpty() const { return m_items.isEmpty(); }
- Item *resetLayout( QPtrList<Item> &remainingItems);
+ Item *resetLayout( TQPtrList<Item> &remainingItems);
- void paint( QPainter &p, int y );
+ void paint( TQPainter &p, int y );
Item *itemAt( int px, SelectionPoint *selectionInfo,
Item::SelectionAccuracy accuracy = Item::SelectExact );
- QPtrListIterator<Item> iterator() const { return QPtrListIterator<Item>( m_items ); }
+ TQPtrListIterator<Item> iterator() const { return TQPtrListIterator<Item>( m_items ); }
- QString plainText() const;
+ TQString plainText() const;
- void fontChange( const QFont &newFont );
+ void fontChange( const TQFont &newFont );
private:
- QPtrList<Item> m_items;
+ TQPtrList<Item> m_items;
int m_maxHeight;
};
@@ -350,13 +350,13 @@ class SelectionPoint;
class TextParag
{
public:
- TextParag( TextView *textView, const QString &richText );
+ TextParag( TextView *textView, const TQString &richText );
~TextParag();
void layout( int width );
- void paint( QPainter &p, int y, int maxY );
+ void paint( TQPainter &p, int y, int maxY );
inline void setLayouted( bool l ) { m_layouted = l; }
inline bool isLayouted() const { return m_layouted; }
@@ -369,21 +369,21 @@ public:
TextView *textView() const { return m_textView; }
- QString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
+ TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
void clearSelection();
- void setRichText( const QString &richText );
+ void setRichText( const TQString &richText );
Tokenizer::PString processedRichText() const { return m_processedRichText; }
- QString plainText() const;
+ TQString plainText() const;
- void fontChange( const QFont &newFont );
+ void fontChange( const TQFont &newFont );
private:
Tokenizer::PString m_processedRichText;
- QPtrList<TextLine> m_lines;
+ TQPtrList<TextLine> m_lines;
bool m_layouted;
int m_height;
int m_minWidth;
@@ -410,7 +410,7 @@ struct SelectionPoint
TextLine *line;
TextParag *parag;
uint offset;
- QPoint pos;
+ TQPoint pos;
};
class TextParagIterator
@@ -422,10 +422,10 @@ public:
TextParagIterator &operator=( const TextParagIterator &rhs )
{ m_paragIt = rhs.m_paragIt; return *this; }
- QString richText() const;
- void setRichText( const QString &richText );
+ TQString richText() const;
+ void setRichText( const TQString &richText );
- QString plainText() const;
+ TQString plainText() const;
bool atEnd() const { return m_paragIt.current() == 0; }
@@ -435,31 +435,31 @@ public:
TextParagIterator &operator--( int steps ) { m_paragIt -= steps; return *this; }
protected:
- TextParagIterator( const QPtrListIterator<TextParag> &paragIt )
+ TextParagIterator( const TQPtrListIterator<TextParag> &paragIt )
: m_paragIt( paragIt ) {}
private:
- QPtrListIterator<TextParag> m_paragIt;
+ TQPtrListIterator<TextParag> m_paragIt;
};
class ContentsPaintAlgorithm
{
public:
- ContentsPaintAlgorithm( const QPtrListIterator<TextParag> &paragIt,
- QWidget *viewport, QPixmap &paintBuffer,
- QPainter &painter, int clipX, int clipY, int clipHeight );
+ ContentsPaintAlgorithm( const TQPtrListIterator<TextParag> &paragIt,
+ TQWidget *viewport, TQPixmap &paintBuffer,
+ TQPainter &painter, int clipX, int clipY, int clipHeight );
void paint();
private:
int goToFirstVisibleParagraph();
- int paint( QPainter &bufferedPainter, int currentY );
+ int paint( TQPainter &bufferedPainter, int currentY );
int adjustYAndIterator( int startY, int currentY, int nextY );
- QPtrListIterator<TextParag> m_paragIt;
- QWidget *m_viewport;
- QPixmap &m_paintBuffer;
- QPainter &m_painter;
+ TQPtrListIterator<TextParag> m_paragIt;
+ TQWidget *m_viewport;
+ TQPixmap &m_paintBuffer;
+ TQPainter &m_painter;
int m_clipX, m_clipY, m_clipHeight;
int m_overshoot;
};
@@ -472,32 +472,32 @@ class TextView : public QScrollView
friend class TextParag;
friend class TextParagIterator;
public:
- TextView( QWidget *parent, const char *name = 0 );
+ TextView( TQWidget *parent, const char *name = 0 );
virtual ~TextView();
virtual void clear();
- TextParagIterator appendParag( const QString &richText );
+ TextParagIterator appendParag( const TQString &richText );
bool removeParag( const TextParagIterator &parag );
void clearSelection( bool repaint = false ); // ### re-consider the repaint arg...
- QString selectedText() const { return m_selectedText; }
+ TQString selectedText() const { return m_selectedText; }
TextParagIterator firstParag() const;
- QString plainText() const;
+ TQString plainText() const;
- QColor linkColor() const;
- void setLinkColor( const QColor &linkColor );
+ TQColor linkColor() const;
+ void setLinkColor( const TQColor &linkColor );
void scrollToBottom( bool force = false );
signals:
void selectionChanged();
- void pasteReq(const QString&);
- void linkClicked( const QMouseEvent *ev, const QString &url );
+ void pasteReq(const TQString&);
+ void linkClicked( const TQMouseEvent *ev, const TQString &url );
public slots:
void copy();
@@ -506,22 +506,22 @@ protected slots:
void scrolling(int value);
protected:
- virtual void viewportResizeEvent( QResizeEvent *ev );
- virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
- virtual void contentsMousePressEvent( QMouseEvent *ev );
- virtual void contentsMouseMoveEvent( QMouseEvent *ev );
- virtual void contentsMouseReleaseEvent( QMouseEvent *ev );
- virtual void fontChange( const QFont & );
+ virtual void viewportResizeEvent( TQResizeEvent *ev );
+ virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
+ virtual void contentsMousePressEvent( TQMouseEvent *ev );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *ev );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *ev );
+ virtual void fontChange( const TQFont & );
virtual void startDrag();
- virtual QDragObject *dragObject( const QString &dragURL );
+ virtual TQDragObject *dragObject( const TQString &dragURL );
private slots:
void autoScroll();
private:
- void emitLinkClickedForMouseEvent( QMouseEvent *ev );
+ void emitLinkClickedForMouseEvent( TQMouseEvent *ev );
void startAutoScroll();
@@ -531,38 +531,38 @@ private:
void updateSelectionOrder();
- QString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
+ TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end );
SelectionPoint *selectionStart();
SelectionPoint *selectionEnd();
void layout( bool force = true );
- Item *itemAt( const QPoint &pos, SelectionPoint *selectionInfo = 0,
+ Item *itemAt( const TQPoint &pos, SelectionPoint *selectionInfo = 0,
Item::SelectionAccuracy accuracy = Item::SelectExact );
void clearSelectionInternal();
void contentsChange(int heightChange, bool force = false);
- QPtrList<TextParag> m_parags;
- QPixmap m_paintBuffer;
+ TQPtrList<TextParag> m_parags;
+ TQPixmap m_paintBuffer;
SelectionPoint m_selectionMaybeStart;
SelectionPoint m_selectionStart;
SelectionPoint m_selectionEnd;
bool m_selectionEndBeforeStart;
- QTimer *m_autoScrollTimer;
+ TQTimer *m_autoScrollTimer;
- QString m_selectedText;
+ TQString m_selectedText;
- QPoint m_dragStartPos;
- QString m_dragURL;
+ TQPoint m_dragStartPos;
+ TQString m_dragURL;
bool m_mousePressed : 1;
bool m_mmbPressed : 1;
- QColor m_linkColor;
- QColor m_selectionBackgroundColor;
+ TQColor m_linkColor;
+ TQColor m_selectionBackgroundColor;
int m_height;
bool m_inScroll;
diff --git a/ksirc/kstextviewtest.cpp b/ksirc/kstextviewtest.cpp
index f3326351..d20e6e50 100644
--- a/ksirc/kstextviewtest.cpp
+++ b/ksirc/kstextviewtest.cpp
@@ -11,13 +11,13 @@ public:
{
//startTimer( 5000 );
}
- void timerEvent( QTimerEvent * )
+ void timerEvent( TQTimerEvent * )
{
m_lines++;
if ( m_lines > 15 )
m_view->removeParag( m_view->firstParag() );
- m_view->appendParag( QString::fromLatin1( "<font color=#0000ff>color test</font><font color=#00ff00>color test</font><font color=#ff0000>color test</font><font color=#000088>color test</font><font color=#008800>color test</font><font color=#880000>color test</font><font color=#0000ff>color test</font><font color=#02ff00>color test</font><font color=#2000ff>color test</font>" ) );
- m_view->appendParag( QString::fromLatin1( "<r>aaaaaa</r> bbbbbb cccccccc ddddddddd eeeeeee " ) );
+ m_view->appendParag( TQString::fromLatin1( "<font color=#0000ff>color test</font><font color=#00ff00>color test</font><font color=#ff0000>color test</font><font color=#000088>color test</font><font color=#008800>color test</font><font color=#880000>color test</font><font color=#0000ff>color test</font><font color=#02ff00>color test</font><font color=#2000ff>color test</font>" ) );
+ m_view->appendParag( TQString::fromLatin1( "<r>aaaaaa</r> bbbbbb cccccccc ddddddddd eeeeeee " ) );
m_view->setContentsPos( 0, m_view->contentsHeight() );
}
private:
@@ -33,17 +33,17 @@ int main( int argc, char **argv )
app.setMainWidget( &view );
view.show();
- view.appendParag( QString::fromLatin1( "<b>bold</b>Normal<i>Italic hey!</i><r>reverse!</r>" ) );
- view.appendParag( QString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) );
- view.appendParag( QString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) );
- view.appendParag( QString::fromLatin1( "&lt;tronical&gt; hah! &amp;" ) );
- view.appendParag( QString::fromLatin1( "<a href=\"http://www.kde.org/\">url</a>" ) );
- view.appendParag( QString::fromLatin1( "<font color=#0000ff bgcolor=#ff0000>color test</font>" ) );
- view.appendParag( QString::fromLatin1( "<font color=\"#00ff00\">another color test</font>" ) );
- view.appendParag( QString::fromLatin1( "<font color=\"#00ff00\" bgcolor=\"#ff0000\">another color test</font>" ) );
- view.appendParag( QString::fromLatin1( "<i bleh>simple attr test</i><b leh foo=15 doo=\"&amp; > 123 \" oof>complicated attr test</b>" ) );
- view.appendParag( QString::fromLatin1( "\"<b doo=\"&amp; > 123 \" oof>\"third attr test 2</b>\"" ) );
- view.appendParag( QString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) );
+ view.appendParag( TQString::fromLatin1( "<b>bold</b>Normal<i>Italic hey!</i><r>reverse!</r>" ) );
+ view.appendParag( TQString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) );
+ view.appendParag( TQString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) );
+ view.appendParag( TQString::fromLatin1( "&lt;tronical&gt; hah! &amp;" ) );
+ view.appendParag( TQString::fromLatin1( "<a href=\"http://www.kde.org/\">url</a>" ) );
+ view.appendParag( TQString::fromLatin1( "<font color=#0000ff bgcolor=#ff0000>color test</font>" ) );
+ view.appendParag( TQString::fromLatin1( "<font color=\"#00ff00\">another color test</font>" ) );
+ view.appendParag( TQString::fromLatin1( "<font color=\"#00ff00\" bgcolor=\"#ff0000\">another color test</font>" ) );
+ view.appendParag( TQString::fromLatin1( "<i bleh>simple attr test</i><b leh foo=15 doo=\"&amp; > 123 \" oof>complicated attr test</b>" ) );
+ view.appendParag( TQString::fromLatin1( "\"<b doo=\"&amp; > 123 \" oof>\"third attr test 2</b>\"" ) );
+ view.appendParag( TQString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) );
Timer t( &view );
return app.exec();
diff --git a/ksirc/ksview.cpp b/ksirc/ksview.cpp
index 12ac357e..d9cac283 100644
--- a/ksirc/ksview.cpp
+++ b/ksirc/ksview.cpp
@@ -18,12 +18,12 @@
// $Id$
-#include <qclipboard.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdragobject.h>
-#include <qvaluestack.h>
-#include <qstylesheet.h>
+#include <tqclipboard.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdragobject.h>
+#include <tqvaluestack.h>
+#include <tqstylesheet.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,17 +42,17 @@
#include "nickColourMaker.h"
#include "ksircprocess.h"
-KSircView::KSircView(KSircProcess *proc, QWidget *parent, const char *name)
+KSircView::KSircView(KSircProcess *proc, TQWidget *parent, const char *name)
: KSirc::TextView(parent, name), m_proc(proc)
{
m_acceptFiles = false;
m_timestamps = false;
viewport()->setAcceptDrops(true);
clear();
- connect( this, SIGNAL( linkClicked( const QMouseEvent *, const QString & ) ),
- this, SLOT( anchorClicked( const QMouseEvent *, const QString & ) ) );
+ connect( this, TQT_SIGNAL( linkClicked( const TQMouseEvent *, const TQString & ) ),
+ this, TQT_SLOT( anchorClicked( const TQMouseEvent *, const TQString & ) ) );
- QPixmap background = ksopts->backgroundPixmap();
+ TQPixmap background = ksopts->backgroundPixmap();
if ( !background.isNull() )
viewport()->setBackgroundPixmap( background );
@@ -70,21 +70,21 @@ void KSircView::clear()
KSirc::TextView::clear();
}
-QString KSircView::makeTimeStamp()
+TQString KSircView::makeTimeStamp()
{
- QTime now = QTime::currentTime();
- QString timeStamp = QString::fromLatin1( "[%1:%2:%3] " )
- .arg( QString::number( now.hour() ).rightJustify( 2, '0' ) )
- .arg( QString::number( now.minute() ).rightJustify( 2, '0' ) )
- .arg( QString::number( now.second() ).rightJustify( 2, '0' ) );
+ TQTime now = TQTime::currentTime();
+ TQString timeStamp = TQString::fromLatin1( "[%1:%2:%3] " )
+ .arg( TQString::number( now.hour() ).rightJustify( 2, '0' ) )
+ .arg( TQString::number( now.minute() ).rightJustify( 2, '0' ) )
+ .arg( TQString::number( now.second() ).rightJustify( 2, '0' ) );
return timeStamp;
}
-void KSircView::saveURL( const QString &url )
+void KSircView::saveURL( const TQString &url )
{
KURL kurl( url );
- KFileDialog *dlg = new KFileDialog( QString::null, QString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ );
+ KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ );
dlg->setKeepLocation( true );
@@ -104,24 +104,24 @@ void KSircView::saveURL( const QString &url )
delete dlg;
}
-QString KSircView::addLine(const QString &pixmap, const QColor &color, const QString &_text)
+TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const TQString &_text)
{
//kdDebug(5008) << "Start Text: " << _text << endl;
- QString richText( "<font color=\"%1\">" );
+ TQString richText( "<font color=\"%1\">" );
richText = richText.arg( color.name() );
if ( !pixmap.isEmpty() )
- richText.prepend( QString::fromLatin1( "<img src=\"%1\"></img>" ).arg( pixmap ) );
+ richText.prepend( TQString::fromLatin1( "<img src=\"%1\"></img>" ).arg( pixmap ) );
- QString timeStamp = QString::fromLatin1( "<font color=\"%1\">%2</font>" )
+ TQString timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" )
.arg( ksopts->textColor.name() )
.arg( makeTimeStamp() );
m_timeStamps.append(timeStamp);
if ( m_timestamps )
richText.prepend( timeStamp );
- QString text = QStyleSheet::escape(_text);
+ TQString text = TQStyleSheet::escape(_text);
// ### a bit of a hack: turn '&lt;nick&gt; message' into
// <span>&lt;nick&gt;<span> message' . span itself isn't supported but it
@@ -130,30 +130,30 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt
// according to UV Kochavi <uv1st@yahoo.com> , to prevent output like
// '<nick message<' , which is supposedly a bug in Qt's reordering. The
// same is done for [nick] and >nick< to catch queries.
- QRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
- text.replace( bidiRe, QString::fromLatin1( "<span>\\1</span>\\2" ) );
- QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
- text.replace( bidiRe2, QString::fromLatin1( "<span>\\1</span>\\2" ) );
- QRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
- text.replace( bidiRe3, QString::fromLatin1( "<span>\\1</span>\\2" ) );
-
- QRegExp nickCol( "~n(.+)~n" );
+ TQRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
+ text.replace( bidiRe, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
+ text.replace( bidiRe2, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ TQRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
+ text.replace( bidiRe3, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+
+ TQRegExp nickCol( "~n(.+)~n" );
nickCol.setMinimal(true);
int pos;
while( (pos = nickCol.search(text)) >= 0 ){
//kdDebug(5008) << "Found nick: " << nickCol.cap(1) << endl;
- QString newText = nickCol.cap(1);
+ TQString newText = nickCol.cap(1);
if( nickCol.cap(1) != m_proc->getNick()){
- QColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1));
+ TQColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1));
- newText.prepend(QString("<font color=\"%1\">").arg(col.name()));
+ newText.prepend(TQString("<font color=\"%1\">").arg(col.name()));
newText.append("</font>");
} else {
- QColor col = ksopts->ownNickColor.name();
+ TQColor col = ksopts->ownNickColor.name();
if( ! col.isValid())
nickColourMaker::colourMaker()->findFg(nickCol.cap(1));
- newText.prepend(QString("<font color=\"%1\">").arg(col.name()));
+ newText.prepend(TQString("<font color=\"%1\">").arg(col.name()));
newText.append("</font>");
if(ksopts->ownNickBold){
newText.prepend("<b>");
@@ -199,11 +199,11 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt
}
if (parser.beeped()) {
- KNotifyClient::event(winId(), QString::fromLatin1("BeepReceived"),
+ KNotifyClient::event(winId(), TQString::fromLatin1("BeepReceived"),
i18n("Beep Received"));
}
- QString logText = parag.plainText();
+ TQString logText = parag.plainText();
// append timestamp if it's not already there
if ( ! m_timestamps )
logText.prepend( makeTimeStamp() );
@@ -211,20 +211,20 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt
return logText + '\n';
}
-void KSircView::addRichText(const QString &_text)
+void KSircView::addRichText(const TQString &_text)
{
//kdDebug(5008) << "Start Text: " << _text << endl;
- QString text = _text;
+ TQString text = _text;
- QRegExp re("^(<font color=\"[^\"]+\">\\[[0-9:]+\\] </font>)");
- QString timeStamp;
+ TQRegExp re("^(<font color=\"[^\"]+\">\\[[0-9:]+\\] </font>)");
+ TQString timeStamp;
if(re.search(text) >= 0){
timeStamp = re.cap(1);
}
else {
- timeStamp = QString::fromLatin1( "<font color=\"%1\">%2</font>" )
+ timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" )
.arg( ksopts->textColor.name() )
.arg( makeTimeStamp() );
if ( m_timestamps )
@@ -254,10 +254,10 @@ void KSircView::enableTimeStamps(bool enable)
setUpdatesEnabled( false );
m_timestamps = enable;
KSirc::TextParagIterator paragIt = firstParag();
- QStringList::ConstIterator timeStampIt = m_timeStamps.begin();
+ TQStringList::ConstIterator timeStampIt = m_timeStamps.begin();
for (; !paragIt.atEnd(); ++paragIt, ++timeStampIt )
{
- QString text = paragIt.richText();
+ TQString text = paragIt.richText();
if ( enable )
text.prepend( *timeStampIt );
else
@@ -268,7 +268,7 @@ void KSircView::enableTimeStamps(bool enable)
updateContents();
}
-void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url)
+void KSircView::anchorClicked(const TQMouseEvent *ev, const TQString &url)
{
if ( (ev->button() & LeftButton) && (ev->state() & ShiftButton ) )
saveURL( url );
@@ -301,43 +301,43 @@ void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url)
}
}
-void KSircView::openBrowser(const QString &url )
+void KSircView::openBrowser(const TQString &url )
{
- (void) new KRun( KURL( url.startsWith("www") ? QString::fromLatin1("http://") + url : url));
+ (void) new KRun( KURL( url.startsWith("www") ? TQString::fromLatin1("http://") + url : url));
}
-void KSircView::copyLinkToClipboard( const QString &url )
+void KSircView::copyLinkToClipboard( const TQString &url )
{
- QApplication::clipboard()->setText( url, QClipboard::Clipboard );
+ TQApplication::clipboard()->setText( url, QClipboard::Clipboard );
}
-QColor KSircView::ircColor(int code)
+TQColor KSircView::ircColor(int code)
{
if (code >= 0 && code < 16)
return ksopts->ircColors[code];
- return QColor();
+ return TQColor();
}
-void KSircView::contentsDragEnterEvent(QDragEnterEvent* event)
+void KSircView::contentsDragEnterEvent(TQDragEnterEvent* event)
{
- event->accept((QTextDrag::canDecode(event) ||
+ event->accept((TQTextDrag::canDecode(event) ||
(m_acceptFiles && KURLDrag::canDecode(event))) &&
(!event->source() || event->source() != viewport()));
}
-void KSircView::contentsDragMoveEvent(QDragMoveEvent* event)
+void KSircView::contentsDragMoveEvent(TQDragMoveEvent* event)
{
event->accept(!event->source() || event->source() != viewport());
}
-void KSircView::contentsDropEvent(QDropEvent* event)
+void KSircView::contentsDropEvent(TQDropEvent* event)
{
- QStringList urls;
- QString text;
+ TQStringList urls;
+ TQString text;
if (m_acceptFiles && KURLDrag::decodeLocalFiles(event, urls))
emit urlsDropped(urls);
- else if (QTextDrag::decode(event, text))
+ else if (TQTextDrag::decode(event, text))
emit textDropped(text);
}
diff --git a/ksirc/ksview.h b/ksirc/ksview.h
index 8b26faea..a4ee782e 100644
--- a/ksirc/ksview.h
+++ b/ksirc/ksview.h
@@ -29,41 +29,41 @@ class KSircView : public KSirc::TextView
{
Q_OBJECT
public:
- KSircView(KSircProcess *proc, QWidget *parent, const char *name);
+ KSircView(KSircProcess *proc, TQWidget *parent, const char *name);
virtual ~KSircView();
virtual void clear();
// returns the plain-text string added (for logging)
- QString addLine(const QString &pixmap, const QColor &color, const QString &text);
- void addRichText(const QString &_text);
+ TQString addLine(const TQString &pixmap, const TQColor &color, const TQString &text);
+ void addRichText(const TQString &_text);
void enableTimeStamps(bool enable);
void setAcceptFiles(bool _acceptFiles) { m_acceptFiles = _acceptFiles; }
signals:
- void urlsDropped(const QStringList&);
- void textDropped(const QString&);
+ void urlsDropped(const TQStringList&);
+ void textDropped(const TQString&);
protected:
- virtual void contentsDragEnterEvent(QDragEnterEvent *);
- virtual void contentsDragMoveEvent(QDragMoveEvent *);
- virtual void contentsDropEvent(QDropEvent *);
+ virtual void contentsDragEnterEvent(TQDragEnterEvent *);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *);
+ virtual void contentsDropEvent(TQDropEvent *);
private:
virtual bool linksEnabled() const { return true; }
- void openBrowser( const QString &url );
- void copyLinkToClipboard( const QString &url );
- static QString makeTimeStamp();
+ void openBrowser( const TQString &url );
+ void copyLinkToClipboard( const TQString &url );
+ static TQString makeTimeStamp();
- void saveURL( const QString &url );
+ void saveURL( const TQString &url );
private slots:
- void anchorClicked(const QMouseEvent *ev, const QString &url);
+ void anchorClicked(const TQMouseEvent *ev, const TQString &url);
- QColor ircColor(int);
+ TQColor ircColor(int);
private:
int m_lines;
- QStringList m_timeStamps;
+ TQStringList m_timeStamps;
bool m_acceptFiles;
bool m_timestamps;
KSircProcess *m_proc;
diff --git a/ksirc/logfile.cpp b/ksirc/logfile.cpp
index 6a15e51e..2246cd30 100644
--- a/ksirc/logfile.cpp
+++ b/ksirc/logfile.cpp
@@ -9,12 +9,12 @@
#include <assert.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kstandarddirs.h>
-LogFile::LogFile( const QString &channel, const QString &server )
- : m_channel( channel ), m_server( server ), m_file( new QFile() ),
+LogFile::LogFile( const TQString &channel, const TQString &server )
+ : m_channel( channel ), m_server( server ), m_file( new TQFile() ),
m_flushTimerId( -1 )
{
}
@@ -39,16 +39,16 @@ void LogFile::open()
assert( m_file->isOpen() == true );
- log( QString::fromLatin1( "### Log session started at " )
- + QDateTime::currentDateTime().toString()
- + QString::fromLatin1( "###\n" ) );
+ log( TQString::fromLatin1( "### Log session started at " )
+ + TQDateTime::currentDateTime().toString()
+ + TQString::fromLatin1( "###\n" ) );
}
void LogFile::closeLog()
{
- log( QString::fromLatin1( "### Log session terminated at " )
- + QDateTime::currentDateTime().toString()
- + QString::fromLatin1( "###\n" ) );
+ log( TQString::fromLatin1( "### Log session terminated at " )
+ + TQDateTime::currentDateTime().toString()
+ + TQString::fromLatin1( "###\n" ) );
if ( m_flushTimerId != -1 )
killTimer( m_flushTimerId );
@@ -56,7 +56,7 @@ void LogFile::closeLog()
m_file->close();
}
-void LogFile::log( const QString &message )
+void LogFile::log( const TQString &message )
{
m_file->writeBlock( message.local8Bit(), message.length() );
@@ -64,7 +64,7 @@ void LogFile::log( const QString &message )
m_flushTimerId = startTimer( 60000 ); // flush each minute
}
-void LogFile::timerEvent( QTimerEvent * )
+void LogFile::timerEvent( TQTimerEvent * )
{
if ( m_file )
m_file->flush();
@@ -73,12 +73,12 @@ void LogFile::timerEvent( QTimerEvent * )
m_flushTimerId = -1;
}
-QString LogFile::makeLogFileName( const QString &channel, const QString &server, int suffix )
+TQString LogFile::makeLogFileName( const TQString &channel, const TQString &server, int suffix )
{
- QString res = channel + '_';
+ TQString res = channel + '_';
- QDate dt = QDate::currentDate();
- QString dateStr;
+ TQDate dt = TQDate::currentDate();
+ TQString dateStr;
dateStr.sprintf( "%.4d_%.2d_%.2d_", dt.year(), dt.month(), dt.day() );
res += dateStr;
@@ -87,7 +87,7 @@ QString LogFile::makeLogFileName( const QString &channel, const QString &server,
res += ".log";
if ( suffix > -1 )
- res += '.' + QString::number( suffix );
+ res += '.' + TQString::number( suffix );
return locateLocal( "appdata", "logs/" + res );
}
diff --git a/ksirc/logfile.h b/ksirc/logfile.h
index 337b9912..1a343728 100644
--- a/ksirc/logfile.h
+++ b/ksirc/logfile.h
@@ -7,34 +7,34 @@
#ifndef __logfile_h__
#define __logfile_h__
-#include <qobject.h>
+#include <tqobject.h>
class QFile;
class LogFile : public QObject
{
public:
- LogFile( const QString &channel, const QString &server );
+ LogFile( const TQString &channel, const TQString &server );
virtual ~LogFile();
void open();
void closeLog();
- void log( const QString &message );
+ void log( const TQString &message );
protected:
- virtual void timerEvent( QTimerEvent * );
+ virtual void timerEvent( TQTimerEvent * );
private:
- QString m_channel;
- QString m_server;
+ TQString m_channel;
+ TQString m_server;
- QFile *m_file;
+ TQFile *m_file;
int m_flushTimerId;
- QString makeLogFileName( const QString &channel, const QString &server, int suffix = -1 );
+ TQString makeLogFileName( const TQString &channel, const TQString &server, int suffix = -1 );
};
#endif
diff --git a/ksirc/mditoplevel.cpp b/ksirc/mditoplevel.cpp
index 3f35d464..73c464c3 100644
--- a/ksirc/mditoplevel.cpp
+++ b/ksirc/mditoplevel.cpp
@@ -1,7 +1,7 @@
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
-#include <qtabbar.h>
+#include <tqtabbar.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -17,11 +17,11 @@
#define ID_CLOSE 5
-void KSTabWidget::mousePressEvent(QMouseEvent *e)
+void KSTabWidget::mousePressEvent(TQMouseEvent *e)
{
if(e->button() == RightButton){
- QPoint p = tabBar()->mapFromParent(e->pos());
- QTab *tab = tabBar()->selectTab(p);
+ TQPoint p = tabBar()->mapFromParent(e->pos());
+ TQTab *tab = tabBar()->selectTab(p);
if(tab){
int id = tab->identifier();
emit showContexMenu(page(id), tabBar()->mapToGlobal(p));
@@ -29,32 +29,32 @@ void KSTabWidget::mousePressEvent(QMouseEvent *e)
}
}
-MDITopLevel::MDITopLevel(QWidget *parent, const char *name)
+MDITopLevel::MDITopLevel(TQWidget *parent, const char *name)
: KMainWindow(parent, name)
{
m_closing = false;
m_tab = new KSTabWidget( this );
- m_tab->setTabPosition( QTabWidget::Bottom );
+ m_tab->setTabPosition( TQTabWidget::Bottom );
setCentralWidget( m_tab );
- connect( m_tab, SIGNAL( currentChanged( QWidget * ) ),
- this, SLOT( slotCurrentChanged( QWidget * ) ) );
+ connect( m_tab, TQT_SIGNAL( currentChanged( TQWidget * ) ),
+ this, TQT_SLOT( slotCurrentChanged( TQWidget * ) ) );
- connect( m_tab, SIGNAL( showContexMenu(QWidget *, const QPoint &) ),
- this, SLOT( slotShowContexMenu(QWidget *, const QPoint &) ) );
+ connect( m_tab, TQT_SIGNAL( showContexMenu(TQWidget *, const TQPoint &) ),
+ this, TQT_SLOT( slotShowContexMenu(TQWidget *, const TQPoint &) ) );
KConfig *config = kapp->config();
config->setGroup("MDI");
- QSize s( 600, 360 );
+ TQSize s( 600, 360 );
resize(config->readSizeEntry( "TopLevelSize", &s ));
m_dirtyIcon = UserIcon( "star" );
m_addressedIcon = UserIcon( "info" );
m_pop = new KPopupMenu(m_tab, "");
- m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, SLOT( slotCloseLastWid() ));
+ m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, TQT_SLOT( slotCloseLastWid() ));
}
@@ -67,21 +67,21 @@ MDITopLevel::~MDITopLevel()
config->writeEntry( "TopLevelSize", this->size() );
config->sync();
- QPtrListIterator<QWidget> it( m_tabWidgets );
+ TQPtrListIterator<TQWidget> it( m_tabWidgets );
for (; it.current(); ++it )
it.current()->disconnect( this, 0 );
kdDebug(5008) << "~MDITopLevel out" << endl;
}
-void MDITopLevel::addWidget( QWidget *widget, bool show )
+void MDITopLevel::addWidget( TQWidget *widget, bool show )
{
if ( m_tabWidgets.containsRef( widget ) )
return;
kdDebug(5008) << "In add widget" << endl;
- widget->reparent( m_tab, 0, QPoint( 0, 0 ), show );
+ widget->reparent( m_tab, 0, TQPoint( 0, 0 ), show );
if(show == TRUE){
showWidget(widget);
@@ -89,19 +89,19 @@ void MDITopLevel::addWidget( QWidget *widget, bool show )
m_tabWidgets.append( widget );
- connect( widget, SIGNAL( destroyed() ) ,
- this, SLOT( slotWidgetDestroyed() ) );
+ connect( widget, TQT_SIGNAL( destroyed() ) ,
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
- connect( widget, SIGNAL( changeChannel( const QString &, const QString & ) ),
- this, SLOT( slotChangeChannelName( const QString &, const QString & ) ) );
+ connect( widget, TQT_SIGNAL( changeChannel( const TQString &, const TQString & ) ),
+ this, TQT_SLOT( slotChangeChannelName( const TQString &, const TQString & ) ) );
widget->installEventFilter( this );
- connect( widget, SIGNAL( changed( bool, QString ) ),
- this, SLOT( slotMarkPageDirty( bool ) ) );
+ connect( widget, TQT_SIGNAL( changed( bool, TQString ) ),
+ this, TQT_SLOT( slotMarkPageDirty( bool ) ) );
}
-void MDITopLevel::removeWidget( QWidget *widget )
+void MDITopLevel::removeWidget( TQWidget *widget )
{
if (m_closing)
return;
@@ -112,17 +112,17 @@ void MDITopLevel::removeWidget( QWidget *widget )
widget->disconnect( this, 0 );
}
-void MDITopLevel::hideWidget( QWidget *widget )
+void MDITopLevel::hideWidget( TQWidget *widget )
{
m_tab->removePage( widget );
widget->hide();
}
-void MDITopLevel::showWidget( QWidget *widget )
+void MDITopLevel::showWidget( TQWidget *widget )
{
if(m_tab->indexOf(widget) == -1){
int space = widget->caption().find(" ");
- QString cap = space < 1 ? widget->caption():widget->caption().left(space);
+ TQString cap = space < 1 ? widget->caption():widget->caption().left(space);
m_tab->addTab( widget, cap);
m_tab->showPage( widget );
m_tab->setCurrentPage( m_tab->indexOf(widget) );
@@ -145,7 +145,7 @@ void MDITopLevel::previous()
m_tab->setCurrentPage(m_tab->count() - 1);
}
-void MDITopLevel::closeEvent( QCloseEvent *ev )
+void MDITopLevel::closeEvent( TQCloseEvent *ev )
{
m_closing = true;
// Don't use iterators on a list while deleting elements
@@ -154,11 +154,11 @@ void MDITopLevel::closeEvent( QCloseEvent *ev )
kdDebug(5008) << "Mdi got close event " << endl;
while ( m_tabWidgets.count() && (i++ < 100000)) {
kdDebug(5008) << "MDITopLevel trying to close: " << m_tabWidgets.first()->name() << endl;
- QGuardedPtr<QWidget> w = m_tabWidgets.take(0);
+ TQGuardedPtr<TQWidget> w = m_tabWidgets.take(0);
w->show();
w->close( false );
if(w)
- delete (QWidget *)w;
+ delete (TQWidget *)w;
}
KMainWindow::closeEvent( ev );
@@ -167,18 +167,18 @@ void MDITopLevel::closeEvent( QCloseEvent *ev )
void MDITopLevel::slotWidgetDestroyed()
{
- const QWidget *widget = static_cast<const QWidget *>( sender() );
+ const TQWidget *widget = static_cast<const TQWidget *>( sender() );
m_tabWidgets.removeRef( widget );
removeFromAddressedList( widget );
}
-bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev )
+bool MDITopLevel::eventFilter( TQObject *obj, TQEvent *ev )
{
- if ( ev->type() != QEvent::CaptionChange )
+ if ( ev->type() != TQEvent::CaptionChange )
return false;
- QWidget *widget = dynamic_cast<QWidget *>( obj );
+ TQWidget *widget = dynamic_cast<TQWidget *>( obj );
if ( !widget || !m_tabWidgets.containsRef( widget ) )
return false;
@@ -189,13 +189,13 @@ bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev )
return false;
}
-void MDITopLevel::slotCurrentChanged( QWidget *page )
+void MDITopLevel::slotCurrentChanged( TQWidget *page )
{
- m_tab->setTabIconSet( page, QIconSet() );
+ m_tab->setTabIconSet( page, TQIconSet() );
removeFromAddressedList( page );
- setPlainCaption( page->QWidget::caption() );
+ setPlainCaption( page->TQWidget::caption() );
KSircTopLevel *kst = dynamic_cast<KSircTopLevel *>( page );
if ( !kst )
@@ -207,7 +207,7 @@ void MDITopLevel::slotMarkPageDirty( bool addressed )
{
// This is called when a line appeared in this channel.
// addressed is true if it was addressed to the user
- KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<QObject *>( sender() ) );
+ KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<TQObject *>( sender() ) );
if ( !window )
return;
@@ -223,27 +223,27 @@ void MDITopLevel::slotMarkPageDirty( bool addressed )
}
}
-void MDITopLevel::slotChangeChannelName( const QString &, const QString &channelName )
+void MDITopLevel::slotChangeChannelName( const TQString &, const TQString &channelName )
{
- KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<QObject *>( sender() ) );
+ KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<TQObject *>( sender() ) );
if ( !window )
return;
- QString esc = channelName;
+ TQString esc = channelName;
esc.replace("&", "&&");
m_tab->setTabLabel( window, esc );
removeFromAddressedList( window );
}
-void MDITopLevel::removeFromAddressedList( const QWidget* w )
+void MDITopLevel::removeFromAddressedList( const TQWidget* w )
{
// If this tab was showing a "you're being talked to" icon, remove it
// and tell the servercontroller (so that it can update the docked icon).
m_addressed.removeRef( w );
}
-void MDITopLevel::slotShowContexMenu(QWidget *w, const QPoint &p)
+void MDITopLevel::slotShowContexMenu(TQWidget *w, const TQPoint &p)
{
m_last_pop_wid = w;
m_pop->popup(p);
diff --git a/ksirc/mditoplevel.h b/ksirc/mditoplevel.h
index 7f58619c..c0f1c010 100644
--- a/ksirc/mditoplevel.h
+++ b/ksirc/mditoplevel.h
@@ -1,8 +1,8 @@
#ifndef __mditoplevel_h__
#define __mditoplevel_h__
-#include <qptrlist.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqtabwidget.h>
#include <kmainwindow.h>
@@ -10,16 +10,16 @@ class KSTabWidget : public QTabWidget
{
Q_OBJECT
public:
- KSTabWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
- : QTabWidget(parent, name, f)
+ KSTabWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
+ : TQTabWidget(parent, name, f)
{
}
protected:
- virtual void mousePressEvent(QMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
signals:
- void showContexMenu(QWidget *, const QPoint &);
+ void showContexMenu(TQWidget *, const TQPoint &);
};
@@ -30,45 +30,45 @@ class MDITopLevel : public KMainWindow
{
Q_OBJECT
public:
- MDITopLevel(QWidget *parent = 0, const char *name = 0);
+ MDITopLevel(TQWidget *parent = 0, const char *name = 0);
virtual ~MDITopLevel();
- void addWidget( QWidget *widget, bool show );
+ void addWidget( TQWidget *widget, bool show );
- void removeWidget( QWidget *widget );
+ void removeWidget( TQWidget *widget );
- QTabWidget *tabWidget() const { return m_tab; }
+ TQTabWidget *tabWidget() const { return m_tab; }
void next();
void previous();
- QPtrList<QWidget> &widgets() { return m_tabWidgets; }
+ TQPtrList<TQWidget> &widgets() { return m_tabWidgets; }
- void hideWidget( QWidget *widget );
- void showWidget( QWidget *widget );
+ void hideWidget( TQWidget *widget );
+ void showWidget( TQWidget *widget );
- virtual bool eventFilter( QObject *obj, QEvent *ev );
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev );
bool closing() const { return m_closing; }
protected:
- void removeFromAddressedList( const QWidget* w );
- virtual void closeEvent( QCloseEvent *ev );
+ void removeFromAddressedList( const TQWidget* w );
+ virtual void closeEvent( TQCloseEvent *ev );
private slots:
void slotWidgetDestroyed();
- void slotCurrentChanged( QWidget *page );
+ void slotCurrentChanged( TQWidget *page );
void slotMarkPageDirty( bool );
- void slotChangeChannelName( const QString &, const QString &newName );
- void slotShowContexMenu(QWidget *, const QPoint &);
+ void slotChangeChannelName( const TQString &, const TQString &newName );
+ void slotShowContexMenu(TQWidget *, const TQPoint &);
void slotCloseLastWid();
private:
KSTabWidget *m_tab;
KPopupMenu *m_pop;
- QWidget *m_last_pop_wid;
- QPtrList<QWidget> m_tabWidgets;
- QPtrList<QWidget> m_addressed;
- QPixmap m_dirtyIcon;
- QPixmap m_addressedIcon;
+ TQWidget *m_last_pop_wid;
+ TQPtrList<TQWidget> m_tabWidgets;
+ TQPtrList<TQWidget> m_addressed;
+ TQPixmap m_dirtyIcon;
+ TQPixmap m_addressedIcon;
bool m_closing;
};
diff --git a/ksirc/messageReceiver.cpp b/ksirc/messageReceiver.cpp
index f2ac6ee0..e60d82e3 100644
--- a/ksirc/messageReceiver.cpp
+++ b/ksirc/messageReceiver.cpp
@@ -1,6 +1,6 @@
#include "messageReceiver.h"
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -36,7 +36,7 @@ UnicodeMessageReceiver::UnicodeMessageReceiver( KSircProcess *process )
{
}
-void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast )
+void UnicodeMessageReceiver::sirc_receive( TQCString str, bool broadcast )
{
assert( encoder() );
//kdDebug(5008) << "Encoder: " << encoder()->name() << endl;
@@ -44,23 +44,23 @@ void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast )
sirc_receive( encoder()->toUnicode( str ), broadcast );
}
-void UnicodeMessageReceiver::setEncoding( const QString &encoding )
+void UnicodeMessageReceiver::setEncoding( const TQString &encoding )
{
m_encoding = encoding;
m_encoder = 0;
}
-QString UnicodeMessageReceiver::encoding() const
+TQString UnicodeMessageReceiver::encoding() const
{
if ( m_encoding.isEmpty() )
- return QTextCodec::codecForLocale()->mimeName();
+ return TQTextCodec::codecForLocale()->mimeName();
return m_encoding;
}
-QTextCodec *UnicodeMessageReceiver::encoder() const
+TQTextCodec *UnicodeMessageReceiver::encoder() const
{
if ( m_encoding.isEmpty() ) {
- return QTextCodec::codecForLocale();
+ return TQTextCodec::codecForLocale();
}
if ( !m_encoder ) {
diff --git a/ksirc/messageReceiver.h b/ksirc/messageReceiver.h
index a86817b0..e70e82f3 100644
--- a/ksirc/messageReceiver.h
+++ b/ksirc/messageReceiver.h
@@ -2,8 +2,8 @@
#ifndef KMESSAGERECEIVER_H
#define KMESSAGERECEIVER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class KSircProcess;
class QTextCodec;
@@ -15,7 +15,7 @@ struct filterRule {
const char *to;
};
-typedef QPtrList<filterRule> filterRuleList;
+typedef TQPtrList<filterRule> filterRuleList;
class KSircMessageReceiver
{
@@ -23,9 +23,9 @@ public:
KSircMessageReceiver(KSircProcess *_proc);
virtual ~KSircMessageReceiver();
- virtual void sirc_receive(QCString str, bool broadcast = false) = 0;
+ virtual void sirc_receive(TQCString str, bool broadcast = false) = 0;
- virtual void control_message(int, QString) = 0;
+ virtual void control_message(int, TQString) = 0;
bool getBroadcast();
void setBroadcast(bool bd);
@@ -45,18 +45,18 @@ class UnicodeMessageReceiver : public KSircMessageReceiver
public:
UnicodeMessageReceiver( KSircProcess *process );
- virtual void sirc_receive(QCString str, bool broadcast = false);
- virtual void sirc_receive(QString str, bool broadcast = false) = 0;
+ virtual void sirc_receive(TQCString str, bool broadcast = false);
+ virtual void sirc_receive(TQString str, bool broadcast = false) = 0;
protected:
- void setEncoding( const QString &encoding );
- QString encoding() const;
+ void setEncoding( const TQString &encoding );
+ TQString encoding() const;
- QTextCodec *encoder() const;
+ TQTextCodec *encoder() const;
private:
- QString m_encoding;
- QTextCodec *m_encoder;
+ TQString m_encoding;
+ TQTextCodec *m_encoder;
};
#endif
diff --git a/ksirc/nickColourMaker.cpp b/ksirc/nickColourMaker.cpp
index b3f793a6..ce866349 100644
--- a/ksirc/nickColourMaker.cpp
+++ b/ksirc/nickColourMaker.cpp
@@ -18,9 +18,9 @@
// $Id$
-#include <qstring.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include "nickColourMaker.h"
@@ -33,7 +33,7 @@ nickColourMaker::nickColourMaker()
s_ncm = this;
}
-int nickColourMaker::findIdx(QString nick) const
+int nickColourMaker::findIdx(TQString nick) const
{
unsigned int value = 0;
uint i;
@@ -71,7 +71,7 @@ int nickColourMaker::findIdx(QString nick) const
}
-QColor nickColourMaker::findFg(QString nick) const
+TQColor nickColourMaker::findFg(TQString nick) const
{
int value = findIdx(nick);
diff --git a/ksirc/nickColourMaker.h b/ksirc/nickColourMaker.h
index 239a7935..ab3593fd 100644
--- a/ksirc/nickColourMaker.h
+++ b/ksirc/nickColourMaker.h
@@ -7,10 +7,10 @@
#ifndef __nickcolourmaker_h__
#define __nickcolourmaker_h__
-#include <qdict.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qcolor.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqcolor.h>
#include "ksopts.h"
struct nickColourInfo
@@ -26,9 +26,9 @@ class nickColourMaker
public:
nickColourMaker();
- int findIdx(QString nick) const;
- QColor findFg(QString nick) const;
- QColor operator[]( QString nick ) const
+ int findIdx(TQString nick) const;
+ TQColor findFg(TQString nick) const;
+ TQColor operator[]( TQString nick ) const
{
return findFg(nick);
}
@@ -38,7 +38,7 @@ public:
private:
static nickColourMaker *s_ncm;
- QDict<nickColourInfo> m_nicks;
+ TQDict<nickColourInfo> m_nicks;
};
#endif
diff --git a/ksirc/objFinder.cpp b/ksirc/objFinder.cpp
index 4625b6cf..5988903d 100644
--- a/ksirc/objFinder.cpp
+++ b/ksirc/objFinder.cpp
@@ -1,15 +1,15 @@
#include "objFinder.h"
-#include <qapplication.h>
-#include <qobjectlist.h>
-#include <qwidgetlist.h>
+#include <tqapplication.h>
+#include <tqobjectlist.h>
+#include <tqwidgetlist.h>
#include <stdlib.h>
#include <time.h>
#include <kdebug.h>
-QDict<QObject> *objFinder::objList = new QDict<QObject>;
+TQDict<TQObject> *objFinder::objList = new TQDict<TQObject>;
/*
* So we can connect to the slots, etc
@@ -17,7 +17,7 @@ QDict<QObject> *objFinder::objList = new QDict<QObject>;
objFinder *objFind = new objFinder();
objFinder::objFinder()
- : QObject()
+ : TQObject()
{
}
@@ -25,8 +25,8 @@ objFinder::~objFinder()
{
}
-void objFinder::insert(QObject *obj, const char *key){
- QString name;
+void objFinder::insert(TQObject *obj, const char *key){
+ TQString name;
if(obj == 0x0){
qWarning("objFinder: Passed Null Object");
@@ -43,22 +43,22 @@ void objFinder::insert(QObject *obj, const char *key){
}
}
objList->insert(name, obj);
- connect(obj, SIGNAL(destroyed()),
- objFind, SLOT(objDest()));
+ connect(obj, TQT_SIGNAL(destroyed()),
+ objFind, TQT_SLOT(objDest()));
emit objFind->inserted(obj);
}
-QObject *objFinder::find(const char *name, const char *inherits){
- QObject *found;
- QDictIterator<QObject> it(*objList);
+TQObject *objFinder::find(const char *name, const char *inherits){
+ TQObject *found;
+ TQDictIterator<TQObject> it(*objList);
uint len = strlen(name);
while(it.current()){
if(len == strlen(it.current()->name()) &&
strcmp(it.current()->name(), name) == 0)
return it.current();
- QObjectList *qobl = it.current()->queryList(inherits, name, FALSE);
- QObjectListIt itql( *qobl );
+ TQObjectList *qobl = it.current()->queryList(inherits, name, FALSE);
+ TQObjectListIt itql( *qobl );
if(itql.current() != 0x0){
found = itql.current();
delete qobl;
@@ -67,8 +67,8 @@ QObject *objFinder::find(const char *name, const char *inherits){
delete qobl;
++it;
}
- QWidgetList *all = QApplication::allWidgets();
- QWidgetListIt itW(*all);
+ TQWidgetList *all = TQApplication::allWidgets();
+ TQWidgetListIt itW(*all);
while(itW.current()){
if(len == strlen(itW.current()->name()) &&
strcmp(itW.current()->name(), name) == 0){
@@ -88,13 +88,13 @@ QObject *objFinder::find(const char *name, const char *inherits){
}
void objFinder::dumpTree(){
- QDictIterator<QObject> it(*objList);
+ TQDictIterator<TQObject> it(*objList);
while(it.current()){
it.current()->dumpObjectTree();
++it;
}
- QWidgetList *all = QApplication::allWidgets();
- QWidgetListIt itW(*all);
+ TQWidgetList *all = TQApplication::allWidgets();
+ TQWidgetListIt itW(*all);
while(itW.current()){
kdDebug(5008) << itW.current()->className() << "::" << itW.current()->name("unnamed") << endl;
++itW;
@@ -102,14 +102,14 @@ void objFinder::dumpTree(){
}
-QStringList objFinder::allObjects(){
- QStringList allNames;
- QDictIterator<QObject> it(*objList);
+TQStringList objFinder::allObjects(){
+ TQStringList allNames;
+ TQDictIterator<TQObject> it(*objList);
while(it.current()){
- QObjectList *qobl = it.current()->queryList(); // Matches everything
- QObjectListIt itql( *qobl );
+ TQObjectList *qobl = it.current()->queryList(); // Matches everything
+ TQObjectListIt itql( *qobl );
while(itql.current()){
- QString name;
+ TQString name;
name = itql.current()->className();
name += "::";
name += itql.current()->name("unnamed");
@@ -119,10 +119,10 @@ QStringList objFinder::allObjects(){
delete qobl;
++it;
}
- QWidgetList *all = QApplication::allWidgets();
- QWidgetListIt itW(*all);
+ TQWidgetList *all = TQApplication::allWidgets();
+ TQWidgetListIt itW(*all);
while(itW.current()){
- QString name;
+ TQString name;
name = itW.current()->className();
name += "::";
name += itW.current()->name("unnamed");
@@ -133,9 +133,9 @@ QStringList objFinder::allObjects(){
return allNames;
}
-QString objFinder::randString(){
+TQString objFinder::randString(){
static bool runSrand = 0;
- QString str = "";
+ TQString str = "";
if(runSrand == 0){
srand(time(NULL));
}
@@ -149,7 +149,7 @@ void objFinder::objDest(){
if(sender() == 0x0){
return;
}
- QDictIterator<QObject> it(*objList);
+ TQDictIterator<TQObject> it(*objList);
while(it.current()){
if(it.current() == sender()){
objList->remove(it.currentKey());
diff --git a/ksirc/objFinder.h b/ksirc/objFinder.h
index 8777dd68..f4f6fbd2 100644
--- a/ksirc/objFinder.h
+++ b/ksirc/objFinder.h
@@ -1,24 +1,24 @@
#ifndef OBJFINGER_H
#define OBJFINGER_H
-#include <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
-class objFinder : public QObject {
+class objFinder : public TQObject {
Q_OBJECT
public:
objFinder();
virtual ~objFinder();
- static void insert(QObject *obj, const char *key = 0);
- static QObject *find(const char *name, const char *inherits);
+ static void insert(TQObject *obj, const char *key = 0);
+ static TQObject *find(const char *name, const char *inherits);
static void dumpTree();
- static QStringList allObjects();
+ static TQStringList allObjects();
signals:
- void inserted(QObject *obj);
+ void inserted(TQObject *obj);
protected slots:
void objDest();
@@ -28,10 +28,10 @@ private:
* Don't allow the object to be created, all it's members are static
*/
- static QString randString();
+ static TQString randString();
- static QDict<QObject> *objList;
+ static TQDict<TQObject> *objList;
};
diff --git a/ksirc/puke/commands.h b/ksirc/puke/commands.h
index 3e45d8ba..50ff88b2 100644
--- a/ksirc/puke/commands.h
+++ b/ksirc/puke/commands.h
@@ -166,7 +166,7 @@
// cArg: not defined
#define PUKE_WIDGET_RESIZE_ACK -1015
-// -1020 to -1040 defines QEvent types
+// -1020 to -1040 defines TQEvent types
// All arguments are 0 unless otherwise stated
#define PUKE_WIDGET_EVENT_NONE -1020
// iArg: timerId
@@ -347,7 +347,7 @@
// cArg: 0
#define PUKE_WIDGET_RECREATE_ACK -1091
-// QFrame gets 1100
+// TQFrame gets 1100
// 1100 defines QFrame
// Desc: set Frame style
@@ -587,11 +587,11 @@
// cArg: not defined
#define PUKE_KSPROGRESS_CANCEL_ACK -1425
-// QTable View at 1500
+// TQTable View at 1500
// none yet
-// QListBox at 1600
+// TQListBox at 1600
// Desc: insert string item
// iWinId: window id
@@ -935,7 +935,7 @@
// OBJECT base class
#define PWIDGET_OBJECT 1
-// WIDGET defines a base QWidget class
+// WIDGET defines a base TQWidget class
#define PWIDGET_WIDGET 2
// FRAME defines a base class
diff --git a/ksirc/puke/controller.cpp b/ksirc/puke/controller.cpp
index 1e798be7..04017529 100644
--- a/ksirc/puke/controller.cpp
+++ b/ksirc/puke/controller.cpp
@@ -16,7 +16,7 @@
using namespace std; // iostream.h include cstring which puts strlen into
// std:: namespace, which breaks Qt's strlen() call
- // in qcstring.h (in gcc3's libstdc++)
+ // in tqcstring.h (in gcc3's libstdc++)
#include <klibloader.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@ using namespace std; // iostream.h include cstring which puts strlen into
uint PukeController::uiBaseWinId = 10; // Gives a little seperation from the controller id
-PukeController::PukeController(QString sock, QObject *parent, const char *name) : PObject( parent, name )
+PukeController::PukeController(TQString sock, TQObject *parent, const char *name) : PObject( parent, name )
{
int len, prev_umask;
struct sockaddr_un unix_addr;
@@ -102,12 +102,12 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name)
fcntl(iListenFd, F_SETFL, O_NONBLOCK); // Set it non-block so that
// accept() never blocks.
- qsnListen = new QSocketNotifier(iListenFd, QSocketNotifier::Read, this, QString(name) + "_iListen");
- connect(qsnListen, SIGNAL(activated(int)),
- this, SLOT(NewConnect(int)));
+ qsnListen = new TQSocketNotifier(iListenFd, TQSocketNotifier::Read, this, TQString(name) + "_iListen");
+ connect(qsnListen, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(NewConnect(int)));
- connect(objFind, SIGNAL(inserted(QObject *)),
- this, SLOT(slotInserted(QObject *)));
+ connect(objFind, TQT_SIGNAL(inserted(TQObject *)),
+ this, TQT_SLOT(slotInserted(TQObject *)));
qidConnectFd.setAutoDelete(TRUE);
@@ -124,8 +124,8 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name)
* Connect outputMessage to the acutal write buffer function
* outputMessage signals from pobjects are chained until they finally reach us.
*/
- connect(this, SIGNAL(outputMessage(int, PukeMessage *)),
- this, SLOT(writeBuffer(int, PukeMessage *)));
+ connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage *)),
+ this, TQT_SLOT(writeBuffer(int, PukeMessage *)));
initHdlr(); // Setup message command handlers.
@@ -142,7 +142,7 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name)
}
void
-PukeController::slotInserted(QObject *obj)
+PukeController::slotInserted(TQObject *obj)
{
emit inserted(obj);
}
@@ -154,7 +154,7 @@ PukeController::~PukeController()
unlink(qsPukeSocket);
}
-QStrList PukeController::allObjects()
+TQStrList PukeController::allObjects()
{
return objFinder::allObjects();
}
@@ -174,12 +174,12 @@ void PukeController::NewConnect(int)
// cfd() never blocks.
fdStatus *fds = new fdStatus();
- fds->sr = new QSocketNotifier(cfd, QSocketNotifier::Read, this);
- fds->sw = new QSocketNotifier(cfd, QSocketNotifier::Write, this);
- connect(fds->sr, SIGNAL(activated(int)),
- this, SLOT(Traffic(int)));
- connect(fds->sw, SIGNAL(activated(int)),
- this, SLOT(Writeable(int)));
+ fds->sr = new TQSocketNotifier(cfd, TQSocketNotifier::Read, this);
+ fds->sw = new TQSocketNotifier(cfd, TQSocketNotifier::Write, this);
+ connect(fds->sr, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(Traffic(int)));
+ connect(fds->sw, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(Writeable(int)));
qidConnectFd.insert(cfd, fds);
qsnListen->setEnabled(TRUE);
@@ -350,7 +350,7 @@ void PukeController::Traffic(int fd)
}
-void PukeController::ServMessage(QString, int, QString)
+void PukeController::ServMessage(TQString, int, TQString)
{
}
@@ -585,7 +585,7 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm)
// Let's go looking for the widget
// Match any class with the right name
- QObject *obj = 0x0;
+ TQObject *obj = 0x0;
if(parent() && (strcmp(name, parent()->name()) == 0)){
obj = parent();
}
@@ -609,8 +609,8 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm)
}
ws->type = iType;
- connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)),
- this, SIGNAL(outputMessage(int, PukeMessage*)));
+ connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)),
+ this, TQT_SIGNAL(outputMessage(int, PukeMessage*)));
// insertPBoject(fd, uiBaseWinId, ws);
// The widget list has to exist since we have ourselves in the list
@@ -637,7 +637,7 @@ void PukeController::hdlrPukeDeleteWidget(int fd, PukeMessage *pm)
throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_CONTROL));
/*
- QIntDict<WidgetS> *qidWS = WidgetList[fd];
+ TQIntDict<WidgetS> *qidWS = WidgetList[fd];
if(qidWS == 0){
kdDebug(5008) << "WidgetRunner:: no such set of widget descriptors?" << endl;
throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_SUCH_CONNECTION));
@@ -691,7 +691,7 @@ void PukeController::closefd(int fd)
/*
* Now let's remove all traces of the widgets
*/
- QIntDict<WidgetS> *qidWS = WidgetList[fd];
+ TQIntDict<WidgetS> *qidWS = WidgetList[fd];
if(qidWS == 0){
kdDebug(5008) << "WidgetRunner:: Close called twice?" << endl;
bClosing = FALSE;
@@ -702,7 +702,7 @@ void PukeController::closefd(int fd)
do {
- QIntDictIterator<WidgetS> it(*qidWS);
+ TQIntDictIterator<WidgetS> it(*qidWS);
if(it.count() == 0){
kdDebug(5008) << "WidgetRunner: nothing left to delete\n" << endl;
break;
@@ -778,7 +778,7 @@ PWidget *PukeController::id2pwidget(widgetId *pwi){
void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){
// If no widget list exists for this fd, create one
if(WidgetList[fd] == NULL){
- QIntDict<WidgetS> *qidWS = new QIntDict<WidgetS>;
+ TQIntDict<WidgetS> *qidWS = new TQIntDict<WidgetS>;
qidWS->setAutoDelete(TRUE);
WidgetList.insert(fd, qidWS);
}
@@ -796,8 +796,8 @@ void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){
// Now connect to the destroyed signal so we can remove the object from the lists
// Once it is deleted
- connect(obj->pwidget, SIGNAL(destroyed()),
- this, SLOT(pobjectDestroyed()));
+ connect(obj->pwidget, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(pobjectDestroyed()));
}
void PukeController::pobjectDestroyed(){
@@ -868,7 +868,7 @@ void PukeController::messageHandler(int fd, PukeMessage *pm) {
return;
}
- QString libName = "ksirc/lib"+QString::fromLatin1(pm->cArg);
+ TQString libName = "ksirc/lib"+TQString::fromLatin1(pm->cArg);
if (libName.right(3) == ".so")
libName = libName.left(libName.length()-2)+"la";
@@ -959,8 +959,8 @@ widgetId PukeController::createWidget(widgetId wI, PukeMessage *pm)
}
ws->type = iType;
- connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)),
- this, SIGNAL(outputMessage(int, PukeMessage*)));
+ connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)),
+ this, TQT_SIGNAL(outputMessage(int, PukeMessage*)));
// insertPBoject(fd, uiBaseWinId, ws);
// The widget list has to exist since we have ourselves in the list
diff --git a/ksirc/puke/controller.h b/ksirc/puke/controller.h
index 80728224..5daa1629 100644
--- a/ksirc/puke/controller.h
+++ b/ksirc/puke/controller.h
@@ -8,12 +8,12 @@
#ifndef PUKE_CONTROLLER_H
#define PUKE_CONTROLLER_H
-#include <qobject.h>
-#include <qsocketnotifier.h>
-#include <qstring.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qstrlist.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqstrlist.h>
#include "pmessage.h"
#include "pobject.h"
@@ -24,9 +24,9 @@ class PukeController;
class KLibrary;
typedef struct {
- QString server;
+ TQString server;
bool writeable;
- QSocketNotifier *sr,*sw;
+ TQSocketNotifier *sr,*sw;
} fdStatus;
@@ -81,7 +81,7 @@ class PukeController : public PObject
{
Q_OBJECT
public:
- PukeController(QString socket = "", QObject *parent=0, const char *name=0);
+ PukeController(TQString socket = "", TQObject *parent=0, const char *name=0);
virtual ~PukeController();
bool running;
@@ -102,20 +102,20 @@ public:
*/
PWidget *id2pwidget(widgetId *pwi);
- QStrList allObjects();
+ TQStrList allObjects();
signals:
- void PukeMessages(QString server, int command, QString args);
- void inserted(QObject *);
+ void PukeMessages(TQString server, int command, TQString args);
+ void inserted(TQObject *);
public slots:
- void ServMessage(QString, int, QString);
+ void ServMessage(TQString, int, TQString);
protected slots:
void Traffic(int);
void Writeable(int);
void NewConnect(int);
- void slotInserted(QObject *obj);
+ void slotInserted(TQObject *obj);
/**
* When we delete a widget, this removes it from our internal
@@ -132,11 +132,11 @@ protected slots:
private:
- QString qsPukeSocket;
+ TQString qsPukeSocket;
int iListenFd;
bool bClosing; // Set true if we are closing, we don't try and close twice at the same time.
- QSocketNotifier *qsnListen;
- QIntDict<fdStatus> qidConnectFd;
+ TQSocketNotifier *qsnListen;
+ TQIntDict<fdStatus> qidConnectFd;
/**
* Controller ID is defined as 1
@@ -145,15 +145,15 @@ private:
// List of widgets and the fle descriptors they belong too
- QIntDict<QIntDict<WidgetS> > WidgetList;
+ TQIntDict<TQIntDict<WidgetS> > WidgetList;
// I use a char * key that's the %p (hex address) of the pwidget
- QDict<widgetId> revWidgetList;
+ TQDict<widgetId> revWidgetList;
enum { keySize = 10 };
// Funtions used to create new widget
- QIntDict<widgetCreate> widgetCF; // widgetCreatingFuntion List
+ TQIntDict<widgetCreate> widgetCF; // widgetCreatingFuntion List
- QIntDict<commandStruct> qidCommandTable;
+ TQIntDict<commandStruct> qidCommandTable;
void initHdlr();
@@ -181,11 +181,11 @@ private:
/**
* NOT APPLICAABLE
*/
- void setWidget(QObject *) { }
+ void setWidget(TQObject *) { }
/**
* NOT APPLICAABLE
*/
- virtual QObject *widget() { return 0x0; }
+ virtual TQObject *widget() { return 0x0; }
/**
* Inserts a PObject into our internal list
diff --git a/ksirc/puke/palistbox.cpp b/ksirc/puke/palistbox.cpp
index 8f3f22f1..9f43b124 100644
--- a/ksirc/puke/palistbox.cpp
+++ b/ksirc/puke/palistbox.cpp
@@ -13,7 +13,7 @@ PAListBox::createWidget(CreateArgs &ca)
plb->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- lb = new aListBox((QWidget *) ca.parent->widget());
+ lb = new aListBox((TQWidget *) ca.parent->widget());
else
lb = new aListBox();
plb->setWidget(lb);
@@ -123,7 +123,7 @@ void PAListBox::messageHandler(int fd, PukeMessage *pm)
}
}
-void PAListBox::setWidget(QObject *_lb)
+void PAListBox::setWidget(TQObject *_lb)
{
if(_lb != 0 && _lb->inherits("aListBox") == FALSE)
{
diff --git a/ksirc/puke/palistbox.h b/ksirc/puke/palistbox.h
index 0731bef9..a902b018 100644
--- a/ksirc/puke/palistbox.h
+++ b/ksirc/puke/palistbox.h
@@ -19,7 +19,7 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_lb = 0x0);
+ virtual void setWidget(TQObject *_lb = 0x0);
virtual aListBox *widget();
public slots:
diff --git a/ksirc/puke/pbutton.cpp b/ksirc/puke/pbutton.cpp
index 309f2ac7..edccbe81 100644
--- a/ksirc/puke/pbutton.cpp
+++ b/ksirc/puke/pbutton.cpp
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdebug.h>
@@ -11,11 +11,11 @@ PObject *
PButton::createWidget(CreateArgs &ca)
{
PButton *pb = new PButton(ca.parent);
- QButton *qb;
+ TQButton *qb;
if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- qb = new QButton((QWidget *) ca.parent->widget());
+ qb = new TQButton((TQWidget *) ca.parent->widget());
else
- qb = new QButton();
+ qb = new TQButton();
pb->setWidget(qb);
pb->setWidgetId(ca.pwI);
return pb;
@@ -60,7 +60,7 @@ void PButton::messageHandler(int fd, PukeMessage *pm)
if(checkWidget() == FALSE)
return;
- widget()->setPixmap(QPixmap(pm->cArg));
+ widget()->setPixmap(TQPixmap(pm->cArg));
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
@@ -82,24 +82,24 @@ void PButton::messageHandler(int fd, PukeMessage *pm)
}
}
-void PButton::setWidget(QObject *_qb)
+void PButton::setWidget(TQObject *_qb)
{
- if(_qb != 0 && _qb->inherits("QButton") == FALSE)
+ if(_qb != 0 && _qb->inherits("TQButton") == FALSE)
{
errorInvalidSet(_qb);
return;
}
- button = (QButton *) _qb;
+ button = (TQButton *) _qb;
if(button != 0){
- connect(button, SIGNAL(pressed()),
- this, SLOT(buttonPressed()));
- connect(button, SIGNAL(released()),
- this, SLOT(buttonReleased()));
- connect(button, SIGNAL(clicked()),
- this, SLOT(buttonClicked()));
- connect(button, SIGNAL(toggled(bool)),
- this, SLOT(buttonToggled(bool)));
+ connect(button, TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(buttonPressed()));
+ connect(button, TQT_SIGNAL(released()),
+ this, TQT_SLOT(buttonReleased()));
+ connect(button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(buttonClicked()));
+ connect(button, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(buttonToggled(bool)));
}
PWidget::setWidget(_qb);
@@ -107,7 +107,7 @@ void PButton::setWidget(QObject *_qb)
}
-QButton *PButton::widget()
+TQButton *PButton::widget()
{
return button;
}
diff --git a/ksirc/puke/pbutton.h b/ksirc/puke/pbutton.h
index e43bd681..addc7713 100644
--- a/ksirc/puke/pbutton.h
+++ b/ksirc/puke/pbutton.h
@@ -3,7 +3,7 @@
class PButton;
-#include <qbutton.h>
+#include <tqbutton.h>
#include "pmessage.h"
#include "pwidget.h"
#include "pobject.h"
@@ -21,8 +21,8 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_qb = 0x0);
- virtual QButton *widget();
+ virtual void setWidget(TQObject *_qb = 0x0);
+ virtual TQButton *widget();
public slots:
void buttonPressed();
@@ -31,7 +31,7 @@ public slots:
void buttonToggled(bool);
private:
- QButton *button;
+ TQButton *button;
void buttonMessage(int iCommand);
bool checkWidget();
diff --git a/ksirc/puke/pframe.cpp b/ksirc/puke/pframe.cpp
index fcff1d96..d0dc79e3 100644
--- a/ksirc/puke/pframe.cpp
+++ b/ksirc/puke/pframe.cpp
@@ -5,12 +5,12 @@ PObject *
PFrame::createWidget(CreateArgs &ca)
{
PFrame *pw = new PFrame(ca.parent);
- QFrame *tf;
+ TQFrame *tf;
if(ca.parent != 0 &&
ca.parent->widget()->isWidgetType() == TRUE)
- tf = new QFrame((QWidget *) ca.parent->widget());
+ tf = new TQFrame((TQWidget *) ca.parent->widget());
else
- tf = new QFrame();
+ tf = new TQFrame();
pw->setWidget(tf);
pw->setWidgetId(ca.pwI);
pw->setPukeController(ca.pc);
@@ -61,20 +61,20 @@ void PFrame::messageHandler(int fd, PukeMessage *pm)
}
}
-void PFrame::setWidget(QObject *w)
+void PFrame::setWidget(TQObject *w)
{
- if(w != 0 && w->inherits("QFrame") == FALSE)
+ if(w != 0 && w->inherits("TQFrame") == FALSE)
{
errorInvalidSet(w);
return;
}
- frame = (QFrame *) w;
- PWidget::setWidget((QWidget *) w);
+ frame = (TQFrame *) w;
+ PWidget::setWidget((TQWidget *) w);
}
-QFrame *PFrame::widget()
+TQFrame *PFrame::widget()
{
// kdDebug(5008) << "PFrame widget called" << endl;
return frame;
diff --git a/ksirc/puke/pframe.h b/ksirc/puke/pframe.h
index e98750aa..8d7fbc82 100644
--- a/ksirc/puke/pframe.h
+++ b/ksirc/puke/pframe.h
@@ -3,7 +3,7 @@
class PFrame;
-#include <qframe.h>
+#include <tqframe.h>
#include "pmessage.h"
#include "pwidget.h"
@@ -18,11 +18,11 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *w = 0x0);
- virtual QFrame *widget();
+ virtual void setWidget(TQObject *w = 0x0);
+ virtual TQFrame *widget();
private:
- QFrame *frame;
+ TQFrame *frame;
};
#endif
diff --git a/ksirc/puke/pkfiledialog.cpp b/ksirc/puke/pkfiledialog.cpp
index c99aea9f..f78ae895 100644
--- a/ksirc/puke/pkfiledialog.cpp
+++ b/ksirc/puke/pkfiledialog.cpp
@@ -16,7 +16,7 @@ PKFileDialog::createWidget(CreateArgs &ca)
pw->setDeleteAble(FALSE);
}
else // Never takes a parent in Puke
- kfbd = new KFileDialog("/", QString::null, 0L, "PukeKFileDialog", TRUE);
+ kfbd = new KFileDialog("/", TQString::null, 0L, "PukeKFileDialog", TRUE);
pw->setWidget(kfbd);
pw->setWidgetId(ca.pwI);
return pw;
@@ -42,7 +42,7 @@ PKFileDialog::~PKFileDialog()
void PKFileDialog::messageHandler(int fd, PukeMessage *pm)
{
- QString selFile;
+ TQString selFile;
PukeMessage pmRet;
if(widget() == 0){
kdDebug(5008) << "PKFileDialog: No Widget set" << endl;
@@ -102,7 +102,7 @@ void PKFileDialog::messageHandler(int fd, PukeMessage *pm)
}
}
-void PKFileDialog::setWidget(QObject *_kbfd)
+void PKFileDialog::setWidget(TQObject *_kbfd)
{
if(_kbfd != 0 && _kbfd->inherits("KFileBaseDialog") == FALSE)
{
diff --git a/ksirc/puke/pkfiledialog.h b/ksirc/puke/pkfiledialog.h
index c8dbea3f..dbfd7dd5 100644
--- a/ksirc/puke/pkfiledialog.h
+++ b/ksirc/puke/pkfiledialog.h
@@ -19,7 +19,7 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_f = 0x0);
+ virtual void setWidget(TQObject *_f = 0x0);
virtual KFileDialog *widget();
public slots:
diff --git a/ksirc/puke/plabel.cpp b/ksirc/puke/plabel.cpp
index 17ca851d..4d2bba48 100644
--- a/ksirc/puke/plabel.cpp
+++ b/ksirc/puke/plabel.cpp
@@ -1,4 +1,4 @@
-#include <qmovie.h>
+#include <tqmovie.h>
#include <kdebug.h>
@@ -9,15 +9,15 @@ PObject *
PLabel::createWidget(CreateArgs &ca)
{
PLabel *pw = new PLabel(ca.parent);
- QLabel *le;
- if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QLabel") == TRUE){
- le = (QLabel *) ca.fetchedObj;
+ TQLabel *le;
+ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQLabel") == TRUE){
+ le = (TQLabel *) ca.fetchedObj;
pw->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- le = new QLabel((QWidget *) ca.parent->widget());
+ le = new TQLabel((TQWidget *) ca.parent->widget());
else
- le = new QLabel((QWidget *)0L);
+ le = new TQLabel((TQWidget *)0L);
pw->setWidget(le);
pw->setWidgetId(ca.pwI);
return pw;
@@ -61,7 +61,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm)
if(!checkWidget())
return;
- widget()->setPixmap(QPixmap(pm->cArg));
+ widget()->setPixmap(TQPixmap(pm->cArg));
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -72,7 +72,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm)
if(!checkWidget())
return;
- widget()->setMovie(QMovie(pm->cArg));
+ widget()->setMovie(TQMovie(pm->cArg));
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -95,21 +95,21 @@ void PLabel::messageHandler(int fd, PukeMessage *pm)
}
}
-void PLabel::setWidget(QObject *_l)
+void PLabel::setWidget(TQObject *_l)
{
- if(_l != 0 && _l->inherits("QLabel") == FALSE)
+ if(_l != 0 && _l->inherits("TQLabel") == FALSE)
{
errorInvalidSet(_l);
return;
}
- label = (QLabel *) _l;
+ label = (TQLabel *) _l;
PWidget::setWidget(_l);
}
-QLabel *PLabel::widget()
+TQLabel *PLabel::widget()
{
return label;
}
diff --git a/ksirc/puke/plabel.h b/ksirc/puke/plabel.h
index c53705b1..f68ffd28 100644
--- a/ksirc/puke/plabel.h
+++ b/ksirc/puke/plabel.h
@@ -3,7 +3,7 @@
class PLabel;
-#include <qlabel.h>
+#include <tqlabel.h>
#include "pmessage.h"
#include "pframe.h"
#include "controller.h"
@@ -19,8 +19,8 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_obj = 0);
- virtual QLabel *widget();
+ virtual void setWidget(TQObject *_obj = 0);
+ virtual TQLabel *widget();
public slots:
@@ -28,7 +28,7 @@ protected:
bool checkWidget();
private:
- QLabel *label;
+ TQLabel *label;
};
#endif
diff --git a/ksirc/puke/playout.cpp b/ksirc/puke/playout.cpp
index 9690f418..ae4fa6d1 100644
--- a/ksirc/puke/playout.cpp
+++ b/ksirc/puke/playout.cpp
@@ -4,7 +4,7 @@
#include "playout.h"
#include "commands.h"
-PLayout::PLayout(QObject *pobject)
+PLayout::PLayout(TQObject *pobject)
: PObject(pobject)
{
// Connect slots as needed
@@ -24,7 +24,7 @@ PLayout::~PLayout()
PObject *PLayout::createWidget(CreateArgs &ca)
{
PLayout *pw = new PLayout(ca.parent);
- QBoxLayout *qbl;
+ TQBoxLayout *qbl;
int direction, border, iType, iParent;
// Retreive the border and direction information out of the
// carg string
@@ -33,12 +33,12 @@ PObject *PLayout::createWidget(CreateArgs &ca)
if((ca.parent != 0) &&
(ca.parent->widget()->isWidgetType() == TRUE)){
- qbl = new QBoxLayout((QWidget *) ca.parent->widget(), (QBoxLayout::Direction) direction, border);
+ qbl = new TQBoxLayout((TQWidget *) ca.parent->widget(), (TQBoxLayout::Direction) direction, border);
// kdDebug(5008) << "Creating layout with parent: " << parent.iWinId << endl;
}
else{
- qbl = new QBoxLayout((QBoxLayout::Direction) direction, border);
+ qbl = new TQBoxLayout((TQBoxLayout::Direction) direction, border);
// kdDebug(5008) << "Creating layout NO PARENT" << endl;
}
pw->setWidget(qbl);
@@ -88,7 +88,7 @@ void PLayout::messageHandler(int fd, PukeMessage *pm)
}
PObject *pld = controller()->id2pobject(fd, pm->iWinId);
PObject *pls = controller()->id2pobject(fd, pm->iArg);
- if( (pld->widget()->inherits("QBoxLayout") == FALSE) || (pls->widget()->inherits("QBoxLayout") == FALSE))
+ if( (pld->widget()->inherits("TQBoxLayout") == FALSE) || (pls->widget()->inherits("TQBoxLayout") == FALSE))
throw(errorCommandFailed(PUKE_LAYOUT_ADDLAYOUT_ACK, 1));
PLayout *plbd = (PLayout *) pld;
PLayout *plbs = (PLayout *) pls;
@@ -133,21 +133,21 @@ void PLayout::messageHandler(int fd, PukeMessage *pm)
}
-void PLayout::setWidget(QObject *_layout)
+void PLayout::setWidget(TQObject *_layout)
{
// kdDebug(5008) << "PObject setwidget called" << endl;
- if(_layout != 0 && _layout->inherits("QBoxLayout") == FALSE)
+ if(_layout != 0 && _layout->inherits("TQBoxLayout") == FALSE)
{
errorInvalidSet(_layout);
return;
}
- layout = (QBoxLayout *) _layout;
+ layout = (TQBoxLayout *) _layout;
PObject::setWidget(_layout);
}
-QBoxLayout *PLayout::widget()
+TQBoxLayout *PLayout::widget()
{
return layout;
}
diff --git a/ksirc/puke/playout.h b/ksirc/puke/playout.h
index 4aec01a1..90a606b8 100644
--- a/ksirc/puke/playout.h
+++ b/ksirc/puke/playout.h
@@ -3,8 +3,8 @@
class PLayout;
-#include <qobject.h>
-#include <qlayout.h>
+#include <tqobject.h>
+#include <tqlayout.h>
#include "pmessage.h"
#include "pobject.h"
@@ -14,7 +14,7 @@ class PLayout : public PObject
public:
static PObject *createWidget(CreateArgs &ca);
- PLayout(QObject *parent = 0);
+ PLayout(TQObject *parent = 0);
virtual ~PLayout();
/**
@@ -26,16 +26,16 @@ public:
/**
* Sets the current opbect
*/
- virtual void setWidget(QObject *qb = 0x0);
+ virtual void setWidget(TQObject *qb = 0x0);
/**
* Returns the current object
*/
- virtual QBoxLayout *widget();
+ virtual TQBoxLayout *widget();
private:
- QBoxLayout *layout;
+ TQBoxLayout *layout;
};
diff --git a/ksirc/puke/plined.cpp b/ksirc/puke/plined.cpp
index 3f3e6a09..56a4ddc0 100644
--- a/ksirc/puke/plined.cpp
+++ b/ksirc/puke/plined.cpp
@@ -9,11 +9,11 @@ PObject *
PLineEdit::createWidget(CreateArgs &ca)
{
PLineEdit *pw = new PLineEdit(ca.parent);
- QLineEdit *le;
+ TQLineEdit *le;
if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- le = new QLineEdit((QWidget *) ca.parent->widget());
+ le = new TQLineEdit((TQWidget *) ca.parent->widget());
else
- le = new QLineEdit(0L);
+ le = new TQLineEdit(0L);
pw->setWidget(le);
pw->setWidgetId(ca.pwI);
return pw;
@@ -59,7 +59,7 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm)
kdDebug(5008) << "PLineEdit: No Widget set" << endl;
return;
}
- widget()->setEchoMode((QLineEdit::EchoMode) pm->iArg);
+ widget()->setEchoMode((TQLineEdit::EchoMode) pm->iArg);
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = widget()->echoMode();
@@ -101,27 +101,27 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm)
}
}
-void PLineEdit::setWidget(QObject *_le)
+void PLineEdit::setWidget(TQObject *_le)
{
- if(_le != 0 && _le->inherits("QLineEdit") == FALSE)
+ if(_le != 0 && _le->inherits("TQLineEdit") == FALSE)
{
errorInvalidSet(_le);
return;
}
- lineedit = (QLineEdit *) _le;
+ lineedit = (TQLineEdit *) _le;
if(lineedit != 0){
- connect(lineedit, SIGNAL(textChanged(const char *)),
- this, SLOT(updateText(const char *)));
- connect(lineedit, SIGNAL(returnPressed()),
- this, SLOT(returnPress()));
+ connect(lineedit, TQT_SIGNAL(textChanged(const char *)),
+ this, TQT_SLOT(updateText(const char *)));
+ connect(lineedit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(returnPress()));
}
PWidget::setWidget(_le);
}
-QLineEdit *PLineEdit::widget()
+TQLineEdit *PLineEdit::widget()
{
return lineedit;
}
diff --git a/ksirc/puke/plined.h b/ksirc/puke/plined.h
index 78f04bdf..91ca7413 100644
--- a/ksirc/puke/plined.h
+++ b/ksirc/puke/plined.h
@@ -3,7 +3,7 @@
class PLineEdit;
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "pmessage.h"
#include "pwidget.h"
#include "controller.h"
@@ -19,15 +19,15 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_f);
- virtual QLineEdit *widget();
+ virtual void setWidget(TQObject *_f);
+ virtual TQLineEdit *widget();
public slots:
void updateText(const char *);
void returnPress();
private:
- QLineEdit *lineedit;
+ TQLineEdit *lineedit;
};
#endif
diff --git a/ksirc/puke/plistbox.cpp b/ksirc/puke/plistbox.cpp
index 482e08c7..d0b98305 100644
--- a/ksirc/puke/plistbox.cpp
+++ b/ksirc/puke/plistbox.cpp
@@ -7,15 +7,15 @@ PObject *
PListBox::createWidget(CreateArgs &ca)
{
PListBox *plb = new PListBox(ca.parent);
- QListBox *lb;
- if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QListBox") == TRUE){
- lb = (QListBox *) ca.fetchedObj;
+ TQListBox *lb;
+ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQListBox") == TRUE){
+ lb = (TQListBox *) ca.fetchedObj;
plb->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- lb = new QListBox((QWidget *) ca.parent->widget());
+ lb = new TQListBox((TQWidget *) ca.parent->widget());
else
- lb = new QListBox();
+ lb = new TQListBox();
plb->setWidget(lb);
plb->setWidgetId(ca.pwI);
return plb;
@@ -71,7 +71,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm)
if(!checkWidget())
return;
- widget()->insertItem(QPixmap(pm->cArg), pm->iArg);
+ widget()->insertItem(TQPixmap(pm->cArg), pm->iArg);
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = widget()->count();
@@ -122,7 +122,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm)
}
break;
case PUKE_LISTBOX_SET_SCROLLBAR:
- widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::AlwaysOn : QListBox::AlwaysOff );
+ widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::AlwaysOn : TQListBox::AlwaysOff );
pmRet.iCommand = PUKE_LISTBOX_SET_SCROLLBAR_ACK;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -130,7 +130,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm)
emit outputMessage(fd, &pmRet);
break;
case PUKE_LISTBOX_SET_AUTO_SCROLLBAR:
- widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::Auto : QListBox::AlwaysOff );
+ widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::Auto : TQListBox::AlwaysOff );
pmRet.iCommand = PUKE_LISTBOX_SET_AUTO_SCROLLBAR_ACK;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -150,27 +150,27 @@ void PListBox::messageHandler(int fd, PukeMessage *pm)
}
}
-void PListBox::setWidget(QObject *_lb)
+void PListBox::setWidget(TQObject *_lb)
{
- if(_lb != 0 && _lb->inherits("QListBox") == FALSE)
+ if(_lb != 0 && _lb->inherits("TQListBox") == FALSE)
{
errorInvalidSet(_lb);
return;
}
- lb = (QListBox *) _lb;
+ lb = (TQListBox *) _lb;
if(lb != 0){
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(highlighted(int)));
- connect(lb, SIGNAL(selected(int)),
- this, SLOT(selected(int)));
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(highlighted(int)));
+ connect(lb, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(selected(int)));
}
PFrame::setWidget(lb);
}
-QListBox *PListBox::widget()
+TQListBox *PListBox::widget()
{
return lb;
}
diff --git a/ksirc/puke/plistbox.h b/ksirc/puke/plistbox.h
index cad454a8..c7683b22 100644
--- a/ksirc/puke/plistbox.h
+++ b/ksirc/puke/plistbox.h
@@ -3,7 +3,7 @@
class PListBox;
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include "pmessage.h"
#include "ptablevw.h"
#include "controller.h"
@@ -19,8 +19,8 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_lb);
- virtual QListBox *widget();
+ virtual void setWidget(TQObject *_lb);
+ virtual TQListBox *widget();
public slots:
void highlighted(int);
@@ -30,7 +30,7 @@ protected:
bool checkWidget();
private:
- QListBox *lb;
+ TQListBox *lb;
};
diff --git a/ksirc/puke/pmenudta.cpp b/ksirc/puke/pmenudta.cpp
index 30b375fc..576ebc39 100644
--- a/ksirc/puke/pmenudta.cpp
+++ b/ksirc/puke/pmenudta.cpp
@@ -1,14 +1,14 @@
#include "pmenudta.h"
#include "pobject.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
PMenuData::PMenuData(PObject *_child)
: PObject()
{
child = _child;
- connect(this, SIGNAL(outputMessage(int, PukeMessage*)),
- child, SIGNAL(outputMessage(int, PukeMessage*)));
+ connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage*)),
+ child, TQT_SIGNAL(outputMessage(int, PukeMessage*)));
}
PMenuData::~PMenuData()
@@ -28,7 +28,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm)
switch(pm->iCommand){
case PUKE_MENUDATA_INSERT_TEXT:
{
- QPopupMenu *widget = (QPopupMenu *) child->widget();
+ TQPopupMenu *widget = (TQPopupMenu *) child->widget();
id = widget->insertItem(pm->cArg);
if(pm->iArg > 0){
widget->setAccel(pm->iArg, id);
@@ -43,8 +43,8 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm)
}
case PUKE_MENUDATA_INSERT_PIXMAP:
{
- QPopupMenu *widget = (QPopupMenu *) child->widget();
- id = widget->insertItem(QPixmap(pm->cArg));
+ TQPopupMenu *widget = (TQPopupMenu *) child->widget();
+ id = widget->insertItem(TQPixmap(pm->cArg));
if(pm->iArg > 0){
widget->setAccel(pm->iArg, id);
}
@@ -58,7 +58,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm)
}
case PUKE_MENUDATA_REMOVE_ITEM:
{
- QPopupMenu *widget = (QPopupMenu *) child->widget();
+ TQPopupMenu *widget = (TQPopupMenu *) child->widget();
widget->removeItem(pm->iArg);
pmRet.iCommand = PUKE_MENUDATA_REMOVE_ITEM_ACK;
diff --git a/ksirc/puke/pmenudta.h b/ksirc/puke/pmenudta.h
index 0c3bfc6a..03227134 100644
--- a/ksirc/puke/pmenudta.h
+++ b/ksirc/puke/pmenudta.h
@@ -3,8 +3,8 @@
class PMenuData;
-#include <qobject.h>
-#include <qmenudata.h>
+#include <tqobject.h>
+#include <tqmenudata.h>
#include "pmessage.h"
#include "pframe.h"
#include "pobject.h"
@@ -18,17 +18,17 @@ class PMenuData;
class PMenuDataHelper : public QMenuData
{
public:
- PMenuDataHelper(QMenuData &qmd) {
- memcpy(this, &qmd, sizeof(QMenuData));
+ PMenuDataHelper(TQMenuData &qmd) {
+ memcpy(this, &qmd, sizeof(TQMenuData));
}
int active() {
- return QMenuData::actItem;
+ return TQMenuData::actItem;
}
int actItem;
};
/**
- * We're subclased off QMenuData so we can access it's internal proteted vars
+ * We're subclased off TQMenuData so we can access it's internal proteted vars
* We do not initialize NOR create it!!!!
*/
@@ -42,12 +42,12 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
virtual bool menuMessageHandler(int fd, PukeMessage *pm);
-// virtual void setWidget(QMenuData *_qmd);
- // virtual QMenuData *widget();
+// virtual void setWidget(TQMenuData *_qmd);
+ // virtual TQMenuData *widget();
virtual int activeItem()
{
- return PMenuDataHelper(*((QMenuData *) child->widget())).active();
+ return PMenuDataHelper(*((TQMenuData *) child->widget())).active();
}
private:
diff --git a/ksirc/puke/pmessage.h b/ksirc/puke/pmessage.h
index 5c777b24..a93cd154 100644
--- a/ksirc/puke/pmessage.h
+++ b/ksirc/puke/pmessage.h
@@ -20,16 +20,16 @@ const uint iPukeHeader = 42U;
#if 0
class errorInvalidSet {
public:
- errorInvalidSet(QObject *_from, const char *_to)
+ errorInvalidSet(TQObject *_from, const char *_to)
: __from(_from), __to(_to)
{
}
- QObject *from() { return __from; }
+ TQObject *from() { return __from; }
const char *to() { return __to; }
private:
- QObject *__from;
+ TQObject *__from;
const char *__to;
};
diff --git a/ksirc/puke/pobject.cpp b/ksirc/puke/pobject.cpp
index f2481a04..9e46e042 100644
--- a/ksirc/puke/pobject.cpp
+++ b/ksirc/puke/pobject.cpp
@@ -2,8 +2,8 @@
#include "commands.h"
-PObject::PObject(QObject *pobject, const char *name)
- : QObject(pobject, name)
+PObject::PObject(TQObject *pobject, const char *name)
+ : TQObject(pobject, name)
{
// Connect slots as needed
obj = 0;
@@ -24,11 +24,11 @@ PObject::~PObject()
PObject *PObject::createWidget(CreateArgs &ca)
{
PObject *pw = new PObject(ca.parent);
- QObject *o;
+ TQObject *o;
if(ca.parent != 0)
- o = new QObject(ca.parent->widget());
+ o = new TQObject(ca.parent->widget());
else
- o = new QObject();
+ o = new TQObject();
pw->setWidget(o);
pw->setWidgetId(ca.pwI);
pw->setPukeController(ca.pc);
@@ -78,23 +78,23 @@ void PObject::messageHandler(int fd, PukeMessage *pm)
}
}
-void PObject::setWidget(QObject *_o)
+void PObject::setWidget(TQObject *_o)
{
// Disconnect everything from the object we where listning too
// Just in case it fires something off, we don't want to get it
if(widget() != 0){
- disconnect(widget(), SIGNAL(destroyed()),
- this, SLOT(swidgetDestroyed()));
+ disconnect(widget(), TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(swidgetDestroyed()));
}
obj = _o;
if(obj != 0){
- connect(widget(), SIGNAL(destroyed()),
- this, SLOT(swidgetDestroyed()));
+ connect(widget(), TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(swidgetDestroyed()));
}
}
-QObject *PObject::widget()
+TQObject *PObject::widget()
{
// kdDebug(5008) << "PObject widget called" << endl;
return obj;
@@ -129,9 +129,9 @@ void PObject::manTerm() {
manualTerm = TRUE;
}
-void PObject::errorInvalidSet(QObject *_w)
+void PObject::errorInvalidSet(TQObject *_w)
{
- m_error = QString("Tried setting a %1 to %2").arg(_w->className()).arg(className());
+ m_error = TQString("Tried setting a %1 to %2").arg(_w->className()).arg(className());
m_hasError = true;
}
#include "pobject.moc"
diff --git a/ksirc/puke/pobject.h b/ksirc/puke/pobject.h
index 8e5c7c5a..d27fab58 100644
--- a/ksirc/puke/pobject.h
+++ b/ksirc/puke/pobject.h
@@ -5,7 +5,7 @@ class PObject;
class PukeController;
class CreateArgs;
-#include <qobject.h>
+#include <tqobject.h>
#include "pmessage.h"
@@ -26,18 +26,18 @@ public:
/**
* name of the widget which was fetched from kSirc, this has to be set explicitly
*/
- QObject *fetchedObj;
+ TQObject *fetchedObj;
};
class PObject : public QObject
{
Q_OBJECT
public:
- PObject(QObject *parent = 0, const char *name = 0);
+ PObject(TQObject *parent = 0, const char *name = 0);
virtual ~PObject();
/**
- * Creates a new QObject and returns a PObject
+ * Creates a new TQObject and returns a PObject
*/
static PObject *createWidget(CreateArgs &ca);
@@ -50,12 +50,12 @@ class PObject : public QObject
/**
* Sets the current opbect
*/
- virtual void setWidget(QObject *w);
+ virtual void setWidget(TQObject *w);
/**
* Returns the current object
*/
- virtual QObject *widget();
+ virtual TQObject *widget();
/**
* Sets the window id
@@ -90,7 +90,7 @@ class PObject : public QObject
/**
* Returns error description
*/
- QString error() {
+ TQString error() {
m_hasError = false;
return m_error;
}
@@ -117,16 +117,16 @@ class PObject : public QObject
protected:
PukeController *controller();
- void errorInvalidSet(QObject *_w);
+ void errorInvalidSet(TQObject *_w);
private:
- QObject *obj;
+ TQObject *obj;
PukeController *pController;
widgetId wI;
bool manualTerm;
bool deleteAble;
- QString m_error;
+ TQString m_error;
bool m_hasError;
};
diff --git a/ksirc/puke/pobjfinder.cpp b/ksirc/puke/pobjfinder.cpp
index 0f510ea4..6870e142 100644
--- a/ksirc/puke/pobjfinder.cpp
+++ b/ksirc/puke/pobjfinder.cpp
@@ -19,8 +19,8 @@ PObjFinder::PObjFinder(PObject *parent)
// We don't actually encase a widget since all the ObjFinder interface
// is static
setWidget(0x0);
- connect(controller(), SIGNAL(inserted(QObject *)),
- this, SLOT(newObject(QObject *)));
+ connect(controller(), TQT_SIGNAL(inserted(TQObject *)),
+ this, TQT_SLOT(newObject(TQObject *)));
}
PObjFinder::~PObjFinder()
@@ -33,8 +33,8 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm)
switch(pm->iCommand){
case PUKE_OBJFINDER_ALLOBJECTS:
{
- QString qscArg;
- QStrList allObj = controller()->allObjects();
+ TQString qscArg;
+ TQStrList allObj = controller()->allObjects();
for(uint i = 0; i <= allObj.count(); i++){
qscArg += allObj.at(i);
qscArg += "\n";
@@ -54,7 +54,7 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm)
}
}
-void PObjFinder::setWidget(QObject *_obj)
+void PObjFinder::setWidget(TQObject *_obj)
{
PObject::setWidget(_obj);
}
@@ -66,8 +66,8 @@ objFinder *PObjFinder::widget()
}
-void PObjFinder::newObject(QObject *name){
- QString info;
+void PObjFinder::newObject(TQObject *name){
+ TQString info;
info = name->className();
info += "::";
diff --git a/ksirc/puke/pobjfinder.h b/ksirc/puke/pobjfinder.h
index 9149aa86..32b4ff86 100644
--- a/ksirc/puke/pobjfinder.h
+++ b/ksirc/puke/pobjfinder.h
@@ -18,11 +18,11 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_obj = 0);
+ virtual void setWidget(TQObject *_obj = 0);
virtual objFinder *widget();
public slots:
- virtual void newObject(QObject *obj);
+ virtual void newObject(TQObject *obj);
protected:
bool checkWidget();
diff --git a/ksirc/puke/ppopmenu.cpp b/ksirc/puke/ppopmenu.cpp
index 4c07d800..cabf4d94 100644
--- a/ksirc/puke/ppopmenu.cpp
+++ b/ksirc/puke/ppopmenu.cpp
@@ -1,5 +1,5 @@
#include <kdebug.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include "ppopmenu.h"
@@ -7,15 +7,15 @@ PObject *
PPopupMenu::createWidget(CreateArgs &ca)
{
PPopupMenu *pm = new PPopupMenu(ca.parent);
- QPopupMenu *qpm;
- if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QPopupMenu") == TRUE){
- qpm= (QPopupMenu *) ca.fetchedObj;
+ TQPopupMenu *qpm;
+ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQPopupMenu") == TRUE){
+ qpm= (TQPopupMenu *) ca.fetchedObj;
pm->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- qpm = new QPopupMenu((QWidget *) ca.parent->widget());
+ qpm = new TQPopupMenu((TQWidget *) ca.parent->widget());
else
- qpm = new QPopupMenu();
+ qpm = new TQPopupMenu();
pm->setWidget(qpm);
pm->setWidgetId(ca.pwI);
return pm;
@@ -64,7 +64,7 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm)
return;
}
- widget()->popup(QCursor::pos(), 0);
+ widget()->popup(TQCursor::pos(), 0);
pmRet.iCommand = - pm->iCommand;
pmRet.iWinId = pm->iWinId;
@@ -79,24 +79,24 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm)
}
}
-void PPopupMenu::setWidget(QObject *_menu)
+void PPopupMenu::setWidget(TQObject *_menu)
{
- if(_menu != 0 && _menu->inherits("QPopupMenu") == FALSE)
+ if(_menu != 0 && _menu->inherits("TQPopupMenu") == FALSE)
{
errorInvalidSet(_menu);
return;
}
- menu = (QPopupMenu *) _menu;
+ menu = (TQPopupMenu *) _menu;
if(menu != 0x0){
- connect(menu, SIGNAL(activated(int)),
- this, SLOT(got_activated(int)));
+ connect(menu, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(got_activated(int)));
}
PFrame::setWidget(menu);
}
-QPopupMenu *PPopupMenu::widget()
+TQPopupMenu *PPopupMenu::widget()
{
return menu;
}
diff --git a/ksirc/puke/ppopmenu.h b/ksirc/puke/ppopmenu.h
index 9044b935..4f5af16e 100644
--- a/ksirc/puke/ppopmenu.h
+++ b/ksirc/puke/ppopmenu.h
@@ -3,7 +3,7 @@
class PPopupMenu;
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "pobject.h"
#include "pmessage.h"
@@ -21,14 +21,14 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_menu);
- virtual QPopupMenu *widget();
+ virtual void setWidget(TQObject *_menu);
+ virtual TQPopupMenu *widget();
protected slots:
void got_activated ( int itemId );
private:
- QPopupMenu *menu;
+ TQPopupMenu *menu;
PMenuData *pmd;
};
diff --git a/ksirc/puke/pprogress.cpp b/ksirc/puke/pprogress.cpp
index 75c7fa4b..09ed39d2 100644
--- a/ksirc/puke/pprogress.cpp
+++ b/ksirc/puke/pprogress.cpp
@@ -11,7 +11,7 @@ PProgress::createWidget(CreateArgs &ca)
PProgress *pw = new PProgress(ca.parent);
KSProgress *ksp;
if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- ksp = new KSProgress((QWidget *) ca.parent->widget());
+ ksp = new KSProgress((TQWidget *) ca.parent->widget());
else
ksp = new KSProgress();
pw->setWidget(ksp);
@@ -66,7 +66,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm)
break;
}
case PUKE_KSPROGRESS_SET_TOPTEXT:
- widget()->setTopText(QString(pm->cArg));
+ widget()->setTopText(TQString(pm->cArg));
pmRet.iCommand = PUKE_KSPROGRESS_SET_TOPTEXT;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -74,7 +74,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm)
emit outputMessage(fd, &pmRet);
break;
case PUKE_KSPROGRESS_SET_BOTTEXT:
- widget()->setBotText(QString(pm->cArg));
+ widget()->setBotText(TQString(pm->cArg));
pmRet.iCommand = PUKE_KSPROGRESS_SET_BOTTEXT;
pmRet.iWinId = pm->iWinId;
pmRet.iArg = 0;
@@ -104,7 +104,7 @@ void PProgress::cancelPressed(){
emit outputMessage(widgetIden().fd, &pmRet);
}
-void PProgress::setWidget(QObject *_f)
+void PProgress::setWidget(TQObject *_f)
{
// kdDebug(5008) << "PProgress setWidget called" << endl;
if(_f != 0 && _f->inherits("KSProgress") == FALSE)
@@ -115,8 +115,8 @@ void PProgress::setWidget(QObject *_f)
ksp = (KSProgress *) _f;
if(widget() != 0){
- connect(widget(), SIGNAL(cancel()),
- this, SLOT(cancelPressed()));
+ connect(widget(), TQT_SIGNAL(cancel()),
+ this, TQT_SLOT(cancelPressed()));
}
PWidget::setWidget(ksp);
diff --git a/ksirc/puke/pprogress.h b/ksirc/puke/pprogress.h
index f81fd976..8542abab 100644
--- a/ksirc/puke/pprogress.h
+++ b/ksirc/puke/pprogress.h
@@ -19,7 +19,7 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_f);
+ virtual void setWidget(TQObject *_f);
virtual KSProgress *widget();
protected slots:
diff --git a/ksirc/puke/ppushbt.cpp b/ksirc/puke/ppushbt.cpp
index 48cf6121..346abcd3 100644
--- a/ksirc/puke/ppushbt.cpp
+++ b/ksirc/puke/ppushbt.cpp
@@ -6,11 +6,11 @@ PObject *
PPushButton::createWidget(CreateArgs &ca)
{
PPushButton *pb = new PPushButton(ca.parent);
- QPushButton *qb;
+ TQPushButton *qb;
if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- qb = new QPushButton((QWidget *) ca.parent->widget());
+ qb = new TQPushButton((TQWidget *) ca.parent->widget());
else
- qb = new QPushButton(0L);
+ qb = new TQPushButton(0L);
pb->setWidget(qb);
pb->setWidgetId(ca.pwI);
return pb;
@@ -43,15 +43,15 @@ void PPushButton::messageHandler(int fd, PukeMessage *pm)
}
}
-void PPushButton::setWidget(QObject *_qb)
+void PPushButton::setWidget(TQObject *_qb)
{
- if(_qb != 0 && _qb->inherits("QPushButton") == FALSE)
+ if(_qb != 0 && _qb->inherits("TQPushButton") == FALSE)
{
errorInvalidSet(_qb);
return;
}
- button = (QPushButton *) _qb;
+ button = (TQPushButton *) _qb;
if(_qb != 0){
}
PButton::setWidget(_qb);
@@ -59,7 +59,7 @@ void PPushButton::setWidget(QObject *_qb)
}
-QPushButton *PPushButton::widget()
+TQPushButton *PPushButton::widget()
{
return button;
}
diff --git a/ksirc/puke/ppushbt.h b/ksirc/puke/ppushbt.h
index 87336679..fd624a24 100644
--- a/ksirc/puke/ppushbt.h
+++ b/ksirc/puke/ppushbt.h
@@ -3,7 +3,7 @@
class PPushButton;
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "pmessage.h"
#include "pbutton.h"
#include "pobject.h"
@@ -20,13 +20,13 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_b = 0);
- virtual QPushButton *widget();
+ virtual void setWidget(TQObject *_b = 0);
+ virtual TQPushButton *widget();
public slots:
private:
- QPushButton *button;
+ TQPushButton *button;
};
diff --git a/ksirc/puke/ptabdialog.cpp b/ksirc/puke/ptabdialog.cpp
index b0e3ba2c..4099aa0a 100644
--- a/ksirc/puke/ptabdialog.cpp
+++ b/ksirc/puke/ptabdialog.cpp
@@ -9,24 +9,24 @@ PObject *
PTabDialog::createWidget(CreateArgs &ca)
{
PTabDialog *ptd = new PTabDialog(ca.parent);
- QTabDialog *qtd;
+ TQTabDialog *qtd;
// Retreive the border and direction information out of the
// carg string
- if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QTabDialog") == TRUE){
- qtd = (QTabDialog *) ca.fetchedObj;
+ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQTabDialog") == TRUE){
+ qtd = (TQTabDialog *) ca.fetchedObj;
ptd->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- qtd = new QTabDialog((QWidget *) ca.parent->widget());
+ qtd = new TQTabDialog((TQWidget *) ca.parent->widget());
else
- qtd = new QTabDialog();
+ qtd = new TQTabDialog();
ptd->setWidget(qtd);
ptd->setWidgetId(ca.pwI);
ptd->setPukeController(ca.pc);
return ptd;
}
-PTabDialog::PTabDialog(QObject *)
+PTabDialog::PTabDialog(TQObject *)
: PWidget()
{
// Connect slots as needed
@@ -76,22 +76,22 @@ void PTabDialog::messageHandler(int fd, PukeMessage *pm)
}
-void PTabDialog::setWidget(QObject *tb)
+void PTabDialog::setWidget(TQObject *tb)
{
- if(tb != 0 && tb->inherits("QTabDialog") == FALSE)
+ if(tb != 0 && tb->inherits("TQTabDialog") == FALSE)
{
errorInvalidSet(tb);
return;
}
- tab = (QTabDialog *) tb;
+ tab = (TQTabDialog *) tb;
if(tab != 0){
}
PObject::setWidget(tb);
}
-QTabDialog *PTabDialog::widget()
+TQTabDialog *PTabDialog::widget()
{
// kdDebug(5008) << "PObject widget called" << endl;
return tab;
diff --git a/ksirc/puke/ptabdialog.h b/ksirc/puke/ptabdialog.h
index 6e669074..17132301 100644
--- a/ksirc/puke/ptabdialog.h
+++ b/ksirc/puke/ptabdialog.h
@@ -3,7 +3,7 @@
class PTabDialog;
-#include <qtabdialog.h>
+#include <tqtabdialog.h>
#include "pmessage.h"
#include "pwidget.h"
@@ -13,7 +13,7 @@ class PTabDialog : public PWidget
public:
static PObject *createWidget(CreateArgs &ca);
- PTabDialog(QObject *parent = 0);
+ PTabDialog(TQObject *parent = 0);
virtual ~PTabDialog();
/**
@@ -25,16 +25,16 @@ public:
/**
* Sets the current opbect
*/
- virtual void setWidget(QObject *tb);
+ virtual void setWidget(TQObject *tb);
/**
* Returns the current object
*/
- virtual QTabDialog *widget();
+ virtual TQTabDialog *widget();
private:
- QTabDialog *tab;
+ TQTabDialog *tab;
};
diff --git a/ksirc/puke/ptablevw.cpp b/ksirc/puke/ptablevw.cpp
index 1dba614b..7c744ac9 100644
--- a/ksirc/puke/ptablevw.cpp
+++ b/ksirc/puke/ptablevw.cpp
@@ -50,15 +50,15 @@ void PTableView::messageHandler(int fd, PukeMessage *pm)
}
}
-void PTableView::setWidget(QObject *_tbv)
+void PTableView::setWidget(TQObject *_tbv)
{
- if(_tbv != 0 && _tbv->inherits("QGridView") == FALSE)
+ if(_tbv != 0 && _tbv->inherits("TQGridView") == FALSE)
{
errorInvalidSet(_tbv);
return;
}
- tbl = (QGridView *) _tbv;
+ tbl = (TQGridView *) _tbv;
if(tbl != 0){
}
PFrame::setWidget(_tbv);
@@ -66,7 +66,7 @@ void PTableView::setWidget(QObject *_tbv)
}
-QGridView *PTableView::widget()
+TQGridView *PTableView::widget()
{
return tbl;
}
diff --git a/ksirc/puke/ptablevw.h b/ksirc/puke/ptablevw.h
index 33ba4015..c1043a4b 100644
--- a/ksirc/puke/ptablevw.h
+++ b/ksirc/puke/ptablevw.h
@@ -3,7 +3,7 @@
class PTableView;
-#include <qgridview.h>
+#include <tqgridview.h>
#include "pmessage.h"
#include "pframe.h"
@@ -21,13 +21,13 @@ public:
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *_tbl);
- virtual QGridView *widget();
+ virtual void setWidget(TQObject *_tbl);
+ virtual TQGridView *widget();
public slots:
private:
- QGridView *tbl;
+ TQGridView *tbl;
};
#endif
diff --git a/ksirc/puke/pwidget.cpp b/ksirc/puke/pwidget.cpp
index d254832b..9ce99a2b 100644
--- a/ksirc/puke/pwidget.cpp
+++ b/ksirc/puke/pwidget.cpp
@@ -6,7 +6,7 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
PWidget::PWidget(PObject *)
: PObject()
@@ -54,15 +54,15 @@ PWidget::~PWidget()
PObject *PWidget::createWidget(CreateArgs &ca)
{
PWidget *pw = new PWidget();
- QWidget *tw;
- if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QWidget") == TRUE){
- tw = (QWidget *) ca.fetchedObj;
+ TQWidget *tw;
+ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQWidget") == TRUE){
+ tw = (TQWidget *) ca.fetchedObj;
pw->setDeleteAble(FALSE);
}
else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
- tw = new QWidget((QWidget *) ca.parent->widget());
+ tw = new TQWidget((TQWidget *) ca.parent->widget());
else
- tw = new QWidget();
+ tw = new TQWidget();
pw->setWidget(tw);
pw->setWidgetId(ca.pwI);
pw->setPukeController(ca.pc);
@@ -175,7 +175,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
{
pmRet.cArg = new char[15];
pmRet.iTextSize = 15;
- QColor back = widget()->backgroundColor();
+ TQColor back = widget()->backgroundColor();
sprintf(pmRet.cArg, "%d,%d,%d", back.red(), back.green(), back.blue());
pmRet.iCommand = -pm->iCommand;
@@ -186,7 +186,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
break;
}
case PUKE_WIDGET_SET_BACKGROUND_PIXMAP:
- widget()->setBackgroundPixmap(QPixmap(pm->cArg));
+ widget()->setBackgroundPixmap(TQPixmap(pm->cArg));
pmRet.iCommand = -pm->iCommand;
pmRet.iWinId = pm->iWinId;
@@ -195,7 +195,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
emit outputMessage(fd, &pmRet);
break;
case PUKE_WIDGET_SET_BACKGROUND_MODE:
- widget()->setBackgroundMode((QWidget::BackgroundMode) pm->iArg);
+ widget()->setBackgroundMode((TQWidget::BackgroundMode) pm->iArg);
pmRet.iCommand = -pm->iCommand;
pmRet.iWinId = pm->iWinId;
@@ -208,15 +208,15 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
{
int *pos;
pos = (int *) pm->cArg;
- QColor bg(pos[0], pos[1], pos[2]);
- QColorGroup cg = QColorGroup(widget()->colorGroup().foreground(),
+ TQColor bg(pos[0], pos[1], pos[2]);
+ TQColorGroup cg = TQColorGroup(widget()->colorGroup().foreground(),
bg,
widget()->colorGroup().light(),
widget()->colorGroup().dark(),
widget()->colorGroup().mid(),
widget()->colorGroup().text(),
bg);
- widget()->setPalette(QPalette(cg,cg,cg));
+ widget()->setPalette(TQPalette(cg,cg,cg));
pmRet.iCommand = -pm->iCommand;
pmRet.iWinId = pm->iWinId;
@@ -236,7 +236,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
break;
case PUKE_WIDGET_RECREATE:
{
- QWidget *nparent = 0x0;
+ TQWidget *nparent = 0x0;
if(pm->iArg != 0x0){
widgetId wiWidget;
wiWidget.fd = fd;
@@ -250,7 +250,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
qWarning("Recreate: %d %d %d", point_show[0], point_show[1], point_show[3]);
- widget()->reparent(nparent, (WFlags) 0, QPoint(point_show[0], point_show[1]), point_show[3]);
+ widget()->reparent(nparent, (WFlags) 0, TQPoint(point_show[0], point_show[1]), point_show[3]);
pmRet.iCommand = PUKE_WIDGET_RECREATE_ACK;
pmRet.iWinId = pm->iWinId;
@@ -264,29 +264,29 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
}
}
-void PWidget::setWidget(QObject *_w)
+void PWidget::setWidget(TQObject *_w)
{
- if(_w != 0 && _w->inherits("QWidget") == FALSE)
+ if(_w != 0 && _w->inherits("TQWidget") == FALSE)
{
errorInvalidSet(_w);
return;
}
- w = (QWidget *) _w;
+ w = (TQWidget *) _w;
if(w != 0){
widget()->installEventFilter(this);
}
PObject::setWidget(_w);
}
-QWidget *PWidget::widget()
+TQWidget *PWidget::widget()
{
// kdDebug(5008) << "PWidget widget called" << endl;
return w;
}
// PWidget specific
-bool PWidget::eventFilter(QObject *o, QEvent *e)
+bool PWidget::eventFilter(TQObject *o, TQEvent *e)
{
if(e->type() < 20 && e->type() >= 0){
(this->*(eventList[e->type()]))(o,e);
@@ -307,7 +307,7 @@ bool PWidget::eventFilter(QObject *o, QEvent *e)
return false;
}
-void PWidget::eventNone(QObject *, QEvent *e)
+void PWidget::eventNone(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
@@ -324,12 +324,12 @@ void PWidget::eventNone(QObject *, QEvent *e)
}
-void PWidget::eventTimer(QObject *, QEvent *e)
+void PWidget::eventTimer(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
- QTimerEvent *et = (QTimerEvent *)(e);
+ TQTimerEvent *et = (TQTimerEvent *)(e);
wI = widgetIden();
pm.iCommand = PUKE_WIDGET_EVENT_TIMER;
@@ -341,12 +341,12 @@ void PWidget::eventTimer(QObject *, QEvent *e)
}
-void PWidget::eventMouse(QObject *, QEvent *e)
+void PWidget::eventMouse(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
- QMouseEvent *me = (QMouseEvent *)(e);
+ TQMouseEvent *me = (TQMouseEvent *)(e);
wI = widgetIden();
pm.iCommand = - e->type() - 1020; // 1020 offset for events
@@ -368,12 +368,12 @@ void PWidget::eventMouse(QObject *, QEvent *e)
}
-void PWidget::eventKey(QObject *, QEvent *e)
+void PWidget::eventKey(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
- QKeyEvent *ke = (QKeyEvent *)(e);
+ TQKeyEvent *ke = (TQKeyEvent *)(e);
wI = widgetIden();
pm.iCommand = - e->type() - 1020; // 1020 offset for events
@@ -394,14 +394,14 @@ void PWidget::eventKey(QObject *, QEvent *e)
}
-void PWidget::eventFocus(QObject *, QEvent *e)
+void PWidget::eventFocus(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
// kdDebug(5008) << "PWidget: eventFocus" << endl;
- QFocusEvent *fe = (QFocusEvent *)(e);
+ TQFocusEvent *fe = (TQFocusEvent *)(e);
wI = widgetIden();
pm.iCommand = - e->type() - 1020; // 1020 offset for events
@@ -418,7 +418,7 @@ void PWidget::eventFocus(QObject *, QEvent *e)
delete[] pm.cArg;
}
-void PWidget::eventPaint(QObject *, QEvent *e)
+void PWidget::eventPaint(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
@@ -433,12 +433,12 @@ void PWidget::eventPaint(QObject *, QEvent *e)
}
-void PWidget::eventMove(QObject *, QEvent *e)
+void PWidget::eventMove(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
- QMoveEvent *me = (QMoveEvent *)(e);
+ TQMoveEvent *me = (TQMoveEvent *)(e);
wI = widgetIden();
pm.iCommand = - e->type() - 1020; // 1020 offset for events
@@ -460,12 +460,12 @@ void PWidget::eventMove(QObject *, QEvent *e)
}
-void PWidget::eventResize(QObject *, QEvent *e)
+void PWidget::eventResize(TQObject *, TQEvent *e)
{
PukeMessage pm;
widgetId wI;
- QResizeEvent *re = (QResizeEvent *)(e);
+ TQResizeEvent *re = (TQResizeEvent *)(e);
wI = widgetIden();
pm.iCommand = - e->type() - 1020; // 1020 offset for events
diff --git a/ksirc/puke/pwidget.h b/ksirc/puke/pwidget.h
index f7f748fb..68853e63 100644
--- a/ksirc/puke/pwidget.h
+++ b/ksirc/puke/pwidget.h
@@ -3,8 +3,8 @@
class PWidget;
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqwidget.h>
#include "pobject.h"
#include "pmessage.h"
@@ -20,25 +20,25 @@ class PWidget : public PObject
virtual void messageHandler(int fd, PukeMessage *pm);
- virtual void setWidget(QObject *w = 0x0);
- virtual QWidget *widget();
+ virtual void setWidget(TQObject *w = 0x0);
+ virtual TQWidget *widget();
protected:
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
private:
- QWidget *w;
-
- void (PWidget::*eventList[20])(QObject *, QEvent *);
-
- void eventNone(QObject *, QEvent *);
- void eventTimer(QObject *, QEvent *);
- void eventMouse(QObject *, QEvent *);
- void eventKey(QObject *, QEvent *);
- void eventFocus(QObject *, QEvent *);
- void eventPaint(QObject *, QEvent *);
- void eventMove(QObject *, QEvent *);
- void eventResize(QObject *, QEvent *);
+ TQWidget *w;
+
+ void (PWidget::*eventList[20])(TQObject *, TQEvent *);
+
+ void eventNone(TQObject *, TQEvent *);
+ void eventTimer(TQObject *, TQEvent *);
+ void eventMouse(TQObject *, TQEvent *);
+ void eventKey(TQObject *, TQEvent *);
+ void eventFocus(TQObject *, TQEvent *);
+ void eventPaint(TQObject *, TQEvent *);
+ void eventMove(TQObject *, TQEvent *);
+ void eventResize(TQObject *, TQEvent *);
};
diff --git a/ksirc/servercontroller.cpp b/ksirc/servercontroller.cpp
index 0b03d1ab..0e7892b9 100644
--- a/ksirc/servercontroller.cpp
+++ b/ksirc/servercontroller.cpp
@@ -13,14 +13,14 @@
new_connection(): Creates popup asking for new connection
- new_ksircprocess(QString):
+ new_ksircprocess(TQString):
Args:
- QString: new server name or IP to connect to.
+ TQString: new server name or IP to connect to.
Action:
Creates a new sirc process and window !default connected to the
server. Does nothing if a server connection already exists.
- add_toplevel(QString parent, QString child):
+ add_toplevel(TQString parent, TQString child):
Args:
parent: the server name that the new channel is being joined on
child: the new channel name
@@ -28,7 +28,7 @@
Adds "child" to the list of joined channles in the main
window. Always call this on new window creation!
- delete_toplevel(QString parent, QString child):
+ delete_toplevel(TQString parent, TQString child):
Args:
parent: the server name of which channel is closing
child: the channle that is closing. IFF Emtpy, parent is
@@ -40,7 +40,7 @@
new_channel: Creates popup asking for new channel name
- new_toplevel(QString str):
+ new_toplevel(TQString str):
Args:
str: name of the new channel to be created
Action:
@@ -48,7 +48,7 @@
list and join the requested channel. Does nothing if nothing
is selected in the tree list.
- recvChangeChanel(QString parent, QString old, QString new):
+ recvChangeChanel(TQString parent, TQString old, TQString new):
Args:
parent: parent server connection
old: the old name for the window
@@ -78,8 +78,8 @@
#include <stdlib.h>
#include "objFinder.h"
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <kmenubar.h>
#include <kconfig.h>
@@ -98,7 +98,7 @@
#include <kglobalaccel.h>
#include <kstdguiitem.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "displayMgrSDI.h"
#include "displayMgrMDI.h"
@@ -116,7 +116,7 @@ DisplayMgr *displayMgr;
servercontroller *servercontroller::s_self = 0;
-servercontroller::servercontroller( QWidget*, const char* name )
+servercontroller::servercontroller( TQWidget*, const char* name )
: KMainWindow( 0, name )
{
we_are_exiting = false;
@@ -139,43 +139,43 @@ servercontroller::servercontroller( QWidget*, const char* name )
break;
}
- sci = new scInside(this, QCString(name) + "_mainview");
+ sci = new scInside(this, TQCString(name) + "_mainview");
setCentralWidget(sci);
- sci->setFrameStyle(QFrame::Box | QFrame::Raised);
+ sci->setFrameStyle(TQFrame::Box | TQFrame::Raised);
ConnectionTree = sci->ConnectionTree;
- connect(ConnectionTree, SIGNAL(clicked( QListViewItem * )),
- this, SLOT(WindowSelected(QListViewItem *)));
+ connect(ConnectionTree, TQT_SIGNAL(clicked( TQListViewItem * )),
+ this, TQT_SLOT(WindowSelected(TQListViewItem *)));
setFrameBorderWidth(5);
- QPopupMenu *file = new QPopupMenu(this, QCString(name) + "_menu_file");
- KStdAction::quit(this, SLOT(endksirc()), actionCollection())->plug(file);
+ TQPopupMenu *file = new TQPopupMenu(this, TQCString(name) + "_menu_file");
+ KStdAction::quit(this, TQT_SLOT(endksirc()), actionCollection())->plug(file);
#ifndef NDEBUG
- file->insertItem(i18n("Dump Object Tree"), this, SLOT(dump_obj()));
- file->insertItem(i18n("Server Debug Window"), this, SLOT(server_debug()));
+ file->insertItem(i18n("Dump Object Tree"), this, TQT_SLOT(dump_obj()));
+ file->insertItem(i18n("Server Debug Window"), this, TQT_SLOT(server_debug()));
#endif
MenuBar->insertItem(i18n("&File"), file);
- connections = new QPopupMenu(this, QCString(name) + "_menu_connections");
+ connections = new TQPopupMenu(this, TQCString(name) + "_menu_connections");
- server_id = connections->insertItem(i18n("&New Server..."), this, SLOT(new_connection()), Key_F2 );
- join_id = connections->insertItem(i18n("&Join Channel..."), this, SLOT(new_channel()), Key_F3 );
+ server_id = connections->insertItem(i18n("&New Server..."), this, TQT_SLOT(new_connection()), Key_F2 );
+ join_id = connections->insertItem(i18n("&Join Channel..."), this, TQT_SLOT(new_channel()), Key_F3 );
connections->insertSeparator();
- connections->insertItem(i18n("&Do Autoconnect..."), this, SLOT(start_autoconnect_check()));
+ connections->insertItem(i18n("&Do Autoconnect..."), this, TQT_SLOT(start_autoconnect_check()));
connections->setItemEnabled(join_id, FALSE);
MenuBar->insertItem(i18n("&Connections"), connections);
- options = new QPopupMenu(this, QCString(name) + "_menu_options");
+ options = new TQPopupMenu(this, TQCString(name) + "_menu_options");
options->setCheckable(TRUE);
options->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."),
- this, SLOT(filter_rule_editor()));
+ this, TQT_SLOT(filter_rule_editor()));
options->insertSeparator();
- KStdAction::configureNotifications(this, SLOT(notification_prefs()), actionCollection())->plug(options);
+ KStdAction::configureNotifications(this, TQT_SLOT(notification_prefs()), actionCollection())->plug(options);
- KStdAction::preferences(this, SLOT(general_prefs()), actionCollection())->plug(options);
+ KStdAction::preferences(this, TQT_SLOT(general_prefs()), actionCollection())->plug(options);
MenuBar->insertItem(i18n("&Settings"), options);
@@ -188,7 +188,7 @@ servercontroller::servercontroller( QWidget*, const char* name )
"when in docked mode, since you don't need to click on the "
"dock icon."),
ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, this,
- SLOT(new_connection()));
+ TQT_SLOT(new_connection()));
open_toplevels = 0;
@@ -239,41 +239,41 @@ void servercontroller::checkDocking()
void servercontroller::new_connection()
{
open_ksirc *w = new open_ksirc(); // Create new ksirc popup
- connect(w, SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process
- this, SLOT(new_ksircprocess(KSircServer &))); // start
+ connect(w, TQT_SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process
+ this, TQT_SLOT(new_ksircprocess(KSircServer &))); // start
w->exec(); // show the sucker!
delete w;
}
void servercontroller::new_ksircprocess(KSircServer &kss)
{
- QString server_id;
+ TQString server_id;
int id = 1;
if(kss.server().isEmpty()) // nothing entered, nothing done
return;
server_id = kss.server();
while(proc_list[server_id]){ // if it already exists, quit
- server_id = QString("%1 %2").arg(kss.server()).arg(id++);
+ server_id = TQString("%1 %2").arg(kss.server()).arg(id++);
}
// Insert new base
- QListViewItem *rootItem = new QListViewItem( ConnectionTree, server_id );
+ TQListViewItem *rootItem = new TQListViewItem( ConnectionTree, server_id );
rootItem->setPixmap( 0, pic_server );
rootItem->setOpen( true );
// We do no_channel here since proc emits the signal in the
// constructor, and we can't connect to before then, so we have to
// do the dirty work here.
- ProcMessage(server_id, ProcCommand::addTopLevel, QString("no_channel"));
+ ProcMessage(server_id, ProcCommand::addTopLevel, TQString("no_channel"));
- KSircProcess *proc = new KSircProcess(server_id, kss, 0, (QString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc
+ KSircProcess *proc = new KSircProcess(server_id, kss, 0, (TQString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc
//this->insertChild(proc); // Add it to out inheritance tree so we can retreive child widgets from it.
objFinder::insert(proc);
proc_list.insert(server_id, proc); // Add proc to hash
- connect(proc, SIGNAL(ProcMessage(QString, int, QString)),
- this, SLOT(ProcMessage(QString, int, QString)));
- connect(this, SIGNAL(ServMessage(QString, int, QString)),
- proc, SLOT(ServMessage(QString, int, QString)));
+ connect(proc, TQT_SIGNAL(ProcMessage(TQString, int, TQString)),
+ this, TQT_SLOT(ProcMessage(TQString, int, TQString)));
+ connect(this, TQT_SIGNAL(ServMessage(TQString, int, TQString)),
+ proc, TQT_SLOT(ServMessage(TQString, int, TQString)));
if(!ConnectionTree->currentItem()){ // If nothing's highlighted
ConnectionTree->setCurrentItem(rootItem); // highlight it.
@@ -286,8 +286,8 @@ void servercontroller::new_ksircprocess(KSircServer &kss)
void servercontroller::new_channel()
{
- QString server;
- QListViewItem *citem = ConnectionTree->currentItem(); // get item
+ TQString server;
+ TQListViewItem *citem = ConnectionTree->currentItem(); // get item
if(citem){ // if it exist, ie something is highlighted, continue
if(proc_list[citem->text(0)]){ // If it's a match with a server, ok
server = citem->text(0);
@@ -303,10 +303,10 @@ void servercontroller::new_channel()
if(server.isEmpty())
return;
- KSircChannel ci(server, QString::null);
+ KSircChannel ci(server, TQString::null);
NewWindowDialog w(ci);
- connect(&w, SIGNAL(openTopLevel(const KSircChannel &)),
- this, SLOT(new_toplevel(const KSircChannel &)));
+ connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)),
+ this, TQT_SLOT(new_toplevel(const KSircChannel &)));
w.exec();
}
@@ -330,8 +330,8 @@ void servercontroller::ToggleAutoCreate()
void servercontroller::general_prefs()
{
KSPrefs *kp = new KSPrefs();
- connect(kp, SIGNAL(update(int)),
- this, SLOT(configChange()));
+ connect(kp, TQT_SIGNAL(update(int)),
+ this, TQT_SLOT(configChange()));
kp->resize(550, 450);
kp->show();
}
@@ -349,9 +349,9 @@ void servercontroller::dump_obj()
}
void servercontroller::server_debug()
{
- QListViewItem *citem = ConnectionTree->currentItem(); // get item
+ TQListViewItem *citem = ConnectionTree->currentItem(); // get item
if(citem){ // if it exist, ie something is highlighted, continue
- QString server;
+ TQString server;
if(proc_list[citem->text(0)]){ // If it's a match with a server, ok
server = citem->text(0);
}
@@ -373,12 +373,12 @@ void servercontroller::server_debug()
void servercontroller::filter_rule_editor()
{
FilterRuleEditor *fe = new FilterRuleEditor();
- connect(fe, SIGNAL(destroyed()),
- this, SLOT(slot_filters_update()));
+ connect(fe, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(slot_filters_update()));
fe->show();
}
-void servercontroller::font_update(const QFont &font)
+void servercontroller::font_update(const TQFont &font)
{
ksopts->defaultFont = font;
/* configChange(); */
@@ -386,12 +386,12 @@ void servercontroller::font_update(const QFont &font)
KConfig *kConfig = kapp->config();
kConfig->setGroup("GlobalOptions");
kConfig->sync();
- QApplication::setFont( font, true, "KSirc::TextView" );
+ TQApplication::setFont( font, true, "KSirc::TextView" );
}
void servercontroller::configChange()
{
- QDictIterator<KSircProcess> it( proc_list );
+ TQDictIterator<KSircProcess> it( proc_list );
while(it.current()){
it.current()->filters_update();
it.current()->getWindowList()["!all"]->control_message(REREAD_CONFIG, "");
@@ -401,10 +401,10 @@ void servercontroller::configChange()
m_kga->updateConnections();
}
-void servercontroller::ProcMessage(QString server, int command, QString args)
+void servercontroller::ProcMessage(TQString server, int command, TQString args)
{
- QListViewItem *serverItem = 0L;
- QListViewItem *item = ConnectionTree->firstChild();
+ TQListViewItem *serverItem = 0L;
+ TQListViewItem *item = ConnectionTree->firstChild();
while ( item ) {
if ( !item->parent() && item->text(0) == server ) {
serverItem = item;
@@ -428,7 +428,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
// Args == nick comming on/offline.
case ProcCommand::nickOffline:
{
- QListViewItem *online_item = findChild(serverItem, i18n("Online"));
+ TQListViewItem *online_item = findChild(serverItem, i18n("Online"));
if(online_item){
item = findChild(online_item, args);
delete item;
@@ -442,9 +442,9 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
}
case ProcCommand::nickOnline:
{
- QListViewItem *online_item = findChild(serverItem, i18n("Online"));
+ TQListViewItem *online_item = findChild(serverItem, i18n("Online"));
if(!online_item){
- online_item = new QListViewItem(serverItem, i18n("Online"));
+ online_item = new TQListViewItem(serverItem, i18n("Online"));
online_item->setPixmap( 0, pic_gf );
online_item->setOpen( true );
}
@@ -454,7 +454,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
delete item;
}
}
- item = new QListViewItem(online_item, args);
+ item = new TQListViewItem(online_item, args);
item->setPixmap( 0, pic_run );
if(ksopts->runDocked && ksopts->dockPopups)
KPassivePopup::message(i18n("%1 just came online on %2").arg(args).arg(server), dockWidget);
@@ -490,7 +490,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
if(args[0] == '!')
args.remove(0, 1); // If the first char is !, it's control, remove it
// add a new child item with parent as it's parent
- item = new QListViewItem( serverItem, args );
+ item = new TQListViewItem( serverItem, args );
item->setPixmap( 0, pic_ppl );
open_toplevels++;
@@ -543,7 +543,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
item = findChild( serverItem, old_s );
delete item;
- item = new QListViewItem( serverItem, new_s );
+ item = new TQListViewItem( serverItem, new_s );
item->setPixmap( 0, pic_ppl );
delete[] new_s;
@@ -578,7 +578,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args)
void servercontroller::slot_filters_update()
{
- emit ServMessage(QString(), ServCommand::updateFilters, QString());
+ emit ServMessage(TQString(), ServCommand::updateFilters, TQString());
}
void servercontroller::saveGlobalProperties(KConfig *ksc)
@@ -589,7 +589,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc)
// Ignore all !<name> windows
- QString group = ksc->group();
+ TQString group = ksc->group();
ksc->setGroup( "KSircSession" );
SessionConfigMap::ConstIterator it = m_sessionConfig.begin();
@@ -597,15 +597,15 @@ void servercontroller::saveGlobalProperties(KConfig *ksc)
ChannelSessionInfoList infoList = *it;
- QStringList channels;
- QString port = "6667";
- QStringList desktops;
+ TQStringList channels;
+ TQString port = "6667";
+ TQStringList desktops;
for ( ChannelSessionInfoList::ConstIterator sessionInfoIt = infoList.begin();
sessionInfoIt != infoList.end(); ++sessionInfoIt ) {
channels << ( *sessionInfoIt ).name;
port = ( *sessionInfoIt ).port;
- desktops << QString::number( ( *sessionInfoIt ).desktop );
+ desktops << TQString::number( ( *sessionInfoIt ).desktop );
}
KConfigGroup( ksc, "KSircSession" ).writeEntry( it.key(), channels );
@@ -621,7 +621,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc)
void servercontroller::readGlobalProperties(KConfig *ksc)
{
- QString group = ksc->group();
+ TQString group = ksc->group();
// ksc == K Session Config
@@ -631,22 +631,22 @@ void servercontroller::readGlobalProperties(KConfig *ksc)
// commented in for testing...
ksc->setGroup( "KSircSession" );
- QMap<QString,QString> keyMap = ksc->entryMap( ksc->group() );
- QMap<QString,QString>::Iterator it = keyMap.begin();
+ TQMap<TQString,TQString> keyMap = ksc->entryMap( ksc->group() );
+ TQMap<TQString,TQString>::Iterator it = keyMap.begin();
while(it != keyMap.end()) {
- QString server = it.key();
- QString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server );
+ TQString server = it.key();
+ TQString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server );
// debug("%s", it.key().latin1());
KSircServer kss(server, port);
new_ksircprocess( kss ); // sets up proc_list
- QStringList channels = ksc->readListEntry( server );
+ TQStringList channels = ksc->readListEntry( server );
- QStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server );
+ TQStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server );
for(uint i = 0; i < channels.count(); i++){
- QString channel = channels[ i ];
+ TQString channel = channels[ i ];
proc_list[ server ]->new_toplevel( KSircChannel(server, channel), true );
@@ -654,7 +654,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc)
if ( !topLevel || !topLevel->isTopLevel() )
continue;
- QStringList::ConstIterator desktopNumberIt = desktops.at( i );
+ TQStringList::ConstIterator desktopNumberIt = desktops.at( i );
if ( desktopNumberIt == desktops.end() )
continue;
@@ -669,7 +669,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc)
++it;
}
- QRect geom;
+ TQRect geom;
// ksc->setGroup("ServerController");
// bool docked = ksc->readBoolEntry("Docked", FALSE);
@@ -687,11 +687,11 @@ void servercontroller::readGlobalProperties(KConfig *ksc)
void servercontroller::saveSessionConfig()
{
- QDictIterator<KSircProcess> ksp(proc_list);
+ TQDictIterator<KSircProcess> ksp(proc_list);
for (; ksp.current(); ++ksp ) {
ChannelSessionInfoList channels;
- QDictIterator<KSircMessageReceiver> ksm(ksp.current()->getWindowList());
+ TQDictIterator<KSircMessageReceiver> ksm(ksp.current()->getWindowList());
for (; ksm.current(); ++ksm )
if(ksm.currentKey()[0] != '!') { // Ignore !ksm's (system created)
ChannelSessionInfo sessionInfo;
@@ -714,20 +714,20 @@ void servercontroller::saveSessionConfig()
}
}
-void servercontroller::showEvent( QShowEvent *e )
+void servercontroller::showEvent( TQShowEvent *e )
{
- QWidget::showEvent( e );
+ TQWidget::showEvent( e );
if ( !e->spontaneous() )
saveDockingStatus();
}
-void servercontroller::hideEvent( QHideEvent * )
+void servercontroller::hideEvent( TQHideEvent * )
{
/*
- QWidget::hideEvent( e );
+ TQWidget::hideEvent( e );
if ( !e->spontaneous() )
saveDockingStatus();
- if(QWidget::isMinimized()){
+ if(TQWidget::isMinimized()){
hide();
KWin::setState(winId(), NET::SkipTaskbar);
}
@@ -750,27 +750,27 @@ void servercontroller::endksirc(){
exit(0);
}
-void servercontroller::closeEvent( QCloseEvent *e )
+void servercontroller::closeEvent( TQCloseEvent *e )
{
we_are_exiting = true;
saveSessionConfig();
KMainWindow::closeEvent( e );
}
-void servercontroller::WindowSelected(QListViewItem *item)
+void servercontroller::WindowSelected(TQListViewItem *item)
{
if ( !item )
return;
- QListViewItem *parent_server = item->parent();
+ TQListViewItem *parent_server = item->parent();
if(!parent_server)
return;
- QString txt = QString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel";
- QWidget *obj = dynamic_cast<QWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
+ TQString txt = TQString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel";
+ TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
if(obj == 0x0){
- txt =QString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel";
- obj = dynamic_cast<QWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
+ txt =TQString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel";
+ obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
}
if(obj != 0x0){
@@ -782,14 +782,14 @@ void servercontroller::WindowSelected(QListViewItem *item)
}
-QListViewItem * servercontroller::findChild( QListViewItem *parent,
- const QString& text )
+TQListViewItem * servercontroller::findChild( TQListViewItem *parent,
+ const TQString& text )
{
if ( !parent || parent->childCount() == 0 ) {
return 0L;
}
- QListViewItem *item = parent->firstChild();
+ TQListViewItem *item = parent->firstChild();
while ( item ) {
if ( item->text(0) == text ) {
return item;
@@ -800,13 +800,13 @@ QListViewItem * servercontroller::findChild( QListViewItem *parent,
return 0L;
}
-void servercontroller::increaseNotificationCount(const QString& reason, const QString& text)
+void servercontroller::increaseNotificationCount(const TQString& reason, const TQString& text)
{
dockWidget->startBlink(reason, text);
m_notificationCount++;
}
-void servercontroller::decreaseNotificationCount(QString reason)
+void servercontroller::decreaseNotificationCount(TQString reason)
{
m_notificationCount--;
if ( m_notificationCount == 0 )
@@ -821,8 +821,8 @@ void servercontroller::decreaseNotificationCount(QString reason)
void servercontroller::resetNotification()
{
m_notificationCount = 0;
- dockWidget->stopBlink(QString::null, true);
- QDictIterator<KSircProcess> it( proc_list );
+ dockWidget->stopBlink(TQString::null, true);
+ TQDictIterator<KSircProcess> it( proc_list );
while(it.current()){
it.current()->filters_update();
it.current()->getWindowList()["!all"]->control_message(RESET_NOTIF, "");
@@ -840,21 +840,21 @@ void servercontroller::do_autoconnect()
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers = conf->readListEntry("Servers");
+ TQStringList servers = conf->readListEntry("Servers");
servers.sort();
- QStringList::ConstIterator ser = servers.begin();
+ TQStringList::ConstIterator ser = servers.begin();
loop = 0;
for( ; ser != servers.end(); ser++){
if(loop++ == stime){
stime++;
- QString server = *ser;
- QString port = "6667";
+ TQString server = *ser;
+ TQString port = "6667";
bool usessl = false;
- QString pass = QString::null;
+ TQString pass = TQString::null;
- QRegExp rx("(.+) \\(SSL\\)(.*)");
+ TQRegExp rx("(.+) \\(SSL\\)(.*)");
if(rx.search(server) >= 0){
server = rx.cap(1) + rx.cap(3);
usessl = true;
@@ -880,23 +880,23 @@ void servercontroller::do_autoconnect()
ser = servers.begin();
for( ; ser != servers.end(); ser++){
- QStringList channels = conf->readListEntry(*ser);
+ TQStringList channels = conf->readListEntry(*ser);
if(channels.empty() == FALSE){
channels.sort();
- QStringList::ConstIterator chan = channels.begin();
+ TQStringList::ConstIterator chan = channels.begin();
for(; chan != channels.end(); chan++){
if(loop++ == ctime){
ctime++;
- QString channel = *chan;
- QString key = QString::null;
- QRegExp crx("(.+) \\(key: (\\S+)\\)");
+ TQString channel = *chan;
+ TQString key = TQString::null;
+ TQRegExp crx("(.+) \\(key: (\\S+)\\)");
if(crx.search(channel) >= 0){
channel = crx.cap(1);
key = crx.cap(2);
}
- QString server = *ser;
+ TQString server = *ser;
- QRegExp rx("^([^ :]+)");
+ TQRegExp rx("^([^ :]+)");
if(rx.search(server) >= 0){
server = rx.cap(1);
}
@@ -916,8 +916,8 @@ void servercontroller::do_autoconnect()
}
void servercontroller::start_autoconnect() {
- at = new QTimer(this);
- connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect()));
+ at = new TQTimer(this);
+ connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect()));
at->start(250, FALSE);
}
@@ -925,36 +925,36 @@ void servercontroller::start_autoconnect_check() {
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers = conf->readListEntry("Servers");
+ TQStringList servers = conf->readListEntry("Servers");
if(servers.count() == 0){
KSPrefs *kp = new KSPrefs();
- connect(kp, SIGNAL(update(int)),
- this, SLOT(configChange()));
+ connect(kp, TQT_SIGNAL(update(int)),
+ this, TQT_SLOT(configChange()));
kp->resize(550, 450);
kp->showPage(7); /* Show auto connect page */
kp->show();
}
else {
- at = new QTimer(this);
- connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect()));
+ at = new TQTimer(this);
+ connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect()));
at->start(250, FALSE);
}
}
-scInside::scInside ( QWidget * parent, const char * name, WFlags
+scInside::scInside ( TQWidget * parent, const char * name, WFlags
f )
- : QFrame(parent, name, f)
+ : TQFrame(parent, name, f)
{
- ASConn = new QLabel(i18n("Active server connections:"), this, "servercontroller_label");
- QFont asfont = ASConn->font();
+ ASConn = new TQLabel(i18n("Active server connections:"), this, "servercontroller_label");
+ TQFont asfont = ASConn->font();
asfont.setBold(TRUE);
ASConn->setFont(asfont);
ConnectionTree = new KListView(this, "connectiontree");
- ConnectionTree->addColumn(QString::null);
+ ConnectionTree->addColumn(TQString::null);
ConnectionTree->setRootIsDecorated( true );
ConnectionTree->setSorting( 0 );
ConnectionTree->header()->hide();
@@ -966,9 +966,9 @@ scInside::~scInside()
delete ConnectionTree;
}
-void scInside::resizeEvent ( QResizeEvent *e )
+void scInside::resizeEvent ( TQResizeEvent *e )
{
- QFrame::resizeEvent(e);
+ TQFrame::resizeEvent(e);
ASConn->setGeometry(10,10, width() - 20,
ASConn->fontMetrics().height()+5);
ConnectionTree->setGeometry(10, 10 + ASConn->height(),
diff --git a/ksirc/servercontroller.h b/ksirc/servercontroller.h
index 54d0292c..2f45f3b2 100644
--- a/ksirc/servercontroller.h
+++ b/ksirc/servercontroller.h
@@ -19,10 +19,10 @@ class dockServerController;
class ServMessage;
class ProcCommand;
-#include <qdict.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <klistview.h>
#include <kmainwindow.h>
@@ -69,15 +69,15 @@ class scInside : QFrame
Q_OBJECT
friend class servercontroller;
public:
- scInside ( QWidget *parent = 0L, const char * name = 0, WFlags f=0 );
+ scInside ( TQWidget *parent = 0L, const char * name = 0, WFlags f=0 );
~scInside();
protected:
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
private:
KListView *ConnectionTree;
- QLabel *ASConn;
+ TQLabel *ASConn;
};
@@ -87,23 +87,23 @@ class servercontroller : public KMainWindow
friend class dockServerController;
public:
- servercontroller ( QWidget* parent = 0L, const char* name = NULL );
+ servercontroller ( TQWidget* parent = 0L, const char* name = NULL );
virtual ~servercontroller();
- const QDict<KSircProcess> &processes() const { return proc_list; }
+ const TQDict<KSircProcess> &processes() const { return proc_list; }
static servercontroller *self() { return s_self; }
/**
* Someone is talking to the user (blue icon), notify him (using the docked icon).
*/
- void increaseNotificationCount(const QString& reason = QString::null, const QString& text = QString::null);
+ void increaseNotificationCount(const TQString& reason = TQString::null, const TQString& text = TQString::null);
/**
* The channel in which the user was talked to, has been read.
* -> decrease count of blue icons.
*/
- void decreaseNotificationCount(QString reason = QString::null);
+ void decreaseNotificationCount(TQString reason = TQString::null);
/**
* This resets all notificaiton counts and allows new ones
@@ -122,7 +122,7 @@ signals:
*/
virtual void filters_update();
- void ServMessage(QString server, int command, QString args);
+ void ServMessage(TQString server, int command, TQString args);
public slots:
// All slots are described in servercontroll.cpp file
@@ -136,12 +136,12 @@ public slots:
virtual void new_connection();
/**
* Args:
- * QString: new server name or IP to connect to.
+ * TQString: new server name or IP to connect to.
* Action:
* Creates a new sirc process and window !default connected to the
* server. Does nothing if a server connection already exists.
*/
- // virtual void new_ksircprocess(QString);
+ // virtual void new_ksircprocess(TQString);
virtual void new_ksircprocess(KSircServer &);
/**
* Creates popup asking for new channel name
@@ -172,11 +172,11 @@ public slots:
* Opens the dialog that lets the user configure system notifications
*/
virtual void notification_prefs();
- virtual void font_update(const QFont&);
+ virtual void font_update(const TQFont&);
virtual void filter_rule_editor();
virtual void configChange();
- virtual void ProcMessage(QString server, int command, QString args);
+ virtual void ProcMessage(TQString server, int command, TQString args);
/**
* On quit we sync the config to disk and exit
*/
@@ -191,19 +191,19 @@ public slots:
void start_autoconnect_check();
- QListViewItem * findChild( QListViewItem *parent, const QString& text );
+ TQListViewItem * findChild( TQListViewItem *parent, const TQString& text );
protected slots:
- void WindowSelected(QListViewItem *);
+ void WindowSelected(TQListViewItem *);
void dump_obj();
void server_debug();
protected:
- virtual void showEvent( QShowEvent *e );
- virtual void hideEvent( QHideEvent *e );
- virtual void closeEvent( QCloseEvent * );
+ virtual void showEvent( TQShowEvent *e );
+ virtual void hideEvent( TQHideEvent *e );
+ virtual void closeEvent( TQCloseEvent * );
void saveDockingStatus();
void saveGlobalProperties(KConfig *);
@@ -223,19 +223,19 @@ private:
// Hold a list of all KSircProcess's for access latter. Index by server
// name
- QDict<KSircProcess> proc_list;
- QPopupMenu *options, *connections;
+ TQDict<KSircProcess> proc_list;
+ TQPopupMenu *options, *connections;
int join_id, server_id;
KGlobalAccel *m_kga;
int open_toplevels;
- QPixmap pic_icon;
- QPixmap pic_server;
- QPixmap pic_gf;
- QPixmap pic_run;
- QPixmap pic_ppl;
+ TQPixmap pic_icon;
+ TQPixmap pic_server;
+ TQPixmap pic_gf;
+ TQPixmap pic_run;
+ TQPixmap pic_ppl;
// PukeController *PukeC;
@@ -249,18 +249,18 @@ private:
{
ChannelSessionInfo()
: desktop( -1 ) {}
- QString name;
- QString port;
+ TQString name;
+ TQString port;
int desktop;
};
- typedef QValueList<ChannelSessionInfo> ChannelSessionInfoList;
+ typedef TQValueList<ChannelSessionInfo> ChannelSessionInfoList;
- typedef QMap<QString, ChannelSessionInfoList> SessionConfigMap;
+ typedef TQMap<TQString, ChannelSessionInfoList> SessionConfigMap;
SessionConfigMap m_sessionConfig;
static servercontroller *s_self;
- QTimer *at;
+ TQTimer *at;
nickColourMaker *m_ncm;
};
diff --git a/ksirc/ssfeprompt.cpp b/ksirc/ssfeprompt.cpp
index 46e68909..74868c5b 100644
--- a/ksirc/ssfeprompt.cpp
+++ b/ksirc/ssfeprompt.cpp
@@ -15,8 +15,8 @@
ssfePrompt::ssfePrompt
(
- QString prompttext,
- QWidget* parent,
+ TQString prompttext,
+ TQWidget* parent,
const char* name
)
:
@@ -37,9 +37,9 @@ void ssfePrompt::terminate()
done(0);
}
-QString ssfePrompt::text()
+TQString ssfePrompt::text()
{
- QString text;
+ TQString text;
text = SLine->text();
return text;
}
@@ -47,8 +47,8 @@ QString ssfePrompt::text()
void ssfePrompt::setPassword(bool pass)
{
if(pass == TRUE)
- SLine->setEchoMode(QLineEdit::Password);
+ SLine->setEchoMode(TQLineEdit::Password);
else
- SLine->setEchoMode(QLineEdit::Normal);
+ SLine->setEchoMode(TQLineEdit::Normal);
}
#include "ssfeprompt.moc"
diff --git a/ksirc/ssfeprompt.h b/ksirc/ssfeprompt.h
index ff777912..5a239869 100644
--- a/ksirc/ssfeprompt.h
+++ b/ksirc/ssfeprompt.h
@@ -20,14 +20,14 @@ public:
ssfePrompt
(
- QString prompttext,
- QWidget* parent = NULL,
+ TQString prompttext,
+ TQWidget* parent = NULL,
const char* name = NULL
);
virtual ~ssfePrompt();
- QString text();
+ TQString text();
void setPassword(bool);
protected slots:
diff --git a/ksirc/ssfepromptdata.cpp b/ksirc/ssfepromptdata.cpp
index ce1dc368..94e52002 100644
--- a/ksirc/ssfepromptdata.cpp
+++ b/ksirc/ssfepromptdata.cpp
@@ -20,13 +20,13 @@
ssfepromptdata::ssfepromptdata
(
- QWidget* parent,
+ TQWidget* parent,
const char* name
)
:
Inherited( parent, name, TRUE, 20480 )
{
- prompt = new QLabel( this, "Label_1" );
+ prompt = new TQLabel( this, "Label_1" );
prompt->setGeometry( 10, 10, 220, 30 );
prompt->setMinimumSize( 10, 10 );
prompt->setMaximumSize( 32767, 32767 );
@@ -34,22 +34,22 @@ ssfepromptdata::ssfepromptdata
prompt->setAlignment( 289 );
prompt->setMargin( -1 );
- SLine = new QLineEdit( this, "LineEdit_1" );
+ SLine = new TQLineEdit( this, "LineEdit_1" );
SLine->setGeometry( 240, 10, 100, 30 );
SLine->setMinimumSize( 10, 10 );
SLine->setMaximumSize( 32767, 32767 );
- connect( SLine, SIGNAL(returnPressed()), SLOT(terminate()) );
+ connect( SLine, TQT_SIGNAL(returnPressed()), TQT_SLOT(terminate()) );
SLine->setText( "" );
SLine->setMaxLength( 32767 );
- SLine->setEchoMode( QLineEdit::Normal );
+ SLine->setEchoMode( TQLineEdit::Normal );
SLine->setFrame( TRUE );
- QPushButton* dlgedit_PushButton_1;
+ TQPushButton* dlgedit_PushButton_1;
dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::ok(), this, "PushButton_1" );
dlgedit_PushButton_1->setGeometry( 240, 50, 100, 30 );
dlgedit_PushButton_1->setMinimumSize( 10, 10 );
dlgedit_PushButton_1->setMaximumSize( 32767, 32767 );
- connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(terminate()) );
+ connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(terminate()) );
dlgedit_PushButton_1->setAutoRepeat( FALSE );
dlgedit_PushButton_1->setAutoDefault( TRUE );
diff --git a/ksirc/ssfepromptdata.h b/ksirc/ssfepromptdata.h
index c4b6a4e6..e4b97994 100644
--- a/ksirc/ssfepromptdata.h
+++ b/ksirc/ssfepromptdata.h
@@ -13,9 +13,9 @@
#ifndef ssfepromptdata_included
#define ssfepromptdata_included
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
class ssfepromptdata : public QDialog
{
@@ -25,7 +25,7 @@ public:
ssfepromptdata
(
- QWidget* parent = NULL,
+ TQWidget* parent = NULL,
const char* name = NULL
);
@@ -39,8 +39,8 @@ protected slots:
virtual void terminate();
protected:
- QLabel* prompt;
- QLineEdit* SLine;
+ TQLabel* prompt;
+ TQLineEdit* SLine;
};
diff --git a/ksirc/stringparserstate.h b/ksirc/stringparserstate.h
index cd9220a4..04fb96ea 100644
--- a/ksirc/stringparserstate.h
+++ b/ksirc/stringparserstate.h
@@ -11,7 +11,7 @@ public:
typedef CharType ValueType;
typedef const CharType * ConstIterator;
typedef _SizeType SizeType;
- typedef QValueList<ValueType> ValueList;
+ typedef TQValueList<ValueType> ValueList;
StringParserState( ConstIterator start, SizeType maxSteps,
const ValueList &optionalEndItems = ValueList() )
diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp
index 9e0d8f3e..49334f43 100644
--- a/ksirc/topic.cpp
+++ b/ksirc/topic.cpp
@@ -8,12 +8,12 @@
#include "topic.h"
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -28,27 +28,27 @@
#include "ksparser.h"
-KSircTopic::KSircTopic( QWidget *parent, const char *name )
+KSircTopic::KSircTopic( TQWidget *parent, const char *name )
: KActiveLabel( parent, name )
{
m_editor = 0;
m_doEdit = false;
m_height = 0;
// setBackgroundColor( colorGroup().light() );
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
setTextFormat( RichText );
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(TQTextEdit::NoWrap);
doResize();
// setAlignment( alignment() | WordBreak );
}
-void KSircTopic::setText( const QString &_text)
+void KSircTopic::setText( const TQString &_text)
{
m_text = _text; /* save a raw copy for us */
- QString text = _text;
+ TQString text = _text;
- QString richText( "<font color=\"%1\">" );
+ TQString richText( "<font color=\"%1\">" );
richText = richText.arg( ksopts->textColor.name() );
text.replace('&', "&amp;");
@@ -64,12 +64,12 @@ void KSircTopic::setText( const QString &_text)
// according to UV Kochavi <uv1st@yahoo.com> , to prevent output like
// '<nick message<' , which is supposedly a bug in Qt's reordering. The
// same is done for [nick] and >nick< to catch queries.
- QRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
- text.replace( bidiRe, QString::fromLatin1( "<span>\\1</span>\\2" ) );
- QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
- text.replace( bidiRe2, QString::fromLatin1( "<span>\\1</span>\\2" ) );
- QRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
- text.replace( bidiRe3, QString::fromLatin1( "<span>\\1</span>\\2" ) );
+ TQRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
+ text.replace( bidiRe, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
+ text.replace( bidiRe2, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ TQRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
+ text.replace( bidiRe3, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
KSParser parser;
richText += parser.parse( text );
@@ -82,12 +82,12 @@ void KSircTopic::setText( const QString &_text)
}
-void KSircTopic::contentsMouseDoubleClickEvent( QMouseEvent * )
+void KSircTopic::contentsMouseDoubleClickEvent( TQMouseEvent * )
{
m_doEdit = true;
}
-void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e )
+void KSircTopic::contentsMouseReleaseEvent( TQMouseEvent *e )
{
if ( m_doEdit ) {
m_doEdit = false;
@@ -99,12 +99,12 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e )
m_editor = new KSircTopicEditor( this );
- connect( m_editor, SIGNAL( returnPressed() ),
- this, SLOT( setNewTopic() ) );
- connect( m_editor, SIGNAL( resized() ),
- this, SLOT( slotEditResized() ) );
- connect( m_editor, SIGNAL( destroyed() ),
- this, SLOT( doResize() ) );
+ connect( m_editor, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( setNewTopic() ) );
+ connect( m_editor, TQT_SIGNAL( resized() ),
+ this, TQT_SLOT( slotEditResized() ) );
+ connect( m_editor, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( doResize() ) );
/*
* If you don't do this order
@@ -116,7 +116,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e )
m_editor->show();
m_editor->setText( m_text );
- QToolTip::remove(this);
+ TQToolTip::remove(this);
}
KActiveLabel::contentsMouseReleaseEvent(e);
@@ -124,7 +124,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e )
void KSircTopic::setNewTopic()
{
- QString topic = m_editor->text().stripWhiteSpace();
+ TQString topic = m_editor->text().stripWhiteSpace();
/*
* don't change the channel display
@@ -132,9 +132,9 @@ void KSircTopic::setNewTopic()
* from the server. If we can't set the topic
* don't make it look like it was set
*/
- QTimer::singleShot( 0, m_editor, SLOT( close() ) );
- disconnect( m_editor, SIGNAL( resized() ),
- this, SLOT( slotEditResized() ) );
+ TQTimer::singleShot( 0, m_editor, TQT_SLOT( close() ) );
+ disconnect( m_editor, TQT_SIGNAL( resized() ),
+ this, TQT_SLOT( slotEditResized() ) );
doResize();
emit topicChange( topic );
}
@@ -149,18 +149,18 @@ void KSircTopic::doResize()
{
int h;
- QFontMetrics metrics( currentFont() );
+ TQFontMetrics metrics( currentFont() );
h = metrics.lineSpacing()+8;
m_height = h;
setFixedHeight( h );
- QToolTip::remove(this);
- QStringList sep = QStringList::split(" ", m_text);
+ TQToolTip::remove(this);
+ TQStringList sep = TQStringList::split(" ", m_text);
int len = 0;
- QString brok;
- QStringList::Iterator it = sep.begin();
+ TQString brok;
+ TQStringList::Iterator it = sep.begin();
for(; it != sep.end(); ++it) {
brok += *it + " ";
len += (*it).length();
@@ -170,30 +170,30 @@ void KSircTopic::doResize()
}
}
- QToolTip::add(this, brok);
+ TQToolTip::add(this, brok);
}
-void KSircTopic::fontChange(QFont &f)
+void KSircTopic::fontChange(TQFont &f)
{
KActiveLabel::fontChange(f);
doResize();
}
-KSircTopicEditor::KSircTopicEditor( QWidget *parent, const char *name )
- : QTextEdit( parent, name )
+KSircTopicEditor::KSircTopicEditor( TQWidget *parent, const char *name )
+ : TQTextEdit( parent, name )
{
setWFlags( WDestructiveClose );
- setFocusPolicy( QWidget::ClickFocus );
- connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) );
+ setFocusPolicy( TQWidget::ClickFocus );
+ connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) );
}
-void KSircTopicEditor::keyPressEvent( QKeyEvent *ev )
+void KSircTopicEditor::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Escape )
{
ev->accept();
- QTimer::singleShot( 0, this, SLOT( close() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( close() ) );
return;
}
else if ( ev->key() == Key_Return )
@@ -202,26 +202,26 @@ void KSircTopicEditor::keyPressEvent( QKeyEvent *ev )
emit returnPressed();
return;
}
- QTextEdit::keyPressEvent( ev );
+ TQTextEdit::keyPressEvent( ev );
}
-void KSircTopicEditor::focusOutEvent( QFocusEvent * )
+void KSircTopicEditor::focusOutEvent( TQFocusEvent * )
{
// we don't want to quit editing when someone brings up QLE's popup
// menu
- if ( QFocusEvent::reason() == QFocusEvent::Popup )
+ if ( TQFocusEvent::reason() == TQFocusEvent::Popup )
{
- QWidget *focusw = qApp->focusWidget();
+ TQWidget *focusw = qApp->focusWidget();
if ( focusw && m_popup && focusw == m_popup )
return;
}
- QTimer::singleShot( 0, this, SLOT( close() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( close() ) );
}
-QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos )
+TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos )
{
- QPopupMenu *popup = QTextEdit::createPopupMenu( pos );
+ TQPopupMenu *popup = TQTextEdit::createPopupMenu( pos );
m_popup = popup;
return popup;
}
@@ -229,13 +229,13 @@ QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos )
void KSircTopicEditor::slotMaybeResize()
{
if(text().contains("\n")){
- QString s = text();
+ TQString s = text();
s.replace('\n', " ");
setText(s);
setCursorPosition(0, s.length());
}
- QFontMetrics metrics( currentFont() );
+ TQFontMetrics metrics( currentFont() );
int h = metrics.lineSpacing() * lines()+8;
setFixedHeight( h );
diff --git a/ksirc/topic.h b/ksirc/topic.h
index 73191128..e435d864 100644
--- a/ksirc/topic.h
+++ b/ksirc/topic.h
@@ -8,10 +8,10 @@
#define __topic_h__
#include <kactivelabel.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qguardedptr.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqguardedptr.h>
class KSircTopicEditor;
@@ -19,18 +19,18 @@ class KSircTopic : public KActiveLabel
{
Q_OBJECT
public:
- KSircTopic( QWidget *parent, const char *name = 0 );
+ KSircTopic( TQWidget *parent, const char *name = 0 );
public slots:
- virtual void setText( const QString &);
+ virtual void setText( const TQString &);
signals:
- void topicChange( const QString &newTopic );
+ void topicChange( const TQString &newTopic );
protected:
- virtual void contentsMouseDoubleClickEvent( QMouseEvent * );
- virtual void contentsMouseReleaseEvent( QMouseEvent * );
- virtual void fontChange(QFont &);
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent * );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent * );
+ virtual void fontChange(TQFont &);
private slots:
void setNewTopic();
@@ -40,17 +40,17 @@ private slots:
private:
- QGuardedPtr<KSircTopicEditor> m_editor;
+ TQGuardedPtr<KSircTopicEditor> m_editor;
bool m_doEdit;
int m_height;
- QString m_text;
+ TQString m_text;
};
class KSircTopicEditor : public QTextEdit
{
Q_OBJECT
public:
- KSircTopicEditor( QWidget *parent, const char *name = 0 );
+ KSircTopicEditor( TQWidget *parent, const char *name = 0 );
signals:
void resized();
@@ -59,12 +59,12 @@ public slots:
virtual void slotMaybeResize();
protected:
- virtual void keyPressEvent( QKeyEvent *ev );
- virtual void focusOutEvent( QFocusEvent * );
- virtual QPopupMenu *createPopupMenu( const QPoint &pos );
+ virtual void keyPressEvent( TQKeyEvent *ev );
+ virtual void focusOutEvent( TQFocusEvent * );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos );
private:
- QGuardedPtr<QPopupMenu> m_popup;
+ TQGuardedPtr<TQPopupMenu> m_popup;
};
#endif
diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp
index f064a291..f5f4d002 100644
--- a/ksirc/toplevel.cpp
+++ b/ksirc/toplevel.cpp
@@ -15,12 +15,12 @@
Signals:
- outputLine(QString &):
- output_toplevel(QString):
+ outputLine(TQString &):
+ output_toplevel(TQString):
- closing(KSircTopLevel *, QString channel):
+ closing(KSircTopLevel *, TQString channel):
- changeChannel(QString old, QString new):
+ changeChannel(TQString old, TQString new):
currentWindow(KSircTopLevel *):
@@ -49,15 +49,15 @@
#include <stdlib.h>
-#include <qaccel.h>
-#include <qclipboard.h>
-#include <qregexp.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqaccel.h>
+#include <tqclipboard.h>
+#include <tqregexp.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <kmenubar.h>
#include <kapplication.h>
@@ -78,26 +78,26 @@
#include <kstdguiitem.h>
extern DisplayMgr *displayMgr;
-//QPopupMenu *KSircTopLevel::user_controls = 0L;
-QPtrList<UserControlMenu> *KSircTopLevel::user_menu = 0L;
-QStringList KSircTopLevel::cmd_menu;
+//TQPopupMenu *KSircTopLevel::user_controls = 0L;
+TQPtrList<UserControlMenu> *KSircTopLevel::user_menu = 0L;
+TQStringList KSircTopLevel::cmd_menu;
void
KSircTopLevel::initColors()
{
- QColorGroup cg_mainw = kapp->palette().active();
- cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor);
- cg_mainw.setColor(QColorGroup::Text, ksopts->textColor);
- cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor);
- cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor);
- cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor);
- mainw->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
- nicks->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
- linee->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
- lag->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
- cg_mainw.setColor(QColorGroup::Background, ksopts->backgroundColor);
- cg_mainw.setColor(QColorGroup::Foreground, ksopts->textColor);
- ksTopic->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw));
+ TQColorGroup cg_mainw = kapp->palette().active();
+ cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor);
+ cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor);
+ cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor);
+ cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor);
+ cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor);
+ mainw->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
+ nicks->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
+ linee->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
+ lag->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
+ cg_mainw.setColor(TQColorGroup::Background, ksopts->backgroundColor);
+ cg_mainw.setColor(TQColorGroup::Foreground, ksopts->textColor);
+ ksTopic->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw));
selector->setFont( ksopts->defaultFont.family() );
mainw->setFont( ksopts->defaultFont );
nicks->setFont( ksopts->defaultFont );
@@ -109,7 +109,7 @@ KSircTopLevel::initColors()
KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInfo, const char * name)
: KMainWindow(0, name, 0/*no WDestructiveClose !*/),
UnicodeMessageReceiver(_proc),
- lastBeep( QTime::currentTime() ),
+ lastBeep( TQTime::currentTime() ),
m_channelInfo(channelInfo)
{
@@ -119,9 +119,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
kapp->ref();
- m_topic = QString::null;
+ m_topic = TQString::null;
- QCString kstl_name = QCString(QObject::name()) + "_" + "toplevel";
+ TQCString kstl_name = TQCString(TQObject::name()) + "_" + "toplevel";
setName(kstl_name);
if(!m_channelInfo.channel().isEmpty()) {
@@ -130,7 +130,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
}
else
{
- caption = QString::null;
+ caption = TQString::null;
}
Buffer = FALSE;
@@ -149,34 +149,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
m_channelInfo.setEncoding(ksopts->chan(m_channelInfo).encoding);
selector = new charSelector();
- connect(selector, SIGNAL(clicked()), this, SLOT(insertText()));
+ connect(selector, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertText()));
selector->setFont(ksopts->defaultFont.family());
- file = new QPopupMenu(this, QCString(QObject::name()) + "_popup_file");
+ file = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_file");
file->setCheckable(true);
- KAction *act = KStdAction::openNew( this, SLOT( newWindow() ), actionCollection() );
+ KAction *act = KStdAction::openNew( this, TQT_SLOT( newWindow() ), actionCollection() );
act->plug( file );
- file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), SLOT(new_connection()), Key_F2);
+ file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), TQT_SLOT(new_connection()), Key_F2);
file->insertSeparator();
- file->insertItem(i18n("&DCC Manager..."), this, SLOT(showDCCMgr()));
- file->insertItem(i18n("&Save to Logfile..."), this, SLOT(saveCurrLog()), CTRL + Key_S);
+ file->insertItem(i18n("&DCC Manager..."), this, TQT_SLOT(showDCCMgr()));
+ file->insertItem(i18n("&Save to Logfile..."), this, TQT_SLOT(saveCurrLog()), CTRL + Key_S);
- tsitem = file->insertItem(i18n("Time St&amp"), this, SLOT(toggleTimestamp()), CTRL + Key_T);
+ tsitem = file->insertItem(i18n("Time St&amp"), this, TQT_SLOT(toggleTimestamp()), CTRL + Key_T);
file->setItemChecked(tsitem, ksopts->chan(m_channelInfo).timeStamp);
- fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, SLOT(toggleFilterJoinPart()));
+ fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, TQT_SLOT(toggleFilterJoinPart()));
file->setItemChecked(fjpitem, ksopts->chan(m_channelInfo).filterJoinPart);
- file->insertItem(i18n("Character &Table"), selector, SLOT(show()), CTRL + Key_H);
- beepitem = file->insertItem(i18n("N&otify on Change"), this, SLOT(toggleBeep()), CTRL + Key_P);
+ file->insertItem(i18n("Character &Table"), selector, TQT_SLOT(show()), CTRL + Key_H);
+ beepitem = file->insertItem(i18n("N&otify on Change"), this, TQT_SLOT(toggleBeep()), CTRL + Key_P);
file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg);
encodingAction = new KSelectAction( i18n( "&Encoding" ), 0, this );
- connect( encodingAction, SIGNAL( activated() ), this, SLOT( setEncoding() ) );
- QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
+ connect( encodingAction, TQT_SIGNAL( activated() ), this, TQT_SLOT( setEncoding() ) );
+ TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
- topicitem = file->insertItem(i18n("S&how Topic"), this, SLOT(toggleTopic()), CTRL + Key_O);
+ topicitem = file->insertItem(i18n("S&how Topic"), this, TQT_SLOT(toggleTopic()), CTRL + Key_O);
if (isPrivateChat() || m_channelInfo.channel().startsWith("!no_channel")) {
file->setItemEnabled(topicitem, false);
}
@@ -184,10 +184,10 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
file->setItemChecked(topicitem, ksopts->chan(m_channelInfo).topicShow);
}
- tickeritem = file->insertItem(i18n("Ticker &Mode"), this, SLOT(toggleTicker()));
+ tickeritem = file->insertItem(i18n("Ticker &Mode"), this, TQT_SLOT(toggleTicker()));
// remove utf16/ucs2 as it just doesn't work for IRC
- QStringList::Iterator encodingIt = encodings.begin();
+ TQStringList::Iterator encodingIt = encodings.begin();
while ( encodingIt != encodings.end() ) {
if ( ( *encodingIt ).find( "utf16" ) != -1 ||
( *encodingIt ).find( "iso-10646" ) != -1 )
@@ -208,7 +208,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
setEncoding();
file->insertSeparator();
- act = KStdAction::close( this, SLOT( terminate() ), actionCollection() );
+ act = KStdAction::close( this, TQT_SLOT( terminate() ), actionCollection() );
act->plug( file );
kmenu = menuBar();
@@ -217,26 +217,26 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
/*
* Ok, let's look at the basic widget "layout"
- * Everything belongs to q QFrame F, this is use so we
+ * Everything belongs to q TQFrame F, this is use so we
* can give the KApplication a single main client widget, which is needs.
*
* A QVbox and a QHbox is used to ctronl the 3 sub widget
- * The Modified QListBox is then added side by side with the User list box.
+ * The Modified TQListBox is then added side by side with the User list box.
* The SLE is then fit bello.
*/
// kstInside does not setup fonts, etc, it simply handles sizing
- top = new QVBox( this );
+ top = new TQVBox( this );
ksTopic = new KSircTopic( top );
ksTopic->setFont(ksopts->defaultFont);
- connect( ksTopic, SIGNAL( topicChange( const QString & ) ),
- this, SLOT( setTopicIntern( const QString & ) ) );
+ connect( ksTopic, TQT_SIGNAL( topicChange( const TQString & ) ),
+ this, TQT_SLOT( setTopicIntern( const TQString & ) ) );
- QCString kstn = QCString(QObject::name()) + "_";
+ TQCString kstn = TQCString(TQObject::name()) + "_";
- pan = new QSplitter(QSplitter::Horizontal, top, kstn + "splitter");
+ pan = new TQSplitter(TQSplitter::Horizontal, top, kstn + "splitter");
#if KDE_IS_VERSION(3,1,92)
pan->setOpaqueResize( KGlobalSettings::opaqueResize() );
#else
@@ -244,31 +244,31 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
#endif
mainw = new KSircView(ksircProcess(), pan, kstn + "KSircView" );
- mainw->setFocusPolicy(QWidget::NoFocus);
+ mainw->setFocusPolicy(TQWidget::NoFocus);
- nicks_box = new QVBox(pan);
+ nicks_box = new TQVBox(pan);
channelButtons = new chanButtons(ksircProcess(), nicks_box);
- connect(channelButtons, SIGNAL(mode(QString, int, QString)),
- this, SLOT(setMode(QString, int, QString)));
+ connect(channelButtons, TQT_SIGNAL(mode(TQString, int, TQString)),
+ this, TQT_SLOT(setMode(TQString, int, TQString)));
nicks = new aListBox(nicks_box, kstn + "aListBox");
- nicks->setFocusPolicy(QWidget::NoFocus);
+ nicks->setFocusPolicy(TQWidget::NoFocus);
//nicks->hide(); // default = only the main widget
- lag = new QLabel(nicks_box);
- lag->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ lag = new TQLabel(nicks_box);
+ lag->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
lag->setAlignment(Qt::AlignCenter | Qt::SingleLine);
lag->setText(i18n("Lag: Wait"));
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << int(width()*0.85) << int(width()*0.15);
pan->setSizes(sizes);
- pan->setResizeMode( mainw, QSplitter::Stretch );
- pan->setResizeMode( nicks_box, QSplitter::Stretch );
+ pan->setResizeMode( mainw, TQSplitter::Stretch );
+ pan->setResizeMode( nicks_box, TQSplitter::Stretch );
-// f = new kstInside(top, QString(QObject::name()) + "_" + "kstIFrame");
+// f = new kstInside(top, TQString(TQObject::name()) + "_" + "kstIFrame");
top->setStretchFactor(pan, 1);
setCentralWidget(top); // Tell the KApplication what the main widget is.
@@ -291,15 +291,15 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
if(isPrivateChat()){
KConfig conf("ksirc/winlog/" + channelInfo.server() + "-" + channelInfo.channel(),
false, false, "data");
- QString group = "Message-History";
+ TQString group = "Message-History";
if(conf.hasGroup( group )){
conf.setGroup( group );
- QStringList strlist = conf.readListEntry("History");
+ TQStringList strlist = conf.readListEntry("History");
if(strlist.count() > 0){
mainw->enableTimeStamps(true);
- for ( QStringList::Iterator it = strlist.begin();
+ for ( TQStringList::Iterator it = strlist.begin();
it != strlist.end();
++it ) {
mainw->addRichText(*it);
@@ -311,12 +311,12 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
mainw->enableTimeStamps(ksopts->chan(m_channelInfo).timeStamp);
- edit = new QPopupMenu(this);
- act = KStdAction::copy( mainw, SLOT( copy() ), actionCollection() );
+ edit = new TQPopupMenu(this);
+ act = KStdAction::copy( mainw, TQT_SLOT( copy() ), actionCollection() );
act->plug( edit );
- act = KStdAction::paste( this, SLOT( pasteToWindow() ), actionCollection() );
+ act = KStdAction::paste( this, TQT_SLOT( pasteToWindow() ), actionCollection() );
act->plug( edit );
- edit->insertItem(i18n("C&lear Window"), this, SLOT(clearWindow()), CTRL + Key_L);
+ edit->insertItem(i18n("C&lear Window"), this, TQT_SLOT(clearWindow()), CTRL + Key_L);
kmenu->insertItem(i18n("&Edit"), edit, -1, -1);
linee = new aHistLineEdit(top, "");
@@ -353,34 +353,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
}
- connect(mainw, SIGNAL(pasteReq( const QString& )),
- this, SLOT( slotTextDropped( const QString& )));
+ connect(mainw, TQT_SIGNAL(pasteReq( const TQString& )),
+ this, TQT_SLOT( slotTextDropped( const TQString& )));
nicks->setFont(ksopts->defaultFont);
// setup line editor
- linee->setFocusPolicy(QWidget::StrongFocus);
+ linee->setFocusPolicy(TQWidget::StrongFocus);
linee->setFont(ksopts->defaultFont);
if(ksopts->oneLineEntry == true) {
- linee->setWordWrap(QTextEdit::NoWrap);
+ linee->setWordWrap(TQTextEdit::NoWrap);
}
else {
- linee->setWordWrap(QTextEdit::WidgetWidth);
+ linee->setWordWrap(TQTextEdit::WidgetWidth);
}
- connect(linee, SIGNAL(gotFocus()),
- this, SLOT(gotFocus()));
- connect(linee, SIGNAL(lostFocus()),
- this, SLOT(lostFocus()));
- connect(linee, SIGNAL(pasteText(const QString&)),
- this, SLOT(slotTextDropped(const QString&)));
- connect(linee, SIGNAL(notTab()),
- this, SLOT(lineeNotTab()));
+ connect(linee, TQT_SIGNAL(gotFocus()),
+ this, TQT_SLOT(gotFocus()));
+ connect(linee, TQT_SIGNAL(lostFocus()),
+ this, TQT_SLOT(lostFocus()));
+ connect(linee, TQT_SIGNAL(pasteText(const TQString&)),
+ this, TQT_SLOT(slotTextDropped(const TQString&)));
+ connect(linee, TQT_SIGNAL(notTab()),
+ this, TQT_SLOT(lineeNotTab()));
- connect( linee, SIGNAL( gotReturnPressed() ),
- this, SLOT( returnPressed() ) );
+ connect( linee, TQT_SIGNAL( gotReturnPressed() ),
+ this, TQT_SLOT( returnPressed() ) );
linee->setFocus(); // Give SLE focus
linee->slotMaybeResize();
@@ -421,56 +421,56 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
if(user_menu == 0)
user_menu = UserControlMenu::parseKConfig();
- user_controls = new QPopupMenu(this);
+ user_controls = new TQPopupMenu(this);
kmenu->insertItem(i18n("&Users"), user_controls);
- command = new QPopupMenu(this);
+ command = new TQPopupMenu(this);
setupCommandMenu();
int i = 0;
- QDict<QPopupMenu> cml;
- for(QStringList::Iterator it = cmd_menu.begin();
+ TQDict<TQPopupMenu> cml;
+ for(TQStringList::Iterator it = cmd_menu.begin();
it != cmd_menu.end();
++it){
- QString top, item;
+ TQString top, item;
top = (*it).section('/', 0, 0);
item = (*it).section('/', 1, 1);
if(!cml[top]) {
- cml.insert(top, new QPopupMenu(this));
+ cml.insert(top, new TQPopupMenu(this));
command->insertItem(top, cml[top]);
}
- cml[top]->insertItem(item, this, SLOT(cmd_process(int)), 0, i);
+ cml[top]->insertItem(item, this, TQT_SLOT(cmd_process(int)), 0, i);
i++;
}
kmenu->insertItem(i18n("C&ommand"), command);
- kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( QString::null, false ));
+ kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( TQString::null, false ));
- connect(user_controls, SIGNAL(activated(int)),
- this, SLOT(UserParseMenu(int)));
+ connect(user_controls, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(UserParseMenu(int)));
- connect(nicks, SIGNAL(contextMenuRequested(int)), this,
- SLOT(UserSelected(int)));
- connect(nicks, SIGNAL(selectedNick(const QString &)),
- this, SLOT(openQueryFromNick(const QString &)));
- connect(nicks, SIGNAL(mouseButtonClicked ( int, QListBoxItem *, const QPoint &)),
- this, SLOT(pasteToNickList(int, QListBoxItem *, const QPoint &)));
- connect(nicks, SIGNAL(textDropped( const QListBoxItem *, const QString& )),
- this, SLOT(dndTextToNickList(const QListBoxItem *, const QString&)));
+ connect(nicks, TQT_SIGNAL(contextMenuRequested(int)), this,
+ TQT_SLOT(UserSelected(int)));
+ connect(nicks, TQT_SIGNAL(selectedNick(const TQString &)),
+ this, TQT_SLOT(openQueryFromNick(const TQString &)));
+ connect(nicks, TQT_SIGNAL(mouseButtonClicked ( int, TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(pasteToNickList(int, TQListBoxItem *, const TQPoint &)));
+ connect(nicks, TQT_SIGNAL(textDropped( const TQListBoxItem *, const TQString& )),
+ this, TQT_SLOT(dndTextToNickList(const TQListBoxItem *, const TQString&)));
UserUpdateMenu(); // Must call to update Popup.
- accel = new QAccel(this, "accel");
+ accel = new TQAccel(this, "accel");
accel->connectItem(accel->insertItem(SHIFT + Key_PageUp),
this,
- SLOT(AccelScrollUpPage()));
+ TQT_SLOT(AccelScrollUpPage()));
accel->connectItem(accel->insertItem(SHIFT + Key_PageDown),
this,
- SLOT(AccelScrollDownPage()));
+ TQT_SLOT(AccelScrollDownPage()));
/*
* Pageup/dn
@@ -479,41 +479,41 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
accel->connectItem(accel->insertItem(Key_PageUp),
this,
- SLOT(AccelScrollUpPage()));
+ TQT_SLOT(AccelScrollUpPage()));
accel->connectItem(accel->insertItem(Key_PageDown),
this,
- SLOT(AccelScrollDownPage()));
+ TQT_SLOT(AccelScrollDownPage()));
/*
* These are not presently implemented, so let's not fill the logs.
accel->connectItem(accel->insertItem(CTRL + Key_Return),
this,
- SLOT(AccelPriorMsgNick()));
+ TQT_SLOT(AccelPriorMsgNick()));
accel->connectItem(accel->insertItem(CTRL + SHIFT + Key_Return),
this,
- SLOT(AccelNextMsgNick()));
+ TQT_SLOT(AccelNextMsgNick()));
*/
accel->connectItem(accel->insertItem(Key_Tab), // adds TAB accelerator
this, // connected to the main
- SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot
+ TQT_SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot
accel->connectItem(accel->insertItem(SHIFT+Key_Tab), // adds TAB accelerator
this, // connected to the main
- SLOT(TabNickCompletionShift())); // TabNickCompletion() slot
+ TQT_SLOT(TabNickCompletionShift())); // TabNickCompletion() slot
accel->connectItem(accel->insertItem(CTRL + Key_N),
- this, SLOT(newWindow()));
+ this, TQT_SLOT(newWindow()));
// accel->connectItem(accel->insertItem(CTRL + Key_S),
-// this, SLOT(toggleTimestamp()));
+// this, TQT_SLOT(toggleTimestamp()));
// Drag & Drop
- connect( mainw, SIGNAL( textDropped(const QString&) ),
- SLOT( slotTextDropped(const QString&) ));
- connect( mainw, SIGNAL( urlsDropped(const QStringList&) ),
- SLOT( slotDropURLs(const QStringList&) ));
- connect( nicks, SIGNAL( urlsDropped( const QStringList&, const QString& )),
- SLOT( slotDccURLs( const QStringList&, const QString& )));
- connect( this, SIGNAL( changed(bool, QString) ), this, SLOT( doChange(bool, QString) ));
+ connect( mainw, TQT_SIGNAL( textDropped(const TQString&) ),
+ TQT_SLOT( slotTextDropped(const TQString&) ));
+ connect( mainw, TQT_SIGNAL( urlsDropped(const TQStringList&) ),
+ TQT_SLOT( slotDropURLs(const TQStringList&) ));
+ connect( nicks, TQT_SIGNAL( urlsDropped( const TQStringList&, const TQString& )),
+ TQT_SLOT( slotDccURLs( const TQStringList&, const TQString& )));
+ connect( this, TQT_SIGNAL( changed(bool, TQString) ), this, TQT_SLOT( doChange(bool, TQString) ));
mainw->setAcceptFiles( isPrivateChat() );
resize(600, 360);
@@ -530,7 +530,7 @@ KSircTopLevel::~KSircTopLevel()
// ksircProcess()->getWindowList().remove(m_channelInfo.channel());
// if((m_channelInfo.channel()[0] == '#') || (m_channelInfo.channel()[0] == '&')){
- // QString str = QString("/part ") + m_channelInfo.channel() + "\n";
+ // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n";
// emit outputLine(str);
// }
@@ -539,11 +539,11 @@ KSircTopLevel::~KSircTopLevel()
{
if ( isPublicChat() ) {
kdDebug(5008) << "*** parting channel: " << m_channelInfo.channel() << endl;
- QString str = QString("/part ") + m_channelInfo.channel() + "\n";
+ TQString str = TQString("/part ") + m_channelInfo.channel() + "\n";
emit outputUnicodeLine(str);
}
else {
- QStringList strlist;
+ TQStringList strlist;
mainw->addLine("user|X", ksopts->channelColor, " Saved log of previous messages");
@@ -552,7 +552,7 @@ KSircTopLevel::~KSircTopLevel()
for(KSirc::TextParagIterator ksit = mainw->firstParag();
ksit.atEnd() == 0;
++ksit) {
- QString rt = ksit.richText();
+ TQString rt = ksit.richText();
if(rt.contains("<img src=\"user|servinfo\">"))
continue;
@@ -565,7 +565,7 @@ KSircTopLevel::~KSircTopLevel()
KConfig conf("ksirc/winlog/" + channelInfo().server() +
"-" + channelInfo().channel(),
false, false, "data");
- QString group = "Message-History";
+ TQString group = "Message-History";
conf.setGroup( group );
@@ -583,13 +583,13 @@ KSircTopLevel::~KSircTopLevel()
kdDebug(5008) << "~KSircToplevel out" << endl;
}
-void KSircTopLevel::setMode(QString mode, int mode_type, QString currentNick)
+void KSircTopLevel::setMode(TQString mode, int mode_type, TQString currentNick)
{
- QString command;
+ TQString command;
if (mode_type == 0)
- command = QString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode);
+ command = TQString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode);
else
- command = QString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode);
+ command = TQString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode);
sirc_write(command);
linee->setFocus();
}
@@ -598,8 +598,8 @@ void KSircTopLevel::setEncoding()
{
int index = encodingAction->currentItem();
if ( index == 0 ) {// default (locale) encoding
- ksopts->chan(m_channelInfo).encoding = QString::null;
- UnicodeMessageReceiver::setEncoding( QString::null );
+ ksopts->chan(m_channelInfo).encoding = TQString::null;
+ UnicodeMessageReceiver::setEncoding( TQString::null );
}
else {
ksopts->chan(m_channelInfo).encoding = encodingAction->currentText();
@@ -713,7 +713,7 @@ void KSircTopLevel::TabNickCompletion(int dir)
int start, end;
int extra = 0;
bool first = false;
- QString s;
+ TQString s;
if(tab_pressed == -1){
s = linee->text();
@@ -745,11 +745,11 @@ void KSircTopLevel::TabNickCompletion(int dir)
lineeNotTab();
return;
}
- QString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet.
+ TQString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet.
linee->setText(line);
linee->setCursorPosition(line.length());
- connect(linee, SIGNAL(notTab()),
- this, SLOT(lineeNotTab()));
+ connect(linee, TQT_SIGNAL(notTab()),
+ this, TQT_SLOT(lineeNotTab()));
return;
}
@@ -800,12 +800,12 @@ void KSircTopLevel::TabNickCompletion(int dir)
tab_pressed = tab; // setText causes lineeTextChanged to get called and erase tab_pressed
- connect(linee, SIGNAL(notTab()),
- this, SLOT(lineeNotTab()));
+ connect(linee, TQT_SIGNAL(notTab()),
+ this, TQT_SLOT(lineeNotTab()));
}
-void KSircTopLevel::sirc_receive(QString str, bool broadcast)
+void KSircTopLevel::sirc_receive(TQString str, bool broadcast)
{
/*
@@ -825,14 +825,14 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast)
bool addressed = false;
BufferedLine line;
- // be careful not to use a QValueList iterator here, as it is possible
+ // be careful not to use a TQValueList iterator here, as it is possible
// that we enter a local event loop (think of the ssfeprompt dialog!)
// which might trigger a socketnotifier activation which in turn
// might result in the execution of code that modifies the LineBuffer,
// which would invalidate iterators (Simon)
while ( LineBuffer.begin() != LineBuffer.end() )
{
- QString plainText("");
+ TQString plainText("");
line = *LineBuffer.begin();
LineBuffer.remove( LineBuffer.begin() );
@@ -850,7 +850,7 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast)
}
// detect /msg's -- needed when auto-create-window is off
- if ( line.message.find( QRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
+ if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
addressedLine = true;
if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick()))
@@ -871,22 +871,22 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast)
LineBuffer.append( BufferedLine( str, broadcast ) );
}
- QValueList<int> list;
- QValueList<int>::iterator it;
- QString values;
+ TQValueList<int> list;
+ TQValueList<int>::iterator it;
+ TQString values;
list = pan->sizes();
it = list.begin();
while( it != list.end()){
- values += QString("%1 ").arg(*it);
+ values += TQString("%1 ").arg(*it);
++it;
}
}
-void KSircTopLevel::sirc_line_return(const QString &text)
+void KSircTopLevel::sirc_line_return(const TQString &text)
{
/* Take line from SLE, and output if to dsirc */
- QString s = text;
+ TQString s = text;
if(s.length() == 0)
return;
@@ -901,34 +901,34 @@ void KSircTopLevel::sirc_line_return(const QString &text)
}
-void KSircTopLevel::sirc_write(const QString &str)
+void KSircTopLevel::sirc_write(const TQString &str)
{
/*
* Parse line forcommand we handle
*/
- QString command = str, plain = str.lower().simplifyWhiteSpace();
+ TQString command = str, plain = str.lower().simplifyWhiteSpace();
if(plain.startsWith("/join ") ||
plain.startsWith("/j ") ||
plain.startsWith("/query ")) {
- QString s = plain.mid(plain.find(' ')+1);
+ TQString s = plain.mid(plain.find(' ')+1);
- QStringList channels = QStringList::split(",", s);
- QStringList::ConstIterator it = channels.begin();
+ TQStringList channels = TQStringList::split(",", s);
+ TQStringList::ConstIterator it = channels.begin();
for( ; it != channels.end(); ++it){
- QString name = *it;
+ TQString name = *it;
//kdDebug(5008) << "Doing " << name << endl;
- QRegExp rx("(\\S+)\\s*(\\S*)");
+ TQRegExp rx("(\\S+)\\s*(\\S*)");
rx.search(name);
KSircChannel ci(m_channelInfo.server(),
rx.cap(1), // channel
rx.cap(2)); // optional key
- linee->setText(QString::null);
+ linee->setText(TQString::null);
emit open_toplevel(ci);
/* if(name[0] != '#'){
emit open_toplevel(name);
- linee->setText(QString::null);
+ linee->setText(TQString::null);
}
else {
emit outputUnicodeLine(plain + "\n");
@@ -941,11 +941,11 @@ void KSircTopLevel::sirc_write(const QString &str)
}
else if(plain.startsWith("/server ")) {
plain.simplifyWhiteSpace();
- QRegExp rx("/server (\\S+) *(\\S*) *(\\S*)");
+ TQRegExp rx("/server (\\S+) *(\\S*) *(\\S*)");
if(rx.search(str) >= 0){
- QString server = rx.cap(1);
- QString port = rx.cap(2);
- QString pass = rx.cap(3);
+ TQString server = rx.cap(1);
+ TQString port = rx.cap(2);
+ TQString pass = rx.cap(3);
bool ssl = false;
if(server.startsWith("+")){
@@ -953,7 +953,7 @@ void KSircTopLevel::sirc_write(const QString &str)
ssl = true;
}
- KSircServer serv(server, port, QString::null, pass, ssl);
+ KSircServer serv(server, port, TQString::null, pass, ssl);
servercontroller::self()->new_ksircprocess(serv);
return;
@@ -962,19 +962,19 @@ void KSircTopLevel::sirc_write(const QString &str)
else if(plain.startsWith("/part") ||
plain.startsWith("/leave") ||
plain.startsWith("/hop")) {
- QApplication::postEvent(this, new QCloseEvent()); // WE'RE DEAD
- linee->setText(QString::null);
+ TQApplication::postEvent(this, new TQCloseEvent()); // WE'RE DEAD
+ linee->setText(TQString::null);
return;
}
else if( plain.startsWith( "/bye" ) ||
plain.startsWith( "/exit" ) ||
plain.startsWith( "/quit" )) {
- linee->setText( QString::null );
+ linee->setText( TQString::null );
emit requestQuit( command.ascii() );
return;
}
else if ( plain.startsWith( "/away" ) ) {
- QString awayEvalCommand = QString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' );
+ TQString awayEvalCommand = TQString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' );
emit outputUnicodeLine( awayEvalCommand );
}
@@ -985,11 +985,11 @@ void KSircTopLevel::sirc_write(const QString &str)
if(!isSpecialWindow()) { // channel or private chat
if(plain[0].latin1() != '/'){
- command.prepend(QString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel()));
+ command.prepend(TQString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel()));
}
else if(plain.startsWith("/me ")) {
command.remove(0, 3);
- command.prepend(QString("/de ") + m_channelInfo.channel());
+ command.prepend(TQString("/de ") + m_channelInfo.channel());
}
}
@@ -1003,7 +1003,7 @@ void KSircTopLevel::sirc_write(const QString &str)
mainw->scrollToBottom(true);
}
-bool KSircTopLevel::parse_input(const QString &string, QString &plainText)
+bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText)
{
/*
* Parsing routines are broken into 3 majour sections
@@ -1033,7 +1033,7 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText)
parseSucc *item = dynamic_cast<parseSucc *>(pResult);
parseError *err = dynamic_cast<parseError *>(pResult);
- QString logString;
+ TQString logString;
if(item)
{
@@ -1069,14 +1069,14 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText)
}
else
{
- logString = mainw->addLine( QString::null, ksopts->textColor, string );
+ logString = mainw->addLine( TQString::null, ksopts->textColor, string );
if(ticker != NULL){
ticker->mergeString(string);
}
// If it contains our nick, move the speaker to the top
// of the nick completion list
if(string.contains("~o")){
- QRegExp rx("<(\\S+)>");
+ TQRegExp rx("<(\\S+)>");
if ( (rx.search(logString) >= 0) &&
(rx.cap(1) != ksircProcess()->getNick()) ) {
//kdDebug(5008) << "addCompleteNick: " << rx.cap(1) << endl;
@@ -1099,10 +1099,10 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText)
void KSircTopLevel::returnPressed()
{
- QString s = linee->text();
+ TQString s = linee->text();
uint i;
- QChar c;
+ TQChar c;
for(i = 0; (c = s[i]); i++){
switch(c.unicode()){
case 0336:
@@ -1146,17 +1146,17 @@ void KSircTopLevel::UserParseMenu(int id)
if(nicks->currentItem() < 0)
return;
- QString s;
- s = QString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem()));
+ TQString s;
+ s = TQString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem()));
sirc_write(s);
// set $$dest_chan variable
- s = QString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel());
+ s = TQString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel());
sirc_write(s);
- QString action = user_menu->at(id)->action;
+ TQString action = user_menu->at(id)->action;
if (action.length() && action[0] == '/')
action.remove(0, 1);
- s = QString("/eval &docommand(eval{\"%1\"});\n").arg(action);
- s.replace(QRegExp("\\$\\$"), "$");
+ s = TQString("/eval &docommand(eval{\"%1\"});\n").arg(action);
+ s.replace(TQRegExp("\\$\\$"), "$");
sirc_write(s);
}
@@ -1192,12 +1192,12 @@ void KSircTopLevel::AccelScrollUpPage()
void KSircTopLevel::newWindow()
{
- NewWindowDialog w(KSircChannel(m_channelInfo.server(), QString::null));
- connect(&w, SIGNAL(openTopLevel(const KSircChannel &)), SIGNAL(open_toplevel(const KSircChannel &)));
+ NewWindowDialog w(KSircChannel(m_channelInfo.server(), TQString::null));
+ connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), TQT_SIGNAL(open_toplevel(const KSircChannel &)));
w.exec();
}
-void KSircTopLevel::closeEvent(QCloseEvent *e)
+void KSircTopLevel::closeEvent(TQCloseEvent *e)
{
KMainWindow::closeEvent( e );
e->accept();
@@ -1205,7 +1205,7 @@ void KSircTopLevel::closeEvent(QCloseEvent *e)
//Let's not part the channel till we are acutally delete.
// We should always get a close event, *BUT* we will always be deleted.
// if( isPublicChat() ) {
- // QString str = QString("/part ") + m_channelInfo.channel() + "\n";
+ // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n";
// emit outputLine(str);
// }
@@ -1217,9 +1217,9 @@ void KSircTopLevel::closeEvent(QCloseEvent *e)
emit closing(this, m_channelInfo.channel());
}
-void KSircTopLevel::focusChange(QWidget *w)
+void KSircTopLevel::focusChange(TQWidget *w)
{
- QWidget *me = this;
+ TQWidget *me = this;
if(w == me){
gotFocus();
}
@@ -1233,7 +1233,7 @@ void KSircTopLevel::gotFocus()
if(isVisible() == TRUE){
if(have_focus == 0){
if(m_channelInfo.channel()[0] != '!' ){
- QString str = QString("/join %1").arg(m_channelInfo.channel());
+ TQString str = TQString("/join %1").arg(m_channelInfo.channel());
if(m_channelInfo.key().length() > 0){
str.append(" " + m_channelInfo.key());
}
@@ -1247,7 +1247,7 @@ void KSircTopLevel::gotFocus()
}
if(m_gotMsgWithoutFocus == true){
m_gotMsgWithoutFocus = false;
- servercontroller::self()->decreaseNotificationCount(QString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()));
+ servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()));
}
}
@@ -1259,13 +1259,13 @@ void KSircTopLevel::lostFocus()
}
}
-void KSircTopLevel::control_message(int command, QString str)
+void KSircTopLevel::control_message(int command, TQString str)
{
switch(command){
case CHANGE_CHANNEL: // 001 is defined as changeChannel
{
- KSircChannel ci(m_channelInfo.server(), QString::null);
- QRegExp rx("([^!]+)!+([^!]+)!*([^!]*)");
+ KSircChannel ci(m_channelInfo.server(), TQString::null);
+ TQRegExp rx("([^!]+)!+([^!]+)!*([^!]*)");
if(rx.search(str) < 0){
ci.setChannel(str);
}
@@ -1285,22 +1285,22 @@ void KSircTopLevel::control_message(int command, QString str)
logFile->open();
}
setName(m_channelInfo.server().utf8() + "_" + m_channelInfo.channel().utf8() + "_" + "toplevel");
- pan->setName(QCString(QObject::name()) + "_" + "QSplitter");
- kmenu->setName(QCString(QObject::name()) + "_ktoolframe");
- linee->setName(QCString(QObject::name()) + "_" + "LineEnter");
+ pan->setName(TQCString(TQObject::name()) + "_" + "TQSplitter");
+ kmenu->setName(TQCString(TQObject::name()) + "_ktoolframe");
+ linee->setName(TQCString(TQObject::name()) + "_" + "LineEnter");
kmenu->show();
setCaption(m_channelInfo.channel());
emit currentWindow(this);
if(m_channelInfo.channel()[0] == '#' || m_channelInfo.channel()[0] == '&'){
- QString str = QString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key());
+ TQString str = TQString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key());
kdDebug(5008) << "Doing /join " << m_channelInfo.channel() << " :" << str << endl;
emit outputUnicodeLine(str);
emit outputLine("/eval $query=''\n");
}
else if (m_channelInfo.channel()[0] != '!')
{
- emit outputUnicodeLine(QString("/eval $query='%1'\n").arg(m_channelInfo.channel()));
+ emit outputUnicodeLine(TQString("/eval $query='%1'\n").arg(m_channelInfo.channel()));
}
bool isPrivate = isPrivateChat();
@@ -1356,7 +1356,7 @@ void KSircTopLevel::control_message(int command, QString str)
case RESUME_UPDATES:
Buffer = FALSE;
if(LineBuffer.isEmpty() == FALSE)
- sirc_receive(QString::null);
+ sirc_receive(TQString::null);
break;
case REREAD_CONFIG:
emit freezeUpdates(TRUE); // Stop the list boxes update
@@ -1380,10 +1380,10 @@ void KSircTopLevel::control_message(int command, QString str)
}
mainw->enableTimeStamps(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp);
if(ksopts->oneLineEntry == true) {
- linee->setWordWrap(QTextEdit::NoWrap);
+ linee->setWordWrap(TQTextEdit::NoWrap);
}
else {
- linee->setWordWrap(QTextEdit::WidgetWidth);
+ linee->setWordWrap(TQTextEdit::WidgetWidth);
}
mainw->scrollToBottom(true);
update();
@@ -1396,7 +1396,7 @@ void KSircTopLevel::control_message(int command, QString str)
double lag = str.toDouble(&ok);
if(ok == TRUE){
lag -= (lag*100.0 - int(lag*100.0))/100.0;
- QString s_lag;
+ TQString s_lag;
s_lag.sprintf("Lag: %.2f", lag);
this->lag->setText(s_lag);
}
@@ -1413,7 +1413,7 @@ void KSircTopLevel::control_message(int command, QString str)
}
}
-void KSircTopLevel::setTopic( const QString &topic )
+void KSircTopLevel::setTopic( const TQString &topic )
{
m_topic = topic;
ksTopic->setText( topic );
@@ -1434,11 +1434,11 @@ void KSircTopLevel::toggleFilterJoinPart()
file->setItemChecked( fjpitem, ksopts->chan(m_channelInfo).filterJoinPart );
}
-QString KSircTopLevel::findNick(QString part, uint which)
+TQString KSircTopLevel::findNick(TQString part, uint which)
{
- QStringList matches;
+ TQStringList matches;
- for (QStringList::ConstIterator it = completeNicks.begin();
+ for (TQStringList::ConstIterator it = completeNicks.begin();
it != completeNicks.end();
++it)
{
@@ -1462,33 +1462,33 @@ QString KSircTopLevel::findNick(QString part, uint which)
if(which < matches.count())
return *(matches.at(which));
else
- return QString::null;
+ return TQString::null;
}
- return QString::null;
+ return TQString::null;
}
-void KSircTopLevel::removeCompleteNick(const QString &nick)
+void KSircTopLevel::removeCompleteNick(const TQString &nick)
{
- QStringList::Iterator it = completeNicks.find(nick);
+ TQStringList::Iterator it = completeNicks.find(nick);
if (it != completeNicks.end())
completeNicks.remove(it);
}
-void KSircTopLevel::addCompleteNick(const QString &nick)
+void KSircTopLevel::addCompleteNick(const TQString &nick)
{
removeCompleteNick(nick);
completeNicks.prepend(nick);
}
-void KSircTopLevel::changeCompleteNick(const QString &oldNick, const QString &newNick)
+void KSircTopLevel::changeCompleteNick(const TQString &oldNick, const TQString &newNick)
{
- QStringList::Iterator it = completeNicks.find(oldNick);
+ TQStringList::Iterator it = completeNicks.find(oldNick);
if (it != completeNicks.end())
*it = newNick;
}
-void KSircTopLevel::openQueryFromNick(const QString &nick)
+void KSircTopLevel::openQueryFromNick(const TQString &nick)
{
KSircChannel ci(m_channelInfo.server(), nick.lower());
emit open_toplevel(ci);
@@ -1502,25 +1502,25 @@ void KSircTopLevel::pasteToWindow()
}
void KSircTopLevel::pasteToNickList(int button,
- QListBoxItem *item,
- const QPoint &)
+ TQListBoxItem *item,
+ const TQPoint &)
{
if(button == Qt::MidButton && item){
KSircChannel ci(m_channelInfo.server(), item->text().lower());
emit open_toplevel(ci);
- QStringList lines = QStringList::split( '\n',
+ TQStringList lines = TQStringList::split( '\n',
KApplication::clipboard()->text( QClipboard::Selection ),
true );
- QStringList::ConstIterator it = lines.begin();
- QStringList::ConstIterator end = lines.end();
+ TQStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator end = lines.end();
for (; it != end; ++it )
{
if ((*it).isEmpty())
continue;
- QString str =
- QString("/msg ") + item->text().lower() + " " +
+ TQString str =
+ TQString("/msg ") + item->text().lower() + " " +
*it + "\n";
emit outputUnicodeLine(str);
@@ -1529,25 +1529,25 @@ void KSircTopLevel::pasteToNickList(int button,
}
-void KSircTopLevel::dndTextToNickList(const QListBoxItem *item,
- const QString& text)
+void KSircTopLevel::dndTextToNickList(const TQListBoxItem *item,
+ const TQString& text)
{
if(item){
KSircChannel ci(m_channelInfo.server(), item->text().lower());
emit open_toplevel(ci);
- QStringList lines = QStringList::split( '\n',
+ TQStringList lines = TQStringList::split( '\n',
text,
true );
- QStringList::ConstIterator it = lines.begin();
- QStringList::ConstIterator end = lines.end();
+ TQStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator end = lines.end();
for (; it != end; ++it )
{
if ((*it).isEmpty())
continue;
- QString str =
- QString("/msg ") + item->text().lower() + " " +
+ TQString str =
+ TQString("/msg ") + item->text().lower() + " " +
*it + "\n";
emit outputUnicodeLine(str);
@@ -1557,11 +1557,11 @@ void KSircTopLevel::dndTextToNickList(const QListBoxItem *item,
}
enum KSircTopLevelCommands{ Ask, Parse, Escape };
-void KSircTopLevel::slotTextDropped( const QString& _text )
+void KSircTopLevel::slotTextDropped( const TQString& _text )
{
if (_text.isEmpty())
return;
- QString text = linee->text();
+ TQString text = linee->text();
int curPos = linee->cursorPosition();
text = text.mid( 0, curPos ) + _text + text.mid( curPos );
@@ -1575,7 +1575,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text )
if (lines > 4) {
int result = KMessageBox::warningContinueCancel(this,
i18n("You are about to send %1 lines of text.\nDo you really want to send that much?").arg(approx_lines),
- QString::null, i18n("Send"));
+ TQString::null, i18n("Send"));
if (result != KMessageBox::Continue)
{
// linee->setText("");
@@ -1587,21 +1587,21 @@ void KSircTopLevel::slotTextDropped( const QString& _text )
if(lines > 1){
linee->setUpdatesEnabled(FALSE);
- QStringList lines = QStringList::split( '\n', text, true );
- QStringList::ConstIterator it = lines.begin();
- QStringList::ConstIterator end = lines.end();
+ TQStringList lines = TQStringList::split( '\n', text, true );
+ TQStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator end = lines.end();
KSircTopLevelCommands commands = Ask;
for (; it != end; ++it )
{
if ((*it).isEmpty())
continue;
- QString line = *it;
+ TQString line = *it;
if ( line[0].latin1() == '/' )
{
if ( commands == Ask )
switch ( KMessageBox::questionYesNo( this, i18n(
"The text you pasted contains lines that start with /.\n"
- "Should they be interpreted as IRC commands?" ), QString::null, i18n("Interpret"), i18n("Do Not Interpret") ) )
+ "Should they be interpreted as IRC commands?" ), TQString::null, i18n("Interpret"), i18n("Do Not Interpret") ) )
{
case KMessageBox::Yes:
commands = Parse;
@@ -1622,7 +1622,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text )
linee->update();
}
else{
- text.replace(QRegExp("\n"), "");
+ text.replace(TQRegExp("\n"), "");
linee->setText(text);
linee->setCursorPosition( curPos + _text.length() );
}
@@ -1637,8 +1637,8 @@ void KSircTopLevel::clearWindow()
void KSircTopLevel::lineeNotTab()
{
tab_pressed = -1;
- disconnect(linee, SIGNAL(notTab()),
- this, SLOT(lineeNotTab()));
+ disconnect(linee, TQT_SIGNAL(notTab()),
+ this, TQT_SLOT(lineeNotTab()));
addCompleteNick(tab_nick);
}
@@ -1646,12 +1646,12 @@ void KSircTopLevel::toggleRootWindow()
{
}
-bool KSircTopLevel::event( QEvent *e)
+bool KSircTopLevel::event( TQEvent *e)
{
- if(e->type() == QEvent::ApplicationPaletteChange ||
- e->type() == QEvent::ApplicationFontChange)
+ if(e->type() == TQEvent::ApplicationPaletteChange ||
+ e->type() == TQEvent::ApplicationFontChange)
{
- QTimer::singleShot(750, this, SLOT(initColors()));
+ TQTimer::singleShot(750, this, TQT_SLOT(initColors()));
initColors();
}
return KMainWindow::event(e);
@@ -1659,14 +1659,14 @@ bool KSircTopLevel::event( QEvent *e)
void KSircTopLevel::saveCurrLog()
{
- KURL url = KURL( KFileDialog::getSaveFileName(QString::null,
+ KURL url = KURL( KFileDialog::getSaveFileName(TQString::null,
"*.log", 0L,
i18n("Save Chat/Query Logfile")));
if( url.isEmpty())
return;
KTempFile temp;
- QTextStream *str = temp.textStream();
+ TQTextStream *str = temp.textStream();
*str << mainw->plainText();
@@ -1679,7 +1679,7 @@ void KSircTopLevel::saveCurrLog()
}
-void KSircTopLevel::slotDropURLs( const QStringList& urls )
+void KSircTopLevel::slotDropURLs( const TQStringList& urls )
{
if ( !isPrivateChat() )
return;
@@ -1688,16 +1688,16 @@ void KSircTopLevel::slotDropURLs( const QStringList& urls )
}
// sends the list of urls to $dest_nick
-void KSircTopLevel::slotDccURLs( const QStringList& urls, const QString& nick )
+void KSircTopLevel::slotDccURLs( const TQStringList& urls, const TQString& nick )
{
if ( urls.isEmpty() || nick.isEmpty() )
return;
- QStringList::ConstIterator it = urls.begin();
- // QString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n");
- QString s("/dcc send " + nick + " %1\n");
+ TQStringList::ConstIterator it = urls.begin();
+ // TQString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n");
+ TQString s("/dcc send " + nick + " %1\n");
for ( ; it != urls.end(); ++it ) {
- QString file( *it );
+ TQString file( *it );
kdDebug(5008) << "........ " << file << endl;
if ( !file.isEmpty() )
sirc_write(s.arg( file ));
@@ -1720,33 +1720,33 @@ bool KSircTopLevel::isSpecialWindow() const
return (m_channelInfo.channel()[0] == '!');
}
-void KSircTopLevel::outputUnicodeLine( const QString &message )
+void KSircTopLevel::outputUnicodeLine( const TQString &message )
{
emit outputLine( encoder()->fromUnicode( message ) );
}
-void KSircTopLevel::setTopicIntern( const QString &topic )
+void KSircTopLevel::setTopicIntern( const TQString &topic )
{
- QString command = QString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic );
+ TQString command = TQString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic );
sirc_write( command );
linee->setFocus();
}
-void KSircTopLevel::doChange(bool pers, QString text)
+void KSircTopLevel::doChange(bool pers, TQString text)
{
- QTime ctime = QTime::currentTime();
+ TQTime ctime = TQTime::currentTime();
if (ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg) {
// beep only every 2 seconds otherwise it'll get very noisy in the room ;)
if ( QABS( lastBeep.secsTo( ctime ) ) > 1 ) {
if ( pers ) {
int winId = !ticker ? topLevelWidget()->winId() : ticker->winId();
KNotifyClient::event(winId,
- QString::fromLatin1("ChannelPersonal"),
+ TQString::fromLatin1("ChannelPersonal"),
i18n("Your nick appeared on channel %1").arg(m_channelInfo.channel()));
} else {
int winId = !ticker ? topLevelWidget()->winId() : ticker->winId();
KNotifyClient::event(winId,
- QString::fromLatin1("ChannelChanged"),
+ TQString::fromLatin1("ChannelChanged"),
i18n("Channel %1 changed").arg(m_channelInfo.channel()));
}
lastBeep = ctime;
@@ -1755,7 +1755,7 @@ void KSircTopLevel::doChange(bool pers, QString text)
if(have_focus == 0 && pers == true && m_gotMsgWithoutFocus == false){
m_gotMsgWithoutFocus = true;
- servercontroller::self()->increaseNotificationCount(QString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text);
+ servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text);
}
}
@@ -1804,7 +1804,7 @@ void KSircTopLevel::toggleTicker()
ticker->show();
displayMgr->hide(this);
- connect(ticker, SIGNAL(doubleClick()), this, SLOT(toggleTicker()));
+ connect(ticker, TQT_SIGNAL(doubleClick()), this, TQT_SLOT(toggleTicker()));
}
}
@@ -1816,7 +1816,7 @@ bool KSircTopLevel::atBottom()
void KSircTopLevel::cmd_process(int id)
{
if(cmd_menu.at(id) != cmd_menu.end()) {
- QString item, arg, out;
+ TQString item, arg, out;
item = cmd_menu[id].section('/', 1, 1);
arg = cmd_menu[id].section('/', 2, 2);
diff --git a/ksirc/toplevel.h b/ksirc/toplevel.h
index ef8d4a57..8c64b150 100644
--- a/ksirc/toplevel.h
+++ b/ksirc/toplevel.h
@@ -1,7 +1,7 @@
#ifndef KSIRCTOPLEVEL_H
#define KSIRCTOPLEVEL_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kmainwindow.h>
#include "ahistlineedit.h"
@@ -54,18 +54,18 @@ public:
* ready processing. This is a single line, and it NOT \n
* terminated.
*/
- virtual void sirc_receive(QString str, bool broadcast = false);
+ virtual void sirc_receive(TQString str, bool broadcast = false);
/**
* Reimplement the ksircmessagereceiver control messages. These
* are parsed and dealt with quickly.
*/
- virtual void control_message(int, QString);
+ virtual void control_message(int, TQString);
- QWidget *lineEdit() const { return linee; }
+ TQWidget *lineEdit() const { return linee; }
- void setTopic( const QString &topic );
- QString topic() const { return m_topic; }
+ void setTopic( const TQString &topic );
+ TQString topic() const { return m_topic; }
/**
* This returns the current channel information for a toplevel
@@ -78,10 +78,10 @@ signals:
* output a new line. The line is correctly
* linefeed terminated, etc.
*/
- void outputLine(QCString);
+ void outputLine(TQCString);
/**
* open a new toplevel widget with for the
- * channel/user QString.
+ * channel/user TQString.
*/
void open_toplevel(const KSircChannel &);
/**
@@ -89,18 +89,18 @@ signals:
* this window is closing. Refrence to outselves
* is include.
*/
- void closing(KSircTopLevel *, QString channel);
+ void closing(KSircTopLevel *, TQString channel);
/**
* emitted when the user typed /quit, will disconnect from this
* server and close all toplevels belonging to it.
*/
- void requestQuit( const QCString& command );
+ void requestQuit( const TQCString& command );
/**
* emitted when we change channel name
* on the fly. old is the old channel name, new
* is the new one.
*/
- void changeChannel(const QString &oldName, const QString &newName);
+ void changeChannel(const TQString &oldName, const TQString &newName);
/**
* emitted to say that KSircTopLevel
* (this) is now the window with focus. Used by
@@ -115,14 +115,14 @@ signals:
/**
* Emitted when a new message appeared in the irc window
*/
- void changed(bool, QString);
+ void changed(bool, TQString);
public slots:
/**
* When enter is pressed, we read the SLE and output the results
* after processing via emitting outputLine.
*/
- virtual void sirc_line_return(const QString &s);
+ virtual void sirc_line_return(const TQString &s);
/**
* Clears the message window
@@ -134,7 +134,7 @@ public slots:
* the widget that just got focus. Used in MDI modes
* where the toplevel doesn't get focus in/out events.
*/
- void focusChange(QWidget *w);
+ void focusChange(TQWidget *w);
protected slots:
/**
@@ -236,30 +236,30 @@ protected slots:
* On a midle mouse button press to the nick list we open
* a query window and paste the text there
*/
- void pasteToNickList(int button, QListBoxItem *item, const QPoint &pos);
+ void pasteToNickList(int button, TQListBoxItem *item, const TQPoint &pos);
/**
* dnd paste to nick list
*/
- void dndTextToNickList(const QListBoxItem *itom, const QString& text);
+ void dndTextToNickList(const TQListBoxItem *itom, const TQString& text);
/**
* open a toplevel on double click
*/
- void openQueryFromNick(const QString &);
+ void openQueryFromNick(const TQString &);
/**
* Some text was dropped on the listbox
*/
- void slotTextDropped(const QString&);
+ void slotTextDropped(const TQString&);
/**
* Calls slotDccURLs with the current nick we're talking to
*/
- void slotDropURLs(const QStringList& urls);
+ void slotDropURLs(const TQStringList& urls);
/**
* Sends the list of urls to nick
*/
- void slotDccURLs(const QStringList& urls, const QString& nick );
+ void slotDccURLs(const TQStringList& urls, const TQString& nick );
/**
* Re-apply color settings.
@@ -275,7 +275,7 @@ protected slots:
* Makes a beep when a change happens (if the user has this on)
* the bool is TRUE if changed line contained user's nick
*/
- void doChange(bool, QString);
+ void doChange(bool, TQString);
/**
* show the ticker window
@@ -298,32 +298,32 @@ protected:
/**
* Make sure to update colors correctly.
*/
- virtual bool event( QEvent *e);
+ virtual bool event( TQEvent *e);
/**
* Redfine closeEvent to emit closing and delete itself.
*/
- virtual void closeEvent(QCloseEvent *);
+ virtual void closeEvent(TQCloseEvent *);
/**
* Searches through the nick list and finds the nick with the best match.
* which, arg2, selects nicks other than the first shouldarg1 match more
* than 1 nick.
*/
- virtual QString findNick(QString, uint which = 0);
+ virtual TQString findNick(TQString, uint which = 0);
/**
* remove a nick from the prefered in nick completion list
*/
- virtual void removeCompleteNick(const QString &);
+ virtual void removeCompleteNick(const TQString &);
/**
* Adds a nick to the list of nicks to prefer in nick completion
* or moves it to the top of the list if it was already there
*/
- virtual void addCompleteNick(const QString &);
+ virtual void addCompleteNick(const TQString &);
/**
* Changes a nick in the completion list if it has been listed,
* otherwise does nothing
*/
- virtual void changeCompleteNick(const QString &, const QString &);
+ virtual void changeCompleteNick(const TQString &, const TQString &);
virtual void setupCommandMenu();
@@ -344,33 +344,33 @@ protected:
bool isSpecialWindow() const;
private slots:
- void setTopicIntern( const QString &topic );
+ void setTopicIntern( const TQString &topic );
void insertText();
- void setMode(QString, int, QString currentNick=0);
+ void setMode(TQString, int, TQString currentNick=0);
void setEncoding();
void returnPressed();
void toggleTopic();
private:
- void outputUnicodeLine( const QString &message );
+ void outputUnicodeLine( const TQString &message );
bool atBottom();
bool continued_line;
charSelector *selector;
chanButtons *channelButtons;
- QSplitter *pan;
- QVBox *nicks_box;
- QVBox *top;
+ TQSplitter *pan;
+ TQVBox *nicks_box;
+ TQVBox *top;
KMenuBar *kmenu;
- QLabel *lag;
+ TQLabel *lag;
enum {PING = 10, TOPIC = 20};
KSircView *mainw;
aHistLineEdit *linee;
aListBox *nicks;
- //QString m_currentNick;
+ //TQString m_currentNick;
//KSircProcess *proc;
@@ -379,44 +379,44 @@ private:
struct BufferedLine
{
BufferedLine() { wasBroadcast = false; }
- BufferedLine( const QString &msg, bool broadc )
+ BufferedLine( const TQString &msg, bool broadc )
{ message = msg; wasBroadcast = broadc; }
bool operator==( const BufferedLine &other )
{ return message == other.message &&
wasBroadcast == other.wasBroadcast; }
- QString message;
+ TQString message;
bool wasBroadcast;
};
bool Buffer;
- QValueList<BufferedLine> LineBuffer;
+ TQValueList<BufferedLine> LineBuffer;
// QPopupMenu's used for the menubar
- QPopupMenu *file, *edit, *command;
+ TQPopupMenu *file, *edit, *command;
- bool parse_input(const QString &string, QString &plainText);
- void sirc_write(const QString &str);
+ bool parse_input(const TQString &string, TQString &plainText);
+ void sirc_write(const TQString &str);
- QPopupMenu *user_controls;
- static QPtrList<UserControlMenu> *user_menu;
+ TQPopupMenu *user_controls;
+ static TQPtrList<UserControlMenu> *user_menu;
int opami;
- QAccel *accel;
+ TQAccel *accel;
/**
* The channel name that we belong too.
*/
- //QString channel_name;
+ //TQString channel_name;
/**
* Caption at the top of the window.
*/
- QString caption;
+ TQString caption;
/**
* Current topic for the channel
*/
- QString m_topic;
+ TQString m_topic;
/**
* Does the window have focus? 1 when yes, 0 when no.
@@ -433,7 +433,7 @@ private:
* tab_nick holds the last nick found so when a blank tab is pressed
* we pop the last niick and ": " up.
*/
- QString tab_saved, tab_nick;
+ TQString tab_saved, tab_nick;
int tab_start, tab_end;
// Ticker specific variables.
@@ -447,20 +447,20 @@ private:
* Size and position of the main window. Main window is returns this
* this position when it reappears.
*/
- QRect myrect;
+ TQRect myrect;
/**
* Position of the main window
*/
- QPoint mypoint;
+ TQPoint mypoint;
/**
* Ticker's size and geometry
*/
- QRect tickerrect;
+ TQRect tickerrect;
/**
* Tickers position
*/
- QPoint tickerpoint;
- QSize tickersize;
+ TQPoint tickerpoint;
+ TQSize tickersize;
/**
* Do we have a kick window open?
* Remember not to open 2
@@ -475,9 +475,9 @@ private:
ChannelParser *ChanParser;
/**
- * QSize maintains size information in case it changes somehow
+ * TQSize maintains size information in case it changes somehow
*/
- QSize current_size;
+ TQSize current_size;
/**
* ID of the timestamp menu item, to use in (un)checking it from slot
@@ -508,13 +508,13 @@ private:
* List of nicks already used in nick completion to give them
* higher priority
*/
- QStringList completeNicks;
+ TQStringList completeNicks;
/**
* The time of the last beep to prevent your soundcard from detonating
* in high traffic channels
*/
- QTime lastBeep;
+ TQTime lastBeep;
KSircTopic *ksTopic;
@@ -522,7 +522,7 @@ private:
KSelectAction *encodingAction;
- static QStringList cmd_menu;
+ static TQStringList cmd_menu;
bool m_gotMsgWithoutFocus;
diff --git a/ksirc/usercontrolmenu.cpp b/ksirc/usercontrolmenu.cpp
index ca35e094..704b5511 100644
--- a/ksirc/usercontrolmenu.cpp
+++ b/ksirc/usercontrolmenu.cpp
@@ -4,10 +4,10 @@
#include <kconfig.h>
#include <klocale.h>
-QPtrList<UserControlMenu> UserControlMenu::UserMenu;
+TQPtrList<UserControlMenu> UserControlMenu::UserMenu;
-UserControlMenu::UserControlMenu(const QString& _title,
- const QString& _action,
+UserControlMenu::UserControlMenu(const TQString& _title,
+ const TQString& _action,
int _accel,
int _type,
bool _op_only)
@@ -23,7 +23,7 @@ UserControlMenu::~UserControlMenu()
{
}
-QPtrList<UserControlMenu> *UserControlMenu::parseKConfig()
+TQPtrList<UserControlMenu> *UserControlMenu::parseKConfig()
{
// Reset the UserMenu to nothing before we start.
@@ -102,7 +102,7 @@ QPtrList<UserControlMenu> *UserControlMenu::parseKConfig()
TRUE));
}
else{
- QString key, cindex, title, action;
+ TQString key, cindex, title, action;
int accel, type, oponly;
for(int i = 0; i < items; i++){
cindex.sprintf("%d", i);
@@ -138,8 +138,8 @@ void UserControlMenu::writeKConfig()
kConfig->writeEntry("Number", items);
- QString key;
- QString cindex;
+ TQString key;
+ TQString cindex;
UserControlMenu *ucm;
int type;
diff --git a/ksirc/usercontrolmenu.h b/ksirc/usercontrolmenu.h
index 1f7a983a..02a313f9 100644
--- a/ksirc/usercontrolmenu.h
+++ b/ksirc/usercontrolmenu.h
@@ -1,8 +1,8 @@
#ifndef USERCONTROLLERMENU_H
#define USERCONTROLLERMENU_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class UserControlMenu {
public:
@@ -11,28 +11,28 @@ class UserControlMenu {
is public so there is no problems changing it in the future.
Data is copied internally and deleted when finished.
*/
- UserControlMenu(const QString& _title = 0,
- const QString& _action = 0,
+ UserControlMenu(const TQString& _title = 0,
+ const TQString& _action = 0,
int _accel = 0,
int _type = 0,
bool _op_only = FALSE);
~UserControlMenu();
- static QPtrList<UserControlMenu> UserMenu;
+ static TQPtrList<UserControlMenu> UserMenu;
- static QPtrList<UserControlMenu> *parseKConfig();
+ static TQPtrList<UserControlMenu> *parseKConfig();
static void writeKConfig();
/**
* title in the popup menu
*/
- QString title;
+ TQString title;
/**
* Action to preform, must be of the format "blah lbah %s blah"
* where %s will be expanded into the selected nick.
*/
- QString action;
+ TQString action;
/**
* Accelerator key, currently does nothing.
diff --git a/ktalkd/kcmktalkd/answmachpage.cpp b/ktalkd/kcmktalkd/answmachpage.cpp
index c0aec185..3f426821 100644
--- a/ktalkd/kcmktalkd/answmachpage.cpp
+++ b/ktalkd/kcmktalkd/answmachpage.cpp
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <klocale.h> // for getenv
-KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name,
+KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name,
KSimpleConfig *_config)
: KCModule (parent, name)
{
@@ -42,42 +42,42 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name,
config = _config;
}
- answmach_cb = new QCheckBox(i18n("&Activate answering machine"), this);
+ answmach_cb = new TQCheckBox(i18n("&Activate answering machine"), this);
answmach_cb->adjustSize();
- mail_edit = new QLineEdit(this);
+ mail_edit = new TQLineEdit(this);
mail_edit->adjustSize();
mail_edit->setMinimumWidth(150);
- mail_label = new QLabel(mail_edit,i18n("&Mail address:"),this);
+ mail_label = new TQLabel(mail_edit,i18n("&Mail address:"),this);
mail_label->adjustSize();
mail_label->setAlignment( ShowPrefix | AlignVCenter );
- subj_edit = new QLineEdit(this);
+ subj_edit = new TQLineEdit(this);
subj_edit->adjustSize();
subj_edit->setMinimumWidth(150);
- subj_label = new QLabel(subj_edit, i18n("Mail s&ubject:"),this);
+ subj_label = new TQLabel(subj_edit, i18n("Mail s&ubject:"),this);
subj_label->adjustSize();
subj_label->setAlignment( ShowPrefix | AlignVCenter );
- subj_tip = new QLabel(i18n("Use %s for the caller name"),this);
+ subj_tip = new TQLabel(i18n("Use %s for the caller name"),this);
subj_tip->setAlignment( ShowPrefix );
- head_edit = new QLineEdit(this);
+ head_edit = new TQLineEdit(this);
head_edit->adjustSize();
head_edit->setMinimumWidth(150);
- head_label = new QLabel(head_edit, i18n("Mail &first line:"),this);
+ head_label = new TQLabel(head_edit, i18n("Mail &first line:"),this);
head_label->adjustSize();
head_label->setAlignment( ShowPrefix | AlignVCenter );
- head_tip = new QLabel(
+ head_tip = new TQLabel(
i18n("Use first %s for caller name, and second %s for caller hostname"),
this);
head_tip->setAlignment( ShowPrefix );
- emptymail_cb = new QCheckBox(i18n("&Receive a mail even if no message left"), this);
+ emptymail_cb = new TQCheckBox(i18n("&Receive a mail even if no message left"), this);
emptymail_cb->adjustSize();
- msg_ml = new QMultiLineEdit(this);
+ msg_ml = new TQMultiLineEdit(this);
msg_ml->adjustSize();
msg_ml->setMinimumWidth(150);
- msg_label = new QLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this);
+ msg_label = new TQLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this);
msg_label->adjustSize();
msg_label->setAlignment( ShowPrefix | AlignVCenter );
@@ -86,24 +86,24 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name,
+ head_tip->height() + emptymail_cb->height() +
msg_label->height() + msg_ml->height() + 30;
setMinimumSize(400, h); // 400 : otherwise, buttons may overlap
- msg_default = new QString(i18n("The person you are asking to talk with is not answering.\n"
+ msg_default = new TQString(i18n("The person you are asking to talk with is not answering.\n"
"Please leave a message to be delivered via email.\n"
"Just start typing and when you have finished, exit normally."));
load();
- connect(answmach_cb, SIGNAL(clicked()), this, SLOT(answmachOnOff()));
+ connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(answmachOnOff()));
// Emit changed(true) when anything changes
- connect(answmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged()));
- connect(mail_edit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotChanged()));
- connect(subj_edit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotChanged()));
- connect(head_edit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotChanged()));
- connect(emptymail_cb, SIGNAL(clicked()), this, SLOT(slotChanged()));
- connect(msg_ml, SIGNAL(textChanged()), this, SLOT(slotChanged()));
+ connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged()));
+ connect(mail_edit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotChanged()));
+ connect(subj_edit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotChanged()));
+ connect(head_edit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotChanged()));
+ connect(emptymail_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged()));
+ connect(msg_ml, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotChanged()));
}
@@ -128,10 +128,10 @@ void KAnswmachPageConfig::slotChanged() {
emit changed(true);
}
-void KAnswmachPageConfig::resizeEvent(QResizeEvent *) {
+void KAnswmachPageConfig::resizeEvent(TQResizeEvent *) {
int h_txt = answmach_cb->height(); // taken for the general label height
- int h_edt = mail_edit->height(); // taken for the general QLineEdit height
+ int h_edt = mail_edit->height(); // taken for the general TQLineEdit height
int spc = h_txt / 3;
int w = rect().width();
@@ -223,7 +223,7 @@ void KAnswmachPageConfig::load() {
msg_ml->clear();
char m[]="Msg1"; // used as key to read configuration
- QString msg;
+ TQString msg;
while (!(msg=config->readEntry(m)).isNull())
{
msg_ml->append(msg);
@@ -249,7 +249,7 @@ void KAnswmachPageConfig::save() {
config->writeEntry("EmptyMail", emptymail_cb->isChecked());
char m[]="Msg1"; // used as key to read configuration
int linenr=0;
- QString msg;
+ TQString msg;
while ((linenr<8) && (linenr<msg_ml->numLines()))
{
config->writeEntry(m,msg_ml->textLine(linenr));
diff --git a/ktalkd/kcmktalkd/answmachpage.h b/ktalkd/kcmktalkd/answmachpage.h
index 830cc32e..31032a93 100644
--- a/ktalkd/kcmktalkd/answmachpage.h
+++ b/ktalkd/kcmktalkd/answmachpage.h
@@ -24,16 +24,16 @@
#ifndef __KCONTROL_KANSWMACHPAGE_H__
#define __KCONTROL_KANSWMACHPAGE_H__
-#include <qdir.h>
+#include <tqdir.h>
/* has to be before everything because of #define Unsorted 0 in X11/X.h !! */
-#include <qobject.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qbutton.h>
-#include <qcheckbox.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqbutton.h>
+#include <tqcheckbox.h>
#include <kcmodule.h>
@@ -44,7 +44,7 @@ class KAnswmachPageConfig : public KCModule
Q_OBJECT
public:
- KAnswmachPageConfig( QWidget *parent=0, const char* name=0,
+ KAnswmachPageConfig( TQWidget *parent=0, const char* name=0,
KSimpleConfig *config=0 );
~KAnswmachPageConfig( );
@@ -53,7 +53,7 @@ public:
void defaults();
protected:
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
private slots:
void answmachOnOff();
@@ -63,20 +63,20 @@ private:
KSimpleConfig *config;
bool delete_config;
- QCheckBox *answmach_cb;
- QLabel *mail_label;
- QLineEdit *mail_edit;
- QLabel *subj_label;
- QLineEdit *subj_edit;
- QLabel *subj_tip;
- QLabel *head_label;
- QLineEdit *head_edit;
- QLabel *head_tip;
- QCheckBox *emptymail_cb;
- QLabel *msg_label;
- QMultiLineEdit *msg_ml;
+ TQCheckBox *answmach_cb;
+ TQLabel *mail_label;
+ TQLineEdit *mail_edit;
+ TQLabel *subj_label;
+ TQLineEdit *subj_edit;
+ TQLabel *subj_tip;
+ TQLabel *head_label;
+ TQLineEdit *head_edit;
+ TQLabel *head_tip;
+ TQCheckBox *emptymail_cb;
+ TQLabel *msg_label;
+ TQMultiLineEdit *msg_ml;
- QString *msg_default;
+ TQString *msg_default;
};
#endif
diff --git a/ktalkd/kcmktalkd/forwmachpage.cpp b/ktalkd/kcmktalkd/forwmachpage.cpp
index 6475927f..0a6337f7 100644
--- a/ktalkd/kcmktalkd/forwmachpage.cpp
+++ b/ktalkd/kcmktalkd/forwmachpage.cpp
@@ -26,7 +26,7 @@
#include <ksimpleconfig.h>
#include <klocale.h>
-KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name,
+KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name,
KSimpleConfig *_config)
: KCModule (parent, name)
{
@@ -38,26 +38,26 @@ KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name,
delete_config = false;
config = _config;
}
- forwmach_cb = new QCheckBox(i18n("Activate &forward"), this);
+ forwmach_cb = new TQCheckBox(i18n("Activate &forward"), this);
forwmach_cb->adjustSize();
- address_edit = new QLineEdit(this);
+ address_edit = new TQLineEdit(this);
address_edit->adjustSize();
address_edit->setMinimumWidth(150);
- address_label = new QLabel(address_edit,i18n("&Destination (user or user@host):"),this);
+ address_label = new TQLabel(address_edit,i18n("&Destination (user or user@host):"),this);
address_label->adjustSize();
address_label->setAlignment( ShowPrefix | AlignVCenter );
- method_combo = new QComboBox(this);
+ method_combo = new TQComboBox(this);
method_combo->insertItem("FWA");
method_combo->insertItem("FWR");
method_combo->insertItem("FWT");
method_combo->adjustSize();
method_combo->setMinimumWidth(80);
- method_label = new QLabel(method_combo, i18n("Forward &method:"),this);
+ method_label = new TQLabel(method_combo, i18n("Forward &method:"),this);
method_label->adjustSize();
method_label->setAlignment( ShowPrefix | AlignVCenter );
- expl_label = new QLabel(i18n(
+ expl_label = new TQLabel(i18n(
"FWA: Forward announcement only. Direct connection. Not recommended.\n\
FWR: Forward all requests, changing info when necessary. Direct connection.\n\
FWT: Forward all requests and handle the talk request. No direct connection.\n\
@@ -75,12 +75,12 @@ See Help for further explanation.\n\
load();
- connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(forwmachOnOff()));
+ connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(forwmachOnOff()));
// emit changed(true) on changes
- connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged()));
- connect(address_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged()));
- connect(method_combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
+ connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged()));
+ connect(address_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged()));
+ connect(method_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
}
KForwmachPageConfig::~KForwmachPageConfig( ) {
@@ -100,9 +100,9 @@ void KForwmachPageConfig::slotChanged() {
emit changed(true);
}
-void KForwmachPageConfig::resizeEvent(QResizeEvent *) {
+void KForwmachPageConfig::resizeEvent(TQResizeEvent *) {
int h_txt = forwmach_cb->height(); // taken for the general label height
- int h_edt = address_edit->height(); // taken for the general QLineEdit height
+ int h_edt = address_edit->height(); // taken for the general TQLineEdit height
int spc = h_txt / 3;
int w = rect().width();
@@ -148,14 +148,14 @@ void KForwmachPageConfig::load() {
config->setGroup("ktalkd");
- QString forward = config->readEntry("Forward","unset");
+ TQString forward = config->readEntry("Forward","unset");
forwmach_cb->setChecked(forward!="unset");
if (forward != "unset" )
address_edit->setText(forward);
else
address_edit->setText("");
- QString forwardMethod = config->readEntry("ForwardMethod","FWR");
+ TQString forwardMethod = config->readEntry("ForwardMethod","FWR");
for (int i=0; i<method_combo->count(); i++)
if (forwardMethod == method_combo->text(i))
method_combo->setCurrentItem(i);
diff --git a/ktalkd/kcmktalkd/forwmachpage.h b/ktalkd/kcmktalkd/forwmachpage.h
index 4202fc30..1643aeef 100644
--- a/ktalkd/kcmktalkd/forwmachpage.h
+++ b/ktalkd/kcmktalkd/forwmachpage.h
@@ -24,16 +24,16 @@
#ifndef __KCONTROL_KFORWMACHPAGE_H__
#define __KCONTROL_KFORWMACHPAGE_H__
-#include <qdir.h>
+#include <tqdir.h>
/* has to be before everything because of #define Unsorted 0 in X11/X.h !! */
-#include <qobject.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qbutton.h>
-#include <qcheckbox.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqbutton.h>
+#include <tqcheckbox.h>
#include <kcmodule.h>
@@ -44,7 +44,7 @@ class KForwmachPageConfig : public KCModule
Q_OBJECT
public:
- KForwmachPageConfig( QWidget *parent=0, const char* name=0,
+ KForwmachPageConfig( TQWidget *parent=0, const char* name=0,
KSimpleConfig *config=0);
~KForwmachPageConfig( );
@@ -53,7 +53,7 @@ public:
void defaults();
protected:
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
private slots:
void forwmachOnOff();
@@ -63,12 +63,12 @@ private:
KSimpleConfig *config;
bool delete_config;
- QCheckBox *forwmach_cb;
- QLabel *address_label;
- QLineEdit *address_edit;
- QLabel *method_label;
- QComboBox * method_combo;
- QLabel *expl_label;
+ TQCheckBox *forwmach_cb;
+ TQLabel *address_label;
+ TQLineEdit *address_edit;
+ TQLabel *method_label;
+ TQComboBox * method_combo;
+ TQLabel *expl_label;
};
#endif
diff --git a/ktalkd/kcmktalkd/main.cpp b/ktalkd/kcmktalkd/main.cpp
index 204606d9..06f1e9b8 100644
--- a/ktalkd/kcmktalkd/main.cpp
+++ b/ktalkd/kcmktalkd/main.cpp
@@ -27,18 +27,18 @@
#include <ksimpleconfig.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
-KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name)
+KTalkdConfigModule::KTalkdConfigModule(TQWidget *parent, const char *name)
: KCModule(parent, name)
{
config = new KSimpleConfig("ktalkdrc");
announceconfig = new KSimpleConfig("ktalkannouncerc");
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
- tab = new QTabWidget(this);
+ tab = new TQTabWidget(this);
layout->addWidget(tab);
@@ -50,9 +50,9 @@ KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name)
tab->addTab(answmachpage, i18n("Ans&wering Machine"));
tab->addTab(forwmachpage, i18n("forward call", "&Forward"));
- connect(soundpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
- connect(answmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
- connect(forwmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ connect(soundpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
+ connect(answmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
+ connect(forwmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
}
KTalkdConfigModule::~KTalkdConfigModule() {
@@ -81,29 +81,29 @@ void KTalkdConfigModule::load()
if (forwmachpage) forwmachpage->load();
}
-void KTalkdConfigModule::resizeEvent(QResizeEvent *)
+void KTalkdConfigModule::resizeEvent(TQResizeEvent *)
{
tab->setGeometry(0,0,width(),height());
}
extern "C"
{
- KDE_EXPORT KCModule *create_ktalkd(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd(TQWidget *parent, const char *)
{
return new KTalkdConfigModule(parent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_answmach(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_answmach(TQWidget *parent, const char *)
{
return new KAnswmachPageConfig(parent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_sound(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_sound(TQWidget *parent, const char *)
{
return new KSoundPageConfig(parent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_forwmach(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_forwmach(TQWidget *parent, const char *)
{
return new KForwmachPageConfig(parent, "kcmktalkd");
}
diff --git a/ktalkd/kcmktalkd/main.h b/ktalkd/kcmktalkd/main.h
index 3fde07c4..ee6c8a12 100644
--- a/ktalkd/kcmktalkd/main.h
+++ b/ktalkd/kcmktalkd/main.h
@@ -38,7 +38,7 @@ class KTalkdConfigModule : public KCModule
public:
- KTalkdConfigModule(QWidget *parent, const char *name);
+ KTalkdConfigModule(TQWidget *parent, const char *name);
virtual ~KTalkdConfigModule();
//void init();
@@ -47,13 +47,13 @@ public:
void defaults();
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
private:
KSimpleConfig *config;
KSimpleConfig *announceconfig;
- QTabWidget *tab;
+ TQTabWidget *tab;
KSoundPageConfig *soundpage;
KAnswmachPageConfig *answmachpage;
diff --git a/ktalkd/kcmktalkd/soundpage.cpp b/ktalkd/kcmktalkd/soundpage.cpp
index 8f53e304..289b180f 100644
--- a/ktalkd/kcmktalkd/soundpage.cpp
+++ b/ktalkd/kcmktalkd/soundpage.cpp
@@ -26,11 +26,11 @@
#include <stdlib.h> //for setenv
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include <ksimpleconfig.h>
@@ -44,7 +44,7 @@
/* Lots of stuff taken from syssound.cpp */
-KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name,
+KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name,
KSimpleConfig *_config, KSimpleConfig *_announceconfig)
: KCModule (parent, name)
{
@@ -59,70 +59,70 @@ KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name,
announceconfig = _announceconfig;
}
- QBoxLayout* toplay = new QVBoxLayout(this, KDialog::marginHint(),
+ TQBoxLayout* toplay = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint() );
- QGroupBox* extprg_box = new QGroupBox(this);
+ TQGroupBox* extprg_box = new TQGroupBox(this);
extprg_box->setColumnLayout( 0, Qt::Horizontal );
toplay->addWidget(extprg_box);
- QGridLayout* l = new QGridLayout(extprg_box->layout());
+ TQGridLayout* l = new TQGridLayout(extprg_box->layout());
extprg_edit = new KURLRequester(extprg_box);
l->addWidget(extprg_edit, 2, 4);
- extprg_label = new QLabel(extprg_edit,i18n("&Announcement program:"), extprg_box);
+ extprg_label = new TQLabel(extprg_edit,i18n("&Announcement program:"), extprg_box);
l->addWidget(extprg_label, 2, 2);
client_edit = new KURLRequester(extprg_box);
l->addWidget(client_edit, 4, 4);
- client_label = new QLabel(client_edit,i18n("&Talk client:"), extprg_box);
+ client_label = new TQLabel(client_edit,i18n("&Talk client:"), extprg_box);
l->addWidget(client_label, 4, 2);
toplay->addSpacing(10);
- sound_cb = new QCheckBox(i18n("&Play sound"), this);
+ sound_cb = new TQCheckBox(i18n("&Play sound"), this);
toplay->addWidget(sound_cb);
- QGroupBox* sound_box = new QGroupBox(this);
+ TQGroupBox* sound_box = new TQGroupBox(this);
toplay->addWidget(sound_box);
- QBoxLayout* lay = new QVBoxLayout(sound_box, 10, 10);
+ TQBoxLayout* lay = new TQVBoxLayout(sound_box, 10, 10);
int edit_h = client_edit->height(); // The height of a QLineEdit
- sound_list = new QListBox(sound_box);
+ sound_list = new TQListBox(sound_box);
sound_list->setMinimumHeight( 3 * edit_h );
sound_list->setAcceptDrops(true);
sound_list->installEventFilter(this);
- sound_label = new QLabel(sound_list,i18n("&Sound file:"), sound_box);
+ sound_label = new TQLabel(sound_list,i18n("&Sound file:"), sound_box);
lay->addWidget(sound_label);
- QBoxLayout* l2 = new QHBoxLayout(lay, 10);
+ TQBoxLayout* l2 = new TQHBoxLayout(lay, 10);
l2->addWidget(sound_list);
- btn_test = new QPushButton(i18n("&Test"), sound_box);
+ btn_test = new TQPushButton(i18n("&Test"), sound_box);
l2->addWidget(btn_test);
- sound_tip = new QLabel(
+ sound_tip = new TQLabel(
i18n("Additional WAV files can be dropped onto the sound list."),
sound_box);
lay->addWidget(sound_tip);
- QStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) );
+ TQStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) );
sound_list->insertStringList( strlist );
load();
- connect(sound_cb, SIGNAL(clicked()), this, SLOT(soundOnOff()));
- connect(btn_test, SIGNAL(clicked()), this, SLOT(playCurrentSound()));
+ connect(sound_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(soundOnOff()));
+ connect(btn_test, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentSound()));
// emit changed(true) on changes
- connect(extprg_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged()));
- connect(client_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged()));
+ connect(extprg_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged()));
+ connect(client_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged()));
}
KSoundPageConfig::~KSoundPageConfig( ) {
@@ -146,15 +146,15 @@ void KSoundPageConfig::slotChanged() {
emit changed(true);
}
-bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e)
+bool KSoundPageConfig::eventFilter(TQObject* /*o*/, TQEvent* e)
{
- if (e->type() == QEvent::DragEnter) {
- sound_listDragEnterEvent((QDragEnterEvent *) e);
+ if (e->type() == TQEvent::DragEnter) {
+ sound_listDragEnterEvent((TQDragEnterEvent *) e);
return true;
}
- if (e->type() == QEvent::Drop) {
- sound_listDropEvent((QDropEvent *) e);
+ if (e->type() == TQEvent::Drop) {
+ sound_listDropEvent((TQDropEvent *) e);
return true;
}
@@ -162,12 +162,12 @@ bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e)
}
-void KSoundPageConfig::sound_listDragEnterEvent(QDragEnterEvent* e)
+void KSoundPageConfig::sound_listDragEnterEvent(TQDragEnterEvent* e)
{
e->accept(KURLDrag::canDecode(e));
}
-void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){
+void KSoundPageConfig::sound_listDropEvent(TQDropEvent* e){
KURL::List list;
// This should never happen, but anyway...
@@ -192,7 +192,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){
{ // Now check for the ending ".wav"
if (url.path().right(4).upper() != ".WAV") {
- QString msg = i18n("%1\ndoes not appear "\
+ TQString msg = i18n("%1\ndoes not appear "\
"to be a WAV file.").arg(url.path());
KMessageBox::sorry(this, msg, i18n("Improper File Extension"));
@@ -203,7 +203,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){
if (!addToSound_List(url.path())) {
// did not add file because it is already in the list
- QString msg = i18n("The file %1 is already in the list").arg(url.path());
+ TQString msg = i18n("The file %1 is already in the list").arg(url.path());
KMessageBox::information(this, msg, i18n("File Already in List"));
@@ -213,7 +213,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){
}
}
-int KSoundPageConfig::findInSound_List(QString sound) {
+int KSoundPageConfig::findInSound_List(TQString sound) {
// Searches for <sound> in sound_list. Returns position or -1 if not found
bool found = false;
@@ -229,13 +229,13 @@ int KSoundPageConfig::findInSound_List(QString sound) {
return (found ? i-1 : -1);
}
-bool KSoundPageConfig::addToSound_List(QString sound){
+bool KSoundPageConfig::addToSound_List(TQString sound){
// Add "sound" to the sound list, but only if it is not already there
bool found = (findInSound_List(sound) != -1);
if (!found) { // Fine, the sound is not already in the sound list!
- QString *tmp = new QString(sound); // take a copy...
+ TQString *tmp = new TQString(sound); // take a copy...
sound_list->insertItem(*tmp);
sound_list->setTopItem(sound_list->count()-1);
@@ -247,7 +247,7 @@ bool KSoundPageConfig::addToSound_List(QString sound){
void KSoundPageConfig::playCurrentSound()
{
- QString hlp, sname;
+ TQString hlp, sname;
int soundno;
soundno = sound_list->currentItem();
@@ -287,7 +287,7 @@ void KSoundPageConfig::load() {
config->setGroup("ktalkd");
announceconfig->setGroup("ktalkannounce");
- setenv("KDEBINDIR",QFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/);
+ setenv("KDEBINDIR",TQFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/);
// for the first reading of the config file
extprg_edit->lineEdit()->setText(config->readPathEntry("ExtPrg",
@@ -298,7 +298,7 @@ void KSoundPageConfig::load() {
bool b = announceconfig->readBoolEntry("Sound",true/*default value*/);
sound_cb->setChecked(b);
- const QString soundFile = announceconfig->readPathEntry("SoundFile");
+ const TQString soundFile = announceconfig->readPathEntry("SoundFile");
if (!soundFile.isEmpty())
{
int pos = findInSound_List(soundFile);
diff --git a/ktalkd/kcmktalkd/soundpage.h b/ktalkd/kcmktalkd/soundpage.h
index e47194a2..61fa24dc 100644
--- a/ktalkd/kcmktalkd/soundpage.h
+++ b/ktalkd/kcmktalkd/soundpage.h
@@ -24,10 +24,10 @@
#ifndef __KCONTROL_KSOUNDPAGE_H__
#define __KCONTROL_KSOUNDPAGE_H__
-#include <qdir.h>
+#include <tqdir.h>
/* has to be before everything because of #define Unsorted 0 in X11/X.h !! */
-#include <qobject.h>
+#include <tqobject.h>
#include <kcmodule.h>
@@ -48,7 +48,7 @@ class KSoundPageConfig : public KCModule
Q_OBJECT
public:
- KSoundPageConfig( QWidget *parent=0, const char* name=0,
+ KSoundPageConfig( TQWidget *parent=0, const char* name=0,
KSimpleConfig *config=0, KSimpleConfig *announceconfig=0);
~KSoundPageConfig( );
@@ -56,7 +56,7 @@ public:
void save();
void defaults();
- bool eventFilter(QObject* o, QEvent* e);
+ bool eventFilter(TQObject* o, TQEvent* e);
private slots:
void soundOnOff();
@@ -64,26 +64,26 @@ private slots:
void slotChanged();
// Sound DnD
- void sound_listDragEnterEvent(QDragEnterEvent* e);
- void sound_listDropEvent(QDropEvent* e);
+ void sound_listDragEnterEvent(TQDragEnterEvent* e);
+ void sound_listDropEvent(TQDropEvent* e);
private:
KSimpleConfig *config;
KSimpleConfig *announceconfig;
bool delete_config;
- QLabel *extprg_label;
+ TQLabel *extprg_label;
KURLRequester *extprg_edit;
- QLabel *client_label;
+ TQLabel *client_label;
KURLRequester *client_edit;
- QCheckBox *sound_cb;
- QLabel *sound_label;
- QListBox *sound_list;
- QLabel *sound_tip;
- QPushButton *btn_test;
-
- int findInSound_List(QString sound);
- bool addToSound_List(QString sound);
+ TQCheckBox *sound_cb;
+ TQLabel *sound_label;
+ TQListBox *sound_list;
+ TQLabel *sound_tip;
+ TQPushButton *btn_test;
+
+ int findInSound_List(TQString sound);
+ bool addToSound_List(TQString sound);
};
#endif
diff --git a/ktalkd/ktalkd/machines/forwmach.cpp b/ktalkd/ktalkd/machines/forwmach.cpp
index 4d6b2146..402e4f01 100644
--- a/ktalkd/ktalkd/machines/forwmach.cpp
+++ b/ktalkd/ktalkd/machines/forwmach.cpp
@@ -428,7 +428,7 @@ char * ForwMachine::forwMachFindMatch(TABLE_ENTRY * table, NEW_CTL_MSG * mp)
void sig_handler(int signum)
{
- ktalk_debug("SIGNAL received : %d",signum);
+ ktalk_debug("TQT_SIGNAL received : %d",signum);
ForwMachine * fwm = ForwMachine::getForwMachine();
fwm->processDelete();
}
diff --git a/ktalkd/ktalkd/machines/talkconn.cpp b/ktalkd/ktalkd/machines/talkconn.cpp
index 2836bc62..b2e5710a 100644
--- a/ktalkd/ktalkd/machines/talkconn.cpp
+++ b/ktalkd/ktalkd/machines/talkconn.cpp
@@ -164,7 +164,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) {
unsigned char *help1;
unsigned char *help2;
- /* disabled caching - I don't have QIntDict ...
+ /* disabled caching - I don't have TQIntDict ...
result = replyAddrList [(long) destination.s_addr];
if (result) {
return *result;
@@ -215,7 +215,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) {
}
return *result;
}
-/* QIntDict <in_addr> TalkConnection::replyAddrList; */
+/* TQIntDict <in_addr> TalkConnection::replyAddrList; */
/** Check the remote protocol. Result stored in <protocol>.
* @return 1 if succeeded to find at least 1 protocol */
diff --git a/ktalkd/ktalkd/readcfg++.cpp b/ktalkd/ktalkd/readcfg++.cpp
index 07a10dc2..b18edbff 100644
--- a/ktalkd/ktalkd/readcfg++.cpp
+++ b/ktalkd/ktalkd/readcfg++.cpp
@@ -53,7 +53,7 @@
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kinstance.h>
-#include <qfile.h>
+#include <tqfile.h>
/* Ktalkd includes */
#include "readconf.h"
@@ -89,7 +89,7 @@ int init_user_config(const char * l_name)
if (!pw) return 0;
else {
struct stat buf;
- QString cfgFileName, tkannFileName;
+ TQString cfgFileName, tkannFileName;
/* Set $HOME, because KInstance uses it */
setenv("HOME",pw->pw_dir,1 /* overwrite */);
@@ -103,14 +103,14 @@ ktalk_debug("%s",pw->pw_dir);
ktalk_debug("%s","endpwent");
//WABA: New KConfig should be able to handle this gracefully:
- if (stat(QFile::encodeName(tkannFileName),&buf)!=-1) {
+ if (stat(TQFile::encodeName(tkannFileName),&buf)!=-1) {
// check if it exists, 'cause otherwise it would be created empty with
// root as owner !
ktkanncfg = new KConfig(tkannFileName);
ktkanncfg -> setGroup("ktalkannounce");
ktkanncfg -> setDollarExpansion(true);
} else ktkanncfg = 0L;
- if (stat(QFile::encodeName(cfgFileName),&buf)!=-1) {
+ if (stat(TQFile::encodeName(cfgFileName),&buf)!=-1) {
// check if it exists, 'cause otherwise it would be created empty with
// root as owner !
ktalkdcfg = new KConfig(cfgFileName);
@@ -142,7 +142,7 @@ int read_user_config(const char * key, char * result, int max)
cfg = ktalkdcfg;
if (!cfg) return 0; // file doesn't exist
- QString Qresult;
+ TQString Qresult;
if ((Qresult = cfg -> readEntry(key, "unset")) != "unset")
{
qstrncpy( result, Qresult.ascii(), max);
@@ -180,20 +180,20 @@ void end_user_config()
int process_config_file(void)
{
// Where is ktalkdlg installed ?
- QString ktalkdlg_dir = locate("exe", "ktalkdlg");
+ TQString ktalkdlg_dir = locate("exe", "ktalkdlg");
ktalkdlg_dir.truncate( ktalkdlg_dir.findRev('/') );
// Has to be done, for any $KDEBINDIR in ktalkdrc.
- setenv("KDEBINDIR", QFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/);
+ setenv("KDEBINDIR", TQFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/);
KConfig * syscfg = new KConfig( "ktalkdrc" );
syscfg -> setGroup("ktalkd");
syscfg -> setDollarExpansion(true);
- QString result;
+ TQString result;
#define found(k) (!(result = syscfg -> readEntry(k)).isEmpty())
- // QString cfgStr = cfgStr0.stripWhiteSpace();
+ // TQString cfgStr = cfgStr0.stripWhiteSpace();
if (found("AnswMach")) {
Options.answmach=booleanresult(result.ascii());
@@ -212,19 +212,19 @@ int process_config_file(void)
ktalk_debug("Sound : %d",Options.sound); }
if (found("SoundFile")) {
- qstrncpy(Options.soundfile,QFile::encodeName(result),S_CFGLINE);
+ qstrncpy(Options.soundfile,TQFile::encodeName(result),S_CFGLINE);
ktalk_debug("SoundFile = %s",Options.soundfile); }
if (found("SoundPlayer")) {
- qstrncpy(Options.soundplayer,QFile::encodeName(result),S_CFGLINE);
+ qstrncpy(Options.soundplayer,TQFile::encodeName(result),S_CFGLINE);
ktalk_debug("SoundPlayer = %s",Options.soundplayer); }
if (found("SoundPlayerOpt")) {
- qstrncpy(Options.soundplayeropt,QFile::encodeName(result),S_CFGLINE);
+ qstrncpy(Options.soundplayeropt,TQFile::encodeName(result),S_CFGLINE);
ktalk_debug("SoundPlayerOpt = %s",Options.soundplayeropt); }
if (found("MailProg")) {
- qstrncpy(Options.mailprog,QFile::encodeName(result),S_CFGLINE);
+ qstrncpy(Options.mailprog,TQFile::encodeName(result),S_CFGLINE);
ktalk_debug("Mail prog = %s",Options.mailprog); }
/* text based announcement */
@@ -246,11 +246,11 @@ int process_config_file(void)
}
if (found("ExtPrg")) {
- qstrncpy(Options.extprg,QFile::encodeName(result),S_CFGLINE);
+ qstrncpy(Options.extprg,TQFile::encodeName(result),S_CFGLINE);
ktalk_debug("Ext prg = %s",Options.extprg); }
else { /* has to work even without config file at all */
KStandardDirs stddirs;
- qstrncpy(Options.extprg, QFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1);
+ qstrncpy(Options.extprg, TQFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1);
}
delete syscfg;
diff --git a/ktalkd/ktalkd/unixsock.cpp b/ktalkd/ktalkd/unixsock.cpp
index 34272405..9547ccf5 100644
--- a/ktalkd/ktalkd/unixsock.cpp
+++ b/ktalkd/ktalkd/unixsock.cpp
@@ -45,8 +45,8 @@
#include <sys/select.h> // Needed on some systems.
#endif
-#include <qstrlist.h>
-#include <qfile.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
#include "includ.h"
#include "proto.h"
@@ -80,8 +80,8 @@ bool sendToKtalk (const char *username, const char *announce)
}
// find sockets of running ktalk clients
- QString tempDir = "/tmp";
- QString templ = QString ("ktalk-") + username + "-";
+ TQString tempDir = "/tmp";
+ TQString templ = TQString ("ktalk-") + username + "-";
bool announceok = FALSE;
char buffer [N_CHARS+2];
buffer [0] = 1;
@@ -89,9 +89,9 @@ bool sendToKtalk (const char *username, const char *announce)
unsigned int announcelen = strlen(buffer);
unsigned int len;
- DIR *dir = opendir (QFile::encodeName(tempDir));
+ DIR *dir = opendir (TQFile::encodeName(tempDir));
struct dirent *entry;
- QStrList dirList;
+ TQStrList dirList;
struct sockaddr_un ktalkAddr;
ktalkAddr.sun_family = AF_UNIX;
while ((entry = readdir (dir))) {
@@ -109,9 +109,9 @@ bool sendToKtalk (const char *username, const char *announce)
// out who's talking to janet, all I need is to write
// a small app that listens on /tmp/ktalk-janet-foo
//
- if (templ == QFile::decodeName(entry->d_name).left(templ.length())) {
- QString path = tempDir + "/" + QFile::decodeName(entry->d_name);
- strncpy (ktalkAddr.sun_path, QFile::encodeName(path), sizeof (ktalkAddr.sun_path));
+ if (templ == TQFile::decodeName(entry->d_name).left(templ.length())) {
+ TQString path = tempDir + "/" + TQFile::decodeName(entry->d_name);
+ strncpy (ktalkAddr.sun_path, TQFile::encodeName(path), sizeof (ktalkAddr.sun_path));
len = sendto (sock, buffer, announcelen, 0,
(struct sockaddr *) &ktalkAddr, sizeof (ktalkAddr));
if (len == announcelen)
diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp
index b843c990..336c9a04 100644
--- a/ktalkd/ktalkdlg/ktalkdlg.cpp
+++ b/ktalkd/ktalkdlg/ktalkdlg.cpp
@@ -26,8 +26,8 @@
#include <fcntl.h>
#include <unistd.h>
-#include <qmessagebox.h>
-#include <qfile.h>
+#include <tqmessagebox.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,21 +42,21 @@
#define MAX_DLG_LIFE RING_WAIT
/* so that the dialog lasts exactly the time of an announce */
-class TimeoutDialog : public QMessageBox {
+class TimeoutDialog : public TQMessageBox {
public:
TimeoutDialog (int timeout_ms,
- const QString& caption, const QString &text, Icon icon,
+ const TQString& caption, const TQString &text, Icon icon,
int button0, int button1, int button2,
- QWidget *parent=0, const char *name=0, bool modal=TRUE,
+ TQWidget *parent=0, const char *name=0, bool modal=TRUE,
WFlags f=WStyle_DialogBorder ):
- QMessageBox (caption, text, icon, button0, button1, button2,
+ TQMessageBox (caption, text, icon, button0, button1, button2,
parent, name, modal, f)
{startTimer (timeout_ms);}
~TimeoutDialog ()
{killTimers ();}
- virtual void timerEvent (QTimerEvent *)
+ virtual void timerEvent (TQTimerEvent *)
{killTimers (); done (Rejected);}
};
@@ -89,7 +89,7 @@ int main (int argc, char **argv)
if (args->count() == 0)
KCmdLineArgs::usage(i18n("'user@host' expected."));
- QString s;
+ TQString s;
s.sprintf ("%d:%02d", localclock->tm_hour, localclock->tm_min);
s = i18n ("Message from talk demon at ") + s + " ...\n" +
i18n ("Talk connection requested by ") + args->arg(0);
@@ -97,7 +97,7 @@ int main (int argc, char **argv)
if ( args->count() == 2 )
{
s += '\n';
- QString callee = args->arg(1);
+ TQString callee = args->arg(1);
s += i18n ("for user %1").arg( callee.isEmpty() ? i18n("<nobody>") : callee );
}
@@ -105,12 +105,12 @@ int main (int argc, char **argv)
TimeoutDialog dialog (MAX_DLG_LIFE * 1000,
i18n ("Talk requested..."), s,
- QMessageBox::Information,
- QMessageBox::Yes | QMessageBox::Default,
- QMessageBox::No | QMessageBox::Escape,
+ TQMessageBox::Information,
+ TQMessageBox::Yes | TQMessageBox::Default,
+ TQMessageBox::No | TQMessageBox::Escape,
0 );
- dialog.setButtonText( QMessageBox::Yes, i18n ("Respond") );
- dialog.setButtonText( QMessageBox::No, i18n ("Ignore") );
+ dialog.setButtonText( TQMessageBox::Yes, i18n ("Respond") );
+ dialog.setButtonText( TQMessageBox::No, i18n ("Ignore") );
a.setTopWidget (&dialog);
@@ -123,7 +123,7 @@ int main (int argc, char **argv)
bool bSound = cfg->readNumEntry ("Sound", 0);
if (bSound) {
- QString soundFile = cfg->readPathEntry ("SoundFile");
+ TQString soundFile = cfg->readPathEntry ("SoundFile");
if (soundFile[0] != '/')
soundFile = locate( "sound", soundFile );
@@ -134,17 +134,17 @@ int main (int argc, char **argv)
//if (!audio) a.beep (); // If no audio is played (whatever reason), beep!
int result = dialog.exec ();
- if (result == QMessageBox::Yes) {
+ if (result == TQMessageBox::Yes) {
dialog.killTimers ();
kdDebug() << "Running talk client..." << endl;
- QString konsole = locate("exe", "konsole");
- QString konsole_dir = konsole;
+ TQString konsole = locate("exe", "konsole");
+ TQString konsole_dir = konsole;
konsole_dir.truncate( konsole.findRev('/') );
- setenv("KDEBINDIR", QFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/);
- QString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk");
+ setenv("KDEBINDIR", TQFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/);
+ TQString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk");
- QString cmd = cmd0.stripWhiteSpace();
+ TQString cmd = cmd0.stripWhiteSpace();
cmd += " '";
cmd += args->arg(0);
cmd += "' &";
@@ -160,7 +160,7 @@ int main (int argc, char **argv)
/* XXX: The sender's name or hostname may contain `rm -rf .`
* That's why it's bad to use system()
*/
- system (QFile::encodeName(cmd));
+ system (TQFile::encodeName(cmd));
kapp->quit();
}
diff --git a/lanbrowsing/kcmlisa/findnic.cpp b/lanbrowsing/kcmlisa/findnic.cpp
index 6e8b025e..721834c9 100644
--- a/lanbrowsing/kcmlisa/findnic.cpp
+++ b/lanbrowsing/kcmlisa/findnic.cpp
@@ -52,9 +52,9 @@
#if defined(HAVE_GETNAMEINFO) && defined(HAVE_GETIFADDRS)
#include <ifaddrs.h>
#include <netdb.h>
- #include <qstring.h>
+ #include <tqstring.h>
- QString flags_tos (unsigned int flags);
+ TQString flags_tos (unsigned int flags);
#endif
#include "findnic.h"
@@ -190,10 +190,10 @@ NICList* findNICs()
return nl;
}
-void suggestSettingsForAddress(const QString& addrMask, LisaConfigInfo& lci)
+void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci)
{
- QString ip=addrMask.left(addrMask.find("/"));
- QString mask=addrMask.mid(addrMask.find("/")+1);
+ TQString ip=addrMask.left(addrMask.find("/"));
+ TQString mask=addrMask.mid(addrMask.find("/")+1);
if (mask[mask.length()-1]==';')
mask=mask.left(mask.length()-1);
@@ -208,10 +208,10 @@ void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci)
lci.clear();
if (nic==0)
return;
- QString address = nic->addr;
- QString netmask = nic->netmask;
+ TQString address = nic->addr;
+ TQString netmask = nic->netmask;
- QString addrMask(address+"/"+netmask+";");
+ TQString addrMask(address+"/"+netmask+";");
struct in_addr tmpaddr;
inet_aton(nic->netmask.latin1(), &tmpaddr);
unsigned int tmp= ntohl(tmpaddr.s_addr);
@@ -266,30 +266,30 @@ void LisaConfigInfo::clear()
}
#if defined(HAVE_GETNAMEINFO) && defined(HAVE_GETIFADDRS)
-QString flags_tos (unsigned int flags)
+TQString flags_tos (unsigned int flags)
{
- QString tmp;
+ TQString tmp;
if (flags & IFF_POINTOPOINT) {
tmp += i18n("Point to Point");
}
if (flags & IFF_BROADCAST) {
if (tmp.length()) {
- tmp += QString::fromLatin1(", ");
+ tmp += TQString::fromLatin1(", ");
}
tmp += i18n("Broadcast");
}
if (flags & IFF_MULTICAST) {
if (tmp.length()) {
- tmp += QString::fromLatin1(", ");
+ tmp += TQString::fromLatin1(", ");
}
tmp += i18n("Multicast");
}
if (flags & IFF_LOOPBACK) {
if (tmp.length()) {
- tmp += QString::fromLatin1(", ");
+ tmp += TQString::fromLatin1(", ");
}
tmp += i18n("Loopback");
}
diff --git a/lanbrowsing/kcmlisa/findnic.h b/lanbrowsing/kcmlisa/findnic.h
index 01140bcc..bff0aabb 100644
--- a/lanbrowsing/kcmlisa/findnic.h
+++ b/lanbrowsing/kcmlisa/findnic.h
@@ -21,8 +21,8 @@
#ifndef FINDNIC_H
#define FINDNIC_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <sys/types.h>
#include <netinet/in.h>
@@ -30,20 +30,20 @@
struct MyNIC
{
- QString name;
- QString addr;
- QString netmask;
- QString state;
- QString type;
+ TQString name;
+ TQString addr;
+ TQString netmask;
+ TQString state;
+ TQString type;
};
struct LisaConfigInfo
{
LisaConfigInfo();
void clear();
- QString pingAddresses;
- QString broadcastNetwork;
- QString allowedAddresses;
+ TQString pingAddresses;
+ TQString broadcastNetwork;
+ TQString allowedAddresses;
int secondWait;
bool secondScan;
int firstWait;
@@ -54,7 +54,7 @@ struct LisaConfigInfo
};
-typedef QPtrList<MyNIC> NICList;
+typedef TQPtrList<MyNIC> NICList;
//some plain C-like helper functions
@@ -63,7 +63,7 @@ NICList* findNICs();
///Enter some settings into lci which might be appropriate for nic
void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci);
-void suggestSettingsForAddress(const QString& addrMask, LisaConfigInfo& lci);
+void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci);
#endif
diff --git a/lanbrowsing/kcmlisa/kcmkiolan.cpp b/lanbrowsing/kcmlisa/kcmkiolan.cpp
index 981c6796..297f127b 100644
--- a/lanbrowsing/kcmlisa/kcmkiolan.cpp
+++ b/lanbrowsing/kcmlisa/kcmkiolan.cpp
@@ -20,39 +20,39 @@
#include "kcmkiolan.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kdebug.h>
#include <kdialog.h>
-IOSlaveSettings::IOSlaveSettings(const QString& config, QWidget *parent)
+IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *parent)
:KCModule(parent)
,m_config(config,false,true)
{
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
layout->setAutoAdd(true);
- QGroupBox* group=new QGroupBox(1, Horizontal, i18n("Show Links for Following Services"), this);
+ TQGroupBox* group=new TQGroupBox(1, Horizontal, i18n("Show Links for Following Services"), this);
m_ftpSettings=new PortSettingsBar(i18n("FTP (TCP, port 21): "), group);
m_httpSettings=new PortSettingsBar(i18n("HTTP (TCP, port 80): "),group);
m_nfsSettings=new PortSettingsBar(i18n("NFS (TCP, port 2049): "),group);
m_smbSettings=new PortSettingsBar(i18n("Windows shares (TCP, ports 445 and 139):"),group);
m_fishSettings=new PortSettingsBar(i18n("Secure Shell/Fish (TCP, port 22): "),group);
- m_shortHostnames = new QCheckBox(i18n("Show &short hostnames (without domain suffix)"),this);
+ m_shortHostnames = new TQCheckBox(i18n("Show &short hostnames (without domain suffix)"),this);
- QHBox *hbox=new QHBox(this);
- QLabel *label=new QLabel(i18n("Default LISa server host: "), hbox);
- m_defaultLisaHostLe=new QLineEdit(hbox);
+ TQHBox *hbox=new TQHBox(this);
+ TQLabel *label=new TQLabel(i18n("Default LISa server host: "), hbox);
+ m_defaultLisaHostLe=new TQLineEdit(hbox);
label->setBuddy(m_defaultLisaHostLe);
- QWidget *w=new QWidget(this);
+ TQWidget *w=new TQWidget(this);
layout->setStretchFactor(m_ftpSettings,0);
layout->setStretchFactor(m_httpSettings,0);
layout->setStretchFactor(m_nfsSettings,0);
@@ -61,13 +61,13 @@ IOSlaveSettings::IOSlaveSettings(const QString& config, QWidget *parent)
layout->setStretchFactor(hbox,0);
layout->setStretchFactor(w,1);
- connect(m_ftpSettings,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_httpSettings,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_nfsSettings,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_smbSettings,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_fishSettings,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_shortHostnames,SIGNAL(clicked()),this,SIGNAL(changed()));
- connect(m_defaultLisaHostLe, SIGNAL(textChanged(const QString&)),this,SIGNAL(changed()));
+ connect(m_ftpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_httpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_nfsSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_smbSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_fishSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_shortHostnames,TQT_SIGNAL(clicked()),this,TQT_SIGNAL(changed()));
+ connect(m_defaultLisaHostLe, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed()));
}
void IOSlaveSettings::load()
diff --git a/lanbrowsing/kcmlisa/kcmkiolan.h b/lanbrowsing/kcmlisa/kcmkiolan.h
index d6910640..9fd0b2a0 100644
--- a/lanbrowsing/kcmlisa/kcmkiolan.h
+++ b/lanbrowsing/kcmlisa/kcmkiolan.h
@@ -32,7 +32,7 @@ class IOSlaveSettings:public KCModule
{
Q_OBJECT
public:
- IOSlaveSettings(const QString& config, QWidget *parent=0);
+ IOSlaveSettings(const TQString& config, TQWidget *parent=0);
virtual ~IOSlaveSettings() {};
void load();
void save();
@@ -40,14 +40,14 @@ class IOSlaveSettings:public KCModule
void changed();
protected:
KConfig m_config;
- QCheckBox *m_shortHostnames;
- QCheckBox *m_rlanSidebar;
+ TQCheckBox *m_shortHostnames;
+ TQCheckBox *m_rlanSidebar;
PortSettingsBar *m_ftpSettings;
PortSettingsBar *m_httpSettings;
PortSettingsBar *m_nfsSettings;
PortSettingsBar *m_smbSettings;
PortSettingsBar *m_fishSettings;
- QLineEdit *m_defaultLisaHostLe;
+ TQLineEdit *m_defaultLisaHostLe;
};
#endif
diff --git a/lanbrowsing/kcmlisa/kcmlisa.cpp b/lanbrowsing/kcmlisa/kcmlisa.cpp
index ee415462..7819b217 100644
--- a/lanbrowsing/kcmlisa/kcmlisa.cpp
+++ b/lanbrowsing/kcmlisa/kcmlisa.cpp
@@ -29,13 +29,13 @@
#include <pwd.h>
#include <time.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qgrid.h>
-#include <qvbuttongroup.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqgrid.h>
+#include <tqvbuttongroup.h>
#include <kapplication.h>
#include <kprocess.h>
@@ -48,140 +48,140 @@
#include <kdebug.h>
-LisaSettings::LisaSettings(const QString& config, QWidget *parent)
+LisaSettings::LisaSettings(const TQString& config, TQWidget *parent)
: KCModule(parent, "kcmlanbrowser")
,m_config(config,false,true)
,m_wizard(0)
,m_configFilename(config)
,m_changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
layout->setAutoAdd(true);
- QWidget *dummy(0);
+ TQWidget *dummy(0);
- QVButtonGroup *gb=new QVButtonGroup(i18n("Tell LISa Daemon How to Search for Hosts"),this);
+ TQVButtonGroup *gb=new TQVButtonGroup(i18n("Tell LISa Daemon How to Search for Hosts"),this);
gb->setInsideSpacing(10);
- m_useNmblookup=new QCheckBox(i18n("Send &NetBIOS broadcasts using nmblookup"), gb);
- QToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer"));
+ m_useNmblookup=new TQCheckBox(i18n("Send &NetBIOS broadcasts using nmblookup"), gb);
+ TQToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer"));
- m_sendPings=new QCheckBox(i18n("Send &pings (ICMP echo packets)"), gb);
- QToolTip::add(m_sendPings,i18n("All hosts running TCP/IP will answer"));
+ m_sendPings=new TQCheckBox(i18n("Send &pings (ICMP echo packets)"), gb);
+ TQToolTip::add(m_sendPings,i18n("All hosts running TCP/IP will answer"));
- QHBox *hbox=new QHBox(gb);
+ TQHBox *hbox=new TQHBox(gb);
hbox->setSpacing(10);
- dummy=new QWidget(hbox);
+ dummy=new TQWidget(hbox);
dummy->setMinimumWidth(10);
- QLabel *label=new QLabel(i18n("To these &IP addresses:"),hbox);
- QString comment = i18n("Enter all ranges to scan, using the format '192.168.0.1/255.255.255.0;10.0.0.1;255.0.0.0'");
- QToolTip::add(label,comment);
+ TQLabel *label=new TQLabel(i18n("To these &IP addresses:"),hbox);
+ TQString comment = i18n("Enter all ranges to scan, using the format '192.168.0.1/255.255.255.0;10.0.0.1;255.0.0.0'");
+ TQToolTip::add(label,comment);
m_pingAddresses=new KRestrictedLine(hbox,"a","0123456789.-/;");
- QToolTip::add(m_pingAddresses, comment);
+ TQToolTip::add(m_pingAddresses, comment);
label->setBuddy(m_pingAddresses);
- QGrid *addressesGrid = new QGrid(2, Qt::Horizontal, this);
+ TQGrid *addressesGrid = new TQGrid(2, Qt::Horizontal, this);
addressesGrid->setSpacing(10);
layout->setStretchFactor(addressesGrid,0);
- label=new QLabel(i18n("&Broadcast network address:"),addressesGrid);
+ label=new TQLabel(i18n("&Broadcast network address:"),addressesGrid);
comment=i18n("Your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
- QToolTip::add(label, comment);
+ TQToolTip::add(label, comment);
m_broadcastNetwork=new KRestrictedLine(addressesGrid,"a","0123456789./;");
- QToolTip::add(m_broadcastNetwork,comment);
+ TQToolTip::add(m_broadcastNetwork,comment);
label->setBuddy(m_broadcastNetwork);
- label=new QLabel(i18n("&Trusted IP addresses:"),addressesGrid);
+ label=new TQLabel(i18n("&Trusted IP addresses:"),addressesGrid);
comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
- QToolTip::add(label, comment);
+ TQToolTip::add(label, comment);
m_allowedAddresses=new KRestrictedLine(addressesGrid,"a","0123456789./;");
- QToolTip::add(m_allowedAddresses, comment);
+ TQToolTip::add(m_allowedAddresses, comment);
label->setBuddy(m_allowedAddresses);
- dummy=new QWidget(this);
+ dummy=new TQWidget(this);
layout->setStretchFactor(dummy,10);
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing(10);
-// m_autoSetup=new QPushButton(i18n("&Guided LISa Setup..."),hbox);
- m_autoSetup=new QPushButton(i18n("Setup Wizard..."),hbox);
+// m_autoSetup=new TQPushButton(i18n("&Guided LISa Setup..."),hbox);
+ m_autoSetup=new TQPushButton(i18n("Setup Wizard..."),hbox);
m_autoSetup->setFixedWidth( m_autoSetup->sizeHint().width() );
- m_suggestSettings=new QPushButton(i18n("&Suggest Settings"),hbox);
+ m_suggestSettings=new TQPushButton(i18n("&Suggest Settings"),hbox);
- new QWidget(hbox);
+ new TQWidget(hbox);
- m_advancedSettingsButton=new QPushButton(i18n("Ad&vanced Settings..."),hbox);
+ m_advancedSettingsButton=new TQPushButton(i18n("Ad&vanced Settings..."),hbox);
m_lisaAdvancedDlg=new KDialogBase(0,0,true,i18n("Advanced Settings for LISa"),KDialogBase::Close, KDialogBase::Close);
- connect(m_advancedSettingsButton,SIGNAL(clicked()),m_lisaAdvancedDlg,SLOT(show()));
+ connect(m_advancedSettingsButton,TQT_SIGNAL(clicked()),m_lisaAdvancedDlg,TQT_SLOT(show()));
- QVBox *vbox=m_lisaAdvancedDlg->makeVBoxMainWidget();
+ TQVBox *vbox=m_lisaAdvancedDlg->makeVBoxMainWidget();
m_pingNames=new KEditListBox(i18n("&Additionally Check These Hosts"),vbox,"a",false, KEditListBox::Add|KEditListBox::Remove);
m_pingNames->setMinimumHeight(180);
- QToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged"));
+ TQToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged"));
- dummy=new QWidget(vbox);
+ dummy=new TQWidget(vbox);
dummy->setMinimumHeight(10);
- m_deliverUnnamedHosts=new QCheckBox(i18n("Show &hosts without DNS names"),vbox);
+ m_deliverUnnamedHosts=new TQCheckBox(i18n("Show &hosts without DNS names"),vbox);
- QGrid *advGrid = new QGrid(2, Qt::Horizontal, vbox);
+ TQGrid *advGrid = new TQGrid(2, Qt::Horizontal, vbox);
advGrid->setSpacing(10);
- label=new QLabel(i18n("Host list update interval:"),advGrid);
- QToolTip::add(label,i18n("Search hosts after this number of seconds"));
- m_updatePeriod=new QSpinBox(30,1800,10,advGrid);
+ label=new TQLabel(i18n("Host list update interval:"),advGrid);
+ TQToolTip::add(label,i18n("Search hosts after this number of seconds"));
+ m_updatePeriod=new TQSpinBox(30,1800,10,advGrid);
m_updatePeriod->setSuffix(i18n(" sec"));
- QToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds"));
+ TQToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds"));
- m_secondScan=new QCheckBox(i18n("Always check twice for hosts when searching"),advGrid);
- new QWidget(advGrid);
+ m_secondScan=new TQCheckBox(i18n("Always check twice for hosts when searching"),advGrid);
+ new TQWidget(advGrid);
- label=new QLabel(i18n("Wait for replies from hosts after first scan:"),advGrid);
- QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- m_firstWait=new QSpinBox(10,1000,50,advGrid);
+ label=new TQLabel(i18n("Wait for replies from hosts after first scan:"),advGrid);
+ TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ m_firstWait=new TQSpinBox(10,1000,50,advGrid);
m_firstWait->setSuffix(i18n(" ms"));
- QToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ TQToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- label=new QLabel(i18n("Wait for replies from hosts after second scan:"),advGrid);
- QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- m_secondWait=new QSpinBox(0,1000,50,advGrid);
+ label=new TQLabel(i18n("Wait for replies from hosts after second scan:"),advGrid);
+ TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ m_secondWait=new TQSpinBox(0,1000,50,advGrid);
m_secondWait->setSuffix(i18n(" ms"));
- QToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ TQToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- label=new QLabel(i18n("Max. number of ping packets to send at once:"),advGrid);
- m_maxPingsAtOnce=new QSpinBox(8,1024,5,advGrid);
+ label=new TQLabel(i18n("Max. number of ping packets to send at once:"),advGrid);
+ m_maxPingsAtOnce=new TQSpinBox(8,1024,5,advGrid);
- dummy=new QWidget(advGrid);
+ dummy=new TQWidget(advGrid);
dummy->setMinimumHeight(10);
- connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool)));
- connect(m_sendPings,SIGNAL(toggled(bool)),m_pingAddresses,SLOT(setEnabled(bool)));
-
- connect(m_pingAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed()));
- connect(m_allowedAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed()));
- connect(m_broadcastNetwork,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed()));
-
- connect(m_pingAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed()));
- connect(m_allowedAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed()));
- connect(m_broadcastNetwork,SIGNAL(returnPressed()),this,SIGNAL(changed()));
-
- connect(m_sendPings,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_firstWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_secondWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_maxPingsAtOnce,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_secondScan,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_deliverUnnamedHosts,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_updatePeriod,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_pingNames,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_useNmblookup,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_autoSetup,SIGNAL(clicked()),this,SLOT(autoSetup()));
- connect(m_suggestSettings,SIGNAL(clicked()),this,SLOT(suggestSettings()));
- connect(this, SIGNAL(changed()), SLOT(slotChanged()));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool)));
+ connect(m_sendPings,TQT_SIGNAL(toggled(bool)),m_pingAddresses,TQT_SLOT(setEnabled(bool)));
+
+ connect(m_pingAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed()));
+ connect(m_allowedAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed()));
+ connect(m_broadcastNetwork,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed()));
+
+ connect(m_pingAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed()));
+ connect(m_allowedAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed()));
+ connect(m_broadcastNetwork,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed()));
+
+ connect(m_sendPings,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_firstWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_secondWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_maxPingsAtOnce,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_deliverUnnamedHosts,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_updatePeriod,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_pingNames,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_useNmblookup,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_autoSetup,TQT_SIGNAL(clicked()),this,TQT_SLOT(autoSetup()));
+ connect(m_suggestSettings,TQT_SIGNAL(clicked()),this,TQT_SLOT(suggestSettings()));
+ connect(this, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()));
}
void LisaSettings::load()
@@ -242,13 +242,13 @@ void LisaSettings::save()
m_config.writeEntry("PingAddresses",m_sendPings->isChecked()?m_pingAddresses->text():"");
m_config.writeEntry("AllowedAddresses",m_allowedAddresses->text());
m_config.writeEntry("BroadcastNetwork",m_broadcastNetwork->text());
- QStringList writeStuff;
+ TQStringList writeStuff;
for (int i=0; i<m_pingNames->count(); i++)
writeStuff.append(m_pingNames->text(i));
m_config.writeEntry("PingNames",writeStuff,';');
m_config.sync();
- chmod(QFile::encodeName(m_configFilename),S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ chmod(TQFile::encodeName(m_configFilename),S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
}
else
{
@@ -260,7 +260,7 @@ void LisaSettings::save()
if (tmp.status() == 0 && tmp.textStream())
{
m_tmpFilename = tmp.name();
- QTextStream &confStream = *(tmp.textStream());
+ TQTextStream &confStream = *(tmp.textStream());
if (m_secondScan->isChecked())
confStream<<"SecondWait = "<<(m_secondWait->value()+5)/10<<"\n";
else
@@ -282,15 +282,15 @@ void LisaSettings::save()
confStream<<"PingAddresses = "<<m_pingAddresses->text().latin1()<<"\n";
confStream<<"AllowedAddresses = "<<m_allowedAddresses->text().latin1()<<"\n";
confStream<<"BroadcastNetwork = "<<m_broadcastNetwork->text().latin1()<<"\n";
- QString writeStuff;
+ TQString writeStuff;
for (int i=0; i<m_pingNames->count(); i++)
writeStuff=writeStuff+m_pingNames->text(i).latin1()+";";
confStream<<"PingNames = "<<writeStuff.latin1()<<"\n";
tmp.close();
- QString suCommand=QString("cp '%1' '%2'; chmod 644 '%3'; rm -f '%4'").arg(m_tmpFilename).arg(m_configFilename).arg(m_configFilename).arg(m_tmpFilename);
+ TQString suCommand=TQString("cp '%1' '%2'; chmod 644 '%3'; rm -f '%4'").arg(m_tmpFilename).arg(m_configFilename).arg(m_configFilename).arg(m_tmpFilename);
KProcess *proc = new KProcess();
- connect(proc, SIGNAL(processExited(KProcess *)), this, SLOT(saveDone(KProcess *)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(saveDone(KProcess *)));
*proc<<"kdesu"<<"-c"<<suCommand;
KApplication::setOverrideCursor(Qt::waitCursor);
setEnabled(false);
@@ -329,7 +329,7 @@ void LisaSettings::suggestSettings()
if (nics->count()>1)
{
- QString msg(i18n("You have more than one network interface installed.<br>"
+ TQString msg(i18n("You have more than one network interface installed.<br>"
"Please make sure the suggested settings are correct.<br>"
"<br>The following interfaces were found:<br><br>"));
//not that easy to handle
@@ -337,7 +337,7 @@ void LisaSettings::suggestSettings()
{
msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>";
}
- KMessageBox::information(0,QString("<html>%1</html>").arg(msg));
+ KMessageBox::information(0,TQString("<html>%1</html>").arg(msg));
}
emit changed();
@@ -353,7 +353,7 @@ void LisaSettings::autoSetup()
m_wizard->clearAll();
int result=m_wizard->exec();
- if (result!=QDialog::Accepted)
+ if (result!=TQDialog::Accepted)
return;
m_pingAddresses->setText(lci.pingAddresses);
@@ -375,7 +375,7 @@ void LisaSettings::autoSetup()
void LisaSettings::saveDone(KProcess *proc)
{
- unlink(QFile::encodeName(m_tmpFilename));
+ unlink(TQFile::encodeName(m_tmpFilename));
KApplication::restoreOverrideCursor();
setEnabled(true);
KMessageBox::information(0,i18n("The configuration has been saved to /etc/lisarc.\n"
diff --git a/lanbrowsing/kcmlisa/kcmlisa.h b/lanbrowsing/kcmlisa/kcmlisa.h
index 743df96b..42fef9af 100644
--- a/lanbrowsing/kcmlisa/kcmlisa.h
+++ b/lanbrowsing/kcmlisa/kcmlisa.h
@@ -38,7 +38,7 @@ class LisaSettings:public KCModule
{
Q_OBJECT
public:
- LisaSettings(const QString& config, QWidget *parent=0);
+ LisaSettings(const TQString& config, TQWidget *parent=0);
virtual ~LisaSettings() {};
void load();
void save();
@@ -51,27 +51,27 @@ class LisaSettings:public KCModule
void suggestSettings();
protected:
KConfig m_config;
- QPushButton *m_autoSetup;
- QCheckBox *m_useNmblookup;
- QCheckBox *m_sendPings;
+ TQPushButton *m_autoSetup;
+ TQCheckBox *m_useNmblookup;
+ TQCheckBox *m_sendPings;
KRestrictedLine *m_pingAddresses;
KEditListBox *m_pingNames;
KRestrictedLine *m_allowedAddresses;
KRestrictedLine *m_broadcastNetwork;
- QSpinBox *m_firstWait;
- QCheckBox *m_secondScan;
- QSpinBox *m_secondWait;
- QSpinBox *m_updatePeriod;
- QCheckBox *m_deliverUnnamedHosts;
- QSpinBox *m_maxPingsAtOnce;
- QPushButton* m_suggestSettings;
- QPushButton *m_advancedSettingsButton;
+ TQSpinBox *m_firstWait;
+ TQCheckBox *m_secondScan;
+ TQSpinBox *m_secondWait;
+ TQSpinBox *m_updatePeriod;
+ TQCheckBox *m_deliverUnnamedHosts;
+ TQSpinBox *m_maxPingsAtOnce;
+ TQPushButton* m_suggestSettings;
+ TQPushButton *m_advancedSettingsButton;
KDialogBase *m_lisaAdvancedDlg;
SetupWizard *m_wizard;
private:
- QString m_tmpFilename;
- QString m_configFilename;
+ TQString m_tmpFilename;
+ TQString m_configFilename;
bool m_changed;
};
diff --git a/lanbrowsing/kcmlisa/kcmreslisa.cpp b/lanbrowsing/kcmlisa/kcmreslisa.cpp
index 7e92b199..fcaf104c 100644
--- a/lanbrowsing/kcmlisa/kcmreslisa.cpp
+++ b/lanbrowsing/kcmlisa/kcmreslisa.cpp
@@ -20,15 +20,15 @@
#include "kcmreslisa.h"
#include "findnic.h"
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -36,7 +36,7 @@
#include <krestrictedline.h>
#include <keditlistbox.h>
-ResLisaSettings::ResLisaSettings(const QString& config, QWidget *parent)
+ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent)
: KCModule(parent)
,m_config(config,false,true)
,m_kiolanConfig("kio_lanrc",false,true)
@@ -53,90 +53,90 @@ ResLisaSettings::ResLisaSettings(const QString& config, QWidget *parent)
,m_maxPingsAtOnce(0)
,m_reslisaAdvancedDlg(0)
{
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
layout->setAutoAdd(true);
- QVButtonGroup *gb=new QVButtonGroup(i18n("Tell ResLISa Daemon How to Search for Hosts"),this);
+ TQVButtonGroup *gb=new TQVButtonGroup(i18n("Tell ResLISa Daemon How to Search for Hosts"),this);
gb->setInsideSpacing(10);
- m_useNmblookup=new QCheckBox(i18n("Send &NetBIOS broadcasts using &nmblookup"),gb);
- QToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer"));
+ m_useNmblookup=new TQCheckBox(i18n("Send &NetBIOS broadcasts using &nmblookup"),gb);
+ TQToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer"));
m_pingNames=new KEditListBox(i18n("A&dditionally Check These Hosts"),gb,"a",false, KEditListBox::Add|KEditListBox::Remove);
- QToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged."));
+ TQToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged."));
- QHBox *hbox=new QHBox(this);
+ TQHBox *hbox=new TQHBox(this);
hbox->setSpacing(10);
- QLabel *label=new QLabel(i18n("&Trusted addresses:"),hbox);
- QString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
- QToolTip::add(label, comment);
+ TQLabel *label=new TQLabel(i18n("&Trusted addresses:"),hbox);
+ TQString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
+ TQToolTip::add(label, comment);
m_allowedAddresses=new KRestrictedLine(hbox,"a","0123456789./;");
- QToolTip::add(m_allowedAddresses,comment);
+ TQToolTip::add(m_allowedAddresses,comment);
label->setBuddy(m_allowedAddresses);
- m_rlanSidebar = new QCheckBox(i18n("Use &rlan:/ instead of lan:/ in Konqueror's navigation panel"), this);
+ m_rlanSidebar = new TQCheckBox(i18n("Use &rlan:/ instead of lan:/ in Konqueror's navigation panel"), this);
- hbox = new QHBox(this);
- m_suggestSettings=new QPushButton(i18n("&Suggest Settings"),hbox);
+ hbox = new TQHBox(this);
+ m_suggestSettings=new TQPushButton(i18n("&Suggest Settings"),hbox);
- new QWidget(hbox);
+ new TQWidget(hbox);
- m_advancedSettingsButton=new QPushButton(i18n("Ad&vanced Settings"),hbox);
+ m_advancedSettingsButton=new TQPushButton(i18n("Ad&vanced Settings"),hbox);
m_reslisaAdvancedDlg=new KDialogBase(0,0,true,i18n("Advanced Settings for ResLISa"),KDialogBase::Close, KDialogBase::Close);
- connect(m_advancedSettingsButton,SIGNAL(clicked()),m_reslisaAdvancedDlg,SLOT(show()));
+ connect(m_advancedSettingsButton,TQT_SIGNAL(clicked()),m_reslisaAdvancedDlg,TQT_SLOT(show()));
- QVBox *vbox=m_reslisaAdvancedDlg->makeVBoxMainWidget();
+ TQVBox *vbox=m_reslisaAdvancedDlg->makeVBoxMainWidget();
- m_deliverUnnamedHosts=new QCheckBox(i18n("Show &hosts without DNS names"),vbox);
+ m_deliverUnnamedHosts=new TQCheckBox(i18n("Show &hosts without DNS names"),vbox);
- QGrid *advGrid = new QGrid(2, Qt::Horizontal, vbox);
+ TQGrid *advGrid = new TQGrid(2, Qt::Horizontal, vbox);
advGrid->setSpacing(10);
- label=new QLabel(i18n("Host list update interval:"),advGrid);
- QToolTip::add(label,i18n("Search hosts after this number of seconds"));
- m_updatePeriod=new QSpinBox(30,1800,10,advGrid);
+ label=new TQLabel(i18n("Host list update interval:"),advGrid);
+ TQToolTip::add(label,i18n("Search hosts after this number of seconds"));
+ m_updatePeriod=new TQSpinBox(30,1800,10,advGrid);
m_updatePeriod->setSuffix(i18n(" sec"));
- QToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds"));
+ TQToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds"));
- m_secondScan=new QCheckBox(i18n("Always check twice for hosts when searching"),advGrid);
- new QWidget(advGrid);
+ m_secondScan=new TQCheckBox(i18n("Always check twice for hosts when searching"),advGrid);
+ new TQWidget(advGrid);
- label=new QLabel(i18n("Wait for replies from hosts after first scan:"),advGrid);
- QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- m_firstWait=new QSpinBox(10,1000,50,advGrid);
+ label=new TQLabel(i18n("Wait for replies from hosts after first scan:"),advGrid);
+ TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ m_firstWait=new TQSpinBox(10,1000,50,advGrid);
m_firstWait->setSuffix(i18n(" ms"));
- QToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ TQToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- label=new QLabel(i18n("Wait for replies from hosts after second scan:"),advGrid);
- QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- m_secondWait=new QSpinBox(0,1000,50,advGrid);
+ label=new TQLabel(i18n("Wait for replies from hosts after second scan:"),advGrid);
+ TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ m_secondWait=new TQSpinBox(0,1000,50,advGrid);
m_secondWait->setSuffix(i18n(" ms"));
- QToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
+ TQToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts"));
- label=new QLabel(i18n("Max. number of ping packets to send at once:"),advGrid);
- m_maxPingsAtOnce=new QSpinBox(8,1024,5,advGrid);
+ label=new TQLabel(i18n("Max. number of ping packets to send at once:"),advGrid);
+ m_maxPingsAtOnce=new TQSpinBox(8,1024,5,advGrid);
- QWidget *dummy=new QWidget(advGrid);
+ TQWidget *dummy=new TQWidget(advGrid);
dummy->setMinimumHeight(10);
- connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool)));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool)));
- connect(m_allowedAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed()));
+ connect(m_allowedAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed()));
- connect(m_allowedAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed()));
+ connect(m_allowedAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed()));
- connect(m_firstWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_secondWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_maxPingsAtOnce,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_secondScan,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_deliverUnnamedHosts,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_updatePeriod,SIGNAL(valueChanged(int)),this,SIGNAL(changed()));
- connect(m_pingNames,SIGNAL(changed()),this,SIGNAL(changed()));
- connect(m_useNmblookup,SIGNAL(toggled(bool)),this,SIGNAL(changed()));
- connect(m_suggestSettings,SIGNAL(clicked()),this,SLOT(suggestSettings()));
- connect(m_rlanSidebar,SIGNAL(clicked()),this,SIGNAL(changed()));
+ connect(m_firstWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_secondWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_maxPingsAtOnce,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_deliverUnnamedHosts,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_updatePeriod,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed()));
+ connect(m_pingNames,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed()));
+ connect(m_useNmblookup,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed()));
+ connect(m_suggestSettings,TQT_SIGNAL(clicked()),this,TQT_SLOT(suggestSettings()));
+ connect(m_rlanSidebar,TQT_SIGNAL(clicked()),this,TQT_SIGNAL(changed()));
load();
}
@@ -193,7 +193,7 @@ void ResLisaSettings::save()
m_config.writeEntry("UpdatePeriod",m_updatePeriod->value());
m_config.writeEntry("AllowedAddresses",m_allowedAddresses->text());
//m_config.writeEntry("BroadcastNetwork",m_broadcastNetwork->text());
- QStringList writeStuff;
+ TQStringList writeStuff;
for (int i=0; i<m_pingNames->count(); i++)
writeStuff.append(m_pingNames->text(i));
m_config.writeEntry("PingNames",writeStuff,';');
@@ -217,8 +217,8 @@ void ResLisaSettings::suggestSettings()
}
MyNIC *nic=nics->first();
- QString address = nic->addr;
- QString netmask = nic->netmask;
+ TQString address = nic->addr;
+ TQString netmask = nic->netmask;
m_allowedAddresses->setText(address+"/"+netmask+";");
m_secondWait->setValue(0);
m_secondScan->setChecked(FALSE);
@@ -229,7 +229,7 @@ void ResLisaSettings::suggestSettings()
m_useNmblookup->setChecked(true);
if (nics->count()>1)
{
- QString msg(i18n("You have more than one network interface installed.<br>"
+ TQString msg(i18n("You have more than one network interface installed.<br>"
"Please make sure the suggested settings are correct.<br>"
"<br>The following interfaces were found:<br><br>"));
//not that easy to handle
@@ -237,9 +237,9 @@ void ResLisaSettings::suggestSettings()
{
msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>";
}
- KMessageBox::information(0,QString("<html>%1</html>").arg(msg));
+ KMessageBox::information(0,TQString("<html>%1</html>").arg(msg));
}
- KMessageBox::information(0,QString("<html>%1</html>").arg(i18n("The ResLISa daemon is now configured "
+ KMessageBox::information(0,TQString("<html>%1</html>").arg(i18n("The ResLISa daemon is now configured "
"correctly, hopefully.<br>Make sure that the reslisa binary is installed <i>suid root</i>.")));
emit changed();
diff --git a/lanbrowsing/kcmlisa/kcmreslisa.h b/lanbrowsing/kcmlisa/kcmreslisa.h
index 6247cc81..adadd1cd 100644
--- a/lanbrowsing/kcmlisa/kcmreslisa.h
+++ b/lanbrowsing/kcmlisa/kcmreslisa.h
@@ -36,7 +36,7 @@ class ResLisaSettings:public KCModule
{
Q_OBJECT
public:
- ResLisaSettings(const QString& config, QWidget *parent=0);
+ ResLisaSettings(const TQString& config, TQWidget *parent=0);
virtual ~ResLisaSettings() {}
void load();
void save();
@@ -47,19 +47,19 @@ class ResLisaSettings:public KCModule
protected:
KConfig m_config;
KConfig m_kiolanConfig;
- QPushButton* m_advancedSettingsButton;
- QPushButton* m_suggestSettings;
- QCheckBox* m_useNmblookup;
+ TQPushButton* m_advancedSettingsButton;
+ TQPushButton* m_suggestSettings;
+ TQCheckBox* m_useNmblookup;
KEditListBox *m_pingNames;
KRestrictedLine *m_allowedAddresses;
- QSpinBox *m_firstWait;
- QCheckBox *m_secondScan;
- QSpinBox *m_secondWait;
- QSpinBox *m_updatePeriod;
- QCheckBox *m_deliverUnnamedHosts;
- QSpinBox *m_maxPingsAtOnce;
- QCheckBox* m_rlanSidebar;
+ TQSpinBox *m_firstWait;
+ TQCheckBox *m_secondScan;
+ TQSpinBox *m_secondWait;
+ TQSpinBox *m_updatePeriod;
+ TQCheckBox *m_deliverUnnamedHosts;
+ TQSpinBox *m_maxPingsAtOnce;
+ TQCheckBox* m_rlanSidebar;
KDialogBase* m_reslisaAdvancedDlg;
};
diff --git a/lanbrowsing/kcmlisa/main.cpp b/lanbrowsing/kcmlisa/main.cpp
index 7e68d345..00d03e52 100644
--- a/lanbrowsing/kcmlisa/main.cpp
+++ b/lanbrowsing/kcmlisa/main.cpp
@@ -21,8 +21,8 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qdir.h>
-#include <qdatetime.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
#include <unistd.h>
#include <sys/types.h>
@@ -33,15 +33,15 @@
extern "C"
{
- KDE_EXPORT KCModule *create_lisa(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_lisa(TQWidget *parent, const char *)
{
return new LisaSettings("/etc/lisarc", parent);
}
- KDE_EXPORT KCModule *create_reslisa(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_reslisa(TQWidget *parent, const char *)
{
- return new ResLisaSettings(QDir::homeDirPath()+"/.reslisarc", parent);
+ return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", parent);
}
- KDE_EXPORT KCModule *create_kiolan(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_kiolan(TQWidget *parent, const char *)
{
return new IOSlaveSettings("kio_lanrc", parent);
}
diff --git a/lanbrowsing/kcmlisa/portsettingsbar.cpp b/lanbrowsing/kcmlisa/portsettingsbar.cpp
index 540ea894..3e94c730 100644
--- a/lanbrowsing/kcmlisa/portsettingsbar.cpp
+++ b/lanbrowsing/kcmlisa/portsettingsbar.cpp
@@ -21,20 +21,20 @@
#include "portsettingsbar.h"
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
-PortSettingsBar::PortSettingsBar(const QString& title, QWidget *parent)
-:QHBox(parent)
+PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *parent)
+:TQHBox(parent)
{
- QLabel* label=new QLabel(title, this);
- m_box=new QComboBox(this);
+ TQLabel* label=new TQLabel(title, this);
+ m_box=new TQComboBox(this);
label->setBuddy(m_box);
m_box->insertItem(i18n("Check Availability"));
m_box->insertItem(i18n("Always"));
m_box->insertItem(i18n("Never"));
- connect(m_box,SIGNAL(activated(int)),this,SIGNAL(changed()));
+ connect(m_box,TQT_SIGNAL(activated(int)),this,TQT_SIGNAL(changed()));
}
int PortSettingsBar::selected() const
diff --git a/lanbrowsing/kcmlisa/portsettingsbar.h b/lanbrowsing/kcmlisa/portsettingsbar.h
index 35c372f5..150390dc 100644
--- a/lanbrowsing/kcmlisa/portsettingsbar.h
+++ b/lanbrowsing/kcmlisa/portsettingsbar.h
@@ -21,8 +21,8 @@
#ifndef PORTSETTINGSBAR_H
#define PORTSETTINGSBAR_H
-#include <qhbox.h>
-#include <qcombobox.h>
+#include <tqhbox.h>
+#include <tqcombobox.h>
#define PORTSETTINGS_CHECK 0
#define PORTSETTINGS_PROVIDE 1
@@ -32,14 +32,14 @@ class PortSettingsBar:public QHBox
{
Q_OBJECT
public:
- PortSettingsBar(const QString& title, QWidget *parent=0);
+ PortSettingsBar(const TQString& title, TQWidget *parent=0);
virtual ~PortSettingsBar() {};
int selected() const;
void setChecked(int what);
signals:
void changed();
protected:
- QComboBox *m_box;
+ TQComboBox *m_box;
};
#endif
diff --git a/lanbrowsing/kcmlisa/setupwizard.cpp b/lanbrowsing/kcmlisa/setupwizard.cpp
index 8b304359..fbe8db4e 100644
--- a/lanbrowsing/kcmlisa/setupwizard.cpp
+++ b/lanbrowsing/kcmlisa/setupwizard.cpp
@@ -20,7 +20,7 @@
#include "setupwizard.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdialog.h>
@@ -31,8 +31,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo)
- :QWizard(parent,"hallo",true)
+SetupWizard::SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo)
+ :TQWizard(parent,"hallo",true)
,m_page1(0)
,m_noNicPage(0)
,m_multiNicPage(0)
@@ -60,7 +60,7 @@ SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo)
,m_nics(0)
,m_configInfo(configInfo)
{
- QString title( i18n("LISa Network Neighborhood Setup") );
+ TQString title( i18n("LISa Network Neighborhood Setup") );
setCaption(title);
m_configInfo->clear();
@@ -121,9 +121,9 @@ void SetupWizard::clearAll()
void SetupWizard::setupPage1()
{
- m_page1 = new QVBox( this );
+ m_page1 = new TQVBox( this );
- new QLabel(i18n("<qt><p>This wizard will ask you a few questions about your network.</p> "
+ new TQLabel(i18n("<qt><p>This wizard will ask you a few questions about your network.</p> "
"<p>Usually you can simply keep the suggested settings.</p> "
"<p>After you have finished the wizard, you will be able to browse and use "
"shared resources on your LAN, not only Samba/Windows shares, but also "
@@ -134,7 +134,7 @@ void SetupWizard::setupPage1()
"only one LISa server can run on one machine.</qt>"),
m_page1);
- QWidget *dummy=new QWidget(m_page1);
+ TQWidget *dummy=new TQWidget(m_page1);
m_page1->setStretchFactor(dummy,10);
m_page1->setSpacing(KDialog::spacingHint());
m_page1->setMargin(KDialog::marginHint());
@@ -145,23 +145,23 @@ void SetupWizard::setupPage1()
void SetupWizard::setupMultiNicPage()
{
- m_multiNicPage=new QVBox(this);
- new QLabel(i18n("<qt><p>More than one network interface card was found on your system.</p>"
+ m_multiNicPage=new TQVBox(this);
+ new TQLabel(i18n("<qt><p>More than one network interface card was found on your system.</p>"
"<p>Please choose the one to which your LAN is connected.</p></qt>"),
m_multiNicPage);
m_multiNicPage->setMargin(KDialog::marginHint());
m_multiNicPage->setSpacing(KDialog::spacingHint());
- m_nicListBox=new QListBox(m_multiNicPage);
- m_nicListBox->setSelectionMode(QListBox::Single);
+ m_nicListBox=new TQListBox(m_multiNicPage);
+ m_nicListBox->setSelectionMode(TQListBox::Single);
setHelpEnabled( m_multiNicPage, false );
}
void SetupWizard::setupNoNicPage()
{
- m_noNicPage=new QVBox(this);
- new QLabel(i18n("<qt><p><b>No network interface card was found on your system.</b></p>"
+ m_noNicPage=new TQVBox(this);
+ new TQLabel(i18n("<qt><p><b>No network interface card was found on your system.</b></p>"
"<p>Possible reason: no network card is installed. You probably want to cancel now "
"or enter your IP address and network manually</p>"
"Example: <code>192.168.0.1/255.255.255.0</code>.</qt>"),
@@ -170,8 +170,8 @@ void SetupWizard::setupNoNicPage()
m_noNicPage->setMargin(KDialog::marginHint());
m_noNicPage->setSpacing(KDialog::spacingHint());
m_manualAddress=new KRestrictedLine(m_noNicPage,"0123456789./");
- connect(m_manualAddress,SIGNAL(textChanged(const QString&)),this,SLOT(checkIPAddress(const QString&)));
- QWidget *dummy=new QWidget(m_noNicPage);
+ connect(m_manualAddress,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(checkIPAddress(const TQString&)));
+ TQWidget *dummy=new TQWidget(m_noNicPage);
m_noNicPage->setStretchFactor(dummy,10);
setNextEnabled(m_noNicPage, false);
@@ -181,24 +181,24 @@ void SetupWizard::setupNoNicPage()
void SetupWizard::setupSearchPage()
{
- m_searchPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage);
+ m_searchPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage);
info->setTextFormat(Qt::RichText);
- m_ping=new QCheckBox(i18n("Send pings"), m_searchPage);
- info=new QLabel(i18n("All hosts with TCP/IP will respond,<br>"
+ m_ping=new TQCheckBox(i18n("Send pings"), m_searchPage);
+ info=new TQLabel(i18n("All hosts with TCP/IP will respond,<br>"
"whether or not they are samba servers.<br>"
"Don\'t use it if your network is very large, i.e. more than 1000 hosts.<br>"),m_searchPage);
- m_nmblookup=new QCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage);
- info=new QLabel(i18n("You need to have the samba package (nmblookup) installed.<br>"
+ m_nmblookup=new TQCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage);
+ info=new TQLabel(i18n("You need to have the samba package (nmblookup) installed.<br>"
"Only samba/windows servers will respond.<br>"
"This method is not very reliable.<br>"
"You should enable it if you are part of a large network."),m_searchPage);
info->setTextFormat(Qt::RichText);
- QWidget *dummy=new QWidget(m_searchPage);
+ TQWidget *dummy=new TQWidget(m_searchPage);
m_searchPage->setStretchFactor(dummy,10);
m_searchPage->setSpacing(KDialog::spacingHint());
m_searchPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"),m_searchPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"),m_searchPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_searchPage, false );
@@ -206,13 +206,13 @@ void SetupWizard::setupSearchPage()
void SetupWizard::setupAddressesPage()
{
- m_addressesPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("All IP addresses included in the specified range will be pinged.<br>"
+ m_addressesPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("All IP addresses included in the specified range will be pinged.<br>"
"If you are part of a small network, e.g. with network mask 255.255.255.0<br>"
"use your IP address/network mask.<br>"),m_addressesPage);
info->setTextFormat(Qt::RichText);
m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-");
- info=new QLabel(i18n("<br>There are four ways to specify address ranges:<br>"
+ info=new TQLabel(i18n("<br>There are four ways to specify address ranges:<br>"
"1. IP address/network mask, like <code>192.168.0.0/255.255.255.0;</code><br>"
"2. single IP addresses, like <code>10.0.0.23;</code><br>"
"3. continuous ranges, like <code>10.0.1.0-10.0.1.200;</code><br>"
@@ -220,11 +220,11 @@ void SetupWizard::setupAddressesPage()
"You can also enter combinations of 1 to 4, separated by \";\", like<br>"
"<code>192.168.0.0/255.255.255.0;10.0.0.0;10.0.1.1-10.0.1.100;</code><br>"),m_addressesPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_addressesPage);
+ TQWidget *dummy=new TQWidget(m_addressesPage);
m_addressesPage->setStretchFactor(dummy,10);
m_addressesPage->setSpacing(KDialog::spacingHint());
m_addressesPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_addressesPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_addressesPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_addressesPage, false );
@@ -232,21 +232,21 @@ void SetupWizard::setupAddressesPage()
void SetupWizard::setupAllowedPage()
{
- m_allowedAddressesPage=new QVBox(this);
- QLabel* info=new QLabel(i18n("This is a security related setting.<br>"
+ m_allowedAddressesPage=new TQVBox(this);
+ TQLabel* info=new TQLabel(i18n("This is a security related setting.<br>"
"It provides a simple IP address based way to specify \"trusted\" hosts.<br>"
"Only hosts which fit into the addresses given here are accepted by LISa as clients. "
"The list of hosts published by LISa will also only contain hosts which fit into this scheme.<br>"
"Usually you enter your IP address/network mask here."),m_allowedAddressesPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_allowedAddresses=new KRestrictedLine(m_allowedAddressesPage,"0123456789./-;");
- m_trustedHostsLabel=new QLabel(m_allowedAddressesPage);
+ m_trustedHostsLabel=new TQLabel(m_allowedAddressesPage);
- QWidget *dummy=new QWidget(m_allowedAddressesPage);
+ TQWidget *dummy=new TQWidget(m_allowedAddressesPage);
m_allowedAddressesPage->setStretchFactor(dummy,10);
m_allowedAddressesPage->setSpacing(KDialog::spacingHint());
m_allowedAddressesPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_allowedAddressesPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_allowedAddressesPage);
info->setAlignment(AlignRight|AlignVCenter);
setHelpEnabled( m_allowedAddressesPage, false );
@@ -254,19 +254,19 @@ void SetupWizard::setupAllowedPage()
void SetupWizard::setupBcastPage()
{
- m_bcastPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
+ m_bcastPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./");
- info=new QLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>"
+ info=new TQLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>"
"cooperate with each other. Therefore you have to enter the broadcast<br>"
"address here. If you are connected to more than one network, choose <br>"
"one of the broadcast addresses."),m_bcastPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_bcastPage);
+ TQWidget *dummy=new TQWidget(m_bcastPage);
m_bcastPage->setStretchFactor(dummy,10);
m_bcastPage->setSpacing(KDialog::spacingHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_bcastPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_bcastPage);
info->setAlignment(AlignRight|AlignVCenter);
m_bcastPage->setSpacing(KDialog::spacingHint());
@@ -276,23 +276,23 @@ void SetupWizard::setupBcastPage()
void SetupWizard::setupUpdateIntervalPage()
{
- m_intervalPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage);
+ m_intervalPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage);
info->setTextFormat(Qt::RichText);
- m_updatePeriod=new QSpinBox(300,1800,10,m_intervalPage);
+ m_updatePeriod=new TQSpinBox(300,1800,10,m_intervalPage);
m_updatePeriod->setSuffix(i18n(" sec"));
- info=new QLabel(i18n("<br>Please note that the update interval will grow automatically by "
+ info=new TQLabel(i18n("<br>Please note that the update interval will grow automatically by "
"up to 16 times the value you enter here, if nobody accesses the LISa server. "
"So if you enter 300 sec = 5 min here, this does not mean that LISa will ping "
"your whole network every 5 minutes. The interval will increase up to 16 x 5 min = 80 min."),m_intervalPage);
info->setAlignment(AlignLeft|AlignVCenter|WordBreak);
- QWidget *dummy=new QWidget(m_intervalPage);
+ TQWidget *dummy=new TQWidget(m_intervalPage);
m_intervalPage->setStretchFactor(dummy,10);
m_intervalPage->setSpacing(KDialog::spacingHint());
m_intervalPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_intervalPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_intervalPage);
info->setAlignment(AlignRight|AlignVCenter);
info->setTextFormat(Qt::RichText);
@@ -301,53 +301,53 @@ void SetupWizard::setupUpdateIntervalPage()
void SetupWizard::setupAdvancedSettingsPage()
{
- m_advancedPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("This page contains several settings you usually only<br>"
+ m_advancedPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("This page contains several settings you usually only<br>"
"need if LISa doesn't find all hosts in your network."),m_advancedPage);
info->setTextFormat(Qt::RichText);
- m_deliverUnnamedHosts=new QCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage);
- info=new QLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?<br>"),m_advancedPage);
+ m_deliverUnnamedHosts=new TQCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage);
+ info=new TQLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?<br>"),m_advancedPage);
- QHBox* hbox=new QHBox(m_advancedPage);
+ TQHBox* hbox=new TQHBox(m_advancedPage);
- info=new QLabel(i18n("Wait for replies after first scan"),hbox);
- m_firstWait=new QSpinBox(10,1000,50,hbox);
+ info=new TQLabel(i18n("Wait for replies after first scan"),hbox);
+ m_firstWait=new TQSpinBox(10,1000,50,hbox);
m_firstWait->setSuffix(i18n(" ms"));
- info=new QLabel(i18n("How long should LISa wait for answers to pings?<br>"
+ info=new TQLabel(i18n("How long should LISa wait for answers to pings?<br>"
"If LISa doesn\'t find all hosts, try to increase this value.<br>"),m_advancedPage);
- hbox=new QHBox(m_advancedPage);
- info=new QLabel(i18n("Max. number of pings to send at once"),hbox);
+ hbox=new TQHBox(m_advancedPage);
+ info=new TQLabel(i18n("Max. number of pings to send at once"),hbox);
info->setTextFormat(Qt::RichText);
- m_maxPingsAtOnce=new QSpinBox(8,1024,5,hbox);
- info=new QLabel(i18n("How many ping packets should LISa send at once?<br>"
+ m_maxPingsAtOnce=new TQSpinBox(8,1024,5,hbox);
+ info=new TQLabel(i18n("How many ping packets should LISa send at once?<br>"
"If LISa doesn't find all hosts you could try to decrease this value.<br>"),m_advancedPage);
- m_secondScan=new QCheckBox(i18n("Al&ways scan twice"),m_advancedPage);
+ m_secondScan=new TQCheckBox(i18n("Al&ways scan twice"),m_advancedPage);
- hbox=new QHBox(m_advancedPage);
+ hbox=new TQHBox(m_advancedPage);
// hbox->setSpacing(10); // WTF?
- info=new QLabel(i18n("Wait for replies after second scan"),hbox);
+ info=new TQLabel(i18n("Wait for replies after second scan"),hbox);
info->setTextFormat(Qt::RichText);
- m_secondWait=new QSpinBox(0,1000,50,hbox);
+ m_secondWait=new TQSpinBox(0,1000,50,hbox);
m_secondWait->setSuffix(i18n(" ms"));
- info=new QLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage);
+ info=new TQLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage);
//this would make the dialog to large
//m_advancedPage->setSpacing(KDialog::spacingHint());
//m_advancedPage->setMargin(KDialog::marginHint());
- info=new QLabel(i18n("<b>If unsure, keep it as is.</b>"), m_advancedPage);
+ info=new TQLabel(i18n("<b>If unsure, keep it as is.</b>"), m_advancedPage);
info->setAlignment(AlignRight|AlignVCenter);
- connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool)));
+ connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool)));
setHelpEnabled( m_advancedPage, false );
}
void SetupWizard::setupFinalPage()
{
- m_finalPage=new QVBox(this);
- QLabel *info=new QLabel(i18n("<br>Your LAN browsing has been successfully set up.<br><br>"
+ m_finalPage=new TQVBox(this);
+ TQLabel *info=new TQLabel(i18n("<br>Your LAN browsing has been successfully set up.<br><br>"
"Make sure that the LISa server is started during the "
"boot process. How this is done depends on your "
"distribution and OS. Usually you have to insert it somewhere "
@@ -357,7 +357,7 @@ void SetupWizard::setupFinalPage()
"To test the server, try <code>lan:/</code> in Konqueror.<br><br>"
"If you have problems or suggestions, visit http://lisa-home.sourceforge.net."),m_finalPage);
info->setTextFormat(Qt::RichText);
- QWidget *dummy=new QWidget(m_finalPage);
+ TQWidget *dummy=new TQWidget(m_finalPage);
m_finalPage->setStretchFactor(dummy,10);
m_finalPage->setSpacing(KDialog::spacingHint());
m_finalPage->setMargin(KDialog::marginHint());
@@ -398,7 +398,7 @@ void SetupWizard::next()
m_nicListBox->clear();
for (MyNIC *nic=m_nics->first(); nic!=0; nic=m_nics->next())
{
- QString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";";
+ TQString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";";
m_nicListBox->insertItem(tmp);
}
m_nicListBox->setSelected(0,true);
@@ -406,7 +406,7 @@ void SetupWizard::next()
}
else if (currentPage()==m_multiNicPage)
{
- QString nic=m_nicListBox->currentText();
+ TQString nic=m_nicListBox->currentText();
unsigned int i=0;
for (i=0; i<m_nicListBox->count(); i++)
{
@@ -438,10 +438,10 @@ void SetupWizard::next()
}
setAppropriate(m_advancedPage, m_ping->isChecked());
}
- QWizard::next();
+ TQWizard::next();
}
-void SetupWizard::showPage(QWidget* page)
+void SetupWizard::showPage(TQWidget* page)
{
if (page==m_noNicPage)
{
@@ -457,7 +457,7 @@ void SetupWizard::showPage(QWidget* page)
m_pingAddresses->setFocus();
else if (page==m_allowedAddressesPage)
{
- QString text;
+ TQString text;
if (m_ping->isChecked())
text+=i18n("You can use the same syntax as on the previous page.<br>");
else
@@ -479,7 +479,7 @@ void SetupWizard::showPage(QWidget* page)
else if (page==m_finalPage)
setFinishEnabled(m_finalPage,true);
- QWizard::showPage(page);
+ TQWizard::showPage(page);
}
void SetupWizard::setupRest()
@@ -538,13 +538,13 @@ void SetupWizard::accept()
m_configInfo->updatePeriod=m_updatePeriod->value();
m_configInfo->useNmblookup=m_nmblookup->isChecked();
m_configInfo->unnamedHosts=m_deliverUnnamedHosts->isChecked();
- QWizard::accept();
+ TQWizard::accept();
}
-void SetupWizard::checkIPAddress(const QString& addr)
+void SetupWizard::checkIPAddress(const TQString& addr)
{
- QString address=addr.simplifyWhiteSpace();
- QRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$");
+ TQString address=addr.simplifyWhiteSpace();
+ TQRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$");
setNextEnabled(m_noNicPage, (regex.search(address,0)!=-1));
// setNextEnabled(m_noNicPage, (regex.find(address,0)!=-1));
}
diff --git a/lanbrowsing/kcmlisa/setupwizard.h b/lanbrowsing/kcmlisa/setupwizard.h
index b85d61c4..8ccd2a15 100644
--- a/lanbrowsing/kcmlisa/setupwizard.h
+++ b/lanbrowsing/kcmlisa/setupwizard.h
@@ -27,15 +27,15 @@
#include "findnic.h"
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
#include <krestrictedline.h>
-#include <qwizard.h>
+#include <tqwizard.h>
#include <kglobal.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqvbox.h>
#include <kcmodule.h>
@@ -44,14 +44,14 @@ class SetupWizard:public QWizard
{
Q_OBJECT
public:
- SetupWizard(QWidget* parent, LisaConfigInfo* configInfo);
+ SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo);
~SetupWizard();
- virtual void showPage(QWidget* page);
+ virtual void showPage(TQWidget* page);
void clearAll();
protected slots:
virtual void next();
virtual void accept();
- void checkIPAddress(const QString& address);
+ void checkIPAddress(const TQString& address);
protected:
void applyLisaConfigInfo(LisaConfigInfo& lci);
@@ -67,32 +67,32 @@ class SetupWizard:public QWizard
void setupFinalPage();
void setupRest();
- QVBox* m_page1;
- QVBox* m_noNicPage;
- QVBox* m_multiNicPage;
- QVBox* m_searchPage;
- QVBox* m_addressesPage;
- QVBox* m_allowedAddressesPage;
- QVBox* m_bcastPage;
- QVBox* m_intervalPage;
- QVBox* m_advancedPage;
- QVBox* m_finalPage;
+ TQVBox* m_page1;
+ TQVBox* m_noNicPage;
+ TQVBox* m_multiNicPage;
+ TQVBox* m_searchPage;
+ TQVBox* m_addressesPage;
+ TQVBox* m_allowedAddressesPage;
+ TQVBox* m_bcastPage;
+ TQVBox* m_intervalPage;
+ TQVBox* m_advancedPage;
+ TQVBox* m_finalPage;
- QListBox *m_nicListBox;
- QLabel *m_trustedHostsLabel;
- QCheckBox *m_ping;
- QCheckBox *m_nmblookup;
+ TQListBox *m_nicListBox;
+ TQLabel *m_trustedHostsLabel;
+ TQCheckBox *m_ping;
+ TQCheckBox *m_nmblookup;
KRestrictedLine* m_pingAddresses;
KRestrictedLine* m_allowedAddresses;
KRestrictedLine* m_bcastAddress;
KRestrictedLine* m_manualAddress;
- QSpinBox* m_updatePeriod;
- QCheckBox* m_deliverUnnamedHosts;
- QSpinBox* m_firstWait;
- QSpinBox* m_maxPingsAtOnce;
- QCheckBox* m_secondScan;
- QSpinBox* m_secondWait;
+ TQSpinBox* m_updatePeriod;
+ TQCheckBox* m_deliverUnnamedHosts;
+ TQSpinBox* m_firstWait;
+ TQSpinBox* m_maxPingsAtOnce;
+ TQCheckBox* m_secondScan;
+ TQSpinBox* m_secondWait;
NICList* m_nics;
LisaConfigInfo* m_configInfo;
diff --git a/lanbrowsing/kio_lan/kio_lan.cpp b/lanbrowsing/kio_lan/kio_lan.cpp
index 89de40da..c1d79695 100644
--- a/lanbrowsing/kio_lan/kio_lan.cpp
+++ b/lanbrowsing/kio_lan/kio_lan.cpp
@@ -28,7 +28,7 @@
#include <kglobal.h>
#include <kprocess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <iostream>
#include <string.h>
@@ -87,7 +87,7 @@ int kdemain( int argc, char **argv )
return 0;
}
-LANProtocol::LANProtocol(int isLanIoslave, const QCString &pool, const QCString &app )
+LANProtocol::LANProtocol(int isLanIoslave, const TQCString &pool, const TQCString &app )
:TCPSlaveBase(7741,isLanIoslave?"lan":"rlan", pool, app)
,m_currentHost("")
,m_port(7741)
@@ -275,7 +275,7 @@ int LANProtocol::rlanReadDataFromServer()
sockaddr_un addr;
memset((char*)&addr,0,sizeof(addr));
addr.sun_family=AF_LOCAL;
- QCString socketname="/tmp/resLisa-";
+ TQCString socketname="/tmp/resLisa-";
struct passwd *user = getpwuid( getuid() );
if ( user )
@@ -441,11 +441,11 @@ int LANProtocol::rlanReadDataFromServer()
return 1;
}
-int LANProtocol::checkHost(const QString& host)
+int LANProtocol::checkHost(const TQString& host)
{
kdDebug(7101)<<"LAN::checkHost() "<<host<<endl;
- QString hostUpper=host.upper();
+ TQString hostUpper=host.upper();
HostInfo* hostInfo=m_hostInfoCache[hostUpper];
if (hostInfo!=0)
{
@@ -559,7 +559,7 @@ int LANProtocol::checkHost(const QString& host)
// by checking all the ports in '_ports', using a non-blocking connect.
// Right now -- assume if *any* of these ports are active,
// the service is active.
-int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
+int LANProtocol::checkPort( TQValueVector<int>& _ports, in_addr ip )
{
int _port=0;
struct sockaddr_in to_scan;
@@ -567,7 +567,7 @@ int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
to_scan.sin_family = AF_INET;
to_scan.sin_addr = ip;
- for (QValueVector<int>::iterator i= _ports.begin(); i != _ports.end(); i++)
+ for (TQValueVector<int>::iterator i= _ports.begin(); i != _ports.end(); i++)
{
_port=(*i);
kdDebug(7101)<<"LANProtocol::checkPort: "<<_port<<endl;
@@ -624,7 +624,7 @@ int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
}
-void LANProtocol::setHost( const QString& host, int port, const QString& , const QString& )
+void LANProtocol::setHost( const TQString& host, int port, const TQString& , const TQString& )
{
if (m_isLanIoslave)
{
@@ -645,8 +645,8 @@ void LANProtocol::setHost( const QString& host, int port, const QString& , const
void LANProtocol::mimetype( const KURL& url)
{
kdDebug(7101)<<"LANProtocol::mimetype -"<<url.prettyURL()<<"-"<<endl;
- QString path( QFile::encodeName(url.path()));
- QStringList pathList=QStringList::split( "/",path);
+ TQString path( TQFile::encodeName(url.path()));
+ TQStringList pathList=TQStringList::split( "/",path);
if ((pathList.count()==2) && (pathList[1].upper()=="HTTP"))
{
//kdDebug(7101)<<"LANProtocol::mimeType text/html"<<endl;
@@ -663,7 +663,7 @@ void LANProtocol::mimetype( const KURL& url)
void LANProtocol::listDir( const KURL& _url)
{
KURL url(_url);
- QString path( QFile::encodeName(url.path()));
+ TQString path( TQFile::encodeName(url.path()));
if (path.isEmpty())
{
url.setPath("/");
@@ -679,9 +679,9 @@ void LANProtocol::listDir( const KURL& _url)
return;
}
kdDebug(7101)<<"LANProtocol::listDir: host: "<<m_currentHost<<" port: "<<m_port<<" path: "<<path<<endl;
- QStringList pathList=QStringList::split("/", path);
+ TQStringList pathList=TQStringList::split("/", path);
kdDebug(7101)<<"parts are: "<<endl;
- for (QStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
+ for (TQStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
kdDebug(7101)<<"-"<<(*it)<<"-"<<endl;
if (pathList.count()>2)
{
@@ -745,8 +745,8 @@ void LANProtocol::stat( const KURL & url)
entry.append(atom);
- QString path( QFile::encodeName(url.path()));
- QStringList pathList=QStringList::split( "/",path);
+ TQString path( TQFile::encodeName(url.path()));
+ TQStringList pathList=TQStringList::split( "/",path);
if ((pathList.count()==2) && (pathList[1].upper()=="HTTP"))
{
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -774,12 +774,12 @@ void LANProtocol::stat( const KURL & url)
void LANProtocol::get(const KURL& url )
{
- QString path(QFile::encodeName(url.path()));
+ TQString path(TQFile::encodeName(url.path()));
kdDebug(7101)<<"LANProtocol::get: "<<path<<endl;
- QStringList pathList=QStringList::split("/", path);
+ TQStringList pathList=TQStringList::split("/", path);
kdDebug(7101)<<"parts are: "<<endl;
- for (QStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
+ for (TQStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
kdDebug(7101)<<"-"<<(*it)<<"-"<<endl;
if ((pathList.count()!=2) || (pathList[1].upper()!="HTTP"))
{
diff --git a/lanbrowsing/kio_lan/kio_lan.h b/lanbrowsing/kio_lan/kio_lan.h
index 9afecceb..1969700f 100644
--- a/lanbrowsing/kio_lan/kio_lan.h
+++ b/lanbrowsing/kio_lan/kio_lan.h
@@ -24,10 +24,10 @@
#include <kio/tcpslavebase.h>
#include <kio/global.h>
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qdict.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqdict.h>
#include <arpa/inet.h>
#include <sys/types.h>
@@ -44,7 +44,7 @@
struct MyProtocolInfo
{
int enabled;
- QValueVector<int> ports;
+ TQValueVector<int> ports;
//this should be large enough for things like "FTP" and so on
char name[NAMELEN];
};
@@ -58,10 +58,10 @@ struct HostInfo
class LANProtocol : public KIO::TCPSlaveBase
{
public:
- LANProtocol (int isLanIoSlave, const QCString &pool, const QCString &app );
+ LANProtocol (int isLanIoSlave, const TQCString &pool, const TQCString &app );
virtual ~LANProtocol();
- virtual void setHost( const QString& host, int port, const QString& user, const QString& pass );
+ virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass );
virtual void mimetype( const KURL& );
virtual void listDir( const KURL& url);
@@ -69,19 +69,19 @@ class LANProtocol : public KIO::TCPSlaveBase
virtual void get( const KURL& url );
protected:
- QDict<HostInfo> m_hostInfoCache;
+ TQDict<HostInfo> m_hostInfoCache;
int readDataFromServer();
int lanReadDataFromServer();
int rlanReadDataFromServer();
- int checkHost(const QString& host);
- int checkPort(QValueVector<int>& _ports, in_addr ip);
- QString m_currentHost;
+ int checkHost(const TQString& host);
+ int checkPort(TQValueVector<int>& _ports, in_addr ip);
+ TQString m_currentHost;
unsigned short int m_port;
MyProtocolInfo m_protocolInfo[KIOLAN_MAX];
int m_maxAge;
bool m_isLanIoslave;
bool m_shortHostnames;
- QString m_defaultLisaHost;
+ TQString m_defaultLisaHost;
};
#endif
diff --git a/librss/article.cpp b/librss/article.cpp
index e283b5c5..4161e0d5 100644
--- a/librss/article.cpp
+++ b/librss/article.cpp
@@ -15,18 +15,18 @@
#include <kurl.h>
#include <kurllabel.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
using namespace RSS;
struct Article::Private : public Shared
{
- QString title;
+ TQString title;
KURL link;
- QString description;
- QDateTime pubDate;
- QString guid;
+ TQString description;
+ TQDateTime pubDate;
+ TQString guid;
bool guidIsPermaLink;
};
@@ -39,17 +39,17 @@ Article::Article(const Article &other) : d(0)
*this = other;
}
-Article::Article(const QDomNode &node) : d(new Private)
+Article::Article(const TQDomNode &node) : d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("pubDate"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::fromLatin1("pubDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -57,7 +57,7 @@ Article::Article(const QDomNode &node) : d(new Private)
*/
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull()) {
time_t _time = KRFCDate::parseDateISO8601(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -66,12 +66,12 @@ Article::Article(const QDomNode &node) : d(new Private)
d->pubDate.setTime_t(_time);
}
- QDomNode n = node.namedItem(QString::fromLatin1("guid"));
+ TQDomNode n = node.namedItem(TQString::fromLatin1("guid"));
if (!n.isNull()) {
d->guidIsPermaLink = true;
- if (n.toElement().attribute(QString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
+ if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
- if (!(elemText = extractNode(node, QString::fromLatin1("guid"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("guid"))).isNull())
d->guid = elemText;
}
}
@@ -82,7 +82,7 @@ Article::~Article()
delete d;
}
-QString Article::title() const
+TQString Article::title() const
{
return d->title;
}
@@ -92,12 +92,12 @@ const KURL &Article::link() const
return d->link;
}
-QString Article::description() const
+TQString Article::description() const
{
return d->description;
}
-QString Article::guid() const
+TQString Article::guid() const
{
return d->guid;
}
@@ -107,12 +107,12 @@ bool Article::guidIsPermaLink() const
return d->guidIsPermaLink;
}
-const QDateTime &Article::pubDate() const
+const TQDateTime &Article::pubDate() const
{
return d->pubDate;
}
-KURLLabel *Article::widget(QWidget *parent, const char *name) const
+KURLLabel *Article::widget(TQWidget *parent, const char *name) const
{
KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name);
label->setUseTips(true);
diff --git a/librss/article.h b/librss/article.h
index 865a6bbc..d6c4a937 100644
--- a/librss/article.h
+++ b/librss/article.h
@@ -36,7 +36,7 @@ namespace RSS
/**
* A list of articles.
*/
- typedef QValueList<Article> List;
+ typedef TQValueList<Article> List;
/**
* Default constructor.
@@ -51,10 +51,10 @@ namespace RSS
/**
* Constructs an Article from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Article.
*/
- Article(const QDomNode &node);
+ Article(const TQDomNode &node);
/**
* Assignment operator.
@@ -86,10 +86,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The headline of this article, or QString::null if
+ * @return The headline of this article, or TQString::null if
* no headline was available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -102,20 +102,20 @@ namespace RSS
/**
* RSS 0.91 and upwards
- * @return A story synopsis, or QString::null if no description
+ * @return A story synopsis, or TQString::null if no description
* was available.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 2.0 and upwards
* @return An article GUID (globally unique identifier).
*/
- QString guid() const;
+ TQString guid() const;
/**
* RSS 2.0 and upwards
- * @return If this article GUID is permalink. Has no meaning when guid() is QString::null.
+ * @return If this article GUID is permalink. Has no meaning when guid() is TQString::null.
*/
bool guidIsPermaLink() const;
@@ -123,7 +123,7 @@ namespace RSS
* RSS 2.0 and upwards
* @return The date when the article was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
/**
* @param parent The parent widget for the KURLLabel.
@@ -132,14 +132,14 @@ namespace RSS
* This makes building a user-interface which contains the
* information in this Article object more convenient.
* The returned KURLLabel's caption will be the title(), clicking
- * on it will emit the URL link(), and it has a QToolTip attached
+ * on it will emit the URL link(), and it has a TQToolTip attached
* to it which displays the description() (in case it has one,
* if there is no description, the URL which the label links to
* will be used).
* Note that you have to delete the KURLLabel object returned by
* this method yourself.
*/
- KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const;
+ KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const;
private:
struct Private;
diff --git a/librss/document.cpp b/librss/document.cpp
index 92f4093e..f551716a 100644
--- a/librss/document.cpp
+++ b/librss/document.cpp
@@ -18,9 +18,9 @@
#include <krfcdate.h>
#include <kurl.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
using namespace RSS;
@@ -37,20 +37,20 @@ struct Document::Private : public Shared
}
Version version;
- QString title;
- QString description;
+ TQString title;
+ TQString description;
KURL link;
Image *image;
TextInput *textInput;
Article::List articles;
Language language;
- QString copyright;
- QDateTime pubDate;
- QDateTime lastBuildDate;
- QString rating;
+ TQString copyright;
+ TQDateTime pubDate;
+ TQDateTime lastBuildDate;
+ TQString rating;
KURL docs;
- QString managingEditor;
- QString webMaster;
+ TQString managingEditor;
+ TQString webMaster;
HourList skipHours;
DayList skipDays;
};
@@ -64,13 +64,13 @@ Document::Document(const Document &other) : d(0)
*this = other;
}
-Document::Document(const QDomDocument &doc) : d(new Private)
+Document::Document(const TQDomDocument &doc) : d(new Private)
{
- QString elemText;
- QDomNode rootNode = doc.documentElement();
+ TQString elemText;
+ TQDomNode rootNode = doc.documentElement();
// Determine the version of the present RSS markup.
- QString attr = rootNode.toElement().attribute(QString::fromLatin1("xmlns"), QString::null);
+ TQString attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString::null);
if (!attr.isNull()) {
/*
* Hardcoding these URLs is actually a bad idea, since the DTD doesn't
@@ -80,256 +80,256 @@ Document::Document(const QDomDocument &doc) : d(new Private)
* distinguish the RSS versions by analyzing the relationship between
* the nodes.
*/
- if (attr == QString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/"))
+ if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/"))
d->version = v0_90;
- else if (attr == QString::fromLatin1("http://purl.org/rss/1.0/")) {
+ else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) {
d->version = v1_0;
}
} else {
- attr = rootNode.toElement().attribute(QString::fromLatin1("version"), QString::null);
+ attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString::null);
if (!attr.isNull()) {
- if (attr == QString::fromLatin1("0.91"))
+ if (attr == TQString::fromLatin1("0.91"))
d->version = v0_91;
- else if (attr == QString::fromLatin1("0.92"))
+ else if (attr == TQString::fromLatin1("0.92"))
d->version = v0_92;
- else if (attr == QString::fromLatin1("0.93"))
+ else if (attr == TQString::fromLatin1("0.93"))
d->version = v0_93;
- else if (attr == QString::fromLatin1("0.94"))
+ else if (attr == TQString::fromLatin1("0.94"))
d->version = v0_94;
- else if (attr == QString::fromLatin1("2.0") || attr == QString::fromLatin1("2"))
+ else if (attr == TQString::fromLatin1("2.0") || attr == TQString::fromLatin1("2"))
d->version = v2_0;
}
}
- QDomNode channelNode = rootNode.namedItem(QString::fromLatin1("channel"));
+ TQDomNode channelNode = rootNode.namedItem(TQString::fromLatin1("channel"));
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
/* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent
* node for <image>, <textinput> and <item> than RSS 0.91-0.94 and RSS 2.0.
*/
- QDomNode parentNode;
+ TQDomNode parentNode;
if (d->version == v0_90 || d->version == v1_0)
parentNode = rootNode;
else
parentNode = channelNode;
- QDomNode n = parentNode.namedItem(QString::fromLatin1("image"));
+ TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image"));
if (!n.isNull())
d->image = new Image(n);
- n = parentNode.namedItem(QString::fromLatin1("textinput"));
+ n = parentNode.namedItem(TQString::fromLatin1("textinput"));
if (!n.isNull())
d->textInput = new TextInput(n);
// Our (hopefully faster) version of elementsByTagName()
for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
- if (e.tagName() == QString::fromLatin1("item"))
+ const TQDomElement e = n.toElement();
+ if (e.tagName() == TQString::fromLatin1("item"))
d->articles.append(Article(e));
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("copyright"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull())
d->copyright = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("language"))).isNull()) {
- if (elemText == QString::fromLatin1("af"))
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("language"))).isNull()) {
+ if (elemText == TQString::fromLatin1("af"))
d->language = af;
- else if (elemText == QString::fromLatin1("sq"))
+ else if (elemText == TQString::fromLatin1("sq"))
d->language = sq;
- else if (elemText == QString::fromLatin1("eu"))
+ else if (elemText == TQString::fromLatin1("eu"))
d->language = eu;
- else if (elemText == QString::fromLatin1("be"))
+ else if (elemText == TQString::fromLatin1("be"))
d->language = be;
- else if (elemText == QString::fromLatin1("bg"))
+ else if (elemText == TQString::fromLatin1("bg"))
d->language = bg;
- else if (elemText == QString::fromLatin1("ca"))
+ else if (elemText == TQString::fromLatin1("ca"))
d->language = ca;
- else if (elemText == QString::fromLatin1("zh-cn"))
+ else if (elemText == TQString::fromLatin1("zh-cn"))
d->language = zh_cn;
- else if (elemText == QString::fromLatin1("zh-tw"))
+ else if (elemText == TQString::fromLatin1("zh-tw"))
d->language = zh_tw;
- else if (elemText == QString::fromLatin1("hr"))
+ else if (elemText == TQString::fromLatin1("hr"))
d->language = hr;
- else if (elemText == QString::fromLatin1("cs"))
+ else if (elemText == TQString::fromLatin1("cs"))
d->language = cs;
- else if (elemText == QString::fromLatin1("da"))
+ else if (elemText == TQString::fromLatin1("da"))
d->language = da;
- else if (elemText == QString::fromLatin1("nl"))
+ else if (elemText == TQString::fromLatin1("nl"))
d->language = nl;
- else if (elemText == QString::fromLatin1("nl-be"))
+ else if (elemText == TQString::fromLatin1("nl-be"))
d->language = nl_be;
- else if (elemText == QString::fromLatin1("nl-nl"))
+ else if (elemText == TQString::fromLatin1("nl-nl"))
d->language = nl_nl;
- else if (elemText == QString::fromLatin1("en"))
+ else if (elemText == TQString::fromLatin1("en"))
d->language = en;
- else if (elemText == QString::fromLatin1("en-au"))
+ else if (elemText == TQString::fromLatin1("en-au"))
d->language = en_au;
- else if (elemText == QString::fromLatin1("en-bz"))
+ else if (elemText == TQString::fromLatin1("en-bz"))
d->language = en_bz;
- else if (elemText == QString::fromLatin1("en-ca"))
+ else if (elemText == TQString::fromLatin1("en-ca"))
d->language = en_ca;
- else if (elemText == QString::fromLatin1("en-ie"))
+ else if (elemText == TQString::fromLatin1("en-ie"))
d->language = en_ie;
- else if (elemText == QString::fromLatin1("en-jm"))
+ else if (elemText == TQString::fromLatin1("en-jm"))
d->language = en_jm;
- else if (elemText == QString::fromLatin1("en-nz"))
+ else if (elemText == TQString::fromLatin1("en-nz"))
d->language = en_nz;
- else if (elemText == QString::fromLatin1("en-ph"))
+ else if (elemText == TQString::fromLatin1("en-ph"))
d->language = en_ph;
- else if (elemText == QString::fromLatin1("en-za"))
+ else if (elemText == TQString::fromLatin1("en-za"))
d->language = en_za;
- else if (elemText == QString::fromLatin1("en-tt"))
+ else if (elemText == TQString::fromLatin1("en-tt"))
d->language = en_tt;
- else if (elemText == QString::fromLatin1("en-gb"))
+ else if (elemText == TQString::fromLatin1("en-gb"))
d->language = en_gb;
- else if (elemText == QString::fromLatin1("en-us"))
+ else if (elemText == TQString::fromLatin1("en-us"))
d->language = en_us;
- else if (elemText == QString::fromLatin1("en-zw"))
+ else if (elemText == TQString::fromLatin1("en-zw"))
d->language = en_zw;
- else if (elemText == QString::fromLatin1("fo"))
+ else if (elemText == TQString::fromLatin1("fo"))
d->language = fo;
- else if (elemText == QString::fromLatin1("fi"))
+ else if (elemText == TQString::fromLatin1("fi"))
d->language = fi;
- else if (elemText == QString::fromLatin1("fr"))
+ else if (elemText == TQString::fromLatin1("fr"))
d->language = fr;
- else if (elemText == QString::fromLatin1("fr-be"))
+ else if (elemText == TQString::fromLatin1("fr-be"))
d->language = fr_be;
- else if (elemText == QString::fromLatin1("fr-ca"))
+ else if (elemText == TQString::fromLatin1("fr-ca"))
d->language = fr_ca;
- else if (elemText == QString::fromLatin1("fr-fr"))
+ else if (elemText == TQString::fromLatin1("fr-fr"))
d->language = fr_fr;
- else if (elemText == QString::fromLatin1("fr-lu"))
+ else if (elemText == TQString::fromLatin1("fr-lu"))
d->language = fr_lu;
- else if (elemText == QString::fromLatin1("fr-mc"))
+ else if (elemText == TQString::fromLatin1("fr-mc"))
d->language = fr_mc;
- else if (elemText == QString::fromLatin1("fr-ch"))
+ else if (elemText == TQString::fromLatin1("fr-ch"))
d->language = fr_ch;
- else if (elemText == QString::fromLatin1("gl"))
+ else if (elemText == TQString::fromLatin1("gl"))
d->language = gl;
- else if (elemText == QString::fromLatin1("gd"))
+ else if (elemText == TQString::fromLatin1("gd"))
d->language = gd;
- else if (elemText == QString::fromLatin1("de"))
+ else if (elemText == TQString::fromLatin1("de"))
d->language = de;
- else if (elemText == QString::fromLatin1("de-at"))
+ else if (elemText == TQString::fromLatin1("de-at"))
d->language = de_at;
- else if (elemText == QString::fromLatin1("de-de"))
+ else if (elemText == TQString::fromLatin1("de-de"))
d->language = de_de;
- else if (elemText == QString::fromLatin1("de-li"))
+ else if (elemText == TQString::fromLatin1("de-li"))
d->language = de_li;
- else if (elemText == QString::fromLatin1("de-lu"))
+ else if (elemText == TQString::fromLatin1("de-lu"))
d->language = de_lu;
- else if (elemText == QString::fromLatin1("de-ch"))
+ else if (elemText == TQString::fromLatin1("de-ch"))
d->language = de_ch;
- else if (elemText == QString::fromLatin1("el"))
+ else if (elemText == TQString::fromLatin1("el"))
d->language = el;
- else if (elemText == QString::fromLatin1("hu"))
+ else if (elemText == TQString::fromLatin1("hu"))
d->language = hu;
- else if (elemText == QString::fromLatin1("is"))
+ else if (elemText == TQString::fromLatin1("is"))
d->language = is;
- else if (elemText == QString::fromLatin1("id"))
+ else if (elemText == TQString::fromLatin1("id"))
d->language = id;
- else if (elemText == QString::fromLatin1("ga"))
+ else if (elemText == TQString::fromLatin1("ga"))
d->language = ga;
- else if (elemText == QString::fromLatin1("it"))
+ else if (elemText == TQString::fromLatin1("it"))
d->language = it;
- else if (elemText == QString::fromLatin1("it-it"))
+ else if (elemText == TQString::fromLatin1("it-it"))
d->language = it_it;
- else if (elemText == QString::fromLatin1("it-ch"))
+ else if (elemText == TQString::fromLatin1("it-ch"))
d->language = it_ch;
- else if (elemText == QString::fromLatin1("ja"))
+ else if (elemText == TQString::fromLatin1("ja"))
d->language = ja;
- else if (elemText == QString::fromLatin1("ko"))
+ else if (elemText == TQString::fromLatin1("ko"))
d->language = ko;
- else if (elemText == QString::fromLatin1("mk"))
+ else if (elemText == TQString::fromLatin1("mk"))
d->language = mk;
- else if (elemText == QString::fromLatin1("no"))
+ else if (elemText == TQString::fromLatin1("no"))
d->language = no;
- else if (elemText == QString::fromLatin1("pl"))
+ else if (elemText == TQString::fromLatin1("pl"))
d->language = pl;
- else if (elemText == QString::fromLatin1("pt"))
+ else if (elemText == TQString::fromLatin1("pt"))
d->language = pt;
- else if (elemText == QString::fromLatin1("pt-br"))
+ else if (elemText == TQString::fromLatin1("pt-br"))
d->language = pt_br;
- else if (elemText == QString::fromLatin1("pt-pt"))
+ else if (elemText == TQString::fromLatin1("pt-pt"))
d->language = pt_pt;
- else if (elemText == QString::fromLatin1("ro"))
+ else if (elemText == TQString::fromLatin1("ro"))
d->language = ro;
- else if (elemText == QString::fromLatin1("ro-mo"))
+ else if (elemText == TQString::fromLatin1("ro-mo"))
d->language = ro_mo;
- else if (elemText == QString::fromLatin1("ro-ro"))
+ else if (elemText == TQString::fromLatin1("ro-ro"))
d->language = ro_ro;
- else if (elemText == QString::fromLatin1("ru"))
+ else if (elemText == TQString::fromLatin1("ru"))
d->language = ru;
- else if (elemText == QString::fromLatin1("ru-mo"))
+ else if (elemText == TQString::fromLatin1("ru-mo"))
d->language = ru_mo;
- else if (elemText == QString::fromLatin1("ru-ru"))
+ else if (elemText == TQString::fromLatin1("ru-ru"))
d->language = ru_ru;
- else if (elemText == QString::fromLatin1("sr"))
+ else if (elemText == TQString::fromLatin1("sr"))
d->language = sr;
- else if (elemText == QString::fromLatin1("sk"))
+ else if (elemText == TQString::fromLatin1("sk"))
d->language = sk;
- else if (elemText == QString::fromLatin1("sl"))
+ else if (elemText == TQString::fromLatin1("sl"))
d->language = sl;
- else if (elemText == QString::fromLatin1("es"))
+ else if (elemText == TQString::fromLatin1("es"))
d->language = es;
- else if (elemText == QString::fromLatin1("es-ar"))
+ else if (elemText == TQString::fromLatin1("es-ar"))
d->language = es_ar;
- else if (elemText == QString::fromLatin1("es-bo"))
+ else if (elemText == TQString::fromLatin1("es-bo"))
d->language = es_bo;
- else if (elemText == QString::fromLatin1("es-cl"))
+ else if (elemText == TQString::fromLatin1("es-cl"))
d->language = es_cl;
- else if (elemText == QString::fromLatin1("es-co"))
+ else if (elemText == TQString::fromLatin1("es-co"))
d->language = es_co;
- else if (elemText == QString::fromLatin1("es-cr"))
+ else if (elemText == TQString::fromLatin1("es-cr"))
d->language = es_cr;
- else if (elemText == QString::fromLatin1("es-do"))
+ else if (elemText == TQString::fromLatin1("es-do"))
d->language = es_do;
- else if (elemText == QString::fromLatin1("es-ec"))
+ else if (elemText == TQString::fromLatin1("es-ec"))
d->language = es_ec;
- else if (elemText == QString::fromLatin1("es-sv"))
+ else if (elemText == TQString::fromLatin1("es-sv"))
d->language = es_sv;
- else if (elemText == QString::fromLatin1("es-gt"))
+ else if (elemText == TQString::fromLatin1("es-gt"))
d->language = es_gt;
- else if (elemText == QString::fromLatin1("es-hn"))
+ else if (elemText == TQString::fromLatin1("es-hn"))
d->language = es_hn;
- else if (elemText == QString::fromLatin1("es-mx"))
+ else if (elemText == TQString::fromLatin1("es-mx"))
d->language = es_mx;
- else if (elemText == QString::fromLatin1("es-ni"))
+ else if (elemText == TQString::fromLatin1("es-ni"))
d->language = es_ni;
- else if (elemText == QString::fromLatin1("es-pa"))
+ else if (elemText == TQString::fromLatin1("es-pa"))
d->language = es_pa;
- else if (elemText == QString::fromLatin1("es-py"))
+ else if (elemText == TQString::fromLatin1("es-py"))
d->language = es_py;
- else if (elemText == QString::fromLatin1("es-pe"))
+ else if (elemText == TQString::fromLatin1("es-pe"))
d->language = es_pe;
- else if (elemText == QString::fromLatin1("es-pr"))
+ else if (elemText == TQString::fromLatin1("es-pr"))
d->language = es_pr;
- else if (elemText == QString::fromLatin1("es-es"))
+ else if (elemText == TQString::fromLatin1("es-es"))
d->language = es_es;
- else if (elemText == QString::fromLatin1("es-uy"))
+ else if (elemText == TQString::fromLatin1("es-uy"))
d->language = es_uy;
- else if (elemText == QString::fromLatin1("es-ve"))
+ else if (elemText == TQString::fromLatin1("es-ve"))
d->language = es_ve;
- else if (elemText == QString::fromLatin1("sv"))
+ else if (elemText == TQString::fromLatin1("sv"))
d->language = sv;
- else if (elemText == QString::fromLatin1("sv-fi"))
+ else if (elemText == TQString::fromLatin1("sv-fi"))
d->language = sv_fi;
- else if (elemText == QString::fromLatin1("sv-se"))
+ else if (elemText == TQString::fromLatin1("sv-se"))
d->language = sv_se;
- else if (elemText == QString::fromLatin1("tr"))
+ else if (elemText == TQString::fromLatin1("tr"))
d->language = tr;
- else if (elemText == QString::fromLatin1("uk"))
+ else if (elemText == TQString::fromLatin1("uk"))
d->language = uk;
else
d->language = UndefinedLanguage;
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("pubDate"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("pubDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -338,7 +338,7 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) {
time_t _time = KRFCDate::parseDateISO8601(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -347,46 +347,46 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("lastBuildDate"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("lastBuildDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
d->lastBuildDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("rating"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull())
d->rating = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("docs"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull())
d->docs = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("managingEditor"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("managingEditor"))).isNull())
d->managingEditor = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("webMaster"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull())
d->webMaster = elemText;
- n = channelNode.namedItem(QString::fromLatin1("skipHours"));
+ n = channelNode.namedItem(TQString::fromLatin1("skipHours"));
if (!n.isNull())
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("hour"))
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::fromLatin1("hour"))
d->skipHours.append(e.text().toUInt());
- n = channelNode.namedItem(QString::fromLatin1("skipDays"));
+ n = channelNode.namedItem(TQString::fromLatin1("skipDays"));
if (!n.isNull()) {
Day day;
- QString elemText;
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("day")) {
+ TQString elemText;
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::fromLatin1("day")) {
elemText = e.text().lower();
- if (elemText == QString::fromLatin1("monday"))
+ if (elemText == TQString::fromLatin1("monday"))
day = Monday;
- else if (elemText == QString::fromLatin1("tuesday"))
+ else if (elemText == TQString::fromLatin1("tuesday"))
day = Tuesday;
- else if (elemText == QString::fromLatin1("wednesday"))
+ else if (elemText == TQString::fromLatin1("wednesday"))
day = Wednesday;
- else if (elemText == QString::fromLatin1("thursday"))
+ else if (elemText == TQString::fromLatin1("thursday"))
day = Thursday;
- else if (elemText == QString::fromLatin1("friday"))
+ else if (elemText == TQString::fromLatin1("friday"))
day = Friday;
- else if (elemText == QString::fromLatin1("saturday"))
+ else if (elemText == TQString::fromLatin1("saturday"))
day = Saturday;
- else if (elemText == QString::fromLatin1("sunday"))
+ else if (elemText == TQString::fromLatin1("sunday"))
day = Sunday;
else
day = UndefinedDay;
@@ -407,26 +407,26 @@ Version Document::version() const
return d->version;
}
-QString Document::verbVersion() const
+TQString Document::verbVersion() const
{
switch (d->version) {
- case v0_90: return QString::fromLatin1("0.90");
- case v0_91: return QString::fromLatin1("0.91");
- case v0_92: return QString::fromLatin1("0.92");
- case v0_93: return QString::fromLatin1("0.93");
- case v0_94: return QString::fromLatin1("0.94");
- case v1_0: return QString::fromLatin1("1.0");
- case v2_0: return QString::fromLatin1("2.0");
+ case v0_90: return TQString::fromLatin1("0.90");
+ case v0_91: return TQString::fromLatin1("0.91");
+ case v0_92: return TQString::fromLatin1("0.92");
+ case v0_93: return TQString::fromLatin1("0.93");
+ case v0_94: return TQString::fromLatin1("0.94");
+ case v1_0: return TQString::fromLatin1("1.0");
+ case v2_0: return TQString::fromLatin1("2.0");
}
- return QString::null;
+ return TQString::null;
}
-QString Document::title() const
+TQString Document::title() const
{
return d->title;
}
-QString Document::description() const
+TQString Document::description() const
{
return d->description;
}
@@ -466,22 +466,22 @@ Language Document::language() const
return d->language;
}
-QString Document::copyright() const
+TQString Document::copyright() const
{
return d->copyright;
}
-const QDateTime &Document::pubDate() const
+const TQDateTime &Document::pubDate() const
{
return d->pubDate;
}
-const QDateTime &Document::lastBuildDate() const
+const TQDateTime &Document::lastBuildDate() const
{
return d->lastBuildDate;
}
-QString Document::rating() const
+TQString Document::rating() const
{
return d->rating;
}
@@ -491,12 +491,12 @@ const KURL &Document::docs() const
return d->docs;
}
-QString Document::managingEditor() const
+TQString Document::managingEditor() const
{
return d->managingEditor;
}
-QString Document::webMaster() const
+TQString Document::webMaster() const
{
return d->webMaster;
}
diff --git a/librss/document.h b/librss/document.h
index 90359871..fb02feb5 100644
--- a/librss/document.h
+++ b/librss/document.h
@@ -45,7 +45,7 @@ namespace RSS
/**
* Constructs a Document from a piece of XML markup.
*/
- Document(const QDomDocument &doc);
+ Document(const TQDomDocument &doc);
/**
* Assignment operator.
@@ -70,28 +70,28 @@ namespace RSS
/**
* Convenience method. Differs from version() only in how the result
* is returned.
- * @return A QString representing the verbose version of the
+ * @return A TQString representing the verbose version of the
* document.
* @see version()
*/
- QString verbVersion() const;
+ TQString verbVersion() const;
/**
* RSS 0.90 and upwards
- * @return The title of the RSS document, or QString::null if no
+ * @return The title of the RSS document, or TQString::null if no
* title was available. This is often the name of the news source
* from which the RSS document was retrieved.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
- * @return The description of the RSS document, or QString::null
+ * @return The description of the RSS document, or TQString::null
* if no description was available. This is usually a short slogan
* or description of the news source from which the RSS document
* was retrieved.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
@@ -153,28 +153,28 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A copyright of the information contained in the RSS
- * document, or QString::null if no copyright is available.
+ * document, or TQString::null if no copyright is available.
*/
- QString copyright() const;
+ TQString copyright() const;
/**
* RSS 0.91 and upwards
* @return The date when the RSS document was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
/**
* RSS 0.91 and upwards.
* @return The last time the channel was modified.
*/
- const QDateTime &lastBuildDate() const;
+ const TQDateTime &lastBuildDate() const;
/**
* RSS 0.91 and upwards
* @return A <a href="http://www.w3.org/PICS/#Specs">PICS</a>
* rating for this page.
*/
- QString rating() const;
+ TQString rating() const;
/**
* RSS 0.91 and upwards
@@ -192,16 +192,16 @@ namespace RSS
* bull@mancuso.com (Bull Mancuso).
* @see webMaster()
*/
- QString managingEditor() const;
+ TQString managingEditor() const;
/**
* RSS 0.91 and upwards
* @return The email address of the webmaster for the site, the
* person to contact if there are technical problems with the
- * channel, or QString::null if this information isn't available.
+ * channel, or TQString::null if this information isn't available.
* @see managingEditor()
*/
- QString webMaster() const;
+ TQString webMaster() const;
/**
* RSS 0.91 and upwards
diff --git a/librss/global.h b/librss/global.h
index 26c34d7e..ca929af0 100644
--- a/librss/global.h
+++ b/librss/global.h
@@ -126,12 +126,12 @@ namespace RSS
/**
* This type is used by Document::skipDays().
*/
- typedef QValueList<Day> DayList;
+ typedef TQValueList<Day> DayList;
/**
* This type is used by Document::skipHours().
*/
- typedef QValueList<unsigned short> HourList;
+ typedef TQValueList<unsigned short> HourList;
}
#endif // LIBRSS_GLOBAL_H
diff --git a/librss/image.cpp b/librss/image.cpp
index 66e3e135..4ab66698 100644
--- a/librss/image.cpp
+++ b/librss/image.cpp
@@ -14,9 +14,9 @@
#include <kio/job.h>
#include <kurl.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqpixmap.h>
using namespace RSS;
@@ -25,39 +25,39 @@ struct Image::Private : public Shared
Private() : height(31), width(88), pixmapBuffer(NULL)
{ }
- QString title;
+ TQString title;
KURL url;
KURL link;
- QString description;
+ TQString description;
unsigned int height;
unsigned int width;
- QBuffer *pixmapBuffer;
+ TQBuffer *pixmapBuffer;
};
-Image::Image() : QObject(), d(new Private)
+Image::Image() : TQObject(), d(new Private)
{
}
-Image::Image(const Image &other) : QObject(), d(0)
+Image::Image(const Image &other) : TQObject(), d(0)
{
*this = other;
}
-Image::Image(const QDomNode &node) : QObject(), d(new Private)
+Image::Image(const TQDomNode &node) : TQObject(), d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull())
d->url = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull())
d->height = elemText.toUInt();
- if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull())
d->width = elemText.toUInt();
}
@@ -71,7 +71,7 @@ Image::~Image()
}
}
-QString Image::title() const
+TQString Image::title() const
{
return d->title;
}
@@ -86,7 +86,7 @@ const KURL &Image::link() const
return d->link;
}
-QString Image::description() const
+TQString Image::description() const
{
return d->description;
}
@@ -111,21 +111,21 @@ void Image::getPixmap()
d->pixmapBuffer->open(IO_WriteOnly);
KIO::Job *job = KIO::get(d->url, false, false);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
}
-void Image::slotData(KIO::Job *, const QByteArray &data)
+void Image::slotData(KIO::Job *, const TQByteArray &data)
{
d->pixmapBuffer->writeBlock(data.data(), data.size());
}
void Image::slotResult(KIO::Job *job)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!job->error())
- pixmap = QPixmap(d->pixmapBuffer->buffer());
+ pixmap = TQPixmap(d->pixmapBuffer->buffer());
emit gotPixmap(pixmap);
delete d->pixmapBuffer;
diff --git a/librss/image.h b/librss/image.h
index d93c3230..eeef8222 100644
--- a/librss/image.h
+++ b/librss/image.h
@@ -13,7 +13,7 @@
#include "global.h"
-#include <qobject.h>
+#include <tqobject.h>
class QDomNode;
@@ -48,10 +48,10 @@ namespace RSS
/**
* Constructs an Image from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Image.
*/
- Image(const QDomNode &node);
+ Image(const TQDomNode &node);
/**
* Assignment operator.
@@ -83,10 +83,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The 'caption' of this image, or QString::null if no
+ * @return The 'caption' of this image, or TQString::null if no
* caption is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -112,11 +112,11 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A description of what this picture shows, or
- * QString::null if no description is available. Useful for
+ * TQString::null if no description is available. Useful for
* people who deactivated images but want or need to know what is
* shown.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.91 and upwards
@@ -125,7 +125,7 @@ namespace RSS
* this value to be between 1 and 400.
* '0' if this information isn't available. This is merely provided
* for completeness, you should not rely on this value but rather
- * check what height the QPixmap as returned by gotPixmap()
+ * check what height the TQPixmap as returned by gotPixmap()
* reports.
*/
unsigned int height() const;
@@ -136,7 +136,7 @@ namespace RSS
* default value is 88 pixels. The RSS 0.91 Specification requires
* this value to be between 1 and 144.
* This is merely provided for completeness, you should not rely
- * on this value but rather check what width the QPixmap as
+ * on this value but rather check what width the TQPixmap as
* returned by gotPixmap() reports.
*/
unsigned int width() const;
@@ -156,10 +156,10 @@ namespace RSS
* @param pixmap The pixmap as constructed from the data referenced
* by the URL returned by link().
*/
- void gotPixmap(const QPixmap &pixmap);
+ void gotPixmap(const TQPixmap &pixmap);
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
private:
diff --git a/librss/loader.cpp b/librss/loader.cpp
index c38400f4..696d4f86 100644
--- a/librss/loader.cpp
+++ b/librss/loader.cpp
@@ -15,9 +15,9 @@
#include <kprocess.h>
#include <kurl.h>
-#include <qdom.h>
-#include <qbuffer.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
using namespace RSS;
@@ -42,7 +42,7 @@ struct FileRetriever::Private
delete buffer;
}
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
};
@@ -65,11 +65,11 @@ void FileRetriever::retrieveData(const KURL &url)
d->buffer->open(IO_WriteOnly);
KIO::Job *job = KIO::get(url, false, false);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
- connect(job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
- SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
+ TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
}
int FileRetriever::errorCode() const
@@ -77,14 +77,14 @@ int FileRetriever::errorCode() const
return d->lastError;
}
-void FileRetriever::slotData(KIO::Job *, const QByteArray &data)
+void FileRetriever::slotData(KIO::Job *, const TQByteArray &data)
{
d->buffer->writeBlock(data.data(), data.size());
}
void FileRetriever::slotResult(KIO::Job *job)
{
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -114,7 +114,7 @@ struct OutputRetriever::Private
}
KShellProcess *process;
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
};
@@ -138,10 +138,10 @@ void OutputRetriever::retrieveData(const KURL &url)
d->buffer->open(IO_WriteOnly);
d->process = new KShellProcess();
- connect(d->process, SIGNAL(processExited(KProcess *)),
- SLOT(slotExited(KProcess *)));
- connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)),
- SLOT(slotOutput(KProcess *, char *, int)));
+ connect(d->process, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotExited(KProcess *)));
+ connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(slotOutput(KProcess *, char *, int)));
*d->process << url.path();
d->process->start(KProcess::NotifyOnExit, KProcess::Stdout);
}
@@ -161,7 +161,7 @@ void OutputRetriever::slotExited(KProcess *p)
if (!p->normalExit())
d->lastError = p->exitStatus();
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -194,10 +194,10 @@ Loader *Loader::create()
return new Loader;
}
-Loader *Loader::create(QObject *object, const char *slot)
+Loader *Loader::create(TQObject *object, const char *slot)
{
Loader *loader = create();
- connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
object, slot);
return loader;
}
@@ -218,8 +218,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever)
d->retriever = retriever;
- connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)),
- this, SLOT(slotRetrieverDone(const QByteArray &, bool)));
+ connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)),
+ this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool)));
d->retriever->retrieveData(url);
}
@@ -229,7 +229,7 @@ int Loader::errorCode() const
return d->lastError;
}
-void Loader::slotRetrieverDone(const QByteArray &data, bool success)
+void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
{
d->lastError = d->retriever->errorCode();
@@ -240,7 +240,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
Status status = Success;
if (success) {
- QDomDocument doc;
+ TQDomDocument doc;
/* Some servers insert whitespace before the <?xml...?> declaration.
* QDom doesn't tolerate that (and it's right, that's invalid XML),
@@ -250,7 +250,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
const char *charData = data.data();
int len = data.count();
- while (len && QChar(*charData).isSpace()) {
+ while (len && TQChar(*charData).isSpace()) {
--len;
++charData;
}
@@ -259,12 +259,12 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
* with the three leading unicode characters 0357, 0273, 0277. For
* an example, check http://msdn.microsoft.com/rss.xml
*/
- if (len > 3 && QChar(*charData) == QChar(0357)) {
+ if (len > 3 && TQChar(*charData) == TQChar(0357)) {
len -= 3;
charData += 3;
}
- QByteArray tmpData;
+ TQByteArray tmpData;
tmpData.setRawData(charData, len);
if (doc.setContent(tmpData))
diff --git a/librss/loader.h b/librss/loader.h
index 5f0c1447..8c4fcb4d 100644
--- a/librss/loader.h
+++ b/librss/loader.h
@@ -15,7 +15,7 @@
class KURL;
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -74,7 +74,7 @@ namespace RSS
* wrong and that the data parameter might contain no or invalid
* data.
*/
- void dataRetrieved(const QByteArray &data, bool success);
+ void dataRetrieved(const TQByteArray &data, bool success);
private:
DataRetriever(const DataRetriever &other);
@@ -127,7 +127,7 @@ namespace RSS
void permanentRedirection(const KURL &url);
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl,
const KURL &toUrl);
@@ -194,8 +194,8 @@ namespace RSS
*
* \code
* Loader *loader = Loader::create();
- * connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
- * this, SLOT(slotLoadingComplete(Loader *, Document, Status)));
+ * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
+ * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status)));
* loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever);
* \endcode
*
@@ -227,7 +227,7 @@ namespace RSS
* if (status != RSS::Success)
* return;
*
- * QString title = doc.title();
+ * TQString title = doc.title();
* // do whatever you want with the information.
* }
* \endcode
@@ -256,10 +256,10 @@ namespace RSS
* Convenience method. Does the same as the above method except that
* it also does the job of connecting the loadingComplete() signal
* to the given slot for you.
- * @param object A QObject which features the specified slot
+ * @param object A TQObject which features the specified slot
* @param slot Which slot to connect to.
*/
- static Loader *create(QObject *object, const char *slot);
+ static Loader *create(TQObject *object, const char *slot);
/**
* Loads the RSS file referenced by the given URL using the
@@ -305,7 +305,7 @@ namespace RSS
void loadingComplete(Loader *loader, Document doc, Status status);
private slots:
- void slotRetrieverDone(const QByteArray &data, bool success);
+ void slotRetrieverDone(const TQByteArray &data, bool success);
private:
Loader();
diff --git a/librss/testlibrss.cpp b/librss/testlibrss.cpp
index 6b6a83d3..2cbbe913 100644
--- a/librss/testlibrss.cpp
+++ b/librss/testlibrss.cpp
@@ -10,8 +10,8 @@ using namespace RSS;
void Tester::test()
{
Loader *loader = Loader::create();
- connect( loader, SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
+ connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ),
+ this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
loader->loadFrom( "http://sourceforge.net/export/rss2_projnews.php?group_id=29057&rss_fulltext=1", new FileRetriever );
}
diff --git a/librss/testlibrss.h b/librss/testlibrss.h
index 2db10178..fda0b0a7 100644
--- a/librss/testlibrss.h
+++ b/librss/testlibrss.h
@@ -1,7 +1,7 @@
#ifndef TESTLIBRSS_H
#define TESTLIBRSS_H
-#include <qobject.h>
+#include <tqobject.h>
#include "loader.h"
#include "document.h"
diff --git a/librss/textinput.cpp b/librss/textinput.cpp
index 71d5e01c..f2af0940 100644
--- a/librss/textinput.cpp
+++ b/librss/textinput.cpp
@@ -13,15 +13,15 @@
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace RSS;
struct TextInput::Private : public Shared
{
- QString title;
- QString description;
- QString name;
+ TQString title;
+ TQString description;
+ TQString name;
KURL link;
};
@@ -34,17 +34,17 @@ TextInput::TextInput(const TextInput &other) : d(0)
*this = other;
}
-TextInput::TextInput(const QDomNode &node) : d(new Private)
+TextInput::TextInput(const TQDomNode &node) : d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("name"))))
+ if (!(elemText = extractNode(node, TQString::fromLatin1("name"))))
d->name = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
}
@@ -54,17 +54,17 @@ TextInput::~TextInput()
delete d;
}
-QString TextInput::title() const
+TQString TextInput::title() const
{
return d->title;
}
-QString TextInput::description() const
+TQString TextInput::description() const
{
return d->description;
}
-QString TextInput::name() const
+TQString TextInput::name() const
{
return d->name;
}
diff --git a/librss/textinput.h b/librss/textinput.h
index 444e7280..ab7652ac 100644
--- a/librss/textinput.h
+++ b/librss/textinput.h
@@ -43,10 +43,10 @@ namespace RSS
/**
* Constructs a TextInput from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the TextInput.
*/
- TextInput(const QDomNode &node);
+ TextInput(const TQDomNode &node);
/**
* Assignment operator.
@@ -79,25 +79,25 @@ namespace RSS
/**
* RSS 0.90 and upwards
* @return The title (often a label to be used for the input field)
- * of the text input, or QString::null if no title is available.
+ * of the text input, or TQString::null if no title is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
* @return The description (usually used as a tooltip which appears
* if the mouse hovers above the input field for a short time) of
- * the text input, or QString::null if no description is
+ * the text input, or TQString::null if no description is
* available.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
* @return The name of the text input (what's this for?) of the
- * text input, or QString::null, if no name is available.
+ * text input, or TQString::null, if no name is available.
*/
- QString name() const;
+ TQString name() const;
/**
* RSS 0.90 and upwards
diff --git a/librss/tools_p.cpp b/librss/tools_p.cpp
index c88eecac..1c043849 100644
--- a/librss/tools_p.cpp
+++ b/librss/tools_p.cpp
@@ -10,17 +10,17 @@
*/
#include "tools_p.h"
-#include <qdom.h>
+#include <tqdom.h>
-QString RSS::extractNode(const QDomNode &parent, const QString &elemName)
+TQString RSS::extractNode(const TQDomNode &parent, const TQString &elemName)
{
- QDomNode node = parent.namedItem(elemName);
+ TQDomNode node = parent.namedItem(elemName);
if (node.isNull())
- return QString::null;
+ return TQString::null;
- QString result = node.toElement().text().simplifyWhiteSpace();
+ TQString result = node.toElement().text().simplifyWhiteSpace();
if (result.isEmpty())
- return QString::null;
+ return TQString::null;
return result;
}
diff --git a/librss/tools_p.h b/librss/tools_p.h
index adc508b8..0d9c9801 100644
--- a/librss/tools_p.h
+++ b/librss/tools_p.h
@@ -24,7 +24,7 @@ namespace RSS
unsigned int count;
};
- QString extractNode(const QDomNode &parent, const QString &elemName);
+ TQString extractNode(const TQDomNode &parent, const TQString &elemName);
}
#endif // LIBRSS_TOOLS_P_H
diff --git a/wifi/interface_dcop.h b/wifi/interface_dcop.h
index 9a4149c0..4bbe7905 100644
--- a/wifi/interface_dcop.h
+++ b/wifi/interface_dcop.h
@@ -8,7 +8,7 @@ class dcop_interface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual QString interface() const = 0;
+ virtual TQString interface() const = 0;
};
#endif
diff --git a/wifi/interface_wireless.cpp b/wifi/interface_wireless.cpp
index 5ece6301..d04efa95 100644
--- a/wifi/interface_wireless.cpp
+++ b/wifi/interface_wireless.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
#include "interface_wireless.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#ifndef WITHOUT_ARTS
#include <arts/artsflow.h>
@@ -32,10 +32,10 @@
#include <klocale.h>
#include <kprocio.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <arpa/inet.h>
-Interface_wireless::Interface_wireless (QStringList * ignoreInterfaces)
+Interface_wireless::Interface_wireless (TQStringList * ignoreInterfaces)
{
this->ignoreInterfaces = ignoreInterfaces;
has_frequency = false;
@@ -94,7 +94,7 @@ bool Interface_wireless::get_mode (int &ext_mode)
}
}
-bool Interface_wireless::get_key (QString & ext_key,
+bool Interface_wireless::get_key (TQString & ext_key,
int &ext_size,
int &ext_flags)
{
@@ -111,7 +111,7 @@ bool Interface_wireless::get_key (QString & ext_key,
}
}
-QString Interface_wireless::get_essid ()
+TQString Interface_wireless::get_essid ()
{
return essid;
}
@@ -126,13 +126,13 @@ int Interface_wireless::get_txpower_disabled()
return txpower_disabled;
}
-bool Interface_wireless::get_AP_info (QString & mac, QString &/*ip*/)
+bool Interface_wireless::get_AP_info (TQString & mac, TQString &/*ip*/)
{
mac = access_point_address;
return false;
}
-QString Interface_wireless::get_IP_info ()
+TQString Interface_wireless::get_IP_info ()
{
return ip_address;
}
@@ -142,7 +142,7 @@ double Interface_wireless::get_bitrate ()
return bitrate;
}
-QString Interface_wireless::get_interface_name ()
+TQString Interface_wireless::get_interface_name ()
{
return interface_name;
}
@@ -196,12 +196,12 @@ MyTimeNotify::notifyTime ()
#endif
QString
-whois (const char *MAC_ADR, QStringList APList)
+whois (const char *MAC_ADR, TQStringList APList)
{
- for (QStringList::Iterator it = APList.begin (); it != APList.end ();
+ for (TQStringList::Iterator it = APList.begin (); it != APList.end ();
(it++)++)
{
- if ((*it) == (QString) MAC_ADR)
+ if ((*it) == (TQString) MAC_ADR)
return *(++it);
}
return i18n ("UNKNOWN");
diff --git a/wifi/interface_wireless.h b/wifi/interface_wireless.h
index 029a8156..0a92709e 100644
--- a/wifi/interface_wireless.h
+++ b/wifi/interface_wireless.h
@@ -20,9 +20,9 @@
#include "config.h"
-#include <qobject.h>
-#include <qstring.h>
-#include <qtable.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqtable.h>
#ifndef WITHOUT_ARTS
#include <arts/iomanager.h>
@@ -35,28 +35,28 @@ const int MAX_HISTORY = 240; // number of device states to be saved
class Interface_wireless:public QObject
{
Q_OBJECT public:
- Interface_wireless (QStringList * ignoreInterfaces);
+ Interface_wireless (TQStringList * ignoreInterfaces);
virtual ~ Interface_wireless() { };
virtual bool get_device_freq (double &freq);
// true: device returned valid frequency
virtual bool get_mode (int &mode);
// true: device returned valid mode info
- virtual bool get_key (QString & key, int &size, int &flags);
+ virtual bool get_key (TQString & key, int &size, int &flags);
// true: device has set up a valid crypto key
- virtual QString get_essid ();
- virtual bool get_AP_info (QString & mac, QString & ip);
+ virtual TQString get_essid ();
+ virtual bool get_AP_info (TQString & mac, TQString & ip);
// true: could retrieve IP, false: returned IP info invalid
- virtual QString get_IP_info ();
+ virtual TQString get_IP_info ();
virtual double get_bitrate ();
- virtual QString get_interface_name ();
+ virtual TQString get_interface_name ();
// if no device is attached, return empty QString
virtual bool get_current_quality (int &sig, int &noi, int &qua);
// quality info is only valid when true
- virtual QTable* get_available_networks () = 0;
+ virtual TQTable* get_available_networks () = 0;
virtual bool get_has_txpower();
virtual int get_txpower_disabled();
- virtual void setActiveDevice( QString device ) = 0;
+ virtual void setActiveDevice( TQString device ) = 0;
// stats
int sigLevel[MAX_HISTORY];
int sigLevelMin, sigLevelMax;
@@ -75,7 +75,7 @@ signals:
void statusChanged ();
void modeChanged ();
void speedChanged ();
- void essidChanged (QString essid);
+ void essidChanged (TQString essid);
void txPowerChanged ();
void statsUpdated ();
protected:
@@ -86,18 +86,18 @@ protected:
bool has_mode;
int mode;
bool has_key;
- QString key;
+ TQString key;
int key_size;
int key_flags;
- QString essid;
- QString access_point_address;
- QString ip_address;
+ TQString essid;
+ TQString access_point_address;
+ TQString ip_address;
double bitrate;
- QString interface_name;
+ TQString interface_name;
int socket;
bool has_range;
int range;
- QStringList * ignoreInterfaces;
+ TQStringList * ignoreInterfaces;
bool has_txpower;
int txpower_disabled;
};
@@ -120,6 +120,6 @@ public:
#endif
-QString whois (const char *MAC_ADR, QStringList APList);
+TQString whois (const char *MAC_ADR, TQStringList APList);
#endif /* INTERFACE_WIRELESS_H */
diff --git a/wifi/interface_wireless_wirelessextensions.cpp b/wifi/interface_wireless_wirelessextensions.cpp
index 874eefb3..878b9460 100644
--- a/wifi/interface_wireless_wirelessextensions.cpp
+++ b/wifi/interface_wireless_wirelessextensions.cpp
@@ -17,9 +17,9 @@
#include "interface_wireless_wirelessextensions.h"
#include <iwlib.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtable.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtable.h>
#include <kmessagebox.h>
@@ -40,7 +40,7 @@
#include <kstandarddirs.h>
#include <kprocio.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -79,7 +79,7 @@
/* ================================== FROM IWCONFIG.C ================================== */
int
-Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interface,
+Interface_wireless_wirelessextensions::get_info (int skfd, const TQString& interface,
struct wireless_info& info)
{
struct iwreq wrq;
@@ -248,7 +248,7 @@ Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interf
/* ================================ END IWCONFIG.C ================================ */
-Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces)
+Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces)
: Interface_wireless(ignoreInterfaces)
{
}
@@ -261,7 +261,7 @@ bool Interface_wireless_wirelessextensions::isSocketOpen()
return (socket > 0);
}
-void Interface_wireless_wirelessextensions::setActiveDevice( QString device )
+void Interface_wireless_wirelessextensions::setActiveDevice( TQString device )
{
kdDebug () << "activating wireless device " << device << endl;
interface_name = device;
@@ -287,30 +287,30 @@ void Interface_wireless_wirelessextensions::setNoActiveDevice( )
has_mode = false;
mode = 0;
has_key = 0;
- key = QString::null;
+ key = TQString::null;
key_size = 0;
key_flags = 0;
- essid = QString::null;
- access_point_address = QString::null;
- ip_address = QString::null;
+ essid = TQString::null;
+ access_point_address = TQString::null;
+ ip_address = TQString::null;
bitrate = 0;
has_range = false;
has_txpower = false;
txpower_disabled = 0;
// propagate the changes
- setActiveDevice( QString::null );
+ setActiveDevice( TQString::null );
}
-QStringList Interface_wireless_wirelessextensions::available_wifi_devices()
+TQStringList Interface_wireless_wirelessextensions::available_wifi_devices()
{
- QFile procnetdev(PROC_NET_DEV);
+ TQFile procnetdev(PROC_NET_DEV);
procnetdev.open (IO_ReadOnly);
kdDebug () << "Autodetecting..." << endl;
- QStringList liste;
- QString device;
+ TQStringList liste;
+ TQString device;
while (!procnetdev.atEnd()) {
procnetdev.readLine (device, 9999);
int pos = device.find (':');
@@ -344,11 +344,11 @@ bool Interface_wireless_wirelessextensions::autodetect_device()
if (!isSocketOpen())
return false;
- QStringList liste = available_wifi_devices();
+ TQStringList liste = available_wifi_devices();
- for (QStringList::Iterator it = liste.begin (); it != liste.end (); ++it)
+ for (TQStringList::Iterator it = liste.begin (); it != liste.end (); ++it)
{
- QString device = *it;
+ TQString device = *it;
kdDebug () << "[ " << device << " ] " << endl;
wireless_info info;
int result = get_info (socket, device, info);
@@ -499,9 +499,9 @@ bool Interface_wireless_wirelessextensions::poll_device_info ()
if (sa->sa_family == AF_INET)
{
sin = (struct sockaddr_in *) sa;
- if (ip_address != (QString) inet_ntoa (sin->sin_addr))
+ if (ip_address != (TQString) inet_ntoa (sin->sin_addr))
emitStatusChanged = true;
- ip_address = (QString) inet_ntoa (sin->sin_addr);
+ ip_address = (TQString) inet_ntoa (sin->sin_addr);
}
else
{
@@ -521,17 +521,17 @@ bool Interface_wireless_wirelessextensions::poll_device_info ()
return true;
}
-QTable* Interface_wireless_wirelessextensions::get_available_networks ()
+TQTable* Interface_wireless_wirelessextensions::get_available_networks ()
{
- networks = new QTable(0,4,0);
+ networks = new TQTable(0,4,0);
networks->horizontalHeader()->setLabel( 0, i18n("Network Name") );
networks->horizontalHeader()->setLabel( 1, i18n("Mode") );
networks->horizontalHeader()->setLabel( 2, i18n("Quality") );
networks->horizontalHeader()->setLabel( 3, i18n("WEP") );
KProcIO *iwlist = new KProcIO;
- QString iwlist_bin = KStandardDirs::findExe("iwlist");
+ TQString iwlist_bin = KStandardDirs::findExe("iwlist");
if(iwlist_bin.isEmpty())
iwlist_bin = KStandardDirs::findExe("iwlist", "/usr/local/sbin:/usr/sbin:/sbin");
if(iwlist_bin.isEmpty())
@@ -539,7 +539,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks ()
*iwlist << iwlist_bin << interface_name << "scanning";
-// connect ( iwlist, SIGNAL ( readReady ( KProcIO * ) ), this, SLOT ( parseScanData ( KProcIO * ) ) );
+// connect ( iwlist, TQT_SIGNAL ( readReady ( KProcIO * ) ), this, TQT_SLOT ( parseScanData ( KProcIO * ) ) );
if ( !iwlist->start ( KProcess::Block ) )
KMessageBox::sorry ( 0, i18n ( "Unable to perform the scan. Please make sure the executable \"iwlist\" is in your $PATH." ),
@@ -558,7 +558,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks ()
void
Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
{
- QString data;
+ TQString data;
int cellcount = 0, iteratecount = 0;
bool ignoreRemainingBits = false;
while ( iwlist->readln ( data, true ) >= 0 )
@@ -578,16 +578,16 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
}
if ( data.contains ( "ESSID:" ) )
{
- QString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 );
+ TQString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 );
if ((ssid=="") || (ssid==" ")) ssid = "(hidden cell)";
networks->setText ( cellcount - 1, 0, ssid );
}
if ( data.contains ( "Mode:" ) )
{
if ( data.contains ( "Master" ) )
- networks->setText ( cellcount - 1, 1, QString ( i18n ( "Managed" ) ) );
+ networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Managed" ) ) );
if ( data.contains ( "Ad-Hoc" ) )
- networks->setText ( cellcount - 1, 1, QString ( i18n ( "Ad-Hoc" ) ) );
+ networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Ad-Hoc" ) ) );
// if could be that this cell belongs to an SSID already discovered, or that there are more than one
// hidden cells, which doesn't give any new information. So, we first search for duplicates and delete
// this row if it's a duplicate. If the same SSID is there once as Managed and once as Ad-Hoc it is no
@@ -608,30 +608,30 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
if ( !ignoreRemainingBits && data.contains ( "Encryption key:" ) )
{
if ( data.contains ( "off" ) )
- networks->setText ( cellcount - 1, 3, QString ( "off" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "off" ) );
else
- networks->setText ( cellcount - 1, 3, QString ( "on" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "on" ) );
}
if ( !ignoreRemainingBits && data.contains ( "Quality:" ) )
{
- QString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 );
+ TQString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 );
networks->setText ( cellcount - 1, 2, quality );
}
if ( !ignoreRemainingBits && data.contains ( "Quality=" ) )
{
- QString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 );
+ TQString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 );
networks->setText ( cellcount - 1, 2, quality );
}
if ( !ignoreRemainingBits && data.contains ( "wpa_ie" ) )
{
- networks->setText ( cellcount - 1, 3, QString ( "WPA" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "WPA" ) );
}
if ( !ignoreRemainingBits && data.contains ( "rsn_ie" ) )
{
- networks->setText ( cellcount - 1, 3, QString ( "WPA2" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "WPA2" ) );
}
}
diff --git a/wifi/interface_wireless_wirelessextensions.h b/wifi/interface_wireless_wirelessextensions.h
index 96d91566..b5e9782d 100644
--- a/wifi/interface_wireless_wirelessextensions.h
+++ b/wifi/interface_wireless_wirelessextensions.h
@@ -20,8 +20,8 @@
#include "config.h"
-#include <qstring.h>
-#include <qtable.h>
+#include <tqstring.h>
+#include <tqtable.h>
#ifndef WITHOUT_ARTS
#include <arts/iomanager.h>
@@ -41,11 +41,11 @@ extern "C"
class Interface_wireless_wirelessextensions:public Interface_wireless
{
Q_OBJECT public:
- Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces);
- QTable* get_available_networks ();
+ Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces);
+ TQTable* get_available_networks ();
public:
- void setActiveDevice( QString device );
+ void setActiveDevice( TQString device );
public slots:
bool poll_device_info ();
@@ -53,12 +53,12 @@ public slots:
private:
bool isSocketOpen();
void setNoActiveDevice( );
- QStringList available_wifi_devices();
+ TQStringList available_wifi_devices();
bool autodetect_device();
- QString print_scanning_token (struct iw_event *event);
- int get_info (int skfd, const QString& interface, struct wireless_info& info);
- QTable* networks;
+ TQString print_scanning_token (struct iw_event *event);
+ int get_info (int skfd, const TQString& interface, struct wireless_info& info);
+ TQTable* networks;
private slots:
void parseScanData ( KProcIO * iwlist );
};
diff --git a/wifi/kcmwifi/configcrypto.ui.h b/wifi/kcmwifi/configcrypto.ui.h
index 6ada4aa4..261e3411 100644
--- a/wifi/kcmwifi/configcrypto.ui.h
+++ b/wifi/kcmwifi/configcrypto.ui.h
@@ -32,7 +32,7 @@ void ConfigCrypto::save( IfConfig &ifconfig )
}
-void ConfigCrypto::slotUpdateKey1Status(const QString& key)
+void ConfigCrypto::slotUpdateKey1Status(const TQString& key)
{
KeyStates status = ::Key::isValid( key );
switch (status) {
@@ -63,7 +63,7 @@ void ConfigCrypto::slotUpdateKey1Status(const QString& key)
}
}
-void ConfigCrypto::slotUpdateKey2Status(const QString& key)
+void ConfigCrypto::slotUpdateKey2Status(const TQString& key)
{
KeyStates status = ::Key::isValid( key );
switch (status) {
@@ -94,7 +94,7 @@ void ConfigCrypto::slotUpdateKey2Status(const QString& key)
}
}
-void ConfigCrypto::slotUpdateKey3Status(const QString& key)
+void ConfigCrypto::slotUpdateKey3Status(const TQString& key)
{
KeyStates status = ::Key::isValid( key );
switch (status) {
@@ -125,7 +125,7 @@ void ConfigCrypto::slotUpdateKey3Status(const QString& key)
}
}
-void ConfigCrypto::slotUpdateKey4Status(const QString& key)
+void ConfigCrypto::slotUpdateKey4Status(const TQString& key)
{
KeyStates status = ::Key::isValid( key );
switch (status) {
diff --git a/wifi/kcmwifi/ifconfigpage.cpp b/wifi/kcmwifi/ifconfigpage.cpp
index 887c817d..8b96b63b 100644
--- a/wifi/kcmwifi/ifconfigpage.cpp
+++ b/wifi/kcmwifi/ifconfigpage.cpp
@@ -23,11 +23,11 @@
#include <klocale.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#include "configcrypto.h"
#include "configpower.h"
@@ -37,41 +37,41 @@
#include <unistd.h>
#include <sys/types.h>
-IfConfigPage::IfConfigPage( int configNum, QWidget *parent, const char *name )
+IfConfigPage::IfConfigPage( int configNum, TQWidget *parent, const char *name )
: IfConfigPageBase( parent, name ),
m_configNum( configNum )
{
- connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
- connect( cb_useCrypto, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
- connect( le_networkName, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
- connect( cmb_wifiMode, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
- connect( cmb_speed, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
- connect( cb_runScript, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
- connect( url_connectScript, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
- connect( cb_Autodetect, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
- connect( le_interface, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
-
- connect( pb_setupPower, SIGNAL( clicked() ), SLOT( slotSetupPower() ) );
- connect( pb_setupCrypto, SIGNAL( clicked() ), SLOT( slotSetupCrypto() ) );
-
- connect( cb_useCrypto, SIGNAL( toggled( bool ) ),
- pb_setupCrypto, SLOT( setEnabled( bool ) ) );
- connect( cb_pmEnabled, SIGNAL( toggled( bool ) ),
- pb_setupPower, SLOT( setEnabled( bool ) ) );
- connect( cb_runScript, SIGNAL( toggled( bool ) ),
- lb_connectScript, SLOT( setEnabled( bool ) ) );
- connect( cb_runScript, SIGNAL( toggled( bool ) ),
- lb_connectScript, SLOT( setEnabled( bool ) ) );
- connect( cb_runScript, SIGNAL( toggled( bool ) ),
- lb_connectScript, SLOT( setEnabled( bool ) ) );
- connect( cb_Autodetect, SIGNAL( toggled( bool ) ),
- le_interface, SLOT( setDisabled( bool ) ) );
-
- connect( cb_Autodetect, SIGNAL( toggled( bool ) ),
- this, SLOT ( slotResetInterface( bool ) ) );
+ connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) );
+ connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) );
+ connect( le_networkName, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+ connect( cmb_wifiMode, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
+ connect( cmb_speed, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
+ connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) );
+ connect( url_connectScript, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+ connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) );
+ connect( le_interface, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+
+ connect( pb_setupPower, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupPower() ) );
+ connect( pb_setupCrypto, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupCrypto() ) );
+
+ connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ),
+ pb_setupCrypto, TQT_SLOT( setEnabled( bool ) ) );
+ connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ),
+ pb_setupPower, TQT_SLOT( setEnabled( bool ) ) );
+ connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ),
+ lb_connectScript, TQT_SLOT( setEnabled( bool ) ) );
+ connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ),
+ lb_connectScript, TQT_SLOT( setEnabled( bool ) ) );
+ connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ),
+ lb_connectScript, TQT_SLOT( setEnabled( bool ) ) );
+ connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ),
+ le_interface, TQT_SLOT( setDisabled( bool ) ) );
+
+ connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT ( slotResetInterface( bool ) ) );
}
void IfConfigPage::slotResetInterface( bool checked )
@@ -120,7 +120,7 @@ void IfConfigPage::save()
IfConfig &ifconfig = config->m_ifConfig[ m_configNum ];
ifconfig.m_networkName = le_networkName->text();
- ifconfig.m_interface = cb_Autodetect->isChecked()? QString::null :
+ ifconfig.m_interface = cb_Autodetect->isChecked()? TQString::null :
le_interface->text();
ifconfig.m_wifiMode = ( IfConfig::WifiMode ) cmb_wifiMode->currentItem();
ifconfig.m_speed = ( IfConfig::Speed ) cmb_speed->currentItem();
diff --git a/wifi/kcmwifi/ifconfigpage.h b/wifi/kcmwifi/ifconfigpage.h
index d7db8a93..bb79f215 100644
--- a/wifi/kcmwifi/ifconfigpage.h
+++ b/wifi/kcmwifi/ifconfigpage.h
@@ -28,7 +28,7 @@ class IfConfigPage : public IfConfigPageBase
Q_OBJECT
public:
- IfConfigPage( int configNum, QWidget *parent, const char *name );
+ IfConfigPage( int configNum, TQWidget *parent, const char *name );
~IfConfigPage() {}
void load();
diff --git a/wifi/kcmwifi/kcmwifi.cpp b/wifi/kcmwifi/kcmwifi.cpp
index 693edc92..743f3d2e 100644
--- a/wifi/kcmwifi/kcmwifi.cpp
+++ b/wifi/kcmwifi/kcmwifi.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kaboutdata.h>
#include <kdebug.h>
@@ -39,13 +39,13 @@
#include "wificonfig.h"
#include "vendorconfig.h"
-typedef KGenericFactory < KCMWifi, QWidget > KWiFiFactory;
+typedef KGenericFactory < KCMWifi, TQWidget > KWiFiFactory;
K_EXPORT_COMPONENT_FACTORY (kcm_wifi, KWiFiFactory("kcmwifi") )
-KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &)
+KCMWifi::KCMWifi(TQWidget * parent, const char *name, const TQStringList &)
: KCModule (parent, name)
{
- tabs = new QTabWidget (this, "tabs");
+ tabs = new TQTabWidget (this, "tabs");
m_mainConfig = new MainConfig(this, "m_mainConfig");
@@ -55,18 +55,18 @@ KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &)
{
IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" );
tabs->addTab(ifConfigPage, i18n ("Config &%1").arg( i+1 ));
- connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) );
+ connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) );
m_ifConfigPage[ i ] = ifConfigPage;
}
- QVBoxLayout *top = new QVBoxLayout (this, 0, KDialog::spacingHint());
+ TQVBoxLayout *top = new TQVBoxLayout (this, 0, KDialog::spacingHint());
top->addWidget( tabs );
top->addWidget( m_mainConfig );
top->addStretch();
- connect(m_mainConfig, SIGNAL(changed()), SLOT( slotChanged() ) );
- connect(m_mainConfig, SIGNAL(activateClicked()), SLOT(slotActivate()));
+ connect(m_mainConfig, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) );
+ connect(m_mainConfig, TQT_SIGNAL(activateClicked()), TQT_SLOT(slotActivate()));
if ( geteuid() != 0 )
{
@@ -147,7 +147,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor )
{
IfConfigPage *ifConfigPage = new IfConfigPage( vendorBase + m_activeVendorCount, tabs, "m_configPage" );
tabs->addTab(ifConfigPage, i18n ("Vendor %1").arg( m_activeVendorCount+1 ) );
- connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) );
+ connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) );
m_ifConfigPage[ vendorBase+m_activeVendorCount ] = ifConfigPage;
m_mainConfig->registerConfig( vendorBase+m_activeVendorCount );
m_activeVendorCount++;
@@ -170,7 +170,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor )
{
IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" );
tabs->insertTab(ifConfigPage, i18n ("Config &%1").arg( i+1 ), i );
- connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) );
+ connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) );
m_ifConfigPage[ i ] = ifConfigPage;
m_mainConfig->registerConfig( i+1 );
retval = ifConfigPage;
@@ -203,7 +203,7 @@ void KCMWifi::activate()
{
KProcess proc;
- QStringList failedParts;
+ TQStringList failedParts;
WifiConfig *config = WifiConfig::instance();
int index;
@@ -219,7 +219,7 @@ void KCMWifi::activate()
IfConfig ifconfig = config->m_ifConfig[ index ];
- QString tempInterface;
+ TQString tempInterface;
if ( ifconfig.m_interface.isEmpty() ) {
tempInterface = config->autoDetectInterface();
@@ -295,8 +295,8 @@ void KCMWifi::activate()
if ( ifconfig.m_keys[ i ].isValid( ifconfig.m_keys[ i ].key() ) > INVALID )
{
proc << "key"
- << QString( "[%1]").arg( i+1 )
- << QString( "%1").arg( ifconfig.m_keys[ i ].rawKey() );
+ << TQString( "[%1]").arg( i+1 )
+ << TQString( "%1").arg( ifconfig.m_keys[ i ].rawKey() );
}
}
@@ -308,7 +308,7 @@ void KCMWifi::activate()
proc << "key"
<< ifconfig.cryptomodeAsString();
proc << "key"
- << QString( "[%1]" ).arg( ifconfig.activeKeyId() );
+ << TQString( "[%1]" ).arg( ifconfig.activeKeyId() );
proc << "key"
<< "on";
}
@@ -334,10 +334,10 @@ void KCMWifi::activate()
{
proc << "power"
<< "period"
- << QString( "%1" ).arg( ifconfig.m_wakeupPeriod );
+ << TQString( "%1" ).arg( ifconfig.m_wakeupPeriod );
proc << "power"
<< "timeout"
- << QString( "%1" ).arg( ifconfig.m_sleepTimeout );
+ << TQString( "%1" ).arg( ifconfig.m_sleepTimeout );
proc << ifconfig.powermodeAsString();
}
@@ -361,7 +361,7 @@ void KCMWifi::activate()
if ( ifconfig.m_runScript )
{
proc.clearArguments();
- proc << QStringList::split( " ", ifconfig.m_connectScript );
+ proc << TQStringList::split( " ", ifconfig.m_connectScript );
proc.start(KProcess::DontCare);
}
diff --git a/wifi/kcmwifi/kcmwifi.h b/wifi/kcmwifi/kcmwifi.h
index 87822ac0..5ba2af33 100644
--- a/wifi/kcmwifi/kcmwifi.h
+++ b/wifi/kcmwifi/kcmwifi.h
@@ -23,7 +23,7 @@
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class IfConfigPage;
class MainConfig;
@@ -34,7 +34,7 @@ class KCMWifi : public KCModule
{
Q_OBJECT
public:
- KCMWifi (QWidget * parent, const char *name, const QStringList &);
+ KCMWifi (TQWidget * parent, const char *name, const TQStringList &);
~KCMWifi ();
void load();
@@ -55,7 +55,7 @@ protected slots:
private:
MainConfig *m_mainConfig;
IfConfigPage *m_ifConfigPage[ 15 ]; // that makes 5 vendor configs
- QTabWidget* tabs;
+ TQTabWidget* tabs;
int m_activeVendorCount;
};
diff --git a/wifi/kcmwifi/mainconfig.cpp b/wifi/kcmwifi/mainconfig.cpp
index 9cdcfcec..c740df69 100644
--- a/wifi/kcmwifi/mainconfig.cpp
+++ b/wifi/kcmwifi/mainconfig.cpp
@@ -30,10 +30,10 @@
#include <kpushbutton.h>
#include <knuminput.h>
-#include <qcheckbox.h>
-#include <qfile.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
-MainConfig::MainConfig( QWidget *parent, const char *name )
+MainConfig::MainConfig( TQWidget *parent, const char *name )
: MainConfigBase( parent, name )
{
WifiConfig *config = WifiConfig::instance();
@@ -43,12 +43,12 @@ MainConfig::MainConfig( QWidget *parent, const char *name )
}
- connect( cb_usePreset, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
- connect( cmb_presetConfig, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
- connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
+ connect( cb_usePreset, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) );
+ connect( cmb_presetConfig, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
+ connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SIGNAL( changed() ) );
- connect( pb_activate, SIGNAL( clicked() ), SIGNAL( activateClicked() ) );
- connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SLOT( slotChangeNumConfigs( int ) ) );
+ connect( pb_activate, TQT_SIGNAL( clicked() ), TQT_SIGNAL( activateClicked() ) );
+ connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotChangeNumConfigs( int ) ) );
}
diff --git a/wifi/kcmwifi/mainconfig.h b/wifi/kcmwifi/mainconfig.h
index 55458fa4..edc09560 100644
--- a/wifi/kcmwifi/mainconfig.h
+++ b/wifi/kcmwifi/mainconfig.h
@@ -30,7 +30,7 @@ class MainConfig : public MainConfigBase
Q_OBJECT
public:
- MainConfig( QWidget *parent, const char *name=0 );
+ MainConfig( TQWidget *parent, const char *name=0 );
~MainConfig() {}
void load();
diff --git a/wifi/kcmwifi/vendorconfig.cpp b/wifi/kcmwifi/vendorconfig.cpp
index 36460c4a..e415c276 100644
--- a/wifi/kcmwifi/vendorconfig.cpp
+++ b/wifi/kcmwifi/vendorconfig.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klineedit.h>
@@ -54,19 +54,19 @@ VendorConfig::initSuSE_92plus ( )
/* configurations are located in /etc/sysconfig/network/ifcfg-wlan*
there can be more than one if there are multiple wireless interfaces */
- QDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" );
- QStringList files = filelist.entryList ( );
+ TQDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" );
+ TQStringList files = filelist.entryList ( );
if ( files.count() == 0 )
{
return;
}
- for ( QStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it )
+ for ( TQStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it )
{
if ( ( ( *it ).endsWith ( "~" ) ) == false )
{ // ignore backup files
- QFile configfile ( QString ( "/etc/sysconfig/network/%1" ).arg ( *it ) );
+ TQFile configfile ( TQString ( "/etc/sysconfig/network/%1" ).arg ( *it ) );
configfile.open ( IO_ReadOnly );
kdDebug ( ) << "Opened SuSE configuration file " << configfile.name ( ) << "\n";
@@ -82,12 +82,12 @@ VendorConfig::initSuSE_92plus ( )
WifiConfig *config = WifiConfig::instance ( );
IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs];
- QString buffer;
+ TQString buffer;
while ( configfile.readLine ( buffer, 255 ) != -1 )
{
// lines look like WIRELESS_ESSID='bla', so split it into WIRELESS_ESSID and bla
- QString var = buffer.section ( '=', 0, 0 );
- QString value = buffer.section ( '=', 1, 1 );
+ TQString var = buffer.section ( '=', 0, 0 );
+ TQString value = buffer.section ( '=', 1, 1 );
value = value.mid ( 1, value.length ( ) - 3 );
kdDebug ( ) << "Variable " << var << " contains " << value << ".\n";
// evaluate the meaningful lines
@@ -157,7 +157,7 @@ VendorConfig::initSuSE_92plus ( )
void
VendorConfig::initDebian ( )
{
- QFile configfile ( QString ( "/etc/network/interfaces" ) );
+ TQFile configfile ( TQString ( "/etc/network/interfaces" ) );
if ( !configfile.open ( IO_ReadOnly ) )
{
return;
@@ -176,12 +176,12 @@ is incremented _after_ successful setup of each given config. */
WifiConfig *config = WifiConfig::instance ( );
IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs];
- QString buffer;
+ TQString buffer;
while ( configfile.readLine ( buffer, 255 ) != -1 )
{
// lines look like wireless-defaultkey bla, so split it into wireless-defaultkey and bla
- QString var = buffer.section ( ' ', 0, 0 );
- QString value = buffer.section ( ' ', 1, 1 );
+ TQString var = buffer.section ( ' ', 0, 0 );
+ TQString value = buffer.section ( ' ', 1, 1 );
kdDebug ( ) << "Variable " << var << " contains " << value << ".\n";
// evaluate the meaningful lines
if ( var.startsWith ( "wireless", false ) )
diff --git a/wifi/kcmwifi/wificonfig.cpp b/wifi/kcmwifi/wificonfig.cpp
index 5afd041f..53f1c7e0 100644
--- a/wifi/kcmwifi/wificonfig.cpp
+++ b/wifi/kcmwifi/wificonfig.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <ksimpleconfig.h>
#include <kglobal.h>
@@ -28,23 +28,23 @@
#include "wificonfig.h"
-static QStringList speedList;
-static QStringList wifiModeList;
-static QStringList cryptoModeList;
-static QStringList powerModeList;
+static TQStringList speedList;
+static TQStringList wifiModeList;
+static TQStringList cryptoModeList;
+static TQStringList powerModeList;
Key::Key()
{
}
-Key::Key( const QString &key )
+Key::Key( const TQString &key )
{
setKey( key );
}
-QString Key::rawKey() const
+TQString Key::rawKey() const
{
- QString s = m_key;
+ TQString s = m_key;
if ( isValid( m_key ) >= STRING_64 )
s = "s:" + s;
@@ -52,12 +52,12 @@ QString Key::rawKey() const
return s;
}
-void Key::setKey( const QString &key )
+void Key::setKey( const TQString &key )
{
m_key = key;
}
-KeyStates Key::isValid ( QString keyCandidate )
+KeyStates Key::isValid ( TQString keyCandidate )
{
if (keyCandidate.isEmpty()) {
kdDebug() << "Ignoring key: empty.\n";
@@ -117,9 +117,9 @@ IfConfig::IfConfig()
void IfConfig::load( KConfig *config, int i )
{
- QString entry;
+ TQString entry;
- QString group = QString( "Configuration %1" ).arg( i+1 );
+ TQString group = TQString( "Configuration %1" ).arg( i+1 );
config->setGroup( group );
m_networkName = config->readEntry( "NetworkName" );
@@ -150,7 +150,7 @@ void IfConfig::load( KConfig *config, int i )
void IfConfig::save( KConfig *config, int i )
{
- QString group = QString( "Configuration %1" ).arg( i+1 );
+ TQString group = TQString( "Configuration %1" ).arg( i+1 );
config->setGroup( group );
config->writeEntry( "NetworkName", m_networkName );
@@ -227,11 +227,11 @@ void WifiConfig::save()
m_config->sync();
}
-QString WifiConfig::autoDetectInterface()
+TQString WifiConfig::autoDetectInterface()
{
m_detectedInterface.truncate( 0 );
- QFile procFile ( "/proc/net/dev" );
+ TQFile procFile ( "/proc/net/dev" );
if ( !procFile.open( IO_ReadOnly ) )
{
@@ -240,8 +240,8 @@ QString WifiConfig::autoDetectInterface()
return m_detectedInterface;
}
- QStringList list;
- QString line;
+ TQStringList list;
+ TQString line;
while ( !procFile.atEnd() )
{
@@ -262,14 +262,14 @@ QString WifiConfig::autoDetectInterface()
return m_detectedInterface;
}
- for ( QStringList::Iterator it = list.begin (); it != list.end (); ++it )
+ for ( TQStringList::Iterator it = list.begin (); it != list.end (); ++it )
{
if ( ((*it).contains("wifi"))==0 ) { // if the name is wifiX, ignore
KProcIO test;
test << "iwconfig";
test << *it;
- connect( &test, SIGNAL( readReady( KProcIO * ) ),
- this, SLOT( slotTestInterface( KProcIO * ) ) );
+ connect( &test, TQT_SIGNAL( readReady( KProcIO * ) ),
+ this, TQT_SLOT( slotTestInterface( KProcIO * ) ) );
test.start ( KProcess::Block );
}
}
@@ -286,7 +286,7 @@ QString WifiConfig::autoDetectInterface()
void WifiConfig::slotTestInterface( KProcIO *proc )
{
- QString output;
+ TQString output;
proc->readln( output );
if ( output.find ( "no wireless extensions" ) == -1 )
{
@@ -295,22 +295,22 @@ void WifiConfig::slotTestInterface( KProcIO *proc )
}
}
-QString IfConfig::speedAsString()
+TQString IfConfig::speedAsString()
{
return speedList[ m_speed ];
}
-QString IfConfig::wifimodeAsString()
+TQString IfConfig::wifimodeAsString()
{
return wifiModeList[ m_wifiMode ];
}
-QString IfConfig::cryptomodeAsString()
+TQString IfConfig::cryptomodeAsString()
{
return cryptoModeList[ m_cryptoMode ];
}
-QString IfConfig::powermodeAsString()
+TQString IfConfig::powermodeAsString()
{
return powerModeList[ m_pmMode ];
}
@@ -325,42 +325,42 @@ Key IfConfig::activeKey()
return m_keys[ m_activeKey-1 ];
}
-IfConfig::Speed IfConfig::convertToSpeedFromString( const QString &s )
+IfConfig::Speed IfConfig::convertToSpeedFromString( const TQString &s )
{
return ( IfConfig::Speed )speedList.findIndex( s );
}
-void IfConfig::speedFromString( const QString &s )
+void IfConfig::speedFromString( const TQString &s )
{
m_speed = convertToSpeedFromString( s );
}
-IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const QString &s )
+IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const TQString &s )
{
return ( IfConfig::WifiMode )wifiModeList.findIndex( s );
}
-void IfConfig::wifimodeFromString( const QString &s )
+void IfConfig::wifimodeFromString( const TQString &s )
{
m_wifiMode = convertToWifiModeFromString( s );
}
-IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const QString &s )
+IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const TQString &s )
{
return ( IfConfig::CryptoMode )cryptoModeList.findIndex( s );
}
-void IfConfig::cryptomodeFromString( const QString &s )
+void IfConfig::cryptomodeFromString( const TQString &s )
{
m_cryptoMode = convertToCryptoModeFromString( s );
}
-IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const QString &s )
+IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const TQString &s )
{
return ( IfConfig::PowerMode )powerModeList.findIndex( s );
}
-void IfConfig::powermodeFromString( const QString &s )
+void IfConfig::powermodeFromString( const TQString &s )
{
m_pmMode = convertToPowerModeFromString( s );
}
diff --git a/wifi/kcmwifi/wificonfig.h b/wifi/kcmwifi/wificonfig.h
index b9186298..b78e32f6 100644
--- a/wifi/kcmwifi/wificonfig.h
+++ b/wifi/kcmwifi/wificonfig.h
@@ -20,8 +20,8 @@
#ifndef WIFICONFIG_H
#define WIFICONFIG_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kcmwifi.h"
@@ -33,20 +33,20 @@ enum KeyStates { EMPTY=0, INVALID=1, HEX_64=2, HEX_128=3, HEX_256=4, STRING_64=5
class Key
{
public:
- Key( const QString &key );
+ Key( const TQString &key );
Key();
- QString key() const { return m_key; }
- static KeyStates isValid( QString keyCandidate );
- QString rawKey() const;
+ TQString key() const { return m_key; }
+ static KeyStates isValid( TQString keyCandidate );
+ TQString rawKey() const;
- void setKey( const QString &key );
+ void setKey( const TQString &key );
protected:
- QString m_key;
+ TQString m_key;
};
-typedef QValueList<Key> KeyList;
+typedef TQValueList<Key> KeyList;
class IfConfig
{
@@ -61,29 +61,29 @@ class IfConfig
void load( KConfig *config, int i );
void save( KConfig *config, int i );
- QString speedAsString();
- QString wifimodeAsString();
- QString cryptomodeAsString();
- QString powermodeAsString();
+ TQString speedAsString();
+ TQString wifimodeAsString();
+ TQString cryptomodeAsString();
+ TQString powermodeAsString();
int activeKeyId();
Key activeKey();
- static Speed convertToSpeedFromString( const QString &s );
- static WifiMode convertToWifiModeFromString( const QString &s );
- static PowerMode convertToPowerModeFromString( const QString &s );
- static CryptoMode convertToCryptoModeFromString( const QString &s );
+ static Speed convertToSpeedFromString( const TQString &s );
+ static WifiMode convertToWifiModeFromString( const TQString &s );
+ static PowerMode convertToPowerModeFromString( const TQString &s );
+ static CryptoMode convertToCryptoModeFromString( const TQString &s );
- void speedFromString( const QString &s );
- void wifimodeFromString( const QString &s );
- void powermodeFromString( const QString &s );
- void cryptomodeFromString( const QString &s );
+ void speedFromString( const TQString &s );
+ void wifimodeFromString( const TQString &s );
+ void powermodeFromString( const TQString &s );
+ void cryptomodeFromString( const TQString &s );
- QString m_networkName;
- QString m_interface;
+ TQString m_networkName;
+ TQString m_interface;
WifiMode m_wifiMode;
Speed m_speed;
bool m_runScript;
- QString m_connectScript;
+ TQString m_connectScript;
bool m_useCrypto;
CryptoMode m_cryptoMode;
@@ -101,7 +101,7 @@ class WifiConfig : QObject
Q_OBJECT
public:
static WifiConfig *instance();
- QString autoDetectInterface();
+ TQString autoDetectInterface();
~WifiConfig();
void load();
@@ -120,7 +120,7 @@ class WifiConfig : QObject
KSimpleConfig *m_config;
static WifiConfig *m_instance;
- QString m_detectedInterface;
+ TQString m_detectedInterface;
};
#endif // WIFICONFIG_H
diff --git a/wifi/kwifimanager.cpp b/wifi/kwifimanager.cpp
index 5e64a683..4267b7ed 100644
--- a/wifi/kwifimanager.cpp
+++ b/wifi/kwifimanager.cpp
@@ -20,14 +20,14 @@
#include <fstream>
// include files for QT
-#include <qdatetime.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
// include files for KDE
#include <kapplication.h>
@@ -62,10 +62,10 @@
#define ID_STATUS_MSG 1
-QStringList APs;
+TQStringList APs;
bool useAlternateStrengthCalc;
-KWiFiManagerApp::KWiFiManagerApp (QWidget *, const char *name):
+KWiFiManagerApp::KWiFiManagerApp (TQWidget *, const char *name):
DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(false), m_iconSize( 22 )
{
statistik = 0;
@@ -73,11 +73,11 @@ DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(f
useAlternateStrengthCalc = false;
init_whois_db ();
- QStringList *ignoreInterfaces;
+ TQStringList *ignoreInterfaces;
if (kapp->isRestored())
- ignoreInterfaces = new QStringList();
+ ignoreInterfaces = new TQStringList();
else
- ignoreInterfaces = new QStringList( usedInterfacesList() );
+ ignoreInterfaces = new TQStringList( usedInterfacesList() );
// substitute the following line with a different interface if required
device = new Interface_wireless_wirelessextensions (ignoreInterfaces);
@@ -102,14 +102,14 @@ DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(f
fileDisableRadio->setEnabled (false);
#endif
- counter = new QTimer (this);
- connect (counter, SIGNAL (timeout ()), device, SLOT (poll_device_info()));
+ counter = new TQTimer (this);
+ connect (counter, TQT_SIGNAL (timeout ()), device, TQT_SLOT (poll_device_info()));
counter->start (1000);
- tricorder_trigger = new QTimer ();
- connect (tricorder_trigger, SIGNAL (timeout ()), this,
- SLOT (tricorder_beep ()));
- connect (trayicon, SIGNAL (quitSelected ()), this, SLOT (slotFileQuit ()));
+ tricorder_trigger = new TQTimer ();
+ connect (tricorder_trigger, TQT_SIGNAL (timeout ()), this,
+ TQT_SLOT (tricorder_beep ()));
+ connect (trayicon, TQT_SIGNAL (quitSelected ()), this, TQT_SLOT (slotFileQuit ()));
slotToggleTric(); //set to value saved by KConfig
setAutoSaveSettings();
@@ -143,26 +143,26 @@ void
KWiFiManagerApp::init_whois_db ()
{
KStandardDirs finder;
- QString kdedir =
+ TQString kdedir =
finder.findResourceDir ("data", "kwifimanager/locations/NOWHERE.loc");
kdedir += "kwifimanager/locations/";
- QDir *locations = new QDir (kdedir);
+ TQDir *locations = new TQDir (kdedir);
if (!locations->exists ())
kdDebug () <<
"A grave error occurred while searching for files with AccessPoint information." << endl;
- QStringList *entries = new QStringList (locations->entryList ());
- QString content;
- QString content2;
- for (QStringList::Iterator it = entries->begin (); it != entries->end ();
+ TQStringList *entries = new TQStringList (locations->entryList ());
+ TQString content;
+ TQString content2;
+ for (TQStringList::Iterator it = entries->begin (); it != entries->end ();
it++)
{
if ((*it) != "." && (*it) != "..")
{
- QFile datei (kdedir + (*it));
+ TQFile datei (kdedir + (*it));
datei.open (IO_ReadOnly);
while (datei.readLine (content, 255) != -1)
{
- QString temp (content);
+ TQString temp (content);
content.truncate (content.find (' '));
content = content.upper ();
content2 = temp.right (temp.length () - temp.find (' ') - 1);
@@ -177,14 +177,14 @@ KWiFiManagerApp::init_whois_db ()
}
void
-KWiFiManagerApp::slotLogESSID (QString essid)
+KWiFiManagerApp::slotLogESSID (TQString essid)
{
- QFile log_file( locateLocal( "data", "kwifimanager/kwifimanager.log", true ) );
+ TQFile log_file( locateLocal( "data", "kwifimanager/kwifimanager.log", true ) );
kdDebug() << "Log file is " << log_file.name() << endl;
if (!log_file.open (IO_WriteOnly | IO_Append))
kdDebug () << "Logging failed!" << endl;
- QTextStream stream (&log_file);
- stream << QDateTime::currentDateTime().toString ().latin1 ();
+ TQTextStream stream (&log_file);
+ stream << TQDateTime::currentDateTime().toString ().latin1 ();
stream << " Entering network: " << essid.latin1() << endl;
log_file.close ();
}
@@ -198,13 +198,13 @@ KWiFiManagerApp::slotTXPowerChanged ()
void
KWiFiManagerApp::slotChangeTrayIcon ()
{
- QPixmap* ICON;
+ TQPixmap* ICON;
int sig, noi, str;
double freq = 0.;
bool validdata = device->get_current_quality (sig, noi, str);
if ( settingsUseAlternateCalc->isChecked() ) str = sig - noi;
int mode;
- QLabel sstrength2( i18n("N/A"), 0, 0 );
+ TQLabel sstrength2( i18n("N/A"), 0, 0 );
if ( ( device->get_txpower_disabled() ) || ( !device->get_device_freq ( freq ) ) )
{
@@ -220,49 +220,49 @@ KWiFiManagerApp::slotChangeTrayIcon ()
}
else if (validdata && (str > 45))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->EXCELLENT;
if (led->state == false)
led->On ();
}
else if (validdata && (str > 35))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->EXCELLENT;
if (led->state == false)
led->On ();
}
else if (validdata && (str > 25))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->EXCELLENT;
if (led->state == false)
led->On ();
}
else if (validdata && (str > 15))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->GOOD;
if (led->state == false)
led->On ();
}
else if (validdata && (str > 5))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->MARGINAL;
if (led->state == false)
led->On ();
}
else if (validdata && (str > 0))
{
- sstrength2.setText( QString::number(str) );
+ sstrength2.setText( TQString::number(str) );
ICON = strength->OOR_MINIMUM;
if (led->state == true)
led->Off ();
}
else if (((str == 0) && (mode == 2)) || (!validdata))
{
- sstrength2.setText( QString::fromLatin1("0") );
+ sstrength2.setText( TQString::fromLatin1("0") );
ICON = strength->OOR_DOWN;
if (led->state == true)
led->Off ();
@@ -274,28 +274,28 @@ KWiFiManagerApp::slotChangeTrayIcon ()
led->Off ();
}
- QPixmap temp (m_iconSize+8, m_iconSize+8);
- QPainter bla (&temp);
+ TQPixmap temp (m_iconSize+8, m_iconSize+8);
+ TQPainter bla (&temp);
bla.fillRect (0, 0, m_iconSize+8, m_iconSize+8, backgroundBrush ());
- bla.drawPixmap ( QRect(1, 4, m_iconSize+2,m_iconSize+2), *ICON );
+ bla.drawPixmap ( TQRect(1, 4, m_iconSize+2,m_iconSize+2), *ICON );
if (showStrength) {
- static QFont labelfont ( "Helvetica", 10 );
+ static TQFont labelfont ( "Helvetica", 10 );
- labelfont.setStyleHint( QFont::SansSerif );
- labelfont.setStretch( QFont::Condensed );
+ labelfont.setStyleHint( TQFont::SansSerif );
+ labelfont.setStretch( TQFont::Condensed );
labelfont.setBold( true );
sstrength2.setFont( labelfont );
sstrength2.setFixedSize( sstrength2.sizeHint() );
}
- QPixmap labeltemp = QPixmap::grabWidget( &sstrength2 );
+ TQPixmap labeltemp = TQPixmap::grabWidget( &sstrength2 );
labeltemp.setMask( labeltemp.createHeuristicMask() );
bla.drawPixmap (0, 0, labeltemp );
temp.setMask (temp.createHeuristicMask() );
trayicon->setPixmap ( temp );
this->setIcon( temp );
- QToolTip::add( trayicon, "SSID: "+device->get_essid() );
+ TQToolTip::add( trayicon, "SSID: "+device->get_essid() );
}
void
@@ -305,43 +305,43 @@ KWiFiManagerApp::initActions ()
if (config->hasGroup("General"))
config->setGroup("General");
fileDisableRadio = new KToggleAction (i18n ("&Disable Radio"), 0, this,
- SLOT (slotDisableRadio ()), actionCollection (), "disable_radio");
+ TQT_SLOT (slotDisableRadio ()), actionCollection (), "disable_radio");
fileDisableRadio->setChecked( false );
settingsUseAlternateCalc =
new KToggleAction (i18n ("&Use Alternate Strength Calculation"), 0, this,
- SLOT (slotToggleStrengthCalc ()), actionCollection (), "use_alt_calculation");
+ TQT_SLOT (slotToggleStrengthCalc ()), actionCollection (), "use_alt_calculation");
settingsUseAlternateCalc->setChecked( config->readBoolEntry("useAlternateStrengthCalculation") );
slotToggleStrengthCalc(); //set to value saved by KConfig
settingsShowStatsNoise =
new KToggleAction (i18n ("Show &Noise Graph in Statistics Window"), 0, this,
- SLOT (slotShowStatsNoise ()), actionCollection (), "show_stats_noise");
+ TQT_SLOT (slotShowStatsNoise ()), actionCollection (), "show_stats_noise");
settingsShowStatsNoise->setChecked( config->readBoolEntry("showStatsNoise") );
slotShowStatsNoise(); //set to value saved by KConfig
settingsShowStrengthNumber = new KToggleAction (i18n ("&Show Strength Number in System Tray"), 0, this,
- SLOT (slotToggleShowStrengthNumber ()), actionCollection (), "show_strength_number_in_tray");
+ TQT_SLOT (slotToggleShowStrengthNumber ()), actionCollection (), "show_strength_number_in_tray");
settingsShowStrengthNumber->setChecked( config->readBoolEntry("showStrengthNumberInTray") );
slotToggleShowStrengthNumber (); //set to value saved by KConfig
- KStdAction::quit (this, SLOT (slotFileQuit ()), actionCollection ());
+ KStdAction::quit (this, TQT_SLOT (slotFileQuit ()), actionCollection ());
new KAction (i18n ("Configuration &Editor..."), 0, this,
- SLOT (slotStartConfigEditor ()), actionCollection (), "configuration_editor");
+ TQT_SLOT (slotStartConfigEditor ()), actionCollection (), "configuration_editor");
new KAction (i18n ("Connection &Statistics"), 0, this,
- SLOT (slotStartStatViewer ()), actionCollection (), "connection_statistics");
+ TQT_SLOT (slotStartStatViewer ()), actionCollection (), "connection_statistics");
settingsAcousticScanning = new KToggleAction (i18n ("&Acoustic Scanning"), 0, this,
- SLOT (slotToggleTric ()),
+ TQT_SLOT (slotToggleTric ()),
actionCollection (), "acoustic_scanning");
settingsAcousticScanning->setChecked( config->readBoolEntry("acousticScanning") );
#ifdef WITHOUT_ARTS
settingsAcousticScanning->setEnabled( false);
#endif
settingsStayInSystrayOnClose = new KToggleAction (i18n ("Stay in System &Tray on Close"), 0, this,
- SLOT (slotToggleStayInSystray()),
+ TQT_SLOT (slotToggleStayInSystray()),
actionCollection (), "stay_in_systray_on_close");
settingsStayInSystrayOnClose->setChecked( config->readBoolEntry("stayInSystrayOnClose") );
createGUI();
@@ -357,22 +357,22 @@ KWiFiManagerApp::initView ()
trayicon = new KSystemTray (this);
trayicon->show ();
- view = new QWidget (this, "mainwidget");
+ view = new TQWidget (this, "mainwidget");
view->setBackgroundMode (PaletteBackground);
setCentralWidget (view);
- QGridLayout *zentrallayout = new QGridLayout (view);
+ TQGridLayout *zentrallayout = new TQGridLayout (view);
zentrallayout->setMargin( KDialog::marginHint() );
speedmeter = new Speed (view, device);
status = new Status (view, device);
location = new Locator (view, device);
strength = new Strength (view, device);
pictogram = new Picture (view, device);
- scan = new QPushButton (i18n("Scan for &Networks..."),view);
+ scan = new TQPushButton (i18n("Scan for &Networks..."),view);
slotChangeWindowCaption ();
- QToolTip::add (strength, i18n ("The current signal strength"));
- QToolTip::add (speedmeter, i18n ("The speed at which the wireless LAN card is operating"));
- QToolTip::add (status, i18n ("Detailed connection status"));
- QToolTip::add (scan, i18n ("Performs a scan to discover the networks you can log into"));
+ TQToolTip::add (strength, i18n ("The current signal strength"));
+ TQToolTip::add (speedmeter, i18n ("The speed at which the wireless LAN card is operating"));
+ TQToolTip::add (status, i18n ("Detailed connection status"));
+ TQToolTip::add (scan, i18n ("Performs a scan to discover the networks you can log into"));
pictogram->setMinimumSize (pictogram->mySizeHint());
strength->setMinimumSize (strength->mySizeHint());
speedmeter->setMinimumHeight (60);
@@ -383,20 +383,20 @@ KWiFiManagerApp::initView ()
zentrallayout->addMultiCellWidget (status, 1, 2, 1, 1);
zentrallayout->addWidget (scan, 2, 0);
zentrallayout->addMultiCellWidget (location, 3, 3, 0, 1, Qt::AlignLeft);
- connect (device, SIGNAL (interfaceChanged ()), this, SLOT (slotChangeWindowCaption ()));
- connect (device, SIGNAL (strengthChanged ()), this, SLOT (slotChangeTrayIcon ()));
- connect (device, SIGNAL (strengthChanged ()), strength, SLOT (repaint ()));
- connect (device, SIGNAL (statusChanged ()), status, SLOT (repaint ()));
- connect (device, SIGNAL (speedChanged ()), speedmeter, SLOT (repaint ()));
- connect (device, SIGNAL (modeChanged ()), pictogram, SLOT (repaint ()));
- connect (device, SIGNAL (essidChanged (QString)), this, SLOT (slotLogESSID (QString)));
- connect (device, SIGNAL (essidChanged (QString)), location, SLOT (repaint ()));
- connect (device, SIGNAL (statusChanged ()), location, SLOT (repaint ()));
- connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotTXPowerChanged ()));
- connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotChangeTrayIcon ()));
- connect (device, SIGNAL (txPowerChanged ()), pictogram, SLOT (repaint ()));
- connect (device, SIGNAL (txPowerChanged ()), strength, SLOT (repaint ()));
- connect (scan, SIGNAL (clicked()), this, SLOT (slotNetworkScan()));
+ connect (device, TQT_SIGNAL (interfaceChanged ()), this, TQT_SLOT (slotChangeWindowCaption ()));
+ connect (device, TQT_SIGNAL (strengthChanged ()), this, TQT_SLOT (slotChangeTrayIcon ()));
+ connect (device, TQT_SIGNAL (strengthChanged ()), strength, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (statusChanged ()), status, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (speedChanged ()), speedmeter, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (modeChanged ()), pictogram, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (essidChanged (TQString)), this, TQT_SLOT (slotLogESSID (TQString)));
+ connect (device, TQT_SIGNAL (essidChanged (TQString)), location, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (statusChanged ()), location, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (txPowerChanged ()), this, TQT_SLOT (slotTXPowerChanged ()));
+ connect (device, TQT_SIGNAL (txPowerChanged ()), this, TQT_SLOT (slotChangeTrayIcon ()));
+ connect (device, TQT_SIGNAL (txPowerChanged ()), pictogram, TQT_SLOT (repaint ()));
+ connect (device, TQT_SIGNAL (txPowerChanged ()), strength, TQT_SLOT (repaint ()));
+ connect (scan, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotNetworkScan()));
}
void
@@ -427,7 +427,7 @@ KWiFiManagerApp::slotStartStatViewer ()
delete statistik;
statistik = new Statistics (device, showStatsNoise);
statistik->setFixedSize (590, 300);
- connect(device,SIGNAL(statsUpdated()),statistik,SLOT(repaint()));
+ connect(device,TQT_SIGNAL(statsUpdated()),statistik,TQT_SLOT(repaint()));
statistik->show ();
}
@@ -439,13 +439,13 @@ KWiFiManagerApp::slotDisableRadio ()
if ( disablePower != 0 && disablePower->isRunning() ) {
return;
}
- QString interface = device->get_interface_name();
+ TQString interface = device->get_interface_name();
if (interface.isEmpty()) {
return;
}
- QString onOrOff;
+ TQString onOrOff;
if ( fileDisableRadio->isChecked() ) {
onOrOff = "on";
} else {
@@ -460,7 +460,7 @@ KWiFiManagerApp::slotDisableRadio ()
//*disablePower << "kdesu" << "iwconfig" << "eth1" << "txpower" << onOrOff;
*disablePower << "kdesu" << "iwconfig" << interface << "txpower" << onOrOff;
- connect( disablePower, SIGNAL(processExited(KProcess*)), this, SLOT(slotDisablePowerProcessExited()) );
+ connect( disablePower, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotDisablePowerProcessExited()) );
disablePower->start(KProcess::NotifyOnExit);
}
@@ -578,7 +578,7 @@ void KWiFiManagerApp::readProperties( KConfig* conf)
else
hide();
- QString dev = conf->readEntry( "wifidevice" );
+ TQString dev = conf->readEntry( "wifidevice" );
if (!dev.isEmpty())
device->setActiveDevice(dev);
}
@@ -605,7 +605,7 @@ KWiFiManagerApp::queryExit()
}
// List of network interfaces used by all running kwifimanager applications
-QStringList usedInterfacesList()
+TQStringList usedInterfacesList()
{
// Register with DCOP
DCOPClient *client = kapp->dcopClient();
@@ -613,19 +613,19 @@ QStringList usedInterfacesList()
client->setDefaultObject( "dcop_interface" );
// shamelessly stolen from kdelibs/kio/booksmarks/kbookmarkimporter_crash.cc
- QStringList ignoreInterfaces;
+ TQStringList ignoreInterfaces;
QCStringList apps = client->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- QCString &clientId = *it;
+ TQCString &clientId = *it;
if ( qstrncmp(clientId, "kwifimanager", 12) != 0 )
continue;
DCOPRef ask( clientId, "dcop_interface" );
DCOPReply reply = ask.call( "interface()" );
- QString interface;
+ TQString interface;
if ( reply.isValid() ) {
- QString i = reply;
+ TQString i = reply;
interface = i;
}
if (!interface.isEmpty())
diff --git a/wifi/kwifimanager.h b/wifi/kwifimanager.h
index cdf8c726..3d814b4e 100644
--- a/wifi/kwifimanager.h
+++ b/wifi/kwifimanager.h
@@ -47,7 +47,7 @@ class Statistics;
class NetworkScanning;
class Led;
-extern QStringList usedInterfacesList();
+extern TQStringList usedInterfacesList();
enum speedlevels
{ AUTO, M1, M2, M55, M11 };
@@ -58,21 +58,21 @@ enum cryptomodes
struct configuration_data
{
- QString net_name[5];
- QString disp_name[5];
+ TQString net_name[5];
+ TQString disp_name[5];
bool managed[5];
bool crypto_enabled[5];
int active_crypto_key[5];
- QString active_key_string[5];
- QString crypto1[5], crypto2[5], crypto3[5], crypto4[5];
+ TQString active_key_string[5];
+ TQString crypto1[5], crypto2[5], crypto3[5], crypto4[5];
bool crypto_is_string1[5], crypto_is_string2[5], crypto_is_string3[5],
crypto_is_string4[5];
cryptomodes crypto_mode[5];
bool pm_enabled[5];
int sleep_time[5];
- QString sleep_time_string[5];
+ TQString sleep_time_string[5];
int wake_time[5];
- QString wake_time_string[5];
+ TQString wake_time_string[5];
speedlevels bitrate[5];
packetmode packet[5];
};
@@ -80,9 +80,9 @@ struct configuration_data
class KWiFiManagerApp:public KMainWindow, virtual public dcop_interface
{
Q_OBJECT public:
- KWiFiManagerApp (QWidget * parent = 0, const char * name = 0);
+ KWiFiManagerApp (TQWidget * parent = 0, const char * name = 0);
~KWiFiManagerApp ();
- QString interface () const { return device ? device->get_interface_name() : QString::null; };
+ TQString interface () const { return device ? device->get_interface_name() : TQString::null; };
public:
bool startDocked() { return m_startDocked; }
public slots:
@@ -96,7 +96,7 @@ Q_OBJECT public:
void slotToggleStayInSystray ();
void slotChangeTrayIcon ();
void slotChangeWindowCaption ();
- void slotLogESSID (QString essid);
+ void slotLogESSID (TQString essid);
void slotTXPowerChanged ();
void slotShowStatsNoise ();
void slotNetworkScan();
@@ -110,14 +110,14 @@ private:
void initActions ();
void initView ();
Speed *speedmeter;
- QBoxLayout *bla;
- QLabel *profil;
+ TQBoxLayout *bla;
+ TQLabel *profil;
Status *status;
Strength *strength;
Picture *pictogram;
Locator *location;
NetworkScanning* scanwidget;
- QWidget *view;
+ TQWidget *view;
Statistics *statistik;
KToggleAction *fileDisableRadio;
KToggleAction *settingsUseAlternateCalc;
@@ -127,10 +127,10 @@ private:
KToggleAction *settingsShowStrengthNumber;
KSystemTray *trayicon;
void init_whois_db ();
- QTimer *tricorder_trigger, *counter;
- QPixmap *pixmap;
+ TQTimer *tricorder_trigger, *counter;
+ TQPixmap *pixmap;
Interface_wireless *device;
- QPushButton * scan;
+ TQPushButton * scan;
Led *led;
KProcess* disablePower;
bool showStrength;
diff --git a/wifi/kwireless/kwireless.cpp b/wifi/kwireless/kwireless.cpp
index ff584603..39b66a76 100644
--- a/wifi/kwireless/kwireless.cpp
+++ b/wifi/kwireless/kwireless.cpp
@@ -17,8 +17,8 @@
#include "kwirelesswidget.h"
-KWireLess::KWireLess(const QString& configFile, Type type,
- int actions, QWidget *parent, const char *name)
+KWireLess::KWireLess(const TQString& configFile, Type type,
+ int actions, TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name)
{
ksConfig = config();
@@ -68,7 +68,7 @@ int KWireLess::heightForWidth(int) const
return widget->preferredHeight();
}
-void KWireLess::resizeEvent(QResizeEvent *)
+void KWireLess::resizeEvent(TQResizeEvent *)
{
widget->setGeometry(0, 0, width(), height());
}
@@ -76,7 +76,7 @@ void KWireLess::resizeEvent(QResizeEvent *)
extern "C"
{
- KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile)
+ KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile)
{
KGlobal::locale()->insertCatalogue("kwireless");
return new KWireLess(configFile, KPanelApplet::Normal,
diff --git a/wifi/kwireless/kwireless.h b/wifi/kwireless/kwireless.h
index 5a4597af..828ad184 100644
--- a/wifi/kwireless/kwireless.h
+++ b/wifi/kwireless/kwireless.h
@@ -15,7 +15,7 @@
#endif
#include <kpanelapplet.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kconfig.h>
class KWireLessWidget;
@@ -25,8 +25,8 @@ class KWireLess : public KPanelApplet
Q_OBJECT
public:
- KWireLess(const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0);
+ KWireLess(const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *parent = 0, const char *name = 0);
~KWireLess();
virtual int widthForHeight(int height) const;
@@ -36,7 +36,7 @@ public:
virtual void preferences();
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
private:
KConfig *ksConfig;
diff --git a/wifi/kwireless/kwirelesswidget.cpp b/wifi/kwireless/kwirelesswidget.cpp
index 3ae2ff8c..08f4336b 100644
--- a/wifi/kwireless/kwirelesswidget.cpp
+++ b/wifi/kwireless/kwirelesswidget.cpp
@@ -7,11 +7,11 @@
http://www.hackerbuero.org $
*/
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qcolor.h>
-#include <qpointarray.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqcolor.h>
+#include <tqpointarray.h>
#include <kglobalsettings.h>
#include <kdebug.h>
#include <kpassivepopup.h>
@@ -25,12 +25,12 @@ extern "C" {
#include <math.h>
}
-QPtrList<DeviceInfo> KWireLessWidget::deviceInfo;
-QMutex KWireLessWidget::mutex;
-QTimer *KWireLessWidget::timer;
+TQPtrList<DeviceInfo> KWireLessWidget::deviceInfo;
+TQMutex KWireLessWidget::mutex;
+TQTimer *KWireLessWidget::timer;
int KWireLessWidget::m_instances;
-DeviceInfo::DeviceInfo(QString _device, QString _essid, QString _encr,
+DeviceInfo::DeviceInfo(TQString _device, TQString _essid, TQString _encr,
float _quality, float _signal, float _noise,
int _bitrate)
: m_device(_device),
@@ -48,9 +48,9 @@ float DeviceInfo::quality()
return m_quality;
}
-QString DeviceInfo::qualityString()
+TQString DeviceInfo::qualityString()
{
- return i18n("%1%").arg(QString::number(m_quality*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_quality*100, 'f', 0));
}
float DeviceInfo::signal()
@@ -58,9 +58,9 @@ float DeviceInfo::signal()
return m_signal;
}
-QString DeviceInfo::signalString()
+TQString DeviceInfo::signalString()
{
- return i18n("%1%").arg(QString::number(m_signal*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_signal*100, 'f', 0));
}
float DeviceInfo::noise()
@@ -68,26 +68,26 @@ float DeviceInfo::noise()
return m_noise ;
}
-QString DeviceInfo::noiseString()
+TQString DeviceInfo::noiseString()
{
- return i18n("%1%").arg(QString::number(m_noise*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_noise*100, 'f', 0));
}
-const QString& DeviceInfo::device()
+const TQString& DeviceInfo::device()
{
return m_device;
}
-const QString& DeviceInfo::essid()
+const TQString& DeviceInfo::essid()
{
return m_essid;
}
-QString DeviceInfo::bitrateString()
+TQString DeviceInfo::bitrateString()
{
- QString bitrate;
- QTextOStream b(&bitrate);
+ TQString bitrate;
+ TQTextOStream b(&bitrate);
b.precision(2);
switch((int)log10(m_bitrate))
@@ -123,7 +123,7 @@ bool DeviceInfo::usesEncryption()
return !m_encr.isEmpty();
}
-QString DeviceInfo::encrString()
+TQString DeviceInfo::encrString()
{
if(m_encr.isEmpty())
{
@@ -135,8 +135,8 @@ QString DeviceInfo::encrString()
}
}
-KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name)
- : QWidget(parent, name),
+KWireLessWidget::KWireLessWidget(TQWidget *parent, const char* name)
+ : TQWidget(parent, name),
mode(Horizontal),
frameWidth(1),
qualityBarWidth(6),
@@ -149,8 +149,8 @@ KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name)
if(timer == 0)
{ // this way, only the poll() method of the first instance will
// ever be called (intended behaviour):
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(poll()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(poll()));
// single shot, will be restartet at the end of poll ()
timer->start(100, true);
}
@@ -181,26 +181,26 @@ void KWireLessWidget::setMode(KWireLessWidget::Mode _mode)
mode = _mode;
}
-void KWireLessWidget::mousePressEvent(QMouseEvent *e)
+void KWireLessWidget::mousePressEvent(TQMouseEvent *e)
{
- if( e->button() == QMouseEvent::LeftButton)
+ if( e->button() == TQMouseEvent::LeftButton)
{
PropertiesDialog dialog(this);
- connect(this, SIGNAL(updateDeviceInfo(QPtrList<DeviceInfo> *)),
- &dialog, SLOT(update(QPtrList<DeviceInfo> *)));
+ connect(this, TQT_SIGNAL(updateDeviceInfo(TQPtrList<DeviceInfo> *)),
+ &dialog, TQT_SLOT(update(TQPtrList<DeviceInfo> *)));
dialog.exec();
}
}
-void KWireLessWidget::paintEvent(QPaintEvent*)
+void KWireLessWidget::paintEvent(TQPaintEvent*)
{
// WORK_TO_DO: paint other devices, too:
// for quick repaints, we need a buffered painter!
int w, h, space;
const int bevel = qualityBarWidth/2;
- QPainter painter(this);
- QPointArray points;
- QColor color, brush;
+ TQPainter painter(this);
+ TQPointArray points;
+ TQColor color, brush;
// do stuff that does not rely on device being valid (e.g.,
// non-nil):
@@ -216,7 +216,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
w = space;
}
- painter.setPen(QPen(Qt::black, frameWidth));
+ painter.setPen(TQPen(Qt::black, frameWidth));
painter.setBrush(KGlobalSettings::baseColor());
painter.drawRect(0, 0, w, h);
@@ -267,12 +267,12 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
QMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1,
frameWidth, frameWidth+qualityBarWidth-1);
}
- painter.setPen(QPen(color));
+ painter.setPen(TQPen(color));
painter.setBrush(brush);
painter.drawPolygon(points);
// draw the signal bar:
- painter.setPen(QPen(Qt::darkRed));
+ painter.setPen(TQPen(Qt::darkRed));
painter.setBrush(Qt::red);
if(mode == Vertical)
@@ -289,7 +289,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
painter.drawRect(x, y, w1, signalBarWidth);
}
// draw the noise bar:
- painter.setPen(QPen(Qt::gray));
+ painter.setPen(TQPen(Qt::gray));
painter.setBrush(Qt::lightGray);
if(mode == Vertical)
@@ -308,7 +308,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
}
}
-KWireLessWidget* KWireLessWidget::makeWireLessWidget(QWidget *parent,
+KWireLessWidget* KWireLessWidget::makeWireLessWidget(TQWidget *parent,
const char *name)
{
#if 1
diff --git a/wifi/kwireless/kwirelesswidget.h b/wifi/kwireless/kwirelesswidget.h
index 5a374d07..3321b583 100644
--- a/wifi/kwireless/kwirelesswidget.h
+++ b/wifi/kwireless/kwirelesswidget.h
@@ -10,32 +10,32 @@
#ifndef KWIRELESS_WIDGET_H
#define KWIRELESS_WIDGET_H
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qmutex.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqmutex.h>
+#include <tqstringlist.h>
class DeviceInfo
{
public:
- DeviceInfo(QString _device=QString::null, QString _essid=QString::null,
- QString _encr=QString::null,
+ DeviceInfo(TQString _device=TQString::null, TQString _essid=TQString::null,
+ TQString _encr=TQString::null,
float _quality=0, float _signal=0, float _noise=0,
int _bitrate=0);
- QString bitrateString();
+ TQString bitrateString();
float quality();
- QString qualityString();
+ TQString qualityString();
float signal();
- QString signalString();
+ TQString signalString();
float noise();
- QString noiseString();
- const QString& device();
- const QString& essid();
+ TQString noiseString();
+ const TQString& device();
+ const TQString& essid();
bool usesEncryption();
- QString encrString();
+ TQString encrString();
protected:
- QString m_device; // the device name (e.g., eth1)
- QString m_essid; // the network name
+ TQString m_device; // the device name (e.g., eth1)
+ TQString m_essid; // the network name
// all this values are coefficients (values between 0 and 1):
float m_quality; // link quality level
@@ -43,7 +43,7 @@ protected:
float m_signal; // the signal level
// all these values are absolut, e.g., 11000000 = 11MBit/sec:
int m_bitrate; // bit rate
- QString m_encr;
+ TQString m_encr;
};
/** This wigdet displays the information about one wireless device.
@@ -58,10 +58,10 @@ public:
Horizontal,
Vertical
};
- static KWireLessWidget* makeWireLessWidget(QWidget *parent = 0,
+ static KWireLessWidget* makeWireLessWidget(TQWidget *parent = 0,
const char *name = 0);
protected:
- KWireLessWidget(QWidget *parent=0, const char* name=0);
+ KWireLessWidget(TQWidget *parent=0, const char* name=0);
public:
~KWireLessWidget();
void setMode(Mode);
@@ -70,8 +70,8 @@ public:
int preferredWidth();
int instances();
protected:
- void paintEvent(QPaintEvent*);
- void mousePressEvent(QMouseEvent *e);
+ void paintEvent(TQPaintEvent*);
+ void mousePressEvent(TQMouseEvent *e);
protected:
Mode mode;
int frameWidth;
@@ -81,12 +81,12 @@ protected:
// some static device information
// a list of DeviceInfo objects, this needs to be filled by the
// poll method:
- static QPtrList<DeviceInfo> deviceInfo;
- static QTimer *timer; // the poll timer
- static QMutex mutex;
+ static TQPtrList<DeviceInfo> deviceInfo;
+ static TQTimer *timer; // the poll timer
+ static TQMutex mutex;
static int m_instances;
signals:
- void updateDeviceInfo(QPtrList<DeviceInfo> *);
+ void updateDeviceInfo(TQPtrList<DeviceInfo> *);
protected slots:
/** poll() is system dependent and needs to be implemented by
deriving classes.
diff --git a/wifi/kwireless/linuxwirelesswidget.cpp b/wifi/kwireless/linuxwirelesswidget.cpp
index de35b84b..3efdbf98 100644
--- a/wifi/kwireless/linuxwirelesswidget.cpp
+++ b/wifi/kwireless/linuxwirelesswidget.cpp
@@ -7,8 +7,8 @@
http://www.hackerbuero.org $
*/
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
#include <unistd.h> // for ::close
@@ -21,9 +21,9 @@ extern "C" {
}
int LinuxWireLessWidget::socketFD;
-QStringList LinuxWireLessWidget::deviceNames;
+TQStringList LinuxWireLessWidget::deviceNames;
-LinuxWireLessWidget::LinuxWireLessWidget(QWidget *parent, const char* name)
+LinuxWireLessWidget::LinuxWireLessWidget(TQWidget *parent, const char* name)
: KWireLessWidget(parent, name),
m_number (-1)
{
@@ -37,7 +37,7 @@ LinuxWireLessWidget::~LinuxWireLessWidget()
{
kdDebug() << "KWireLessWidget dtor: closing FD, over and out."
<< endl;
- ::close(socketFD); // prevent from using QWidget::close
+ ::close(socketFD); // prevent from using TQWidget::close
socketFD = 0;
}
}
@@ -91,7 +91,7 @@ void LinuxWireLessWidget::poll()
}
// ----- get the device information:
- QStringList::Iterator it;
+ TQStringList::Iterator it;
deviceInfo.clear();
for(it=deviceNames.begin(); it!=deviceNames.end(); ++it)
@@ -110,7 +110,7 @@ void LinuxWireLessWidget::poll()
} else {
// WORK_TO_DO: decide whether updates are needed or not
// create a DeviceInfo object and fill it:
- QString dev, essid, encr;
+ TQString dev, essid, encr;
float quality=0, signal=0, noise=0;
int bitrate;
@@ -192,7 +192,7 @@ void LinuxWireLessWidget::poll()
if(updateToolTip)
{
DeviceInfo *info;
- QString text;
+ TQString text;
for(info=deviceInfo.first(); info; info=deviceInfo.next())
{
@@ -203,7 +203,7 @@ void LinuxWireLessWidget::poll()
.arg(info->qualityString())
.arg(info->bitrateString());
}
- QToolTip::add(this, text);
+ TQToolTip::add(this, text);
updateToolTip = false;
}
diff --git a/wifi/kwireless/linuxwirelesswidget.h b/wifi/kwireless/linuxwirelesswidget.h
index 3bbd085c..fe695d68 100644
--- a/wifi/kwireless/linuxwirelesswidget.h
+++ b/wifi/kwireless/linuxwirelesswidget.h
@@ -16,7 +16,7 @@ class LinuxWireLessWidget : public KWireLessWidget
{
Q_OBJECT
public:
- LinuxWireLessWidget(QWidget *parent=0, const char* name=0);
+ LinuxWireLessWidget(TQWidget *parent=0, const char* name=0);
~LinuxWireLessWidget();
protected:
/** poll() is supposed to read the information from
@@ -24,7 +24,7 @@ protected:
void poll();
static int socketFD; // the socket file descriptor to talk to the
// driver
- static QStringList deviceNames;
+ static TQStringList deviceNames;
static int devEnumHandler(int skfd,
char * ifname,
char * args[],
diff --git a/wifi/kwireless/propertytable.cpp b/wifi/kwireless/propertytable.cpp
index 7011c691..7c73b1c2 100644
--- a/wifi/kwireless/propertytable.cpp
+++ b/wifi/kwireless/propertytable.cpp
@@ -7,11 +7,11 @@
http://www.hackerbuero.org $
*/
-#include <qtable.h>
-#include <qcombobox.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
+#include <tqtable.h>
+#include <tqcombobox.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
#include <kdialogbase.h>
#include <klocale.h>
#include "propertytable.h"
@@ -21,7 +21,7 @@ extern "C" {
#include <math.h>
}
-PropertyTable::PropertyTable(QWidget *parent, const char* name)
+PropertyTable::PropertyTable(TQWidget *parent, const char* name)
: PropertyTableBase(parent, name)
{
}
@@ -30,7 +30,7 @@ PropertyTable::~PropertyTable()
{
}
-PropertiesDialog::PropertiesDialog(QWidget *parent, const char *name)
+PropertiesDialog::PropertiesDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true,
i18n("Wireless Network Device Properties"),
KDialogBase::Ok, KDialogBase::Ok, true),
@@ -42,14 +42,14 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, const char *name)
table->table->setSorting(false);
table->table->setReadOnly(true);
adjustSize();
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(timeout()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
timer->start(3000, false);
- connect(table->cbDeviceSelector, SIGNAL(activated(int)),
- SLOT(selected(int)));
+ connect(table->cbDeviceSelector, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(selected(int)));
}
-void PropertiesDialog::update(QPtrList<DeviceInfo> *_info)
+void PropertiesDialog::update(TQPtrList<DeviceInfo> *_info)
{
int selection = table->cbDeviceSelector->currentItem();
@@ -57,7 +57,7 @@ void PropertiesDialog::update(QPtrList<DeviceInfo> *_info)
info = _info;
DeviceInfo *device;
- QPtrListIterator<DeviceInfo> it(*info);
+ TQPtrListIterator<DeviceInfo> it(*info);
table->cbDeviceSelector->clear();
@@ -102,7 +102,7 @@ void PropertiesDialog::selected(int index)
device = info->at(index);
}
- QString fields[] =
+ TQString fields[] =
{
i18n("Device:"),
i18n("ESSID (network name):"),
@@ -114,7 +114,7 @@ void PropertiesDialog::selected(int index)
};
const int NoOfFields = sizeof(fields)/sizeof(fields[0]);
- QString values[] =
+ TQString values[] =
{
device->device(),
device->essid(),
diff --git a/wifi/kwireless/propertytable.h b/wifi/kwireless/propertytable.h
index 4eadc78a..b8b7f004 100644
--- a/wifi/kwireless/propertytable.h
+++ b/wifi/kwireless/propertytable.h
@@ -11,7 +11,7 @@
#define KWIRELESS_PROPERTYTABLE_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "propertytablebase.h"
class DeviceInfo;
@@ -21,7 +21,7 @@ class PropertyTable : public PropertyTableBase
{
Q_OBJECT
public:
- PropertyTable(QWidget *parent = 0, const char* name = 0);
+ PropertyTable(TQWidget *parent = 0, const char* name = 0);
~PropertyTable();
};
@@ -30,14 +30,14 @@ class PropertiesDialog : public KDialogBase
{
Q_OBJECT
public:
- PropertiesDialog(QWidget *parent = 0, const char *name = 0);
+ PropertiesDialog(TQWidget *parent = 0, const char *name = 0);
protected:
PropertyTable *table;
- QPtrList<DeviceInfo> *info;
+ TQPtrList<DeviceInfo> *info;
bool wait;
- QTimer *timer;
+ TQTimer *timer;
public slots:
- void update(QPtrList<DeviceInfo> *);
+ void update(TQPtrList<DeviceInfo> *);
void timeout();
void selected(int);
};
diff --git a/wifi/locator.cpp b/wifi/locator.cpp
index dc4e4ce1..ad4e7945 100644
--- a/wifi/locator.cpp
+++ b/wifi/locator.cpp
@@ -15,13 +15,13 @@
* *
***************************************************************************/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "locator.h"
#include "interface_wireless.h"
-extern QStringList APs;
+extern TQStringList APs;
-Locator::Locator (QWidget * parent, Interface_wireless * device):QWidget (parent,
+Locator::Locator (TQWidget * parent, Interface_wireless * device):TQWidget (parent,
"KwiFiManager")
{
this->device = device;
@@ -30,10 +30,10 @@ Locator::Locator (QWidget * parent, Interface_wireless * device):QWidget (parent
void
Locator::generateLocWidget ()
{
- QString mac, ip;
+ TQString mac, ip;
device->get_AP_info (mac, ip);
sentence =
- new QLabel (i18n ("AccessPoint: ") + whois (mac.local8Bit (), APs), this);
+ new TQLabel (i18n ("AccessPoint: ") + whois (mac.local8Bit (), APs), this);
setFixedSize (QSize
(sentence->sizeHint ().width () + 2,
sentence->sizeHint ().height ()));
@@ -42,14 +42,14 @@ Locator::generateLocWidget ()
(sentence->sizeHint ().width () + 2,
sentence->sizeHint ().height ()));
sentence->show ();
- widgetbild = QPixmap::grabWidget (sentence);
+ widgetbild = TQPixmap::grabWidget (sentence);
delete sentence;
}
void
-Locator::paintEvent (QPaintEvent *)
+Locator::paintEvent (TQPaintEvent *)
{
- QPainter *locatorpainter = new QPainter (this);
+ TQPainter *locatorpainter = new TQPainter (this);
generateLocWidget ();
locatorpainter->drawPixmap (0, 0, widgetbild);
delete locatorpainter;
diff --git a/wifi/locator.h b/wifi/locator.h
index af63c70c..54f2c683 100644
--- a/wifi/locator.h
+++ b/wifi/locator.h
@@ -18,9 +18,9 @@
#ifndef LOCATOR_H
#define LOCATOR_H
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -29,12 +29,12 @@ class Interface_wireless;
class Locator:public QWidget
{
public:
- Locator (QWidget * parent, Interface_wireless * device);
+ Locator (TQWidget * parent, Interface_wireless * device);
private:
- void paintEvent (QPaintEvent *);
+ void paintEvent (TQPaintEvent *);
void generateLocWidget ();
- QPixmap widgetbild;
- QLabel *sentence;
+ TQPixmap widgetbild;
+ TQLabel *sentence;
Interface_wireless *device;
};
diff --git a/wifi/networkscanning.cpp b/wifi/networkscanning.cpp
index 5a15ffbc..7e2a0e12 100644
--- a/wifi/networkscanning.cpp
+++ b/wifi/networkscanning.cpp
@@ -17,11 +17,11 @@
#include <stdio.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtable.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtable.h>
#include <kdebug.h>
#include <klocale.h>
@@ -32,7 +32,7 @@
#include "networkscanning.h"
#include "interface_wireless.h"
-NetworkScanning::NetworkScanning (Interface_wireless * dev, QWidget * parent, const char * name ) : QWidget ( parent, name ) {
+NetworkScanning::NetworkScanning (Interface_wireless * dev, TQWidget * parent, const char * name ) : TQWidget ( parent, name ) {
device = dev;
networkScan();
}
@@ -52,24 +52,24 @@ NetworkScanning::networkScan ()
if ( networks->text( i, 3 ) == i18n( "off" )) networks->setRowReadOnly( i, true );
}
- networks->setSelectionMode(QTable::SingleRow);
- connect(networks,SIGNAL(selectionChanged()),this,SLOT(checkWEP()));
+ networks->setSelectionMode(TQTable::SingleRow);
+ connect(networks,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(checkWEP()));
this->setCaption( i18n( "Scan Results" ) );
- QGridLayout* networkSelectionLayout = new QGridLayout ( this, 2, 3, 0, 5);
- switchNet = new QPushButton( i18n( "Switch to Network..." ), this );
+ TQGridLayout* networkSelectionLayout = new TQGridLayout ( this, 2, 3, 0, 5);
+ switchNet = new TQPushButton( i18n( "Switch to Network..." ), this );
switchNet->setEnabled(false);
- QPushButton* close = new QPushButton( i18n( "Close" ), this );
+ TQPushButton* close = new TQPushButton( i18n( "Close" ), this );
- networks->reparent( this, QPoint( 0, 0 ) );
+ networks->reparent( this, TQPoint( 0, 0 ) );
networks->setLeftMargin( 0 );
networks->verticalHeader()->hide();
- connect ( close, SIGNAL( clicked() ), this, SLOT( hide() ) );
- connect ( switchNet, SIGNAL( clicked() ), this, SLOT( switchToNetwork() ) );
- connect ( networks, SIGNAL( currentChanged(int,int)), this, SLOT( checkSettings(int,int)));
- connect ( networks, SIGNAL( valueChanged(int,int)), this, SLOT( checkSettings(int,int)));
+ connect ( close, TQT_SIGNAL( clicked() ), this, TQT_SLOT( hide() ) );
+ connect ( switchNet, TQT_SIGNAL( clicked() ), this, TQT_SLOT( switchToNetwork() ) );
+ connect ( networks, TQT_SIGNAL( currentChanged(int,int)), this, TQT_SLOT( checkSettings(int,int)));
+ connect ( networks, TQT_SIGNAL( valueChanged(int,int)), this, TQT_SLOT( checkSettings(int,int)));
networkSelectionLayout->addMultiCellWidget( networks, 0, 0, 0, 2 );
networkSelectionLayout->addWidget( switchNet, 1, 0 );
@@ -113,20 +113,20 @@ NetworkScanning::switchToNetwork()
return;
}
- QString cmdline;
+ TQString cmdline;
- KTempFile* tempfile = new KTempFile( QString::null, QString::null, 0700 );
- QString tempfilename = tempfile->name();
+ KTempFile* tempfile = new KTempFile( TQString::null, TQString::null, 0700 );
+ TQString tempfilename = tempfile->name();
- cmdline = (QString)"ifconfig %1 down\n";
+ cmdline = (TQString)"ifconfig %1 down\n";
cmdline = cmdline.arg( device->get_interface_name() );
write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) );
- cmdline = (QString)"iwconfig %1 essid %2 mode %3 enc %4\n";
+ cmdline = (TQString)"iwconfig %1 essid %2 mode %3 enc %4\n";
cmdline = cmdline.arg( device->get_interface_name() );
cmdline = cmdline.arg( KProcess::quote( networks->text( networks->currentRow(), 0 ) ) );
- QString modetemp;
+ TQString modetemp;
if (networks->text( networks->currentRow(), 1 ) == i18n("Managed") ) modetemp = "Managed"; else modetemp = "Ad-Hoc";
cmdline = cmdline.arg( modetemp );
@@ -137,7 +137,7 @@ NetworkScanning::switchToNetwork()
}
write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) );
- cmdline = (QString)"ifconfig %1 up\n";
+ cmdline = (TQString)"ifconfig %1 up\n";
cmdline = cmdline.arg( device->get_interface_name() );
write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) );
diff --git a/wifi/networkscanning.h b/wifi/networkscanning.h
index 5964db3a..a09b7b69 100644
--- a/wifi/networkscanning.h
+++ b/wifi/networkscanning.h
@@ -19,7 +19,7 @@
#ifndef NETWORKSCANNING_H
#define NETWORKSCANNING_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QTable;
class QPushButton;
@@ -34,13 +34,13 @@ class NetworkScanning : public QWidget
Q_OBJECT
public:
- NetworkScanning (Interface_wireless * dev, QWidget * parent = 0, const char * name = 0 );
+ NetworkScanning (Interface_wireless * dev, TQWidget * parent = 0, const char * name = 0 );
protected:
void networkScan ();
- QTable* networks;
+ TQTable* networks;
Interface_wireless * device;
- QPushButton* switchNet;
+ TQPushButton* switchNet;
protected slots:
void checkSettings(int row, int);
diff --git a/wifi/picture.cpp b/wifi/picture.cpp
index 11d77cae..5e4d28c5 100644
--- a/wifi/picture.cpp
+++ b/wifi/picture.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kstandarddirs.h>
#include "picture.h"
#include "interface_wireless.h"
@@ -25,22 +25,22 @@
#define X_OFFSET 20
#define Y_OFFSET 10
-Picture::Picture (QWidget * parent, Interface_wireless * device):QWidget (parent,
+Picture::Picture (TQWidget * parent, Interface_wireless * device):TQWidget (parent,
"picture")
{
this->device = device;
KStandardDirs finder;
kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png");
kdedir += "kwifimanager/pics/";
- NO_CARD = new QPixmap (kdedir + "no_card.png");
- AD_HOC = new QPixmap (kdedir + "ad_hoc.png");
- ALL_ALONE = new QPixmap (kdedir + "all_alone.png");
- AP_CONNECT = new QPixmap (kdedir + "ap_connect.png");
+ NO_CARD = new TQPixmap (kdedir + "no_card.png");
+ AD_HOC = new TQPixmap (kdedir + "ad_hoc.png");
+ ALL_ALONE = new TQPixmap (kdedir + "all_alone.png");
+ AP_CONNECT = new TQPixmap (kdedir + "ap_connect.png");
}
-QSize Picture::mySizeHint() {
+TQSize Picture::mySizeHint() {
/* make this quite general, just in case someone uses different icons */
- QSize* temp = new QSize(NO_CARD->size());
+ TQSize* temp = new TQSize(NO_CARD->size());
if (AD_HOC->size().width() > temp->width ()) { temp->setWidth (AD_HOC->size().width ()); }
if (AD_HOC->size().height() > temp->height()) { temp->setHeight(AD_HOC->size().height()); }
if (ALL_ALONE->size().width() > temp->width ()) { temp->setWidth (ALL_ALONE->size().width ()); }
@@ -62,9 +62,9 @@ Picture::~Picture ()
}
void
-Picture::paintEvent (QPaintEvent *)
+Picture::paintEvent (TQPaintEvent *)
{
- QPainter *picturepainter = new QPainter (this);
+ TQPainter *picturepainter = new TQPainter (this);
double freq;
int mode;
device->get_mode (mode);
diff --git a/wifi/picture.h b/wifi/picture.h
index 8d9b6bfc..b863516e 100644
--- a/wifi/picture.h
+++ b/wifi/picture.h
@@ -24,13 +24,13 @@ class QSize;
class Picture:public QWidget
{
public:
- Picture (QWidget * parent, Interface_wireless * device);
- QSize mySizeHint();
+ Picture (TQWidget * parent, Interface_wireless * device);
+ TQSize mySizeHint();
~Picture ();
private:
- void paintEvent (QPaintEvent *);
- QPixmap *NO_CARD, *ALL_ALONE, *AD_HOC, *AP_CONNECT;
- QString kdedir;
+ void paintEvent (TQPaintEvent *);
+ TQPixmap *NO_CARD, *ALL_ALONE, *AD_HOC, *AP_CONNECT;
+ TQString kdedir;
Interface_wireless *device;
};
diff --git a/wifi/speed.cpp b/wifi/speed.cpp
index fdb7256c..ae199d90 100644
--- a/wifi/speed.cpp
+++ b/wifi/speed.cpp
@@ -15,23 +15,23 @@
* *
***************************************************************************/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kdebug.h>
#include "speed.h"
#include "interface_wireless.h"
-Speed::Speed (QWidget * parent, Interface_wireless * device):QWidget (parent,
+Speed::Speed (TQWidget * parent, Interface_wireless * device):TQWidget (parent,
"KWiFiManager")
{
this->device = device;
}
void
-Speed::paintEvent (QPaintEvent *)
+Speed::paintEvent (TQPaintEvent *)
{
- QPainter speedpainter (this);
- QColor farbe;
+ TQPainter speedpainter (this);
+ TQColor farbe;
farbe.setRgb (0, 255, 0);
if (device->get_bitrate () < 6000000)
farbe.setRgb (0, 200, 0);
diff --git a/wifi/speed.h b/wifi/speed.h
index 41f15b70..48b949b3 100644
--- a/wifi/speed.h
+++ b/wifi/speed.h
@@ -18,16 +18,16 @@
#ifndef SPEED_H
#define SPEED_H
-#include <qwidget.h>
+#include <tqwidget.h>
class Interface_wireless;
class Speed:public QWidget
{
public:
- Speed (QWidget * parent, Interface_wireless * device);
+ Speed (TQWidget * parent, Interface_wireless * device);
private:
- void paintEvent (QPaintEvent *);
+ void paintEvent (TQPaintEvent *);
Interface_wireless *device;
};
diff --git a/wifi/statistics.cpp b/wifi/statistics.cpp
index 2ad8d393..a7716de1 100644
--- a/wifi/statistics.cpp
+++ b/wifi/statistics.cpp
@@ -15,13 +15,13 @@
* *
***************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
#include <klocale.h>
#include "statistics.h"
#include "interface_wireless.h"
-Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):QWidget (0,
+Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):TQWidget (0,
"KWiFiManager")
{
this->setCaption (i18n ("Statistics - KWiFiManager"));
@@ -30,10 +30,10 @@ Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):QWidge
}
void
-Statistics::paintEvent (QPaintEvent *)
+Statistics::paintEvent (TQPaintEvent *)
{
- statpainter = new QPainter (this);
- QColor farbe (255, 255, 255);
+ statpainter = new TQPainter (this);
+ TQColor farbe (255, 255, 255);
statpainter->drawText (40, 30, i18n ("Noise/Signal Level Statistics"));
statpainter->drawText (150, 260,
i18n ("BLUE = signal level, RED = noise level"));
@@ -42,8 +42,8 @@ Statistics::paintEvent (QPaintEvent *)
statpainter->drawText (21, 274, i18n ("-240 s"));
statpainter->drawText (510, 274, i18n ("now"));
statpainter->fillRect (41, 41, 480, 201, farbe);
- QPointArray datensatz (240);
- QPointArray datensatz2 (240);
+ TQPointArray datensatz (240);
+ TQPointArray datensatz2 (240);
// we may need to scale the output to fit into the window, so here we
// determine the range of values
int bottom =
@@ -53,8 +53,8 @@ Statistics::paintEvent (QPaintEvent *)
(device->sigLevelMax >
device->noiseLevelMax) ? device->sigLevelMax : device->noiseLevelMax;
int datarange = top - bottom;
- statpainter->drawText (10, 50, QString ("%1").arg (top));
- statpainter->drawText (10, 240, QString ("%1").arg (bottom));
+ statpainter->drawText (10, 50, TQString ("%1").arg (top));
+ statpainter->drawText (10, 240, TQString ("%1").arg (bottom));
// if values are all below 0, this indicates proper dBm values
diff --git a/wifi/statistics.h b/wifi/statistics.h
index f8c99dd9..dc43ef41 100644
--- a/wifi/statistics.h
+++ b/wifi/statistics.h
@@ -24,8 +24,8 @@ class Statistics:public QWidget
public:
Statistics (Interface_wireless * device, bool showStatsNoise);
private:
- QPainter * statpainter;
- void paintEvent (QPaintEvent *);
+ TQPainter * statpainter;
+ void paintEvent (TQPaintEvent *);
Interface_wireless *device;
bool showStatsNoise;
};
diff --git a/wifi/status.cpp b/wifi/status.cpp
index b40fa67d..e7ace893 100644
--- a/wifi/status.cpp
+++ b/wifi/status.cpp
@@ -22,8 +22,8 @@
#include <unistd.h>
#include <sys/types.h>
-Status::Status (QWidget * parent, Interface_wireless * device)
- : QWidget (parent, "KWiFiManager status")
+Status::Status (TQWidget * parent, Interface_wireless * device)
+ : TQWidget (parent, "KWiFiManager status")
{
this->device = device;
}
@@ -38,29 +38,29 @@ bool Status::generateStatsWidget ()
qual = 0;
device->get_current_quality (sig, noi, qual);
content =
- new QGroupBox (2, Qt::Horizontal, i18n ("Status of Active Connection"),
+ new TQGroupBox (2, Qt::Horizontal, i18n ("Status of Active Connection"),
this);
bool has_freq = device->get_device_freq (freq);
if ((!has_freq) || (qual == 0))
{
- stat = new QLabel (i18n ("Searching for network: "), content);
+ stat = new TQLabel (i18n ("Searching for network: "), content);
}
else
- stat = new QLabel (i18n ("Connected to network: "), content);
- net_id = new QLabel (device->get_essid (), content);
- ap_str = new QLabel (i18n ("Access point: "), content);
+ stat = new TQLabel (i18n ("Connected to network: "), content);
+ net_id = new TQLabel (device->get_essid (), content);
+ ap_str = new TQLabel (i18n ("Access point: "), content);
QString
mac,
ip;
device->get_AP_info (mac, ip);
if ((mac != "44:44:44:44:44:44") && (mac != "00:00:00:00:00:00")) {
- ap_ad = new QLabel (mac, content);
+ ap_ad = new TQLabel (mac, content);
} else {
- ap_ad = new QLabel (i18n("- no access point -"),content);
+ ap_ad = new TQLabel (i18n("- no access point -"),content);
}
- local_ip_string = new QLabel (i18n ("Local IP: "), content);
- local_ip_content = new QLabel (device->get_IP_info (), content);
- fr_str = new QLabel (i18n ("Frequency [channel]: "), content);
+ local_ip_string = new TQLabel (i18n ("Local IP: "), content);
+ local_ip_content = new TQLabel (device->get_IP_info (), content);
+ fr_str = new TQLabel (i18n ("Frequency [channel]: "), content);
QString
temp3 = "%1";
QString
@@ -342,10 +342,10 @@ bool Status::generateStatsWidget ()
temp3 = temp3.arg (freq);
}
- fr = new QLabel ( has_freq ? temp2 + " [" + temp3 + "]" : "" , content);
+ fr = new TQLabel ( has_freq ? temp2 + " [" + temp3 + "]" : "" , content);
if (geteuid () == 0)
{
- enc_str = new QLabel (i18n ("Encryption: "), content);
+ enc_str = new TQLabel (i18n ("Encryption: "), content);
QString
key;
int
@@ -356,26 +356,26 @@ bool Status::generateStatsWidget ()
// will the following line suffice?
if (size == 0)
{
- enc = new QLabel (i18n ("off"), content);
+ enc = new TQLabel (i18n ("off"), content);
}
else
- enc = new QLabel (i18n ("active"), content);
+ enc = new TQLabel (i18n ("active"), content);
}
// content->setFixedSize (content->sizeHint ());
content->setMinimumSize(content->sizeHint());
if ( content->minimumWidth() < 280 ) content->setMinimumWidth( 280 );
setFixedSize (content->minimumSize());
content->show ();
- widgetbild = QPixmap::grabWidget (content);
+ widgetbild = TQPixmap::grabWidget (content);
delete
content;
return true;
}
void
-Status::paintEvent (QPaintEvent *)
+Status::paintEvent (TQPaintEvent *)
{
- QPainter *paintArea = new QPainter (this);
+ TQPainter *paintArea = new TQPainter (this);
generateStatsWidget ();
paintArea->drawPixmap (0, 0, widgetbild);
delete paintArea;
diff --git a/wifi/status.h b/wifi/status.h
index 0c7f0d3e..9b8aed52 100644
--- a/wifi/status.h
+++ b/wifi/status.h
@@ -18,25 +18,25 @@
#ifndef STATUS_H
#define STATUS_H
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
class Interface_wireless;
class Status:public QWidget
{
public:
- Status (QWidget * parent, Interface_wireless * device);
+ Status (TQWidget * parent, Interface_wireless * device);
private:
- void paintEvent (QPaintEvent *);
+ void paintEvent (TQPaintEvent *);
bool generateStatsWidget ();
- QGroupBox *content;
- QLabel *stat, *net_id, *ap_str, *ap_ad, *fr_str, *fr, *enc_str, *enc,
+ TQGroupBox *content;
+ TQLabel *stat, *net_id, *ap_str, *ap_ad, *fr_str, *fr, *enc_str, *enc,
*local_ip_content, *local_ip_string;
- QPixmap widgetbild, widgetbildalt;
+ TQPixmap widgetbild, widgetbildalt;
Interface_wireless *device;
};
diff --git a/wifi/strength.cpp b/wifi/strength.cpp
index 0bb43f6c..ad4314c0 100644
--- a/wifi/strength.cpp
+++ b/wifi/strength.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kdebug.h>
@@ -27,25 +27,25 @@
extern bool useAlternateStrengthCalc;
-Strength::Strength (QWidget * parent, Interface_wireless * device):QWidget (parent,
+Strength::Strength (TQWidget * parent, Interface_wireless * device):TQWidget (parent,
"strength")
{
this->device = device;
KStandardDirs finder;
kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png");
kdedir += "kwifimanager/pics/";
- NOT_CON_OFFLINE_ADHOC = new QPixmap (kdedir + "offline.png");
- EXCELLENT = new QPixmap (kdedir + "excellent.png");
- GOOD = new QPixmap (kdedir + "good.png");
- MARGINAL = new QPixmap (kdedir + "marginal.png");
- OOR_MINIMUM = new QPixmap (kdedir + "oor_minimum.png");
- OOR_DOWN = new QPixmap (kdedir + "oor_down.png");
+ NOT_CON_OFFLINE_ADHOC = new TQPixmap (kdedir + "offline.png");
+ EXCELLENT = new TQPixmap (kdedir + "excellent.png");
+ GOOD = new TQPixmap (kdedir + "good.png");
+ MARGINAL = new TQPixmap (kdedir + "marginal.png");
+ OOR_MINIMUM = new TQPixmap (kdedir + "oor_minimum.png");
+ OOR_DOWN = new TQPixmap (kdedir + "oor_down.png");
}
-QSize Strength::mySizeHint ()
+TQSize Strength::mySizeHint ()
{
/* make this quite general, just in case someone uses different icons */
- QSize* temp = new QSize(NOT_CON_OFFLINE_ADHOC->size());
+ TQSize* temp = new TQSize(NOT_CON_OFFLINE_ADHOC->size());
if (EXCELLENT->size().width() > temp->width ()) { temp->setWidth (EXCELLENT->size().width ()); }
if (EXCELLENT->size().height() > temp->height()) { temp->setHeight(EXCELLENT->size().height()); }
if (GOOD->size().width() > temp->width ()) { temp->setWidth (GOOD->size().width ()); }
@@ -62,7 +62,7 @@ QSize Strength::mySizeHint ()
temp->setHeight(temp->height() + 30);
// up to now: this is the height required to get a decent logo display
// now determine height of QLabels to calculate the extra needed height
- QLabel heightTest( "ABC", 0 );
+ TQLabel heightTest( "ABC", 0 );
temp->setHeight( temp->height() + 2 * heightTest.sizeHint().height() + 10 );
return *temp;
}
@@ -77,16 +77,16 @@ Strength::~Strength ()
}
void
-Strength::paintEvent (QPaintEvent * event)
+Strength::paintEvent (TQPaintEvent * event)
{
updateInfo (event);
}
void
-Strength::updateInfo (QPaintEvent *)
+Strength::updateInfo (TQPaintEvent *)
{
- QPainter *strengthpainter = new QPainter (this);
- QString sstrength1, sstrength2( i18n("N/A") );
+ TQPainter *strengthpainter = new TQPainter (this);
+ TQString sstrength1, sstrength2( i18n("N/A") );
int mode;
double freq;
@@ -113,43 +113,43 @@ Strength::updateInfo (QPaintEvent *)
else if (validdata && (strength > 45))
{
sstrength1 = i18n("ULTIMATE");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 35))
{
sstrength1 = i18n("TOP");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 25))
{
sstrength1 = i18n("EXCELLENT");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 15))
{
sstrength1 = i18n("GOOD");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *GOOD);
}
else if (validdata && (strength > 5))
{
sstrength1 = i18n("WEAK");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *MARGINAL);
}
else if (validdata && (strength > 0))
{
sstrength1 = i18n("MINIMUM");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *OOR_MINIMUM);
}
else if (((strength == 0) && (mode == 2)) || (!validdata))
{
sstrength1 = i18n("OUT OF RANGE");
- sstrength2 = QString::fromLatin1("0");
+ sstrength2 = TQString::fromLatin1("0");
strengthpainter->drawPixmap (50, 10, *OOR_DOWN);
}
else
diff --git a/wifi/strength.h b/wifi/strength.h
index b03eb215..c8b9eb0b 100644
--- a/wifi/strength.h
+++ b/wifi/strength.h
@@ -17,7 +17,7 @@
#ifndef STRENGTH_H
#define STRENGTH_H
-#include <qwidget.h>
+#include <tqwidget.h>
class Interface_wireless;
class QSize;
@@ -26,15 +26,15 @@ class Strength:public QWidget
{
Q_OBJECT
public:
- Strength (QWidget * parent, Interface_wireless * device);
- QSize mySizeHint();
+ Strength (TQWidget * parent, Interface_wireless * device);
+ TQSize mySizeHint();
~Strength ();
- QPixmap *NOT_CON_OFFLINE_ADHOC, *OOR_DOWN, *OOR_MINIMUM, *MARGINAL, *GOOD, *EXCELLENT;
+ TQPixmap *NOT_CON_OFFLINE_ADHOC, *OOR_DOWN, *OOR_MINIMUM, *MARGINAL, *GOOD, *EXCELLENT;
public slots:
- void updateInfo (QPaintEvent *);
+ void updateInfo (TQPaintEvent *);
private:
- QString kdedir;
- void paintEvent (QPaintEvent *);
+ TQString kdedir;
+ void paintEvent (TQPaintEvent *);
Interface_wireless *device;
};